From: Alexander Graf Subject: Re: [Qemu-devel] [PATCH V11 13/15] xen: Initialize event channels and io rings Date: Wed, 23 Mar 2011 13:36:38 +0100 Message-ID: <2A1D2D77-64CB-4978-81DF-CD04BA1AD45C@suse.de> References: <1299004529-31290-1-git-send-email-anthony.perard@citrix.com> <1299004529-31290-14-git-send-email-anthony.perard@citrix.com> Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1299004529-31290-14-git-send-email-anthony.perard@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Anthony.Perard@citrix.com Cc: Arun Sharma , Xen Devel , QEMU-devel , Anthony Liguori , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 01.03.2011, at 19:35, Anthony.Perard@citrix.com wrote: > From: Arun Sharma >=20 > Open and bind event channels; map ioreq and buffered ioreq rings. >=20 > Signed-off-by: Arun Sharma > Signed-off-by: Anthony PERARD > Signed-off-by: Stefano Stabellini > Acked-by: Alexander Graf > --- > hw/xen_common.h | 2 + > xen-all.c | 411 = +++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 413 insertions(+), 0 deletions(-) >=20 > diff --git a/hw/xen_common.h b/hw/xen_common.h > index 5a36642..a5fc74b 100644 > --- a/hw/xen_common.h > +++ b/hw/xen_common.h > @@ -76,4 +76,6 @@ static inline int xc_fd(xc_interface *xen_xc) > } > #endif >=20 > +void destroy_hvm_domain(void); > + > #endif /* QEMU_HW_XEN_COMMON_H */ > diff --git a/xen-all.c b/xen-all.c > index 03d1e90..f96fd7d 100644 > --- a/xen-all.c > +++ b/xen-all.c > @@ -6,12 +6,58 @@ > * > */ >=20 > +#include > + > #include "hw/pci.h" > #include "hw/xen_common.h" > #include "hw/xen_backend.h" >=20 > #include "xen-mapcache.h" >=20 > +#include > +#include > + > +//#define DEBUG_XEN > + > +#ifdef DEBUG_XEN > +#define DPRINTF(fmt, ...) \ > + do { fprintf(stderr, "xen: " fmt, ## __VA_ARGS__); } while (0) > +#else > +#define DPRINTF(fmt, ...) \ > + do { } while (0) > +#endif > + > +/* Compatibility with older version */ > +#if __XEN_LATEST_INTERFACE_VERSION__ < 0x0003020a > +# define xen_vcpu_eport(shared_page, i) \ > + (shared_page->vcpu_iodata[i].vp_eport) > +# define xen_vcpu_ioreq(shared_page, vcpu) \ > + (shared_page->vcpu_iodata[vcpu].vp_ioreq) > +# define FMT_ioreq_size PRIx64 > +#else > +# define xen_vcpu_eport(shared_page, i) \ > + (shared_page->vcpu_ioreq[i].vp_eport) > +# define xen_vcpu_ioreq(shared_page, vcpu) \ > + (shared_page->vcpu_ioreq[vcpu]) Could you please change these to static inline functions? Alex