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

Re: [Xen-devel] [PATCH] x86/EPT: defer enabling of A/D maintenance until PML get enabled



>>> On 15.10.15 at 09:35, <kai.huang@xxxxxxxxxxxxxxx> wrote:
> On 10/15/2015 03:11 PM, Jan Beulich wrote:
>>>>> On 15.10.15 at 08:42, <kai.huang@xxxxxxxxxxxxxxx> wrote:
>>>         * ept_p2m_type_to_flags will do the check, and write protection 
>>> will be
>>>         * used if PML is not enabled.
>>>         */
>>> -    vmx_domain_enable_pml(p2m->domain);
>>> +    if ( vmx_domain_enable_pml(p2m->domain) )
>>> +        return;
>>> +
>>> +    p2m->ept.ept_ad = 1;
>>> +    vmx_domain_update_eptp(p2m->domain);
>> Shouldn't you enable A/D _before_ enabling PML, at least without
>> having a domain-is-paused check here?
> Looks we don't have such function. How about just add 
> ASSERT(atomic_read(&d->pause_count)), just the same as in 
> vmx_domain_enable_pml ?

Indeed that was one of the two possible solutions I meant to hint at.

Jan


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