[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCHv1 3/5] x86/fpu: Add a per-domain field to set the width of FIP/FDP
On 18/02/16 19:13, Andrew Cooper wrote: > On 18/02/16 18:52, David Vrabel wrote: >> --- a/xen/include/asm-x86/domain.h >> +++ b/xen/include/asm-x86/domain.h >> @@ -394,6 +394,21 @@ struct arch_domain >> >> /* Emulated devices enabled bitmap. */ >> uint32_t emulation_flags; >> + >> + /* >> + * The width of the FIP/FDP register in the FPU that needs to be >> + * saved/restored during a context switch. This is needed because >> + * the FPU can either: a) restore the 64-bit FIP/FDP and clear FCS >> + * and FDS; or b) retstore the 32-bit FIP/FDP (clearing the upper >> + * 32-bits) and restore FCS/FDS. >> + * >> + * Which one is needed depends on the guest. >> + * >> + * This can be either: 8, 4 or 0. 0 means auto-detect the size >> + * based on the width of FIP/FDP values that are written by by the >> + * guest. >> + */ >> + uint8_t x87_fip_width; > > Can we get away with always using fpu_sse.x[FPU_WORD_SIZE_OFFSET], > instead if duplicating the information in arch_domain and risking them > getting out of sync? No. Because if x87_fip_width == 0 (auto-mode) we check every save for the correct width to use, storing the result at FPU_WORD_SIZE_OFFSET. > VMs which have migrated in will already have some policy latched, and we > should preserve their old behaviour if possible. This does. x87_fip_width is only used on save. The restore behaviour is unchanged and is conditional on the word size written to the save state. David _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |