[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/5] xen: Drop __XEN_LATEST_INTERFACE_VERSION__
From: |
Stefano Stabellini |
Subject: |
Re: [Qemu-devel] [PATCH 5/5] xen: Drop __XEN_LATEST_INTERFACE_VERSION__ checks from prior to Xen 4.2 |
Date: |
Tue, 9 Feb 2016 17:23:27 +0000 |
User-agent: |
Alpine 2.02 (DEB 1266 2009-07-14) |
On Tue, 9 Feb 2016, Ian Campbell wrote:
> We assume (and check for in configure) 4.2 or later now. In reality
> all of the removed checks are for far older versions.
>
> Signed-off-by: Ian Campbell <address@hidden>
> ---
> hw/display/xenfb.c | 7 -------
> xen-hvm.c | 14 +-------------
> 2 files changed, 1 insertion(+), 20 deletions(-)
>
> diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
> index a533c3d..40b096a 100644
> --- a/hw/display/xenfb.c
> +++ b/hw/display/xenfb.c
> @@ -241,9 +241,7 @@ static int xenfb_send_motion(struct XenInput *xenfb,
> event.type = XENKBD_TYPE_MOTION;
> event.motion.rel_x = rel_x;
> event.motion.rel_y = rel_y;
> -#if __XEN_LATEST_INTERFACE_VERSION__ >= 0x00030207
> event.motion.rel_z = rel_z;
> -#endif
>
> return xenfb_kbd_event(xenfb, &event);
> }
> @@ -258,12 +256,7 @@ static int xenfb_send_position(struct XenInput *xenfb,
> event.type = XENKBD_TYPE_POS;
> event.pos.abs_x = abs_x;
> event.pos.abs_y = abs_y;
> -#if __XEN_LATEST_INTERFACE_VERSION__ == 0x00030207
> - event.pos.abs_z = z;
> -#endif
> -#if __XEN_LATEST_INTERFACE_VERSION__ >= 0x00030208
> event.pos.rel_z = z;
> -#endif
>
> return xenfb_kbd_event(xenfb, &event);
> }
> diff --git a/xen-hvm.c b/xen-hvm.c
> index fbe0e3a..087041a 100644
> --- a/xen-hvm.c
> +++ b/xen-hvm.c
> @@ -67,17 +67,6 @@ struct shared_vmport_iopage {
> typedef struct shared_vmport_iopage shared_vmport_iopage_t;
> #endif
>
> -#if __XEN_LATEST_INTERFACE_VERSION__ < 0x0003020a
> -static inline uint32_t xen_vcpu_eport(shared_iopage_t *shared_page, int i)
> -{
> - return shared_page->vcpu_iodata[i].vp_eport;
> -}
> -static inline ioreq_t *xen_vcpu_ioreq(shared_iopage_t *shared_page, int vcpu)
> -{
> - return &shared_page->vcpu_iodata[vcpu].vp_ioreq;
> -}
> -# define FMT_ioreq_size PRIx64
> -#else
> static inline uint32_t xen_vcpu_eport(shared_iopage_t *shared_page, int i)
> {
> return shared_page->vcpu_ioreq[i].vp_eport;
> @@ -86,8 +75,7 @@ static inline ioreq_t *xen_vcpu_ioreq(shared_iopage_t
> *shared_page, int vcpu)
> {
> return &shared_page->vcpu_ioreq[vcpu];
> }
> -# define FMT_ioreq_size "u"
> -#endif
> +#define FMT_ioreq_size "u"
Given that we are not defining any other special FMT constants for the
other fields in ioreq_t, please just go ahead and replace the callers
below.