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

Re: [Xen-devel] [PATCH v2] xen/HVM: atomically access pointers in bufioreq handling



On Thu, 23 Jul 2015, Jan Beulich wrote:
> The number of slots per page being 511 (i.e. not a power of two) means
> that the (32-bit) read and write indexes going beyond 2^32 will likely
> disturb operation. The hypervisor side gets I/O req server creation
> extended so we can indicate that we're using suitable atomic accesses
> where needed, allowing it to atomically canonicalize both pointers when
> both have gone through at least one cycle.
> 
> The Xen side counterpart (which is not a functional prereq to this
> change, albeit a build one) went in already (commit b7007bc6f9).
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> --- unstable.orig/qemu/upstream/include/hw/xen/xen_common.h   2015-03-31 
> 15:58:04.000000000 +0200
> +++ unstable/qemu/upstream/include/hw/xen/xen_common.h        2015-06-15 
> 08:24:28.000000000 +0200
> @@ -370,7 +370,8 @@ static inline void xen_unmap_pcidev(XenX
>  static inline int xen_create_ioreq_server(XenXC xc, domid_t dom,
>                                            ioservid_t *ioservid)
>  {
> -    int rc = xc_hvm_create_ioreq_server(xc, dom, 1, ioservid);
> +    int rc = xc_hvm_create_ioreq_server(xc, dom, 
> HVM_IOREQSRV_BUFIOREQ_ATOMIC,
> +                                        ioservid);
>  

I am sorry that I noticed this just now: HVM_IOREQSRV_BUFIOREQ_ATOMIC is
not defined on older versions of Xen and QEMU still needs to build
against them. This change breaks compilation against Xen 4.5 for example.

Please define HVM_IOREQSRV_BUFIOREQ_ATOMIC in
include/hw/xen/xen_common.h when Xen < 4.6. You might have to
introduce a test in configure to detect Xen 4.6, like the others at
configure:1869.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.