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

[PATCH v1 07/12] include/hw/xen/xen_common: return error from xen_create_ioreq_server


  • To: <qemu-devel@xxxxxxxxxx>
  • From: Vikram Garhwal <vikram.garhwal@xxxxxxx>
  • Date: Fri, 14 Oct 2022 22:07:45 -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=QFQAI2p5Tya+5yrK89aiCN3h+euzdMm2LiqHr9x0Cpc=; b=FPLkwTlDlTkvAlihRWiRfBICU+tLhO+0F6BkExYesAkQSEnbsI8ylPyI9r5hGBiVTubPfTMAOWa8r8oeAf+ueju9aGV7O0nr/xeJuNYVaYJJKoM+OdrEaIJb1FcfuTQbOm2OVSvnO4hUtbsbtROne69za73mU4y1YlfINeo2IWy/s3jGshqDjrJcscB06r4R7OMucmW6QfW6iE2Ke4umaDwBdUTiFBvCg6SjmQdefiMViEm8M68YhgDjd7PrtWFC7+3uBmy2BrBa82OVvb3cbvSFOQP9vTdmEC90FyjmAeBsmRP9SmAOBK/XGB94PNKZVFbxZi1MJCIJfgE/caNkmA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QQwig5LE3qYkyH+Zs4g5Yf5AJ8bz0H1fZbOcCf2bYYtwpKXKe+SwjhAug1SyR9eOOn/SU08ZuBH3MR8XStTZVoOvUrP+WwcVgVs0dGRhbu2XsyrMZAMDpo8v/E3gnDlCJzQJN/iREu7CXIBVs9ulZR2/X43K8qBaQLdn0p49N0RpkUyrADQtUoCG515kdr/oW8BqnwbBsWZ4FVk6wkjSdT+eEbXyl4kj7uvz+BMm/gR3JLdTciO1BJME8FNUETIobT9uoVLqvZs3QrHjAUiRtXk60TpSZsZuf6x4pLPRC6PGSpLkJqGSqiKlyKCLGhI3WrEtsNWWbhJ/Bdb+imqlDw==
  • 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:45 +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>
---
 include/hw/xen/xen_common.h | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h
index 77ce17d8a4..c2d2f36bde 100644
--- a/include/hw/xen/xen_common.h
+++ b/include/hw/xen/xen_common.h
@@ -467,8 +467,8 @@ 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)
 {
 }
 
@@ -600,8 +600,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 +609,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®.