[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 4/8] target-i386: preserve FPU and MSR state
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH v2 4/8] target-i386: preserve FPU and MSR state on INIT |
Date: |
Mon, 12 May 2014 09:23:56 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
Am 02.05.2014 16:33, schrieb Paolo Bonzini:
> Most MSRs, plus the FPU, MMX, MXCSR, XMM and YMM registers should not
> be zeroed on INIT (Table 9-1 in the Intel SDM). Copy them out of
> CPUX86State and back in, instead of special casing env->pat.
>
> The relevant fields are already consecutive except PAT and SMBASE.
> However:
>
> - KVM and Hyper-V MSRs should be reset because they include memory
> locations written by the hypervisor. These MSRs are moved together
> at the end of the preserved area.
>
> - SVM state can be moved out of the way since it is written by VMRUN.
>
> Cc: Andreas Färber <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> target-i386/cpu.c | 3 +--
> target-i386/cpu.h | 42 ++++++++++++++++++++++++++----------------
> target-i386/helper.c | 10 ++++++++--
> 3 files changed, 35 insertions(+), 20 deletions(-)
Fine with me. You might as well use a third marker for zeroed-on-reset
to avoid the pat -> cpuid_level change.
If we want to widen this pattern, a macro might make sense.
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [PATCH v2 0/8] x86: correctly implement soft reset, Paolo Bonzini, 2014/05/02
- [Qemu-devel] [PATCH v2 1/8] kvm: reset state from the CPU's reset method, Paolo Bonzini, 2014/05/02
- [Qemu-devel] [PATCH v2 3/8] target-i386: fix set of registers zeroed on reset, Paolo Bonzini, 2014/05/02
- [Qemu-devel] [PATCH v2 4/8] target-i386: preserve FPU and MSR state on INIT, Paolo Bonzini, 2014/05/02
- Re: [Qemu-devel] [PATCH v2 4/8] target-i386: preserve FPU and MSR state on INIT,
Andreas Färber <=
- [Qemu-devel] [PATCH v2 5/8] apic: do not accept SIPI on the bootstrap processor, Paolo Bonzini, 2014/05/02
- [Qemu-devel] [PATCH v2 2/8] kvm: forward INIT signals coming from the chipset, Paolo Bonzini, 2014/05/02
- [Qemu-devel] [PATCH v2 7/8] pc: port 92 reset requires a low->high transition, Paolo Bonzini, 2014/05/02
- [Qemu-devel] [PATCH v2 6/8] cpu: make CPU_INTERRUPT_RESET available on all targets, Paolo Bonzini, 2014/05/02