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

Re: [Xen-devel] [PATCH v5 3/3] x86/altp2m: Add a hvmop for querying the suppress #VE bit



On 9/21/18 4:16 PM, Razvan Cojocaru wrote:
> On 9/20/18 3:50 PM, George Dunlap wrote:
>> On 09/03/2018 04:48 PM, Adrian Pop wrote:
>>> Signed-off-by: Adrian Pop <apop@xxxxxxxxxxxxxxx>
>>> +++ b/xen/arch/x86/mm/mem_access.c
>>> @@ -550,6 +550,51 @@ out:
>>>      return rc;
>>>  }
>>>  
>>> +int p2m_get_suppress_ve(struct domain *d, gfn_t gfn, bool *suppress_ve,
>>> +                        unsigned int altp2m_idx)
>>> +{
>>> +    struct p2m_domain *host_p2m = p2m_get_hostp2m(d);
>>> +    struct p2m_domain *ap2m = NULL;
>>> +    struct p2m_domain *p2m;
>>> +    mfn_t mfn;
>>> +    p2m_access_t a;
>>> +    p2m_type_t t;
>>> +
>>> +    if ( !cpu_has_vmx_virt_exceptions )
>>> +        return -EOPNOTSUPP;
>>> +
>>> +    /* #VE should be enabled for this vcpu. */
>>> +    if ( gfn_eq(vcpu_altp2m(current).veinfo_gfn, INVALID_GFN) )
>>> +        return -ENXIO;
>>
>> Basically the same comments as for 2/3:  Move to p2m.c, and get rid of
>> the vmx-ism.
>>
>> Anothre idea is to get rid of these checks altogether -- returning
>> 'false' when the feature isn't supported or enabled shouldn't be a big
>> deal.  But I don't feel strongly enough about it to argue either way.
> 
> I've moved the functions to p2m.c and started moving the checks when it
> occured to me that it might be cha to move them to ept_get_entry() /
> ept_set_entry() in p2m-ept.c.

Sorry, wrote "challenging" here, my touchpad got in the way and removed
a part of the word.

_______________________________________________
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®.