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

Re: [Xen-devel] [PATCH v10 10/11] xen: add new Xen cpuid node for max address width info



>>> On 25.09.17 at 14:00, <jgross@xxxxxxxx> wrote:
> On 25/09/17 13:55, Andrew Cooper wrote:
>> On 25/09/17 11:00, Juergen Gross wrote:
>>> On very large hosts a pv-guest needs to know whether it will have to
>>> handle frame numbers larger than 32 bits in order to select the
>>> appropriate grant interface version.
>>>
>>> Add a new Xen specific CPUID node to contain the maximum machine address
>>> width similar to the x86 CPUID node 0x80000008 containing the maximum
>>> physical address width. The maximum frame width needs to take memory
>>> hotplug into account.
>>>
>>> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
>>> ---
>>> V10:
>>> - correct comment in cpuid.h (Jan Beulich)
>>>
>>> V9:
>>> - make leaf pv-only (Jan Beulich)
>>> - use hex value for mask (Jan Beulich)
>>> - guest address width -> machine address width (Jan Beulich)
>>> ---
>>>  xen/arch/x86/traps.c                |  7 +++++++
>>>  xen/include/public/arch-x86/cpuid.h | 11 ++++++++++-
>>>  2 files changed, 17 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
>>> index d8feef2942..2b464d02ef 100644
>>> --- a/xen/arch/x86/traps.c
>>> +++ b/xen/arch/x86/traps.c
>>> @@ -930,6 +930,13 @@ void cpuid_hypervisor_leaves(const struct vcpu *v, 
> uint32_t leaf,
>>>          res->b = v->vcpu_id;
>>>          break;
>>>  
>>> +    case 5: /* PV-specific parameters */
>>> +        if ( is_hvm_domain(d) || subleaf != 0 )
>>> +            break;
>> 
>> Leaves 3 and 4 are currently broken in terms of their subleaf handling,
>> and can't easily be fixed (as the ABI is set in stone).  However, please
>> lets not propagate the brokenness into new leaves.
>> 
>> 5/0 should report max_subleaf in res->a, in the same way as other
>> subleafs get handled.
> 
> Aah, okay. So it should be okay to move the data below to res->b of
> sub-leaf 0 then, I guess?

And you can keep my ack with that change. In fact I think the
adjustment could easily be done while committing.

Jan


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

 


Rackspace

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