Move the prototypes for the MMU notifier callbacks out of arch code and
into common code. There is no benefit to having each arch replicate the
prototypes since any deviation from the invocation in common code will
explode.
No functional change intended.
Signed-off-by: Sean Christopherson
can consolidate the core iterating logic.
No real functional change intended.
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/mmu/tdp_mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c
index 7fe5004b1565
g TLB
flushes across multiple address spaces in kvm_zap_gfn_range(), and also
optimizes the TDP MMU to utilize range-based flushing when running as L1
with Hyper-V enlightenments.
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/mmu/mmu.c | 10 --
arch/x86/kvm/mmu/mmu_internal.h
iteration to cover the legacy and TDP MMUs without
introducing truly ugly code.
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/mmu/mmu.c | 17 -
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index 37e2432c78ca..e6
may have serviced a prior
pending flush.
Cc: Ben Gardon
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/mmu/tdp_mmu.c | 22 +-
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c
index 08667e3cf091
-off-by: Sean Christopherson
---
arch/x86/kvm/mmu/mmu.c | 37 +++--
1 file changed, 19 insertions(+), 18 deletions(-)
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index 7a99e59c8c1c..d5c9fb34971a 100644
--- a/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm
with Hyper-V enlightenments.
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/mmu/mmu.c | 6 --
arch/x86/kvm/mmu/tdp_mmu.c | 8 +++-
arch/x86/kvm/mmu/tdp_mmu.h | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
or our particular use case. :-/
Patches 17-18 are additional x86 cleanups.
Sean Christopherson (18):
KVM: x86/mmu: Coalesce TDP MMU TLB flushes when zapping collapsible
SPTEs
KVM: x86/mmu: Move flushing for "slot" handlers to caller for legacy
MMU
KVM: x86/mmu: Coalesce TLB fl
On Thu, Mar 25, 2021, Ben Gardon wrote:
> On Thu, Mar 25, 2021 at 1:01 PM Sean Christopherson wrote:
> > +static inline bool kvm_tdp_mmu_zap_gfn_range(struct kvm *kvm, gfn_t start,
> > +gfn_t end)
> > +{
> > + return
holding mmu_lock for read would break as the TDP MMU
wouldn't be guaranteed to see the present shadow page, and thus could step
sideways at a lower level.
Cc: Ben Gardon
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/mmu/mmu.c | 4 +---
arch/x86/kvm/mmu/tdp_mmu.c | 5 +++--
arch/x86/kvm
n
no flush will occur.
Fixes: 29cf0f5007a2 ("kvm: x86/mmu: NX largepage recovery for TDP MMU")
Cc: sta...@vger.kernel.org
Cc: Ben Gardon
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/mmu/mmu.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch
wed-by: Ben Gardon
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/mmu/tdp_mmu.c | 23 ---
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c
index f0c99fa04ef2..6cf08c3c537f 100644
--- a/arch/x86/kvm/mm
atch since it's not strictly a
bug fix and it's standalone anyways (the flush feedback loop was not).
v1:
- https://lkml.kernel.org/r/20210319232006.3468382-1-sea...@google.com
Sean Christopherson (3):
KVM: x86/mmu: Ensure TLBs are flushed when yielding during GFN range
zap
KVM: x86/m
On Tue, Mar 23, 2021, Ben Gardon wrote:
> On Tue, Mar 23, 2021 at 11:58 AM Sean Christopherson
> wrote:
> >
> > On Tue, Mar 23, 2021, Ben Gardon wrote:
> > > On Mon, Mar 22, 2021 at 5:15 PM Sean Christopherson
> > > wrote:
> > > >
On Thu, Mar 25, 2021, Haiwei Li wrote:
> On Tue, Mar 23, 2021 at 10:37 AM wrote:
> >
> > From: Haiwei Li
> >
> > According to IA-32 SDM Vol.3D "A.1 BASIC VMX INFORMATION", two inspections
> > are missing.
> > * Bit 31 is always 0. Earlier versions of this manual specified that the
> > VMCS
On Tue, Mar 23, 2021, Sami Tolvanen wrote:
> On Tue, Mar 23, 2021 at 9:36 AM Sean Christopherson wrote:
> >
> > On Tue, Mar 23, 2021, Sami Tolvanen wrote:
> > > On Mon, Mar 22, 2021 at 4:44 PM Sean Christopherson
> > > wrote:
> > > >
> >
On Tue, Mar 23, 2021, Ben Gardon wrote:
> On Mon, Mar 22, 2021 at 5:15 PM Sean Christopherson wrote:
> >
> > On Mon, Mar 22, 2021, Ben Gardon wrote:
> > > It could be fixed by forbidding kvm_tdp_mmu_zap_gfn_range from
> > > yielding. Since we should only need
On Tue, Mar 23, 2021, Paolo Bonzini wrote:
> On 23/03/21 18:02, Sean Christopherson wrote:
> > > That's important, but it's even more important *to developers* that the
> > > commit message spells out why this would be a kernel bug more often than
> > > not. I for o
On Tue, Mar 23, 2021, Paolo Bonzini wrote:
> On 23/03/21 17:06, Borislav Petkov wrote:
> > > Practically speaking, "basic" deployments of SGX VMs will be insulated
> > > from
> > > this bug. KVM doesn't support EPC oversubscription, so even if all EPC is
> > > exhausted, new VMs will fail to
On Tue, Mar 23, 2021, Borislav Petkov wrote:
> On Tue, Mar 23, 2021 at 04:21:47PM +0000, Sean Christopherson wrote:
> > I like the idea of pointing at the documentation. The documentation should
> > probably emphasize that something is very, very wrong.
>
> Yap, bec
On Tue, Mar 23, 2021, Sami Tolvanen wrote:
> On Mon, Mar 22, 2021 at 4:44 PM Sean Christopherson wrote:
> >
> > Merge module sections only when using Clang LTO. With gcc-10, merging
> > sections does not appear to update the symbol tables for the module,
> > e.g. '
On Tue, Mar 23, 2021, Borislav Petkov wrote:
> On Tue, Mar 23, 2021 at 03:45:14PM +0000, Sean Christopherson wrote:
> > Practically speaking, "basic" deployments of SGX VMs will be insulated from
> > this bug. KVM doesn't support EPC oversubscription, so even if all EPC
On Wed, Mar 17, 2021, Cathy Avery wrote:
> Extend using the vmcb12 control clean field to determine which
> vmcb12.save registers were marked dirty in order to minimize
> register copies by including the CR bit.
>
> This patch also fixes the init of last_vmcb12_gpa by using an invalid
> physical
On Tue, Mar 23, 2021, Yanan Wang wrote:
> Hi,
> This v5 series can mainly include two parts.
> Based on kvm queue branch:
> https://git.kernel.org/pub/scm/virt/kvm/kvm.git/log/?h=queue
Given the number of Reviewed-by tags, I'm pretty sure you can drop the "RFC" :-)
On Tue, Mar 23, 2021, Yang Weijiang wrote:
> On Tue, Mar 16, 2021 at 05:03:47PM +0800, Yang Weijiang wrote:
>
> Hi, Sean,
> Could you respond my below rely? I'm not sure how to proceed, thanks!
>
> > On Mon, Mar 15, 2021 at 09:45:11AM -0700, Sean Christopherson wrote:
>
On Tue, Mar 23, 2021, Kai Huang wrote:
> On Mon, 22 Mar 2021 23:37:26 +0100 Borislav Petkov wrote:
> > "The instruction fails if the operand is not properly aligned or does
> > not refer to an EPC page or the page is in use by another thread, or
> > other threads are running in the enclave to
On Mon, Mar 22, 2021, Ben Gardon wrote:
> On Fri, Mar 19, 2021 at 4:20 PM Sean Christopherson wrote:
> > @@ -5960,19 +5963,21 @@ static void kvm_recover_nx_lpages(struct kvm *kvm)
> > lpage_disallowed_link);
> >
, and presumably
other things, e.g.
gdb -batch -ex "file arch/x86/kvm/kvm.ko" -ex "disassemble kvm_init"
reads the wrong bytes and dumps garbage.
Fixes: dd2776222abb ("kbuild: lto: merge module sections")
Cc: Nick Desaulniers
Cc: Sami Tolvanen
Cc: Kees Cook
Sign
On Mon, Mar 22, 2021, Borislav Petkov wrote:
> On Mon, Mar 22, 2021 at 11:56:37AM -0700, Sean Christopherson wrote:
> > Not necessarily. This can only trigger in the host, and thus require a host
> > reboot, if the host is also running enclaves. If the CSP is not runni
On Mon, Mar 22, 2021, Borislav Petkov wrote:
> On Fri, Mar 19, 2021 at 08:22:19PM +1300, Kai Huang wrote:
> > +/**
> > + * sgx_encl_free_epc_page - free EPC page assigned to an enclave
> > + * @page: EPC page to be freed
> > + *
> > + * Free EPC page assigned to an enclave. It does EREMOVE for
On Sun, Mar 21, 2021, ira.we...@intel.com wrote:
> From: Ira Weiny
>
> PKey faults may now happen on kernel mappings if the feature is enabled.
> Remove the warning in the fault path if PKS is enabled.
When/why can they happen? I read through all the changelogs, as well as the
cover letters
ds a flush. This
fixes the case where the TDP MMU yields, but it iteslf does not require a
flush.
Fixes: 29cf0f5007a2 ("kvm: x86/mmu: NX largepage recovery for TDP MMU")
Cc: sta...@vger.kernel.org
Cc: Ben Gardon
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/mmu/mmu.c | 15 ++---
nt flushes. zap_gfn_range()
preserves and return the incoming "flush", unless of course the flush was
performed prior to yielding and no new flush was triggered.
Fixes: 1af4a96025b3 ("KVM: x86/mmu: Yield in TDU MMU iter even if no SPTES
changed")
Cc: sta...@vger.kernel.org
Cc: B
that was required from a previous root.
Patch 2 fixes a much more egregious bug where it fails to handle TDP MMU
flushes in NX huge page recovery, as well as a similar bug to patch 1
where KVM can yield without correctly handling a previously triggered
pending TLB flush.
Sean Christopherson (2):
KVM
On Thu, Mar 18, 2021, Kuppuswamy Sathyanarayanan wrote:
> diff --git a/arch/x86/kernel/tdx.c b/arch/x86/kernel/tdx.c
> index e44e55d1e519..7ae1d25e272b 100644
> --- a/arch/x86/kernel/tdx.c
> +++ b/arch/x86/kernel/tdx.c
> @@ -4,6 +4,58 @@
> #include
> #include
>
> +void tdcall(u64 leafid,
Add builder macros to generate the MSR bitmap helpers to reduce the
amount of copy-paste code, especially with respect to all the magic
numbers needed to calc the correct bit location.
No functional change intended.
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/vmx/vmx.h | 77
possible")
Cc: sta...@vger.kernel.org
Cc: Alexander Graf
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/vmx/nested.c | 108 +-
arch/x86/kvm/vmx/vmx.c| 67 ++-
arch/x86/kvm/vmx/vmx.h| 63 ++
3 files changed,
comment was flat out wrong for x2APIC behavior).
No functional change intended.
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/vmx/nested.c | 53 +++
arch/x86/kvm/vmx/vmx.h| 8 ++
2 files changed, 22 insertions(+), 39 deletions(-)
diff --git
onzini
Reviewed-by: Alexander Graf
Reported-by: Yuan Yao
Signed-off-by: Sean Christopherson
---
Documentation/virt/kvm/api.rst | 6 +-
arch/x86/include/asm/kvm_host.h | 17 ++---
arch/x86/kvm/x86.c | 109 +++-
3 files changed, 78 insertions(+), 54 deletion
[Paolo, Alex].
- Make the macro insanity slightly less insane. [Paolo]
v1: https://lkml.kernel.org/r/20210316184436.2544875-1-sea...@google.com
Sean Christopherson (4):
KVM: x86: Protect userspace MSR filter with SRCU, and set
atomically-ish
KVM: nVMX: Handle dynamic MSR intercept toggli
and will need to be updated if AMD ever gains 5-level paging.
No functional change intended.
Suggested-by: Paolo Bonzini
Signed-off-by: Sean Christopherson
---
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/kvm/mmu/mmu.c | 20 ++--
2 files changed, 11 insertions(+), 11
On Thu, Mar 18, 2021, Paolo Bonzini wrote:
> On 18/03/21 18:03, Andrew Jones wrote:
> > >
> > > TEST_GEN_PROGS_x86_64 = x86_64/cr4_cpuid_sync_test
> > > +TEST_GEN_PROGS_x86_64 += x86_64/get_msr_index_features
> >
> > Maybe we should give up trying to keep an alphabetic order.
>
> FWIW I had
On Thu, Mar 18, 2021, Maxim Levitsky wrote:
> On Thu, 2021-03-18 at 16:35 +0000, Sean Christopherson wrote:
> > Skipping SEV-ES guests should not be difficult; KVM could probably even
> > print a message stating that the debug hook is being ignored. One thought
> > wou
On Thu, Mar 18, 2021, Joerg Roedel wrote:
> On Thu, Mar 18, 2021 at 11:24:25AM +0200, Maxim Levitsky wrote:
> > But again this is a debug feature, and it is intended to allow the user
> > to shoot himself in the foot.
>
> And one can't debug SEV-ES guests with it, so what is the point of
>
On Wed, Mar 17, 2021, Sean Christopherson wrote:
> On Wed, Mar 17, 2021, Borislav Petkov wrote:
> > IOW, you have c_bit so your valid address space is [0 .. c_bit-1] no?
>
> I haven't found anything in the GHCB that dictates that MAXPHYADDR == C_BIT-1,
> or more specifical
On Wed, Mar 17, 2021, Sean Christopherson wrote:
> On Wed, Mar 17, 2021, Paolo Bonzini wrote:
> > On 17/03/21 17:50, Sean Christopherson wrote:
> > > > Feel free to squash patch 3 in this one or reorder it before; it makes
> > > > sense
> > > >
On Wed, Mar 17, 2021, Borislav Petkov wrote:
> On Wed, Mar 17, 2021 at 11:32:43AM -0700, Sean Christopherson wrote:
> > Note, early kernel boot code for SEV-*, e.g. get_sev_encryption_bit(),
> > _requires_ the SEV feature flag to be set in CPUID in order to identify
> > SEV (t
Cc: Tom Lendacky
Cc: Brijesh Singh
Cc: Peter Gonda
Signed-off-by: Sean Christopherson
---
Regarding clearing SME, SEV, SEV_ES, etc..., it's obviously not required,
but to avoid false postives, identifying "SEV guest" within the kernel
must be done with sev_active(). And if we wa
On Wed, Mar 17, 2021, Paolo Bonzini wrote:
> On 17/03/21 17:50, Sean Christopherson wrote:
> > > Feel free to squash patch 3 in this one or reorder it before; it makes
> > > sense
> > > to make them macros when you go from 4 to 6 functions.
> > I put them in
On Wed, Mar 17, 2021, Paolo Bonzini wrote:
> On 16/03/21 19:44, Sean Christopherson wrote:
> > Always check vmcs01's MSR bitmap when merging L0 and L1 bitmaps for L2,
> > and always update the relevant bits in vmcs02. This fixes two distinct,
> > but intertwined bugs related
On Wed, Mar 17, 2021, Paolo Bonzini wrote:
> On 16/03/21 19:44, Sean Christopherson wrote:
> > + return (ret)true; \
>
> I'm not sure if (void)true is amazing or disgusting, but anyway...
Definitely both.
> > +BUILD_
possible")
Cc: sta...@vger.kernel.org
Cc: Alexander Graf
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/vmx/nested.c | 108 +-
arch/x86/kvm/vmx/vmx.c| 67 ++-
arch/x86/kvm/vmx/vmx.h| 63 ++
3 files changed,
comment was flat out wrong for x2APIC behavior).
No functional change intended.
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/vmx/nested.c | 53 +++
arch/x86/kvm/vmx/vmx.h| 7 ++
2 files changed, 21 insertions(+), 39 deletions(-)
diff --git
ted-by: Yuan Yao
Signed-off-by: Sean Christopherson
---
Documentation/virt/kvm/api.rst | 6 +-
arch/x86/include/asm/kvm_host.h | 17 ++---
arch/x86/kvm/x86.c | 109 +++-
3 files changed, 78 insertions(+), 54 deletions(-)
diff --git a/Documentation/vi
the before and after
binary output for vmx_set_intercept_for_msr() was identical (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).
Sean Christopherson (4
Add builder macros to generate the MSR bitmap helpers to reduce the
amount of copy-paste code, especially with respect to all the magic
numbers needed to calc the correct bit location.
No functional change intended.
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/vmx/vmx.h | 82
On Tue, Mar 16, 2021, Paolo Bonzini wrote:
> On 16/03/21 18:52, Sean Christopherson wrote:
> > > I don't
> > > know that holding the fd instead of the kvm makes that much better though,
> > > are there advantages to that I'm not seeing?
> > If there's no k
On Mon, Mar 15, 2021, Ben Gardon wrote:
> No functional change intended.
I want royalties.
> Signed-off-by: Ben Gardon
> ---
Reviewed-by: Sean Christopherson
On Mon, Mar 15, 2021, Ben Gardon wrote:
> Fix a missing rcu_dereference in tdp_mmu_zap_spte_atomic.
>
> Reported-by: kernel test robot
> Signed-off-by: Ben Gardon
> ---
Reviewed-by: Sean Christopherson
On Fri, Mar 12, 2021, Nathan Tempelman wrote:
> On Wed, Feb 24, 2021 at 9:37 AM Sean Christopherson wrote:
> > > @@ -1282,6 +1299,65 @@ int svm_unregister_enc_region(struct kvm *kvm,
> > > return ret;
> > > }
> > >
> > > +int svm_vm_copy_asi
On Tue, Mar 16, 2021, Jan Kiszka wrote:
> On 16.03.21 17:50, Sean Christopherson wrote:
> > Rather than block all events in KVM, what about having QEMU "pause" the
> > timer?
> > E.g. save MSR_TSC_DEADLINE and APIC_TMICT (or inspect the guest to find out
> >
On Tue, Mar 16, 2021, Borislav Petkov wrote:
> On Tue, Mar 16, 2021 at 03:42:23PM +0800, Feng Tang wrote:
> > Also I'm wondering for some basic leaf and extended leaf which
> > may has different definition for different vendors, do we need
> > to seprate the csv to a general one and vendor
gt; I have no objections though to use this patch as is, or at least make this
> the new default with a new flag to override this.
That's less bad, but IMO still violates the principle of least surprise, e.g.
someone that is single-stepping a guest and is expecting an IRQ to fire will be
all kinds of confu
On Tue, Mar 16, 2021, Jarkko Sakkinen wrote:
> On Tue, Mar 16, 2021 at 01:05:05AM +0200, Jarkko Sakkinen wrote:
> > The way I've understood it is that given that KVM can support SGX
> > without FLC, vEPC should be available even if driver cannot be
> > enabled.
> >
> > This is also exactly what
On Tue, Mar 16, 2021, Maxim Levitsky wrote:
> This change greatly helps with two issues:
>
> * Resuming from a breakpoint is much more reliable.
>
> When resuming execution from a breakpoint, with interrupts enabled, more
> often
> than not, KVM would inject an interrupt and make the CPU
On Mon, Mar 15, 2021, Ben Gardon wrote:
> Fix a missing rcu_dereference in tdp_mmu_zap_spte_atomic.
>
> Reported-by: kernel test robot
> Signed-off-by: Ben Gardon
> ---
Reviewed-by: Sean Christopherson
> tdp_mmu_iter_cond_resched and tdp_iter_start.
>
> No functional change intended.
>
> Signed-off-by: Ben Gardon
> ---
Very nice, sooo much easier to read.
Reviewed-by: Sean Christopherson
On Mon, Mar 15, 2021, Ben Gardon wrote:
Missing "From: Sean Christopherson ", i.e. the commit in your
local tree needs "git commit --amend --author="Sean Christopherson
".
Alternatively, you could just erase my SOB ;-)
> Store the address space ID in the
one blank line and add minor fix for MPX.
>
> Suggested-by: Sean Christopherson
> Signed-off-by: Yang Weijiang
> ---
> arch/x86/kvm/cpuid.c | 1 -
> arch/x86/kvm/vmx/nested.c | 35 +--
> arch/x86/kvm/vmx/vmx.h| 3 +++
> 3 files
On Wed, Mar 10, 2021, Haiwei Li wrote:
> On Wed, Mar 10, 2021 at 7:42 AM Sean Christopherson wrote:
> >
> > On Wed, Mar 03, 2021, Haiwei Li wrote:
> > > On 21/3/3 10:09, lihaiwei.ker...@gmail.com wrote:
> > > > From: Haiwei Li
> > > >
>
On Thu, Feb 25, 2021, wangyanan (Y) wrote:
>
> On 2021/2/11 7:06, Sean Christopherson wrote:
> > Align the HVA for hugepage memslots to 1gb, as opposed to incorrectly
> > assuming all architectures' hugepages are 512*page_size.
> >
> > For x86, multiplying by 51
On Thu, Feb 25, 2021, wangyanan (Y) wrote:
> Hi Sean,
>
> On 2021/2/11 7:06, Sean Christopherson wrote:
> > Align the HVA for HugeTLB memslots, not just THP memslots. Add an
> > assert so any future backing types are forced to assess whether or not
> > they need to b
On Mon, Mar 08, 2021, Yang Weijiang wrote:
> On Thu, Mar 04, 2021 at 08:46:45AM -0800, Sean Christopherson wrote:
> > On Thu, Mar 04, 2021, Yang Weijiang wrote:
> > > @@ -3375,6 +3391,12 @@ enum nvmx_vmentry_status
> > > nested_vmx_enter_non_root
On Tue, Mar 09, 2021, Paolo Bonzini wrote:
> On 09/03/21 10:30, Borislav Petkov wrote:
> > On Tue, Mar 09, 2021 at 02:38:49PM +1300, Kai Huang wrote:
> > > This series adds KVM SGX virtualization support. The first 14 patches
> > > starting
> > > with x86/sgx or x86/cpu.. are necessary changes to
On Tue, Mar 09, 2021, Kai Huang wrote:
> From: Sean Christopherson
>
> Expose SGX architectural structures, as KVM will use many of the
> architectural constants and structs to virtualize SGX.
>
> Name the new header file as asm/sgx.h, rather than asm/sgx_arch.h, to
&g
*
> + * Error out only if both fail to initialize.
> + */
> + ret = !!sgx_drv_init() & !!sgx_vepc_init();
I love this code.
Reviewed-by: Sean Christopherson
> if (ret)
> goto err_kthread;
>
> --
> 2.29.2
>
On Tue, Mar 09, 2021, Kai Huang wrote:
> + if (cpu_has(c, X86_FEATURE_SGX) && IS_ENABLED(CONFIG_X86_SGX)) {
> + /*
> + * Separate out SGX driver enabling from KVM. This allows KVM
> + * guests to use SGX even if the kernel SGX driver refuses to
> +
bug during copy/paste which results in SECS page and va pages are not
>correctly freed in sgx_encl_release() (sorry for the mistake).
> - Added Jarkko's Acked-by.
That Acked-by should either be dropped or moved above Co-developed-by to make
checkpatch happy.
Reviewed-by: Sean Christopherson
On Tue, Mar 09, 2021, Kai Huang wrote:
> @@ -290,6 +290,8 @@
> #define X86_FEATURE_FENCE_SWAPGS_KERNEL (11*32+ 5) /* "" LFENCE in
> kernel entry SWAPGS path */
> #define X86_FEATURE_SPLIT_LOCK_DETECT(11*32+ 6) /* #AC for split
> lock */
> #define X86_FEATURE_PER_THREAD_MBA
On Tue, Mar 09, 2021, Kai Huang wrote:
> Move SGX_LC feature bit to CPUID dependency table to make clearing all
> SGX feature bits easier. Also remove clear_sgx_caps() since it is just
> a wrapper of setup_clear_cpu_cap(X86_FEATURE_SGX) now.
>
> Suggested-by: Sean Christopherson
&
On Fri, Mar 12, 2021, Vipin Sharma wrote:
> On Thu, Mar 11, 2021 at 07:59:03PM +0100, Michal Koutný wrote:
> > > +#ifndef CONFIG_KVM_AMD_SEV
> > > +/*
> > > + * When this config is not defined, SEV feature is not supported and
> > > APIs in
> > > + * this file are not used but this file still
On Thu, Mar 11, 2021, Ben Gardon wrote:
> In tdp_mmu_iter_cond_resched there is a call to tdp_iter_start which
> causes the iterator to continue its walk over the paging structure from
> the root. This is needed after a yield as paging structure could have
> been freed in the interim.
>
> The
On Thu, Mar 11, 2021, Ben Gardon wrote:
> Fix a missing rcu_dereference in tdp_mmu_zap_spte_atomic.
>
> Reported-by: kernel test robot
s/x/intel.com
Reviewed-by: Sean Christopherson
> Signed-off-by: Ben Gardon
necessary in some cases, it will be a net win when setting multiple
sptes, e.g. in mmu_notifier callbacks.
Compile tested only...
>From 02fb9cd2aa52d0afd318e93661d0212ccdb54218 Mon Sep 17 00:00:00 2001
From: Sean Christopherson
Date: Fri, 12 Mar 2021 08:12:21 -0800
Subject: [PATCH] KVM
out a proper rcu_derefrence. Fix this by
> passing the pt as a tdp_ptep_t and then rcu_dereferencing it in
> the function.
>
> Suggested-by: Sean Christopherson
> Reported-by: kernel test robot
Should be . Looks like you've been taking pointers from Paolo
:-)
https://lkml.org
avid Rientjes
Cc: Ben Gardon
Cc: Michal Hocko
Cc: "Jérôme Glisse"
Cc: Andrea Arcangeli
Cc: Johannes Weiner
Cc: Dimitri Sivanich
Signed-off-by: Sean Christopherson
---
v2: Reimplemented as suggested by Jason. Only functional change relative
to Jason's suggestion is t
On Tue, Feb 23, 2021, Wanpeng Li wrote:
> On Tue, 23 Feb 2021 at 13:25, Wanpeng Li wrote:
> >
> > From: Wanpeng Li
> >
> > After commit 997acaf6b4b59c (lockdep: report broken irq restoration), the
> > guest
> > splatting below during boot:
> >
> > raw_local_irq_restore() called with IRQs
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: c8e2fe13d1d1f3a02842b7b909d4e4846a4b6a2c
Gitweb:
https://git.kernel.org/tip/c8e2fe13d1d1f3a02842b7b909d4e4846a4b6a2c
Author:Sean Christopherson
AuthorDate:Tue, 09 Mar 2021 09:10:19 -08:00
On Wed, Mar 10, 2021, Jason Gunthorpe wrote:
> On Wed, Mar 10, 2021 at 05:20:01PM -0800, Sean Christopherson wrote:
>
> > > Which I believe is fatal to kvm? These notifiers certainly do not only
> > > happen at process exit.
> >
> > My point about the pr
On Wed, Mar 10, 2021, Jason Gunthorpe wrote:
> On Wed, Mar 10, 2021 at 01:31:17PM -0800, Sean Christopherson wrote:
> > Invoke the MMU notifier's .invalidate_range_end() callbacks even if one
> > of the .invalidate_range_start() callbacks failed. If there are multiple
> > no
notifier count.
Fixes: 93065ac753e4 ("mm, oom: distinguish blockable mode for mmu notifiers")
Cc: sta...@vger.kernel.org
Cc: David Rientjes
Cc: Ben Gardon
Cc: Jason Gunthorpe
Cc: Michal Hocko
Cc: "Jérôme Glisse"
Cc: Andrea Arcangeli
Cc: Johannes Weiner
Cc: Dimitri Sivanich
On Wed, Mar 10, 2021, Paolo Bonzini wrote:
> On 10/03/21 01:30, Sean Christopherson wrote:
> > diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c
> > index 50ef757c5586..f0c99fa04ef2 100644
> > --- a/arch/x86/kvm/mmu/tdp_mmu.c
> > +++ b/arch/x86/kvm/
On Wed, Mar 10, 2021, Peter Zijlstra wrote:
> On Tue, Mar 09, 2021 at 09:10:19AM -0800, Sean Christopherson wrote:
>
> > @@ -2024,9 +2021,6 @@ static int __init init_hw_perf_events(void)
> > if (!x86_pmu.read)
> > x86_
On Wed, Mar 10, 2021, Martin Radev wrote:
> On Wed, Mar 10, 2021 at 08:08:37AM -0800, Sean Christopherson wrote:
> > On Wed, Mar 10, 2021, Joerg Roedel wrote:
> > > + /*
> > > + * Sanity check CPUID results from the Hypervisor. See comment in
> > > + * do_
On Wed, Mar 10, 2021, Joerg Roedel wrote:
> From: Joerg Roedel
>
> The 32-bit #VC handler has no GHCB and can only handle CPUID exit codes.
> It is needed by the early boot code to handle #VC exceptions raised in
> verify_cpu() and to get the position of the C bit.
>
> But the CPUID information
On Wed, Mar 10, 2021, Jarkko Sakkinen wrote:
> On Wed, Mar 03, 2021 at 08:56:52AM -0800, Dave Hansen wrote:
> > On 3/3/21 7:03 AM, Jarkko Sakkinen wrote:
> > > If sgx_page_cache_init() fails in the middle, a trivial return
> > > statement causes unused memory and virtual address space reserved for
big function), as well as
several conditional branches before bailing out.
Cc: Ben Gardon
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/mmu/tdp_mmu.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c
index 50ef757c5586
On Wed, Mar 03, 2021, Haiwei Li wrote:
> On 21/3/3 10:09, lihaiwei.ker...@gmail.com wrote:
> > From: Haiwei Li
> >
> > In my test environment, advance_expire_delta is frequently greater than
> > the fixed LAPIC_TIMER_ADVANCE_ADJUST_MAX. And this will hinder the
> > adjustment.
>
> Supplementary
c: Brijesh Singh
Cc: Tom Lendacky
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/mmu/mmu.c | 22 +-
arch/x86/kvm/svm/svm.c | 5 ++---
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index 6b0576ff2846..c6
-by: Sean Christopherson
---
arch/x86/kvm/mmu/mmu.c | 24 +---
arch/x86/kvm/mmu/mmu_audit.c| 2 +-
arch/x86/kvm/mmu/mmu_internal.h | 10 ++
3 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
201 - 300 of 2860 matches
Mail list logo