Re: [PATCH] KVM: Fix OSXSAVE after migration

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

 



On Wednesday 08 December 2010 18:33:43 Avi Kivity wrote:
> On 12/08/2010 04:49 AM, Sheng Yang wrote:
> > CPUID's OSXSAVE is a mirror of CR4.OSXSAVE bit. We need to update the
> > CPUID after migration.
> 
> Applied, thanks.
> 
> > @@ -5585,6 +5585,8 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu
> > *vcpu,
> > 
> >   	mmu_reset_needed |= kvm_read_cr4(vcpu) != sregs->cr4;
> >   	kvm_x86_ops->set_cr4(vcpu, sregs->cr4);
> > 
> > +	if (sregs->cr4&  X86_CR4_OSXSAVE)
> > +		update_cpuid(vcpu);
> > 
> >   	if (!is_long_mode(vcpu)&&  is_pae(vcpu)) {
> >   	
> >   		load_pdptrs(vcpu, vcpu->arch.walk_mmu, vcpu->arch.cr3);
> >   		mmu_reset_needed = 1;
> 
> We really should use kvm_set_crX() here.

Yeah, I suppose we use ops->set_cr4() here because we don't need to all kinds of 
check and operation for the value(which should already be done by other S/R code), 
so I just add update_cpuid() here.

--
regards
Yang, Sheng
--
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