[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v1 08/12] hw/xen/xen-hvm-common: skip ioreq creation on ioreq registration failure


  • To: <qemu-devel@xxxxxxxxxx>
  • From: Vikram Garhwal <vikram.garhwal@xxxxxxx>
  • Date: Fri, 14 Oct 2022 22:07:46 -0700
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=nongnu.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vpNswOJaJTvoQnEp4VKG3t3Oool7KkMpjFedov6r4QE=; b=MmkVYj9DAk7EMD+Oh28VQq5fXg19TaMFECBybTMqSq67yhUrfGSCv77dMkKwMOrq6YMiTf0RVEW9euTLI4lsQDLDSqouextGmOHBL5ok1ipHMiRn6ATPKIKhincV89w01QSS+KkK0kuH30zsGD8qD4NA7/rrab06+IFXlVrsTbvQ7qZdxTPz0QdQo5lJL/EAI+uNFitAa9HRKPDD59xCPlyNWDw6aSWxDxk7uZuzJSPvGimLzcXNVBsBviKdxAIiPgWHomhPLfDxDdcOTF34SEncuFjtOrzBi3GltaKSfmPoqhXUFU+9HiSTo4Y9xpqMk9PQ9hBUEZGMZovEWr94yg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jifEHGNqERbztNNgNTNYc7ipxn+PIuMCLCs7nKtpdKHy8LSrdY5RdnDzvh1klNPd+msnPZIzRzNZeCiRHa1wKNXMdR/4HqNGFpXzKAXDShxAgnhvqZQTC32wS4etKCM9mY3cR56Yvii27zGxjNJjSJQrBrxXeVZjYx9Y9KPr/gTZTNGJTggMbl4AFV5RHiU25juYNTDRlwKprMp9eI1uXeQ41hn2mgamhnTpXD/zxEZi++KFu2Cl1zxaRJsT6DMYCRVOpfHsXgzy2Njo3qpT8Kha+Yzvoa7YIznKgCgY5rrL9Es3DAXZk81xM//oCrUtQ4RYbkBWf11dRo1HvNhbNg==
  • Cc: <vikram.garhwal@xxxxxxx>, <stefano.stabellini@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, "Paul Durrant" <paul@xxxxxxx>, "open list:X86 Xen CPUs" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Sat, 15 Oct 2022 05:08:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Stefano Stabellini <stefano.stabellini@xxxxxxx>

On ARM it is possible to have a functioning xenpv machine with only the
PV backends and no IOREQ server. If the IOREQ server creation fails continue
to the PV backends initialization.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
---
 hw/xen/xen-hvm-common.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c
index f848f9e625..7bccf595fc 100644
--- a/hw/xen/xen-hvm-common.c
+++ b/hw/xen/xen-hvm-common.c
@@ -777,7 +777,11 @@ void xen_register_ioreq(XenIOState *state, unsigned int 
max_cpus,
         goto err;
     }
 
-    xen_create_ioreq_server(xen_domid, &state->ioservid);
+    rc = xen_create_ioreq_server(xen_domid, &state->ioservid);
+    if (rc) {
+        DPRINTF("xen: failed to create ioreq server\n");
+        goto no_ioreq;
+    }
 
     state->exit.notify = xen_exit_notifier;
     qemu_add_exit_notifier(&state->exit);
@@ -842,6 +846,7 @@ void xen_register_ioreq(XenIOState *state, unsigned int 
max_cpus,
     QLIST_INIT(&state->dev_list);
     device_listener_register(&state->device_listener);
 
+no_ioreq:
     xen_bus_init();
 
     /* Initialize backend core & drivers */
-- 
2.17.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.