Re: [PATCH] KVM: x86: Keep masked bits unmodified on kvm_set_shared_msr

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

 



Il 21/08/2014 14:19, Nadav Amit ha scritto:
>> > 
>> > He meant they are passed as zero in the WRMSR but actually they're not
>> > zeroed.  They're set to the value that is passed to kvm_set_shared_msr,
>> > and this value is massaged elsewhere to do mix guest and host bugs.  See
>> > update_transition_efer.
>> > 
>> > So I'm removing this patch, it's wrong.
> I stand corrected - they are massaged in update_transition_efer.
> 
> The question is whether this massaging is specific to EFER, or a general one.
> Currently update_transition_efer does:
> 
>         guest_efer &= ~ignore_bits;
>         guest_efer |= host_efer & ignore_bits;
> 	vmx->guest_msrs[efer_offset].data = guest_efer;
> 
> I think this is a general behaviour - taking the masked bits from the
> host, and the rest from the guest. Therefore, it makes sense to put
> this logic into kvm_set_shared_msr. I understand the EFER is
> currently the only MSR which is only partially masked. Nonetheless,
> kvm_set_shared_msr can be useful for other purposes.

Yes, I agree.  But right now it's not particularly interesting to do it:
you're not using the functionality in e.g. the MISC_ENABLE patch, so
it's just a matter of defining the semantics of the .data field, basically.

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