qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] target-i386: Intel MPX support


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 2/2] target-i386: Intel MPX support
Date: Fri, 29 Nov 2013 16:42:08 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

Il 29/11/2013 15:50, Liu, Jinsong ha scritto:
> > There is no reason to get the size and offset from the host.  Peter
> > Anvin confirmed that the sizes and offsets will never change (as
> > should be the case for migration to work across different CPU
> > versions).  In fact, the size and offset is documented for every
> > XSAVE feature except MPX in the copy I have of the Intel
> > documentation. 
> 
> If the sizes and offsets will never change, what's the bad effect of getting 
> them from host?

In case TCG gets AVX/MPX support later, you will not be able to get
CPUID values from the host.  The leaf 0xd code was written so that it
would work for both KVM and TCG.

When QEMU got AVX support, we decided not to treat XSAVE data as opaque
blobs, and instead "unmarshal" data out of it into the CPUX86State
struct and back.  This is again useful for TCG, but it also makes for
easier interpretation of migration state.  You will have to rely on
precise sizes and offsets in the marshaling/unmarshaling code of
kvm_get_xsave/kvm_put_xsave, so it is not a big problem to have them
here as well.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]