Message ID | 20221015050750.4185-8-vikram.garhwal@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v1,01/12] hw/xen: Correct build config for xen_pt_stub | expand |
Hi Vikram, On 15/10/2022 06:07, Vikram Garhwal wrote: > From: Stefano Stabellini <stefano.stabellini@amd.com> > > 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@amd.com> > --- > 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) > { I think there is a return missing here. > } > > @@ -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, Cheers,
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,