> -----Original Message-----
> From: Julien Grall <julien.gr...@arm.com>
> Sent: 05 September 2019 21:06
> To: Paul Durrant <paul.durr...@citrix.com>; xen-devel@lists.xenproject.org
> Cc: Roger Pau Monne <roger....@citrix.com>; Jan Beulich <jbeul...@suse.com>; 
> Christian Lindig
> <christian.lin...@citrix.com>; David Scott <d...@recoil.org>; Ian Jackson 
> <ian.jack...@citrix.com>;
> Wei Liu <w...@xen.org>; Andrew Cooper <andrew.coop...@citrix.com>; George 
> Dunlap
> <george.dun...@citrix.com>; Konrad Rzeszutek Wilk <konrad.w...@oracle.com>; 
> Stefano Stabellini
> <sstabell...@kernel.org>; Tim (Xen.org) <t...@xen.org>; Volodymyr Babchuk 
> <volodymyr_babc...@epam.com>
> Subject: Re: [PATCH v8 2/6] domain: introduce XEN_DOMCTL_CDF_iommu flag
> 
> Hi,
> 
> On 9/2/19 3:50 PM, Paul Durrant wrote:
> > diff --git a/xen/common/domain.c b/xen/common/domain.c
> > index e9d2c613e0..7dfb257c50 100644
> > --- a/xen/common/domain.c
> > +++ b/xen/common/domain.c
> > @@ -301,7 +301,8 @@ static int sanitise_domain_config(struct 
> > xen_domctl_createdomain *config)
> >                              XEN_DOMCTL_CDF_hap |
> >                              XEN_DOMCTL_CDF_s3_integrity |
> >                              XEN_DOMCTL_CDF_oos_off |
> > -                           XEN_DOMCTL_CDF_xs_domain) )
> > +                           XEN_DOMCTL_CDF_xs_domain |
> > +                           XEN_DOMCTL_CDF_iommu) )
> >       {
> >           dprintk(XENLOG_INFO, "Unknown CDF flags %#x\n", config->flags);
> >           return -EINVAL;
> > @@ -320,6 +321,12 @@ static int sanitise_domain_config(struct 
> > xen_domctl_createdomain *config)
> >           return -EINVAL;
> >       }
> >
> > +    if ( (config->flags & XEN_DOMCTL_CDF_iommu) && !iommu_enabled )
> > +    {
> > +        dprintk(XENLOG_INFO, "IOMMU is not enabled\n");
> > +        return -EINVAL;
> > +    }
> > +
> 
> Looking at this patch again, the implementation of
> arch_sanitise_domain_config() for Arm will only accepts config->flags to
> be equal to CDF_hvm_guest | CDF_hap.
> 
> So after this patch, it will not be possible to create any domain when
> CDF_iommu is set.

You're right, I'm not sure how I missed that. I think I had changed it in 
development then managed to lose the hunk. Clearly ARM needs to accept the flag 
too.

  Paul

> 
> Cheers,
> 
> --
> Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to