mirror of https://github.com/xqemu/xqemu.git
spapr: support memory unplug for qtest
Fake availability of OV5_HP_EVT, so we can test memory unplug in qtest. Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20190218092202.26683-3-david@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
d40bfcbbbb
commit
b8165118f5
|
@ -16,6 +16,7 @@
|
||||||
#include "qemu/bitmap.h"
|
#include "qemu/bitmap.h"
|
||||||
#include "exec/address-spaces.h"
|
#include "exec/address-spaces.h"
|
||||||
#include "qemu/error-report.h"
|
#include "qemu/error-report.h"
|
||||||
|
#include "sysemu/qtest.h"
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
#include <libfdt.h>
|
#include <libfdt.h>
|
||||||
|
|
||||||
|
@ -131,6 +132,11 @@ bool spapr_ovec_test(sPAPROptionVector *ov, long bitnr)
|
||||||
g_assert(ov);
|
g_assert(ov);
|
||||||
g_assert(bitnr < OV_MAXBITS);
|
g_assert(bitnr < OV_MAXBITS);
|
||||||
|
|
||||||
|
/* support memory unplug for qtest */
|
||||||
|
if (qtest_enabled() && bitnr == OV5_HP_EVT) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return test_bit(bitnr, ov->bitmap) ? true : false;
|
return test_bit(bitnr, ov->bitmap) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue