Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/812480/?format=api
{ "id": 812480, "url": "http://patchwork.ozlabs.org/api/patches/812480/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170911172022.4738-11-eblake@redhat.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170911172022.4738-11-eblake@redhat.com>", "list_archive_url": null, "date": "2017-09-11T17:19:54", "name": "[v7,10/38] libqos: Move/rename qpci_unplug_acpi_device_test() to pci.c", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "89f249454d13399a77a430625338fea517ab5fae", "submitter": { "id": 6591, "url": "http://patchwork.ozlabs.org/api/people/6591/?format=api", "name": "Eric Blake", "email": "eblake@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170911172022.4738-11-eblake@redhat.com/mbox/", "series": [ { "id": 2534, "url": "http://patchwork.ozlabs.org/api/series/2534/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2534", "date": "2017-09-11T17:19:47", "name": "Preliminary libqtest cleanups", "version": 7, "mbox": "http://patchwork.ozlabs.org/series/2534/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/812480/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/812480/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)", "ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com", "ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=eblake@redhat.com" ], "Received": [ "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrZjP1ChKz9sBd\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 03:31:37 +1000 (AEST)", "from localhost ([::1]:59370 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1drSYZ-00009A-4c\n\tfor incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 13:31:35 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:38384)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1drSOH-0007E2-V5\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 13:20:59 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1drSOG-0001Ae-JF\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 13:20:57 -0400", "from mx1.redhat.com ([209.132.183.28]:39930)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <eblake@redhat.com>)\n\tid 1drSO9-00014O-KF; Mon, 11 Sep 2017 13:20:49 -0400", "from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 79B07C3F80;\n\tMon, 11 Sep 2017 17:20:48 +0000 (UTC)", "from red.redhat.com (ovpn-120-44.rdu2.redhat.com [10.10.120.44])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id E41A35D968;\n\tMon, 11 Sep 2017 17:20:46 +0000 (UTC)" ], "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 79B07C3F80", "From": "Eric Blake <eblake@redhat.com>", "To": "qemu-devel@nongnu.org", "Date": "Mon, 11 Sep 2017 12:19:54 -0500", "Message-Id": "<20170911172022.4738-11-eblake@redhat.com>", "In-Reply-To": "<20170911172022.4738-1-eblake@redhat.com>", "References": "<20170911172022.4738-1-eblake@redhat.com>", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.14", "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tMon, 11 Sep 2017 17:20:48 +0000 (UTC)", "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]", "X-Received-From": "209.132.183.28", "Subject": "[Qemu-devel] [PATCH v7 10/38] libqos: Move/rename\n\tqpci_unplug_acpi_device_test() to pci.c", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.21", "Precedence": "list", "List-Id": "<qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Cc": "thuth@redhat.com, \"open list:virtio-blk\" <qemu-block@nongnu.org>,\n\tAmit Shah <amit@kernel.org>, Jason Wang <jasowang@redhat.com>,\n\tarmbru@redhat.com, Stefan Hajnoczi <stefanha@redhat.com>,\n\tpbonzini@redhat.com", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>" }, "content": "Commit 2f8b2767 originally added qpci_plug_device_test() and\nqpci_unplug_acpi_device_test() as a pair, both in pci-pc.c.\nLater, commit cf716b31 moved one half of the pair to pci.c\nwhen adding PPC64 support. Keep the implementations of the\ntwo functions together, and shorten the name to\nqpci_unplug_device_test(), since all callers use the two\nfunctions in tandem.\n\nSigned-off-by: Eric Blake <eblake@redhat.com>\n---\n tests/libqos/pci.h | 2 +-\n tests/e1000e-test.c | 2 +-\n tests/ivshmem-test.c | 2 +-\n tests/libqos/pci-pc.c | 23 -----------------------\n tests/libqos/pci.c | 23 +++++++++++++++++++++++\n tests/virtio-blk-test.c | 2 +-\n tests/virtio-net-test.c | 2 +-\n tests/virtio-rng-test.c | 2 +-\n 8 files changed, 29 insertions(+), 29 deletions(-)", "diff": "diff --git a/tests/libqos/pci.h b/tests/libqos/pci.h\nindex 429c382282..fdda7eca6e 100644\n--- a/tests/libqos/pci.h\n+++ b/tests/libqos/pci.h\n@@ -111,5 +111,5 @@ QPCIBar qpci_legacy_iomap(QPCIDevice *dev, uint16_t addr);\n\n void qpci_plug_device_test(const char *driver, const char *id,\n uint8_t slot, const char *opts);\n-void qpci_unplug_acpi_device_test(const char *id, uint8_t slot);\n+void qpci_unplug_device_test(const char *id, uint8_t slot);\n #endif\ndiff --git a/tests/e1000e-test.c b/tests/e1000e-test.c\nindex d8085d944e..4c663a3019 100644\n--- a/tests/e1000e-test.c\n+++ b/tests/e1000e-test.c\n@@ -461,7 +461,7 @@ static void test_e1000e_hotplug(gconstpointer data)\n qtest_start(\"-device e1000e\");\n\n qpci_plug_device_test(\"e1000e\", \"e1000e_net\", slot, NULL);\n- qpci_unplug_acpi_device_test(\"e1000e_net\", slot);\n+ qpci_unplug_device_test(\"e1000e_net\", slot);\n\n qtest_end();\n }\ndiff --git a/tests/ivshmem-test.c b/tests/ivshmem-test.c\nindex 37763425ee..8c9ed6a568 100644\n--- a/tests/ivshmem-test.c\n+++ b/tests/ivshmem-test.c\n@@ -427,7 +427,7 @@ static void test_ivshmem_hotplug(void)\n\n qpci_plug_device_test(\"ivshmem\", \"iv1\", PCI_SLOT_HP, opts);\n if (strcmp(arch, \"ppc64\") != 0) {\n- qpci_unplug_acpi_device_test(\"iv1\", PCI_SLOT_HP);\n+ qpci_unplug_device_test(\"iv1\", PCI_SLOT_HP);\n }\n\n qtest_end();\ndiff --git a/tests/libqos/pci-pc.c b/tests/libqos/pci-pc.c\nindex e267fd1a44..6305d142a5 100644\n--- a/tests/libqos/pci-pc.c\n+++ b/tests/libqos/pci-pc.c\n@@ -19,9 +19,6 @@\n #include \"qemu-common.h\"\n\n\n-#define ACPI_PCIHP_ADDR 0xae00\n-#define PCI_EJ_BASE 0x0008\n-\n typedef struct QPCIBusPC\n {\n QPCIBus bus;\n@@ -156,23 +153,3 @@ void qpci_free_pc(QPCIBus *bus)\n\n g_free(s);\n }\n-\n-void qpci_unplug_acpi_device_test(const char *id, uint8_t slot)\n-{\n- QDict *response;\n- char *cmd;\n-\n- cmd = g_strdup_printf(\"{'execute': 'device_del',\"\n- \" 'arguments': {\"\n- \" 'id': '%s'\"\n- \"}}\", id);\n- response = qmp(cmd);\n- g_free(cmd);\n- g_assert(response);\n- g_assert(!qdict_haskey(response, \"error\"));\n- QDECREF(response);\n-\n- outb(ACPI_PCIHP_ADDR + PCI_EJ_BASE, 1 << slot);\n-\n- qmp_eventwait(\"DEVICE_DELETED\");\n-}\ndiff --git a/tests/libqos/pci.c b/tests/libqos/pci.c\nindex 2dcdeade2a..9f36ec73ef 100644\n--- a/tests/libqos/pci.c\n+++ b/tests/libqos/pci.c\n@@ -16,6 +16,9 @@\n #include \"hw/pci/pci_regs.h\"\n #include \"qemu/host-utils.h\"\n\n+#define ACPI_PCIHP_ADDR 0xae00\n+#define PCI_EJ_BASE 0x0008\n+\n void qpci_device_foreach(QPCIBus *bus, int vendor_id, int device_id,\n void (*func)(QPCIDevice *dev, int devfn, void *data),\n void *data)\n@@ -412,3 +415,23 @@ void qpci_plug_device_test(const char *driver, const char *id,\n g_assert(!qdict_haskey(response, \"error\"));\n QDECREF(response);\n }\n+\n+void qpci_unplug_device_test(const char *id, uint8_t slot)\n+{\n+ QDict *response;\n+ char *cmd;\n+\n+ cmd = g_strdup_printf(\"{'execute': 'device_del',\"\n+ \" 'arguments': {\"\n+ \" 'id': '%s'\"\n+ \"}}\", id);\n+ response = qmp(cmd);\n+ g_free(cmd);\n+ g_assert(response);\n+ g_assert(!qdict_haskey(response, \"error\"));\n+ QDECREF(response);\n+\n+ outb(ACPI_PCIHP_ADDR + PCI_EJ_BASE, 1 << slot);\n+\n+ qmp_eventwait(\"DEVICE_DELETED\");\n+}\ndiff --git a/tests/virtio-blk-test.c b/tests/virtio-blk-test.c\nindex ca4ee645b7..8441ab91ed 100644\n--- a/tests/virtio-blk-test.c\n+++ b/tests/virtio-blk-test.c\n@@ -672,7 +672,7 @@ static void pci_hotplug(void)\n\n /* unplug secondary disk */\n if (strcmp(arch, \"i386\") == 0 || strcmp(arch, \"x86_64\") == 0) {\n- qpci_unplug_acpi_device_test(\"drv1\", PCI_SLOT_HP);\n+ qpci_unplug_device_test(\"drv1\", PCI_SLOT_HP);\n }\n qtest_shutdown(qs);\n }\ndiff --git a/tests/virtio-net-test.c b/tests/virtio-net-test.c\nindex 635b942c36..24e0f774f0 100644\n--- a/tests/virtio-net-test.c\n+++ b/tests/virtio-net-test.c\n@@ -248,7 +248,7 @@ static void hotplug(void)\n qpci_plug_device_test(\"virtio-net-pci\", \"net1\", PCI_SLOT_HP, NULL);\n\n if (strcmp(arch, \"i386\") == 0 || strcmp(arch, \"x86_64\") == 0) {\n- qpci_unplug_acpi_device_test(\"net1\", PCI_SLOT_HP);\n+ qpci_unplug_device_test(\"net1\", PCI_SLOT_HP);\n }\n\n test_end();\ndiff --git a/tests/virtio-rng-test.c b/tests/virtio-rng-test.c\nindex dcecf77463..fc4a36474b 100644\n--- a/tests/virtio-rng-test.c\n+++ b/tests/virtio-rng-test.c\n@@ -25,7 +25,7 @@ static void hotplug(void)\n qpci_plug_device_test(\"virtio-rng-pci\", \"rng1\", PCI_SLOT_HP, NULL);\n\n if (strcmp(arch, \"i386\") == 0 || strcmp(arch, \"x86_64\") == 0) {\n- qpci_unplug_acpi_device_test(\"rng1\", PCI_SLOT_HP);\n+ qpci_unplug_device_test(\"rng1\", PCI_SLOT_HP);\n }\n }\n\n", "prefixes": [ "v7", "10/38" ] }