mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
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 <[email protected]> Reviewed-by: Greg Kurz <[email protected]> Acked-by: David Gibson <[email protected]> Signed-off-by: David Hildenbrand <[email protected]> Message-Id: <[email protected]> Signed-off-by: David Gibson <[email protected]>
This commit is contained in:
1 parent
d40bfcbbbb
commit
b8165118f5
1 file changed
+6
@@ -16,6 +16,7 @@
|
||||
#include "qemu/bitmap.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "sysemu/qtest.h"
|
||||
#include "trace.h"
|
||||
#include <libfdt.h>
|
||||
|
||||
@@ -131,6 +132,11 @@ bool spapr_ovec_test(sPAPROptionVector *ov, long bitnr)
|
||||
g_assert(ov);
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user