]> Git Repo - qemu.git/commitdiff
spapr: support memory unplug for qtest
authorDavid Hildenbrand <[email protected]>
Mon, 18 Feb 2019 09:21:58 +0000 (10:21 +0100)
committerDavid Gibson <[email protected]>
Mon, 25 Feb 2019 22:21:25 +0000 (09:21 +1100)
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: <20190218092202[email protected]>
Signed-off-by: David Gibson <[email protected]>
hw/ppc/spapr_ovec.c

index 318bf33de4b1092061dd407b1a433631522c18c3..12510b236a95d3fb0eee055c2873ed31f979c0cd 100644 (file)
@@ -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;
 }
 
This page took 0.026404 seconds and 4 git commands to generate.