[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210318224310.3274160-1-seanjc@google.com>
Date: Thu, 18 Mar 2021 15:43:06 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Sean Christopherson <seanjc@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Alexander Graf <graf@...zon.com>,
Yuan Yao <yaoyuan0329os@...il.com>
Subject: [PATCH v2 0/4] KVM: x86: MSR filtering and related fixes
Rework the MSR filtering implementation to treat a given filter instance
as an atomic unit, and to properly protect it with SRCU.
Fix two nVMX bugs related to MSR filtering (one directly, one indirectly),
and additional cleanup on top.
Regarding the macro insanity in patch 03, I verified the before and after
binary output for vmx_set_intercept_for_msr() was identical, again. This
required wrapping "if (msr <= 0x1fff)" with (un)likely in both the before
and after versions; gcc made seemingly random choices without forcing it
to favor a specific branch.
v2:
- Collect R-b. [Paolo, Alex].
- Make the macro insanity slightly less insane. [Paolo]
v1: https://lkml.kernel.org/r/20210316184436.2544875-1-seanjc@google.com
Sean Christopherson (4):
KVM: x86: Protect userspace MSR filter with SRCU, and set
atomically-ish
KVM: nVMX: Handle dynamic MSR intercept toggling
KVM: VMX: Macrofy the MSR bitmap getters and setters
KVM: nVMX: Clean up x2APIC MSR handling for L2
Documentation/virt/kvm/api.rst | 6 +-
arch/x86/include/asm/kvm_host.h | 17 ++--
arch/x86/kvm/vmx/nested.c | 161 +++++++++++++-------------------
arch/x86/kvm/vmx/vmx.c | 67 +------------
arch/x86/kvm/vmx/vmx.h | 28 ++++++
arch/x86/kvm/x86.c | 109 ++++++++++++---------
6 files changed, 172 insertions(+), 216 deletions(-)
--
2.31.0.rc2.261.g7f71774620-goog
Powered by blists - more mailing lists