&& defined(KVM_ARCH_WANT_MMU_NOTIFIER)
checks into a single
#ifdef CONFIG_KVM_GENERIC_MMU_NOTIFIER
without having to worry about PPC's "bare" usage of
KVM_ARCH_WANT_MMU_NOTIFIER.
Signed-off-by: Sean Christopherson
Reviewed-by: Paolo Bonzini
Reviewed-by: Fuad Tabba
Message-
S_HV_POSSIBLE=y.
Suggested-by: Paolo Bonzini
Signed-off-by: Sean Christopherson
Message-Id: <20231027182217.3615211-7-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
arch/powerpc/kvm/powerpc.c | 4
1 file changed, 4 deletions(-)
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerp
there's no
good reason not to define it in common KVM.
Acked-by: Anup Patel
Signed-off-by: Sean Christopherson
Reviewed-by: Paolo Bonzini
Reviewed-by: Fuad Tabba
Tested-by: Fuad Tabba
Message-Id: <20231027182217.3615211-8-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
arch/ar
ction of bad flags a bit more robust, e.g. if the new fd field
is guarded only by a flag and not a new ioctl(), then a userspace bug
(setting a "bad" flag) would generate out-of-bounds access instead of an
-EINVAL error.
Cc: Jarkko Sakkinen
Reviewed-by: Paolo Bonzini
Reviewed-by: X
Chao Peng
Co-developed-by: Sean Christopherson
Signed-off-by: Sean Christopherson
Reviewed-by: Paolo Bonzini
Message-Id: <20231027182217.3615211-10-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
Documentation/virt/kvm/api.rst | 41 ++
arch/x86/kvm/x86.c
urned from a function call (not to mention the size of the struct will
be two bytes in practice).
Signed-off-by: Sean Christopherson
Reviewed-by: Paolo Bonzini
Reviewed-by: Fuad Tabba
Tested-by: Fuad Tabba
Message-Id: <20231027182217.3615211-11-sea...@google.com>
Signed-off-by: Pa
this nature.
Reported-by: Isaku Yamahata
Link: https://lore.kernel.org/all/20230802203119.gb2021...@ls.amr.corp.intel.com
Signed-off-by: Sean Christopherson
Reviewed-by: Paolo Bonzini
Reviewed-by: Fuad Tabba
Tested-by: Fuad Tabba
Message-Id: <20231027182217.3615211-12-sea...@google.com>
Si
Id: <20231027182217.3615211-14-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
Documentation/virt/kvm/api.rst | 36 ++
include/linux/kvm_host.h | 19 +++
include/uapi/linux/kvm.h | 13 ++
virt/kvm/Kconfig | 4 +
virt/kvm/kvm_main.c| 216
NEVICTABLE.
Cc: Matthew Wilcox
Co-developed-by: Vlastimil Babka
Signed-off-by: Vlastimil Babka
Signed-off-by: Sean Christopherson
Message-Id: <20231027182217.3615211-15-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
include/linux/pagemap.h | 19 +-
mm/compactio
().
There is no in-tree module that uses it, and the old name is gone anyway.
If anybody actually needs the symbol, they can ask or they can just use
anon_inode_create_getfile(), which will be exported very soon for use
in KVM.
Suggested-by: Christian Brauner
Signed-off-by: Paolo Bonzini
---
fs
ick
Cc: Isaku Yamahata
Co-developed-by: Kirill A. Shutemov
Signed-off-by: Kirill A. Shutemov
Co-developed-by: Yu Zhang
Signed-off-by: Yu Zhang
Co-developed-by: Chao Peng
Signed-off-by: Chao Peng
Co-developed-by: Ackerley Tng
Signed-off-by: Ackerley Tng
Co-developed-by: Isaku Yamahata
Signed-o
n is
preserved across KVM_RUN when run->immediate_exit is true.
Link: https://lore.kernel.org/all/20230908222905.1321305-1-amoor...@google.com
Link: https://lore.kernel.org/all/zffbwoxz5ui%2fg...@google.com
Signed-off-by: Sean Christopherson
Reviewed-by: Paolo Bonzini
Reviewed-by: Fuad Tabba
Tested-by: Fuad
son
Signed-off-by: Sean Christopherson
Message-Id: <20231027182217.3615211-20-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
arch/x86/include/asm/kvm_host.h | 3 +
arch/x86/kvm/mmu/mmu.c | 154 +++-
arch/x86/kvm/x86.c | 4 +
e mappings
always come from a guest_memfd instance.
Co-developed-by: Yu Zhang
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
Co-developed-by: Sean Christopherson
Signed-off-by: Sean Christopherson
Reviewed-by: Fuad Tabba
Tested-by: Fuad Tabba
Message-Id: <20231027182217.
From: Sean Christopherson
Drop __KVM_VCPU_MULTIPLE_ADDRESS_SPACE and instead check the value of
KVM_ADDRESS_SPACE_NUM.
No functional change intended.
Reviewed-by: Paolo Bonzini
Signed-off-by: Sean Christopherson
Reviewed-by: Fuad Tabba
Tested-by: Fuad Tabba
Message-Id
eviewed-by: Paolo Bonzini
Reviewed-by: Fuad Tabba
Tested-by: Fuad Tabba
Message-Id: <20231027182217.3615211-23-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
arch/powerpc/kvm/book3s_hv.c| 2 +-
arch/x86/include/asm/kvm_host.h | 8 +++-
arch/x86/kvm/debugfs.c | 2 +-
emory isn't a realistic option.
At the very least, KVM_X86_SW_PROTECTED_VM will enable a variety of
selftests for guest_memfd and private memory support without requiring
unique hardware.
Signed-off-by: Sean Christopherson
Reviewed-by: Paolo Bonzini
Message-Id: <20231027182217.3615211
egion/slot information.
Signed-off-by: Sean Christopherson
Message-Id: <20231027182217.3615211-25-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
.../selftests/kvm/include/kvm_util_base.h | 4 ---
tools/testing/selftests/kvm/lib/kvm_util.c| 29 ---
2 files changed, 33 de
this point forward.
Signed-off-by: Sean Christopherson
Message-Id: <20231027182217.3615211-26-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
.../selftests/kvm/include/kvm_util_base.h | 2 +-
tools/testing/selftests/kvm/lib/kvm_util.c| 19 ++-
2 files
the fd without having to first
destroy memslots.
Co-developed-by: Ackerley Tng
Signed-off-by: Ackerley Tng
Signed-off-by: Sean Christopherson
Message-Id: <20231027182217.3615211-27-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
.../selftests/kvm/include/kvm_util_base.h | 23 ++
ge-Id: <20231027182217.3615211-28-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
.../selftests/kvm/include/kvm_util_base.h | 48 +++
tools/testing/selftests/kvm/lib/kvm_util.c| 28 +++
2 files changed, 76 insertions(+)
diff --git a/tools/testing/selftests/
: drop shared/private helpers (let tests specify flags)]
Signed-off-by: Sean Christopherson
Message-Id: <20231027182217.3615211-29-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
.../selftests/kvm/include/x86_64/processor.h | 15 +++
1 file changed, 15 insertions(+)
t's expected that x86 will double down and require unique
VM types for TDX and SNP guests.
Signed-off-by: Sean Christopherson
Message-Id: <20231027182217.3615211-30-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
tools/testing/selftests/kvm/dirty_log_test.c
From: Sean Christopherson
Add GUEST_SYNC[1-6]() so that tests can pass the maximum amount of
information supported via ucall(), without needing to resort to shared
memory.
Signed-off-by: Sean Christopherson
Message-Id: <20231027182217.3615211-31-sea...@google.com>
Signed-off-by: Paolo B
Ackerley Tng
Signed-off-by: Ackerley Tng
Co-developed-by: Sean Christopherson
Signed-off-by: Sean Christopherson
Message-Id: <20231027182217.3615211-32-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
tools/testing/selftests/kvm/Makefile | 1 +
.../kvm/x86_64/private_me
ss version to reduce
the amount of boilerplate code need for basic usage.
Signed-off-by: Chao Peng
Signed-off-by: Ackerley Tng
Signed-off-by: Sean Christopherson
Message-Id: <20231027182217.3615211-33-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
.../selftests/kvm/includ
-by: Ackerley Tng
Signed-off-by: Ackerley Tng
[sean: trim the testcases to remove duplicate coverage]
Signed-off-by: Sean Christopherson
Message-Id: <20231027182217.3615211-34-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
.../selftests/kvm/include/kvm_util_base.h
Signed-off-by: Ackerley Tng
Co-developed-by: Paolo Bonzini
Signed-off-by: Paolo Bonzini
Co-developed-by: Sean Christopherson
Signed-off-by: Sean Christopherson
Message-Id: <20231027182217.3615211-35-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
tools/testing/selftests/kvm/Ma
_X86_SW_PROTECTED_VM without its prerequisites.
Signed-off-by: Ackerley Tng
[sean: call out the similarities with set_memory_region_test]
Signed-off-by: Sean Christopherson
Message-Id: <20231027182217.3615211-36-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
tools/testing/selftests/k
sea...@google.com>
Signed-off-by: Paolo Bonzini
---
.../selftests/kvm/set_memory_region_test.c| 49 +++
1 file changed, 49 insertions(+)
diff --git a/tools/testing/selftests/kvm/set_memory_region_test.c
b/tools/testing/selftests/kvm/set_memory_region_test.c
index 189177
7182217.3615211-13-sea...@google.com>
Signed-off-by: Paolo Bonzini
---
include/linux/kvm_host.h | 2 ++
virt/kvm/kvm_main.c | 17 +
2 files changed, 19 insertions(+)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 3ebc6912c54a..4d5d139b0bde 10064
11-18-sea...@google.com>
[Allow even with CONFIG_TRANSPARENT_HUGEPAGE; dropped momentarily due to
uneasiness about the API. - Paolo]
Signed-off-by: Paolo Bonzini
---
Documentation/virt/kvm/api.rst| 7 ++
include/uapi/linux/kvm.h | 2 +
.../testing/selfte
On 11/6/23 12:00, Fuad Tabba wrote:
Hi,
On Fri, Oct 27, 2023 at 7:23 PM Sean Christopherson wrote:
Add a new x86 VM type, KVM_X86_SW_PROTECTED_VM, to serve as a development
and testing vehicle for Confidential (CoCo) VMs, and potentially to even
become a "real" product in the distant future,
On 11/5/23 17:30, Paolo Bonzini wrote:
From: Chao Peng
Expand set_memory_region_test to exercise various positive and negative
testcases for private memory.
- Non-guest_memfd() file descriptor for private memory
- guest_memfd() from different VM
- Overlapping bindings
- Unaligned
On 11/9/23 00:37, Anish Moorthy wrote:
On Wed, Nov 8, 2023 at 9:00 AM Anish Moorthy wrote:
This commit breaks the arm64 selftests build btw: looks like a simple oversight?
Yup, fix is a one-liner. Posted below.
diff --git a/tools/testing/selftests/kvm/aarch64/page_fault_test.c
b/tools/test
On 11/5/23 17:30, Paolo Bonzini wrote:
The "development cycle" for this version is going to be very short;
ideally, next week I will merge it as is in kvm/next, taking this through
the KVM tree for 6.8 immediately after the end of the merge window.
The series is still based on 6.6
6_64__, while the usages introduced here aren't.
> >
> > Should
> >
> > On Sun, Nov 5, 2023 at 8:35 AM Paolo Bonzini wrote:
> > >
> > > + test_invalid_memory_region_flags();
> >
> > be #ifdef'd, perhaps? I'm not quite sure what th
bility is to remove 'raw' and just assign
the whole union.
Apart from this,
Reviewed-by: Paolo Bonzini
Paolo
+ BUILD_BUG_ON(sizeof(gfn_range.arg) != sizeof(range->arg));
should be uncommon, so the
impact is expected small.
Reviewed-by: Paolo Bonzini
Suggested-by: Sean Christopherson
Signed-off-by: Chao Peng
Reviewed-by: Fuad Tabba
Tested-by: Fuad Tabba
[sean: convert vmx_set_apic_access_page_addr() to gfn-based API]
Signed-off-by: Sean Christopherson
---
arch
On 7/19/23 01:44, Sean Christopherson wrote:
Signed-off-by: Sean Christopherson
---
virt/kvm/kvm_main.c | 34 +++---
1 file changed, 19 insertions(+), 15 deletions(-)
Reviewed-by: Paolo Bonzini
On 7/19/23 01:44, Sean Christopherson wrote:
Signed-off-by: Sean Christopherson
---
arch/powerpc/kvm/powerpc.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 7197c8256668..5cf9e5e3112a 100644
--- a/arch/p
(kvm, &mem);
break;
}
case KVM_GET_DIRTY_LOG: {
Reviewed-by: Paolo Bonzini
erson
Reviewed-by: Paolo Bonzini
On 7/19/23 01:44, Sean Christopherson wrote:
+static bool range_has_attrs(struct kvm *kvm, gfn_t start, gfn_t end,
+ unsigned long attrs)
+{
+ XA_STATE(xas, &kvm->mem_attr_array, start);
+ unsigned long index;
+ bool has_attrs;
+ void *entry;
+
+
On 7/19/23 01:44, Sean Christopherson wrote:
@@ -413,6 +454,9 @@ int kvm_gmem_create(struct kvm *kvm, struct kvm_create_guest_memfd *args)
u64 flags = args->flags;
u64 valid_flags = 0;
+ if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE))
+ valid_flags |= KVM_GUEST_M
ADDRESS_SPACE
+#if KVM_ADDRESS_SPACE_NUM == 1
static inline int kvm_arch_vcpu_memslots_id(struct kvm_vcpu *vcpu)
{
return 0;
Reviewed-by: Paolo Bonzini
RET_PF_FIXED,
RET_PF_SPURIOUS,
};
diff --git a/arch/x86/kvm/mmu/mmutrace.h b/arch/x86/kvm/mmu/mmutrace.h
index ae86820cef69..2d7555381955 100644
--- a/arch/x86/kvm/mmu/mmutrace.h
+++ b/arch/x86/kvm/mmu/mmutrace.h
@@ -58,6 +58,7 @@ TRACE_DEFINE_ENUM(RET_PF_CONTINUE);
TRACE_DEFINE
On 7/19/23 01:44, Sean Christopherson wrote:
@@ -4725,9 +4725,9 @@ static int kvm_vm_ioctl_check_extension_generic(struct
kvm *kvm, long arg)
case KVM_CAP_IRQ_ROUTING:
return KVM_MAX_IRQ_ROUTES;
#endif
-#if KVM_ADDRESS_SPACE_NUM > 1
+#if KVM_MAX_NR_ADDRESS_SPACES > 1
On 7/19/23 01:45, Sean Christopherson wrote:
Drop kvm_userspace_memory_region_find(), it's unused and a terrible API
(probably why it's unused). If anything outside of kvm_util.c needs to
get at the memslot, userspace_mem_region_find() can be exposed to give
others full access to all memory regi
On 7/19/23 01:44, Sean Christopherson wrote:
+ inode = alloc_anon_inode(mnt->mnt_sb);
+ if (IS_ERR(inode))
+ return PTR_ERR(inode);
+
+ err = security_inode_init_security_anon(inode, &qname, NULL);
+ if (err)
+ goto err_inode;
+
I don't unders
On 7/28/23 18:02, Vlastimil Babka wrote:
There's even a comment to that effect later on in the function:
Hmm, well spotted. But it wouldn't be so great if we now had to lock every
inspected page (and not just dirty pages), just to check the AS_ bit.
But I wonder if this is leftover from previou
On 7/29/23 02:03, Sean Christopherson wrote:
KVM would need to do multiple uaccess reads, but that's not a big
deal. Am I missing something, or did past us just get too clever and
miss the obvious solution?
You would have to introduce struct kvm_userspace_memory_region2 anyway,
though not a n
On Fri, Jul 21, 2023 at 7:13 PM Sean Christopherson wrote:
> On Fri, Jul 21, 2023, Paolo Bonzini wrote:
> > On 7/19/23 01:44, Sean Christopherson wrote:
> > > @@ -413,6 +454,9 @@ int kvm_gmem_create(struct kvm *kvm, struct
> > > kvm_create_guest_memfd *args)
> &
Queued, thanks.
Paolo
On 5/31/23 21:17, Jason Gunthorpe wrote:
+ int (*test_clear_young)(struct mmu_notifier *mn, struct mm_struct *mm,
+ unsigned long start, unsigned long end,
+ bool clear, unsigned long *bitmap);
+
Why leave clear_young behind? Just
On 5/27/23 01:44, Yu Zhao wrote:
+#define kvm_arch_has_test_clear_young kvm_arch_has_test_clear_young
+static inline bool kvm_arch_has_test_clear_young(void)
+{
+ return IS_ENABLED(CONFIG_X86_64) &&
+ (!IS_REACHABLE(CONFIG_KVM) || (tdp_mmu_enabled &&
shadow_accessed_mask));
+}
On 5/27/23 01:44, Yu Zhao wrote:
TLDR
This patchset adds a fast path to clear the accessed bit without
taking kvm->mmu_lock. It can significantly improve the performance of
guests when the host is under heavy memory pressure.
ChromeOS has been using a similar approach [1] since mid 2021 and
n
> keeping that additional argument.
>
> Signed-off-by: Christian Brauner
> ---
> arch/x86/kvm/hyperv.c | 2 +-
> arch/x86/kvm/xen.c| 2 +-
> virt/kvm/eventfd.c| 4 ++--
> 30 files changed, 60 insert
ail VM creation.
>
> Change to a void return to discourage architectures from making debugfs
> failures fatal for the VM. Seems like everyone already had the right
> idea, as all implementations already return 0 unconditionally.
>
> Signed-off-by: Oliver Upton
Acked-by: Paolo Bonzini
Queued, thanks.
Paolo
onflicts.
Thanks,
Paolo
Paolo Bonzini (4):
KVM: delete .change_pte MMU notifier callback
KVM: remove unused argument of kvm_handle_hva_range()
mmu_notifier: remove the .change_pte() callback
mm: replace set_pte_at_notify() with just set_pte_at()
arch/arm64/kvm/mmu.c | 3
y
moot, because KVM unmaps the sPTEs during .invalidate_range_start()
and therefore .change_pte() has no hope of finding a sPTE to change.
Drop the generic KVM code that dispatches to kvm_set_spte_gfn(), as
well as all the architecture specific implementations.
Signed-off-by: Paolo Bonzini
---
set_pte_at_notify() even though it is just a synonym for set_pte_at().
Signed-off-by: Paolo Bonzini
---
include/linux/mmu_notifier.h | 46 ++--
mm/mmu_notifier.c| 17 -
2 files changed, 2 insertions(+), 61 deletions(-)
diff --git a/include/linux
The only user was kvm_mmu_notifier_change_pte(), which is now gone.
Signed-off-by: Paolo Bonzini
---
virt/kvm/kvm_main.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 2fcd9979752a..970111ad 100644
--- a/virt/kvm
With the demise of the .change_pte() MMU notifier callback, there is no
notification happening in set_pte_at_notify(). It is a synonym of
set_pte_at() and can be replaced with it.
Signed-off-by: Paolo Bonzini
---
include/linux/mmu_notifier.h | 2 --
kernel/events/uprobes.c | 5 ++---
mm
On Mon, Apr 8, 2024 at 3:56 PM Peter Xu wrote:
> Paolo,
>
> I may miss a bunch of details here (as I still remember some change_pte
> patches previously on the list..), however not sure whether we considered
> enable it? Asked because I remember Andrea used to have a custom tree
> maintaining tha
On Wed, Apr 10, 2024 at 11:30 PM Andrew Morton
wrote:
> On Fri, 5 Apr 2024 07:58:11 -0400 Paolo Bonzini wrote:
> > Please review! Also feel free to take the KVM patches through the mm
> > tree, as I don't expect any conflicts.
>
> It's mainly a KVM thing and the
On 04/10/20 02:18, Joe Perches wrote:
> This should be const, so make it so.
>
> Signed-off-by: Joe Perches
> ---
> arch/powerpc/kvm/book3s_hv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
> index 4ba06a2a3
On 11/3/22 00:18, Sean Christopherson wrote:
+static void hv_cleanup_evmcs(void)
This needs to be __init.
Paolo
On Thu, Nov 3, 2022 at 3:01 PM Paolo Bonzini wrote:
>
> On 11/3/22 00:18, Sean Christopherson wrote:
> > +static void hv_cleanup_evmcs(void)
>
> This needs to be __init.
Error: brain temporarily disconnected.
Paolo
On 11/3/22 00:19, Sean Christopherson wrote:
+ if (!boot_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) ||
+ !boot_cpu_has(X86_FEATURE_VMX)) {
+ pr_err("VMX not enabled in MSR_IA32_FEAT_CTL\n");
+ return false;
I think the reference to the BIOS should remain
On 11/3/22 00:19, Sean Christopherson wrote:
From: Chao Gao
Do compatibility checks when enabling hardware to effectively add
compatibility checks when onlining a CPU. Abort enabling, i.e. the
online process, if the (hotplugged) CPU is incompatible with the known
good setup.
This paragraph is
On 11/3/22 00:19, Sean Christopherson wrote:
+- kvm_lock is taken outside kvm->mmu_lock
Not surprising since one is a mutex and one is an rwlock. :) You can
drop this hunk as well as the "Opportunistically update KVM's locking
documentation" sentence in the commit message.
- vcpu->mutex
On 11/3/22 13:08, Christian Borntraeger wrote:
There are bug fixes throughout this series. They are more scattered than
I would usually prefer, but getting the sequencing correct was a gigantic
pain for many of the x86 fixes due to needing to fix common code in order
for the x86 fix to have any
On 11/3/22 18:44, Sean Christopherson wrote:
Do compatibility checks when enabling hardware to effectively add
compatibility checks when onlining a CPU. Abort enabling, i.e. the
online process, if the (hotplugged) CPU is incompatible with the known
good setup.
This paragraph is not true with t
On 11/3/22 19:35, Sean Christopherson wrote:
It's technically required. IA32_FEAT_CTL and thus KVM_INTEL depends on any of
CPU_SUP_{INTEL,CENATUR,ZHAOXIN}, but init_ia32_feat_ctl() is invoked if and only
if the actual CPU type matches one of the aforementioned CPU_SUP_*.
E.g. running a kernel b
On 11/4/22 08:17, Isaku Yamahata wrote:
On Wed, Nov 02, 2022 at 11:18:27PM +,
Sean Christopherson wrote:
Non-x86 folks, please test on hardware when possible. I made a _lot_ of
mistakes when moving code around. Thankfully, x86 was the trickiest code
to deal with, and I'm fairly confident
On 11/3/22 19:58, Sean Christopherson wrote:
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 3e508f239098..ebe617ab0b37 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -191,6 +191,8 @@ static void default_init(struct cpuinfo_x86 *c)
Queued, thanks. I will leave this in kvm/queue after testing everything
else and moving it to kvm/next; this way, we can wait for test results
on other architectures.
Paolo
On 12/28/22 12:22, Marc Zyngier wrote:
Queued, thanks. I will leave this in kvm/queue after testing everything
else and moving it to kvm/next; this way, we can wait for test results
on other architectures.
Can you please make this a topic branch, and if possible based
on a released -rc? It w
On 12/28/22 12:22, Marc Zyngier wrote:
Queued, thanks. I will leave this in kvm/queue after testing everything
else and moving it to kvm/next; this way, we can wait for test results
on other architectures.
Can you please make this a topic branch, and if possible based
on a released -rc? It w
Queued, thanks.
Paolo
Queued, thanks.
Paolo
On 15/04/21 09:27, Masahiro Yamada wrote:
Since commit d9f4ff50d2aa ("kbuild: spilt cc-option and friends to
scripts/Makefile.compiler"), some kselftests fail to build.
The tools/ directory opted out Kbuild, and went in a different
direction. They copy any kind of files to the tools/ directory
i
On 15/04/21 10:04, Masahiro Yamada wrote:
On Thu, Apr 15, 2021 at 4:40 PM Paolo Bonzini wrote:
I think it would make sense to add try-run, cc-option and
.DELETE_ON_ERROR to tools/build/Build.include?
To be safe, I just copy-pasted what the makefiles need.
If someone wants to refactor the
On 16/04/21 15:26, Christian Borntraeger wrote:
On 16.04.21 15:00, Masahiro Yamada wrote:
Since commit d9f4ff50d2aa ("kbuild: spilt cc-option and friends to
scripts/Makefile.compiler"), some kselftests fail to build.
The tools/ directory opted out Kbuild, and went in a different
direction. Th
On 05/05/21 14:15, Nicholas Piggin wrote:
Commit b1c5356e873c ("KVM: PPC: Convert to the gfn-based MMU notifier
callbacks") causes unmap_gfn_range and age_gfn callbacks to only work
on the first gfn in the range. It also makes the aging callbacks call
into both radix and hash aging functions for
On 23/06/20 17:31, Christian Borntraeger wrote:
>
> I have trouble seeing value in this particular patch. We add LOCs
> without providing any noticable benefit. All other patches in this series at
> least reduce the amount of code. So I would defer this to Paolo if he prefers
> to have this way ac
On 23/06/20 15:14, Tianjia Zhang wrote:
>
> /* Load non-volatile guest state from the vcpu */
> - VCPU_LOAD_NVGPRS(r4)
> + VCPU_LOAD_NVGPRS(r3)
>
> kvm_start_lightweight:
> /* Copy registers into shadow vcpu so we can access them in real mode */
> - mr r3, r4
>
On 10/07/20 09:32, Tianjia Zhang wrote:
> Hi Paolo,
>
> Any opinion on this series patches? Can I help with this patchset ?
I was hoping to have some Tested-by, for now I'm queuing patches 1 and
2. Thanks,
Paolo
> Thanks and best,
> Tianjia
>
> On 2020/6/23 21:14, Tianjia Zhang wrote:
>> In t
On 20/08/21 20:51, Mathieu Desnoyers wrote:
Ah, or is it the case that rseq_cs is non-NULL if and only if userspace is in an
rseq critical section, and because syscalls in critical sections are illegal, by
definition clearing rseq_cs is a nop unless userspace is misbehaving.
Not quite, as I desc
On 18/08/21 02:12, Sean Christopherson wrote:
Patch 1 fixes a KVM+rseq bug where KVM's handling of TIF_NOTIFY_RESUME,
e.g. for task migration, clears the flag without informing rseq and leads
to stale data in userspace's rseq struct.
Patch 2 is a cleanup to try and make future bugs less likely.
On 13/09/21 15:57, Juergen Gross wrote:
Revert commit 76b4f357d0e7d8f6f00 which was based on wrong reasoning
and rename KVM_MAX_VCPU_ID to KVM_MAX_VCPU_IDS in order to avoid the
same issue in future.
Juergen Gross (2):
x86/kvm: revert commit 76b4f357d0e7d8f6f00
kvm: rename KVM_MAX_VCPU_ID
abs.org
+T: git git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
topic/ppc-kvm
F:arch/powerpc/include/asm/kvm*
F:arch/powerpc/include/uapi/asm/kvm*
F:arch/powerpc/kernel/kvm*
Acked-by: Paolo Bonzini
Thanks Michael and Paul!
Paolo
On 11/6/21 12:17, Marc Zyngier wrote:
If you too believe that this is just wrong, I'm happy to drop the
locking altogether. If that breaks someone's flow, they'll shout soon
enough.
Yes, it's not necessary. It was added in 2009 (commit 988a2cae6a3c,
"KVM: Use macro to iterate over vcpus.") a
On 11/5/21 21:03, Sean Christopherson wrote:
But I think even that is flawed, as APICv can be dynamically deactivated and
re-activated while the VM is running, and I don't see a path that re-updates
the IRTE when APICv is re-activated. So I think a more conservative check is
needed, e.g.
diff -
On 11/16/21 15:13, Juergen Gross wrote:
On 05.11.21 20:20, Marc Zyngier wrote:
The kvm structure is pretty large. A large portion of it is the vcpu
array, which is 4kB on x86_64 and arm64 as they deal with 512 vcpu
VMs. Of course, hardly anyone runs VMs this big, so this is often a
net waste of
On 11/5/21 20:20, Marc Zyngier wrote:
The kvm structure is pretty large. A large portion of it is the vcpu
array, which is 4kB on x86_64 and arm64 as they deal with 512 vcpu
VMs. Of course, hardly anyone runs VMs this big, so this is often a
net waste of memory and cache locality.
A possible app
On 11/16/21 17:07, Sean Christopherson wrote:
if (!kvm_arch_has_assigned_device(kvm) ||
!irq_remapping_cap(IRQ_POSTING_CAP) ||
- !kvm_vcpu_apicv_active(kvm->vcpus[0]))
+ !irqchip_in_kernel(kvm) || !enable_apicv)
return 0;
id
On 11/17/21 22:09, David Woodhouse wrote:
{
- struct kvm_vcpu *vcpu = kvm_get_running_vcpu();
+ struct kvm_vcpu *running_vcpu = kvm_get_running_vcpu();
+ WARN_ON_ONCE(vcpu && vcpu != running_vcpu);
WARN_ON_ONCE(vcpu->kvm != kvm);
Ah, that one needs to be changed to c
101 - 200 of 320 matches
Mail list logo