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

[QEMU][PATCH v6 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: Tue, 11 Apr 2023 15:47:41 -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=FMxXRBFxRmkD0pWrYu+sj44qnNzbURauoioUBy1Lo+4=; b=U5KMC9g4P5MHtmS6GLiha1q6hKu1eSxJ7jtVF4QwVignsYxpiZg6aAsTkNP+RRylwFHJr3uw8dqov33uroCaTrU/tktbRSL5Q67b924H5me+1YK6EXHRyLBq99SQMXHmkWMxx82JqBJAOH8crsa4aw2j5bNtWQIbSCsoEBZt5dfVvmTZAbP4zLEwv1nwFVpXGYWALqaX4Rn5GSOmI5NIFrSpGz13F5eQcM75i4PCyo+HAw+m+hYwfAqHmrNcfDxqzsDDlAIfYUACMdT6Vh+l5GIK/vRfgB6/w60UFGJ3q+h9jX1okXLkmg8oW6jCiogC1yIxkI5aRYIbp2j3yqlCfQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YD2Sjvqw1aiCb/5kve5wM4Bz/reAjtkCRm1Bz1PzaJAg3ac3PjndSuNORPqR4weXADEWEJAK1GLDKJJEhNmAbCj3VAuq6azfHDLcnHvQ3bEHjRo1GPdUESOsak21BurEHu6eCJa/IXMjpDBep4prig6MZOYPlRJg7qg4PTGbLARsYYzTXUshn5yH8vLBvxr23vvGUIhHcQJ1n2XF8TpAVF52pR8e9PeucwlHOB55FumD7xaKzGpB3uQg40NriAGF3DD/BRnS+sD9PqNdWLlwczTxbQzB/T+CXw4lVHncO8UzTyqV/UoAa5mvMHtNkkL7lc/xmfVao06e/WMgPJCfVQ==
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <vikram.garhwal@xxxxxxx>, <stefano.stabellini@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Tue, 11 Apr 2023 22:48:16 +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>
Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Reviewed-by: Paul Durrant <paul@xxxxxxx>
---
 include/hw/xen/xen_native.h | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/include/hw/xen/xen_native.h b/include/hw/xen/xen_native.h
index 6bcc83baf9..8b01b071e5 100644
--- a/include/hw/xen/xen_native.h
+++ b/include/hw/xen/xen_native.h
@@ -433,9 +433,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,
@@ -566,8 +567,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,
@@ -575,12 +576,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®.