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

Re: [Xen-devel] [PATCH 34/34] RFC x86: introduce directio virt cap



>>> On 21.08.18 at 18:02, <wei.liu2@xxxxxxxxxx> wrote:
> On Tue, Aug 21, 2018 at 09:40:07AM -0600, Jan Beulich wrote:
>> >>> On 21.08.18 at 15:43, <wei.liu2@xxxxxxxxxx> wrote:
>> > On Tue, Aug 21, 2018 at 05:52:39AM -0600, Jan Beulich wrote:
>> >> >>> On 17.08.18 at 17:12, <wei.liu2@xxxxxxxxxx> wrote:
>> >> > --- a/xen/arch/x86/sysctl.c
>> >> > +++ b/xen/arch/x86/sysctl.c
>> >> > @@ -92,8 +92,10 @@ void arch_do_physinfo(struct xen_sysctl_physinfo *pi)
>> >> >             min(sizeof(pi->hw_cap), 
>> >> > sizeof(boot_cpu_data.x86_capability)));
>> >> >      if ( hvm_enabled )
>> >> >          pi->capabilities |= XEN_SYSCTL_PHYSCAP_hvm;
>> >> > -    if ( iommu_enabled )
>> >> > +    if ( hvm_enabled && iommu_enabled )
>> >> >          pi->capabilities |= XEN_SYSCTL_PHYSCAP_hvm_directio;
>> >> > +    else if ( iommu_enabled )
>> >> > +        pi->capabilities |= XEN_SYSCTL_PHYSCAP_directio;
>> >> >  }
>> >> 
>> >> At the sysctl layer I think you can, as suggested iirc by Roger,
>> >> simply replace hvm_directio with directio (or iommu). For the
>> >> "xl info" output, otoh, I'm afraid this doesn't hold, as people
>> >> may parse for the string. Depending on how this would best
>> >> be addressed in the tool stack, replacing the sysctl names may
>> >> then no longer be the most suitable solution.
>> > 
>> > In that case what do you think about the two flags this patch provides
>> > on the toolstack level?
>> > 
>> > Essentially we change slightly hvm_directio's meaning to mean "hvm &&
>> > iommu_enabled" while it previously mean "iommu_enabled", and then in the
>> > absence of hvm_directio, add "directio" as an indication for
>> > "iommu_enabled".
>> 
>> I think when you mean to provide two flags, retaining the meaning
>> of the pre-existing one might be desirable. But as said before -
>> much depends on what the tool stack means to present to the user.
>> The expectations on the current meaning on "xl info" output should
>> not be broken.
> 
> Previously "hvm" and "hvm_directio" always show up together. The
> hvm_directio only case never showed up in practice -- I don't think
> there had been systems with vt-d but not vt-x.
> 
> My plan for xl info:
> 
> pv    hvm     iommu           flags in xl info
> 0     0       0               n/a
> 0     0       1               n/a
> 0     1       0               hvm
> 0     1       1               hvm hvm_directio
> 1     0       0               NIL
> 1     0       1               directio
> 1     1       0               hvm
> 1     1       1               hvm hvm_directio directio
> 
> This retains sensible (though not completely identical) semantics for
> hvm_directio.

I think that ought to be fine.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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