aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/ivshmem-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qtest/ivshmem-test.c')
-rw-r--r--tests/qtest/ivshmem-test.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/qtest/ivshmem-test.c b/tests/qtest/ivshmem-test.c
index fe94dd3b96..4e8af42a9d 100644
--- a/tests/qtest/ivshmem-test.c
+++ b/tests/qtest/ivshmem-test.c
@@ -385,7 +385,12 @@ static void test_ivshmem_hotplug(void)
QTestState *qts;
const char *arch = qtest_get_arch();
- qts = qtest_init("-object memory-backend-ram,size=1M,id=mb1");
+ if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
+ qts = qtest_init("-object memory-backend-ram,size=1M,id=mb1"
+ " -machine pc");
+ } else {
+ qts = qtest_init("-object memory-backend-ram,size=1M,id=mb1");
+ }
qtest_qmp_device_add(qts, "ivshmem-plain", "iv1",
"{'addr': %s, 'memdev': 'mb1'}",