Re: [PATCH 08/21] KVM: x86: Reset FPU state during reset

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

 



2014-11-06 10:44+0100, Paolo Bonzini:
> 
> 
> On 06/11/2014 10:13, Nadav Amit wrote:
> > 
> >> On Nov 6, 2014, at 10:58, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> >>
> >> On 05/11/2014 21:31, Nadav Amit wrote:
> >>> You are correct, it does not appear clearly in the SDM, but that is what real hardware does.
> >>> If you look at bochs - http://code.metager.de/source/xref/bochs/bochs/cpu/init.cc - you’ll see they call
> >>> "BX_CPU_THIS_PTR xcr0.set32(0x1);” regardless to whether it is hardware or software reset (the latter happens on INIT).
> >>
> >> Fair enough. :)
> > Thanks. It is turning harder to find references for the crazy x86 behaviour. :)
> 
> Indeed, I'll ask Intel to clarify this one too.
> 
> The crazy thing is that AMD doesn't say anything, either!  Their own 
> manual just says "Hardware initializes XCR0 to 0000_0000_0000_0001h", 
> but it doesn't say when.

I found AMD 2:15.21.8
  INIT reinitializes the control registers, segment registers and GP
  registers in a manner similar to RESET, but does not alter the
  contents of most MSRs, caches or numeric coprocessor (x87 or SSE)
  state,

So reseting XCR0 is ok, but we shouldn't call fx_init() on INIT,
the version below seems fine in this regard.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux