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

[QEMU][PATCH v4 05/10] include/hw/xen/xen_common: return error from xen_create_ioreq_server


  • To: <qemu-devel@xxxxxxxxxx>
  • From: Vikram Garhwal <vikram.garhwal@xxxxxxx>
  • Date: Wed, 25 Jan 2023 00:54:02 -0800
  • 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=HpZAZyFrLxyZiJ9zE+SxaljhwMZQFl/Jyy62XvsgXdo=; b=CG14mV1q7sGZmZuPMZ9TvNQ/d7Ta0ljhIFmZVpfAMRjDcaKmWXmSQJmbH+p9p4d/6So7GYi3VsIBPaSQQ57MUT0hpe0e4eqh6hoimhFY3ZwvIe/DLybYGGYaZhpFj63xo5qritGnNLh54fif09iBOBTEdQEIgcPuCgG1AcS4J9cYZbqCudg38H9eKF9Wvae81T5FzOh/SzKc8hE3MnkR2+htGDbyt3c7NJWFCt17JbMPEFrctjQ56s9g1t4RRkdjG7ua8l8TjWM69k6KmLEFhpO6kalGWZ72pRZymrdIeYcaUWfE/DBqM6mla8EuG3fbzQwLothXAIj2wUWjLNYdLg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W2gE/67T9fTJ1cEkhDxG5gATfKNecs7kxqzcMDdzBpwc41+N5hEJqTowHUXPQOLbGvE8jka+NiQBCQnDV/r5zrvDgGn0jhLhQq7fnppRwPbGqllyMrEsajoJXafc9OR80sZGCEBcMlqLmu/eEeSkPZyYT5sUxCC+/iePrEwvKWvNZ2bncMcXMJIhZqAS9/wyVog6soGV1OjBtA47xkllFzq0UHJ01m0zVwxG+XliecPKIDQnwI71aylVW3GLKrBsKzniFyggdCNbHJ6ESA8T6pTXRrlXf0z2p5xEpg5khysd+3KCWs4bFGtUjiiYFJc8gaw8D2L7vJaYUr8jxF8CpA==
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <vikram.garhwal@xxxxxxx>, <stefano.stabellini@xxxxxxx>, <alex.bennee@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, "Paul Durrant" <paul@xxxxxxx>
  • Delivery-date: Wed, 25 Jan 2023 09:07:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Stefano Stabellini <stefano.stabellini@xxxxxxx>

This is done to prepare for enabling xenpv support for ARM architecture.
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>
Signed-off-by: Vikram Garhwal <vikram.garhwal@xxxxxxx>
---
 include/hw/xen/xen_common.h | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h
index 9a13a756ae..9ec69582b3 100644
--- a/include/hw/xen/xen_common.h
+++ b/include/hw/xen/xen_common.h
@@ -467,9 +467,10 @@ static inline void xen_unmap_pcidev(domid_t dom,
 {
 }
 
-static inline void xen_create_ioreq_server(domid_t dom,
-                                           ioservid_t *ioservid)
+static inline int xen_create_ioreq_server(domid_t dom,
+                                          ioservid_t *ioservid)
 {
+    return 0;
 }
 
 static inline void xen_destroy_ioreq_server(domid_t dom,
@@ -600,8 +601,8 @@ static inline void xen_unmap_pcidev(domid_t dom,
                                                   PCI_FUNC(pci_dev->devfn));
 }
 
-static inline void xen_create_ioreq_server(domid_t dom,
-                                           ioservid_t *ioservid)
+static inline int xen_create_ioreq_server(domid_t dom,
+                                          ioservid_t *ioservid)
 {
     int rc = xendevicemodel_create_ioreq_server(xen_dmod, dom,
                                                 HVM_IOREQSRV_BUFIOREQ_ATOMIC,
@@ -609,12 +610,14 @@ static inline void xen_create_ioreq_server(domid_t dom,
 
     if (rc == 0) {
         trace_xen_ioreq_server_create(*ioservid);
-        return;
+        return rc;
     }
 
     *ioservid = 0;
     use_default_ioreq_server = true;
     trace_xen_default_ioreq_server();
+
+    return rc;
 }
 
 static inline void xen_destroy_ioreq_server(domid_t dom,
-- 
2.17.0




 


Rackspace

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