Re: [PATCH 1/2] kvm: make vendor_intel a generic function

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

 



Paolo Bonzini <pbonzini@xxxxxxxxxx> writes:

> Il 30/05/2013 08:07, Gleb Natapov ha scritto:
>>> > Unfortunately, this is not acceptable.  The emulator is not supposed to
>>> > know about the vcpu.  Everything has to go through the context; in
>>> > principle, the emulator should be usable outside of KVM.
>>> > 
>>> > I would just duplicate the code in kvm_guest_vcpu_model (perhaps you can
>>> > rename it to kvm_cpuid_get_intel_model or something like that; having
>>> > both "guest" and "vcpu" in the name is a pleonasm :)).
>> 
>> I thought having inline function that gets &eax, &ebx, &ecx, &edx as a
>> parameter and returns a vendor.
>
> That could work too.  Bandan, whatever looks nicer to you. :)

OK, I posted a v2. I changed vendor_intel() to just do the checking and the call
to cpuid happens outside the function now through whatever method is appropriate.
As a cleanup work, I think there should be a corresponding vendor_amd() too for 
the AMD related checks that happen in emulate.c. I will send a separate 
change for it.

Bandan
> Paolo
--
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