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

Re: [Xen-devel] [PATCH 02/11] VMX: implement suppress #VE.



On 01/15/2015 08:25 AM, Tim Deegan wrote:
> Hi,
> 
> At 13:26 -0800 on 09 Jan (1420806392), Ed White wrote:
>>  static inline bool_t is_epte_valid(ept_entry_t *e)
>>  {
>> -    return (e->epte != 0 && e->sa_p2mt != p2m_invalid);
>> +    return (e->valid != 0 && e->sa_p2mt != p2m_invalid);
> 
> This test for 0 is just catching uninitialised entries in freshly
> allocated pages.  Rather than changing it to ignore bit 63, this loop...
> 
>>  }
>>  
>>  /* returns : 0 for success, -errno otherwise */
>> @@ -194,6 +194,19 @@ static int ept_set_middle_entry(struct p2m_domain *p2m, 
>> ept_entry_t *ept_entry)
>>  
>>      ept_entry->r = ept_entry->w = ept_entry->x = 1;
>>  
>> +    /* Disable #VE on all entries */ 
>> +    if ( cpu_has_vmx_virt_exceptions )
>> +    {
>> +        ept_entry_t *table = __map_domain_page(pg);
>> +
>> +        for ( int i = 0; i < EPT_PAGETABLE_ENTRIES; i++ )
>> +            table[i].suppress_ve = 1;
> 
> ...should set the type of the empty entries to p2m_invalid as it goes.
> 
>> +    /* Disable #VE on all entries */
>> +    if ( cpu_has_vmx_virt_exceptions )
>> +    {
>> +        ept_entry_t *table =
>> +            map_domain_page(pagetable_get_pfn(p2m_get_pagetable(p2m)));
>> +
>> +        for ( int i = 0; i < EPT_PAGETABLE_ENTRIES; i++ )
>> +            table[i].suppress_ve = 1;
> 
> And the same here.

You mean do that unconditionally, regardless of hardware #VE?

Ed


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


 


Rackspace

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