Re: [PATCH 1/2] KVM: X86: Move ignore_msrs handling upper the stack

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

 



On Thu, Jul 09, 2020 at 05:09:19PM -0400, Peter Xu wrote:
> Again, using host_initiated or not should be a different issue?  Frankly
> speaking, I don't know whether it's an issue or not, but it's different from
> what this series wants to do, because it'll be the same before/after this
> series. Am I right?

I'm arguing that the TSX thing should be

diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 5eb618dbf211..e1fd5ac0df96 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -1015,7 +1015,7 @@ bool kvm_cpuid(struct kvm_vcpu *vcpu, u32 *eax, u32 *ebx,
                *edx = entry->edx;
                if (function == 7 && index == 0) {
                        u64 data;
-                       if (!__kvm_get_msr(vcpu, MSR_IA32_TSX_CTRL, &data, true) &&
+                       if (!kvm_get_msr(vcpu, MSR_IA32_TSX_CTRL, &data) &&
                            (data & TSX_CTRL_CPUID_CLEAR))
                                *ebx &= ~(F(RTM) | F(HLE));
                }

At which point hoisting the ignored message up a few levels is pointless
because the only users of __kvm_*et_msr() will do the explicit ignored_check.
And I'm also arguing that KVM should never use __kvm_get_msr() for its own
actions, as host_initiated=true should only be used for host VMM accesses and
host_initiated=false actions should go through the proper checks and never
get to the ignored_msrs logic (assuming no KVM bug).

> Or, please explain what's the "overruled objection" that you're talking about..

Sean: Objection your honor.
Paolo: Overruled, you're wrong.
Sean: Phooey.

My point is that even though I still object to this series, Paolo has final
say.



[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