> -----Original Message-----
> From: Andrew Cooper <andrew.coop...@citrix.com>
> Sent: 25 November 2020 11:31
> To: Paul Durrant <p...@xen.org>; xen-devel@lists.xenproject.org
> Cc: Durrant, Paul <pdurr...@amazon.co.uk>; Elnikety, Eslam 
> <elnik...@amazon.com>; Christian Lindig
> <christian.lin...@citrix.com>; David Scott <d...@recoil.org>; Ian Jackson 
> <i...@xenproject.org>; Wei
> Liu <w...@xen.org>; George Dunlap <george.dun...@citrix.com>; Jan Beulich 
> <jbeul...@suse.com>; Julien
> Grall <jul...@xen.org>; Stefano Stabellini <sstabell...@kernel.org>
> Subject: RE: [EXTERNAL] [PATCH v4 1/3] domctl: introduce a new domain create 
> flag,
> XEN_DOMCTL_CDF_disable_fifo, ...
> 
> CAUTION: This email originated from outside of the organization. Do not click 
> links or open
> attachments unless you can confirm the sender and know the content is safe.
> 
> 
> 
> On 24/11/2020 19:17, Paul Durrant wrote:
> > diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
> > index 666aeb71bf1b..70701c59d053 100644
> > --- a/xen/include/public/domctl.h
> > +++ b/xen/include/public/domctl.h
> > @@ -70,9 +70,11 @@ struct xen_domctl_createdomain {
> >  #define XEN_DOMCTL_CDF_iommu          (1U<<_XEN_DOMCTL_CDF_iommu)
> >  #define _XEN_DOMCTL_CDF_nested_virt   6
> >  #define XEN_DOMCTL_CDF_nested_virt    (1U << _XEN_DOMCTL_CDF_nested_virt)
> > +#define _XEN_DOMCTL_CDF_disable_fifo  7
> > +#define XEN_DOMCTL_CDF_disable_fifo   (1U << _XEN_DOMCTL_CDF_disable_fifo)
> 
> The sense is backwards.  It should be a "permit the use of FIFO"
> control.  If the code had been written this way to begin with, the bug
> you found wouldn't have existed.
> 
> Given that there is not currently a way to disable FIFO, you can
> probably do without an enumeration of whether the hypervisor supports it
> or not.
> 

Ok, I can reverse the sense.

I found another one that we ought to control in a similar way... the per-cpu 
evtchn upcalls. AFAIK only the Windows PV drivers make use of it (and I can 
arrange to squash that with a registry flag) but it really falls into the same 
category as FIFO... so maybe we need a separate bit-field for these sorts of 
thing?

  Paul

> ~Andrew

Reply via email to