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

Re: [Xen-devel] [PATCH] x86/hvm: fix domain crash when CR3 has the noflush bit set



On 01/26/2018 12:27 PM, Jan Beulich wrote:
>>>> On 26.01.18 at 10:39, <rcojocaru@xxxxxxxxxxxxxxx> wrote:
>> --- a/xen/arch/x86/hvm/hvm.c
>> +++ b/xen/arch/x86/hvm/hvm.c
>> @@ -2324,6 +2324,9 @@ int hvm_set_cr3(unsigned long value, bool_t may_defer)
>>          }
>>      }
>>  
>> +    if ( hvm_pcid_enabled(v) ) /* Clear the noflush bit. */
>> +        value &= ((1ull << 63) - 1);
> 
> This needs a proper X86_CR3_* constant defined.
> 
> Did you investigate what it would take to actually _act_ upon the
> bit being set (besides clearing it for the value to be stored to be
> sane)? Afaict it would require handing a boolean through
> paging_update_cr3() -> ... -> {svm,vmx}_update_guest_cr() to
> allow suppressing the hvm_asid_flush_vcpu() etc there.

I'm now propagating the bool to {svm,vmx}_update_guest_cr() in a
quick-test patch (attached), however my Windows 10 KPTI-enabled guest is
now BSODing with "IRQL NOT LESS OR EQUAL" soon after I attach to it with
xen-access.

Clearly I'm touching code I'm not familiar with, so if this is something
worth pursuing any suggestions are appreciated. Otherwise, I can stick
to the original plan and just clear the noflush bit with no other
processing until things become clearer with the new code.


Thanks,
Razvan

Attachment: noflush.patch
Description: Text Data

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