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

Re: [Xen-devel] [PATCH v2] x86emul: don't read mask register on AVX512F-incapable platforms



>>> On 29.03.19 at 11:02, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 29/03/2019 09:36, Jan Beulich wrote:
>> I'd like to put up the other option then: Rather than using
>> _get_fpu() (and in particular the read_xcr() and read_cr() hooks)
>> we could read the real XCR0 here. After all we issue the KMOV not
>> because the guest has specified it, but because we need the value
>> of the register for correct fault suppression emulation.
> 
> True, and that would be rather smaller and less invasive than
> deliberately squashing the other side effects of get_fpu()

Hmm, I've tried to do this, but this is more complicated: CR0.TS
may be set, in which case we need to invoke the get_fpu() hook
to get it cleared with appropriate bookkeeping. I don't think it's
worth further complicating the code by invoking the hook _only_
in that case. So I guess we better stick to v2.

Which makes me come back to your request to drop the
cpu_has_avx512f part of the condition: Right now the fuzzer
uses emul_test_read_xcr() instead of actually fuzzing the
value. Once it does, would we expect it to never set any bits
in the returned value that aren't set in hardware, but could
in principle be set based on (real) CPUID output? In that case
I could agree to remove the extra condition.

Jan



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