Re: Guest handling of IA32_DEBUGCTL MSR

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

 



Jan Kiszka <jan.kiszka@xxxxxxxxxxx> wrote:

> Am 2015-04-28 um 13:43 schrieb Paolo Bonzini:
>> On 28/04/2015 13:42, Nadav Amit wrote:
>>> It seems strange that the guest is allowed to set IA32_DEBUGCTL MSR for the
>>> nested VM and get this value to the physical IA32_DEBUGCTL (see
>>> prepare_vmcs02), while it cannot set IA32_DEBUGCTL for itself (see
>>> kvm_set_msr_common).
>>> 
>>> Am I missing something?
>> 
>> No, it makes no sense.
> 
> Are you sure that vmx is not allowing direct access to that MSR while in
> guest mode? We do save/restore it on all Intel CPUs, see
> setup_vmcs_config. Not sure about the AMD situation, though.

Unless you explicitly disable the interception of the MSR in the bitmap, you
trap WRMSR to this MSR. I guess the original intention of saving/restoring
it was to address situations in which the CPU itself implicitly changes it
(e.g., clearing LBR when “freezing LBR on PMI” is set). I think that these
situations do not apply when the MSR is zeroed, as it happens to be in KVM.

Nadav--
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