On 01.03.2011, at 19:35, anthony.per...@citrix.com wrote:

> From: Arun Sharma <arun.sha...@intel.com>
> 
> Open and bind event channels; map ioreq and buffered ioreq rings.
> 
> Signed-off-by: Arun Sharma <arun.sha...@intel.com>
> Signed-off-by: Anthony PERARD <anthony.per...@citrix.com>
> Signed-off-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com>
> Acked-by: Alexander Graf <ag...@suse.de>
> ---
> hw/xen_common.h |    2 +
> xen-all.c       |  411 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 413 insertions(+), 0 deletions(-)
> 
> 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
> 
> +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 @@
>  *
>  */
> 
> +#include <sys/mman.h>
> +
> #include "hw/pci.h"
> #include "hw/xen_common.h"
> #include "hw/xen_backend.h"
> 
> #include "xen-mapcache.h"
> 
> +#include <xen/hvm/ioreq.h>
> +#include <xen/hvm/params.h>
> +
> +//#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


Reply via email to