diff options
author | Laurent Vivier | 2016-09-29 12:32:44 +0200 |
---|---|---|
committer | David Gibson | 2016-10-06 07:15:40 +0200 |
commit | cf716b31cba278a6dbff585d58fa29d1ae2fe334 (patch) | |
tree | 032a53f614772fee48a21bc215e379f7b6ad650c /tests/libqos/pci.c | |
parent | target-ppc: fix vmx instruction type/type2 (diff) | |
download | qemu-cf716b31cba278a6dbff585d58fa29d1ae2fe334.tar.gz qemu-cf716b31cba278a6dbff585d58fa29d1ae2fe334.tar.xz qemu-cf716b31cba278a6dbff585d58fa29d1ae2fe334.zip |
libqos: add PPC64 PCI support
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
[dwg: Fixed build problem on 32-bit hosts]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests/libqos/pci.c')
-rw-r--r-- | tests/libqos/pci.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/libqos/pci.c b/tests/libqos/pci.c index ed78d91cea..c3f3382b7c 100644 --- a/tests/libqos/pci.c +++ b/tests/libqos/pci.c @@ -263,4 +263,24 @@ void qpci_iounmap(QPCIDevice *dev, void *data) dev->bus->iounmap(dev->bus, data); } - +void qpci_plug_device_test(const char *driver, const char *id, + uint8_t slot, const char *opts) +{ + QDict *response; + char *cmd; + + cmd = g_strdup_printf("{'execute': 'device_add'," + " 'arguments': {" + " 'driver': '%s'," + " 'addr': '%d'," + " %s%s" + " 'id': '%s'" + "}}", driver, slot, + opts ? opts : "", opts ? "," : "", + id); + response = qmp(cmd); + g_free(cmd); + g_assert(response); + g_assert(!qdict_haskey(response, "error")); + QDECREF(response); +} |