+Naresh
On Tue, Aug 26, 2025, Sean Christopherson wrote:
> On Tue, Aug 26, 2025, Oliver Upton wrote:
> > On Tue, Aug 26, 2025 at 11:51:18AM -0700, Sean Christopherson wrote:
> > > On Mon, Aug 25, 2025, Oliver Upton wrote:
> > > > The majority of selftests don
On Tue, Sep 30, 2025, Naresh Kamboju wrote:
> The selftests: kvm: irqfd_test consistently fails across all test platforms
> since its introduction in Linux next-20250625. The failure occurs due to
> a KVM_IRQFD ioctl returning errno 11 (Resource temporarily unavailable).
> This has been observed fr
a valid task_struct. The wake is safe and will be skipped
> in this case.
>
> Fixes: f9010dbdce911 ("fork, vhost: Use CLONE_THREAD to fix freezer/ps
> regression")
> Reported-by: Sean Christopherson
> Closes: https://lore.kernel.org/all/akkletodxkxaa...@google.com/
&g
On Thu, Sep 18, 2025, Michael S. Tsirkin wrote:
> On Thu, Sep 18, 2025 at 09:52:19AM -0700, Sean Christopherson wrote:
> > On Thu, Sep 18, 2025, Michael S. Tsirkin wrote:
> > > On Thu, Sep 18, 2025 at 09:04:07AM -0700, Sean Christopherson wrote:
> > > > On Thu, S
On Thu, Sep 18, 2025, Michael S. Tsirkin wrote:
> On Thu, Sep 18, 2025 at 09:04:07AM -0700, Sean Christopherson wrote:
> > On Thu, Sep 18, 2025, Sebastian Andrzej Siewior wrote:
> > > On 2025-09-18 11:09:05 [-0400], Michael S. Tsirkin wrote:
> > > > So how about s
Longer term, I'd still like to land everything though.
> > Sean?
>
> Since I am in To: here. You want me to resent my diff as a proper patch?
Ya, I think it makes sense to harden against UAF even if we fix the KVM bug more
directly.
iwari (1):
> vhost-scsi: fix argument order in tport allocation error message
>
> Alyssa Ross (1):
> virtio_config: clarify output parameters
>
> Ashwini Sahu (1):
> uapi: vduse: fix typo in comment
>
> Michael S. Tsirkin (1):
> Revert "vi
On Sun, 24 Aug 2025 11:16:40 -0700, Alok Tiwari wrote:
> Fix a typo in hyperv_cpuid.c test assertion log:
> replace "our of supported range" -> "out of supported range".
Applied to kvm-x86 selftests, thanks!
[1/1] KVM: selftests: Fix typo in hyperv cpuid test message
https://github.com/kvm-
On Mon, Sep 15, 2025, Michael S. Tsirkin wrote:
> On Mon, Sep 15, 2025 at 02:03:00PM -0700, Sean Christopherson wrote:
> > On Wed, Aug 27, 2025, Sean Christopherson wrote:
> > > Michael,
> > >
> > > Do you want to take this through the vhost tree? It technical
On Wed, Aug 27, 2025, Sean Christopherson wrote:
> Michael,
>
> Do you want to take this through the vhost tree? It technically fixes a KVM
> bug, but this obviously touches far more vhost code than KVM code, and the
> patch that needs to go into 6.17 doesn't touch KVM
On Fri, Sep 05, 2025, Aqib Faruqui wrote:
> Thanks for the suggestion. I don't see your previous redefinition of
> PAGE_SIZE
> upstream, just 3 lines above the warning redefinition:
Oh, I manually added a conflicting definition to demonstrate the warning gcc
will provide.
> > In file included f
On Sat, Sep 06, 2025, Sukrut Heroorkar wrote:
> Replace the hardcoded 0xff in test_icr() with the actual number of vcpus
> created for the vm. This address the existing TODO and keeps the test
> correct if it is ever run with multiple vcpus.
The TODO is stale, it was resolved by commit 376bc1b458c
On Wed, Aug 27, 2025, Binbin Wu wrote:
> On 8/21/2025 12:29 PM, Sagi Shahar wrote:
> > @@ -46,11 +69,23 @@ void *ucall_arch_get_ucall(struct kvm_vcpu *vcpu)
> > {
> > struct kvm_run *run = vcpu->run;
> > - if (run->exit_reason == KVM_EXIT_IO && run->io.port == UCALL_PIO_PORT) {
> > -
Subject says KVM, but I don't see anything KVM related in here. I don't think
any of the KVM selftests even use pidfd_open() directly.
On Fri, Aug 29, 2025, Aqib Faruqui wrote:
> The kselftest-harness uses pidfd_open() for test timeout handling, but
> non-glibc C library headers may not define th
On Fri, Aug 29, 2025, Aqib Faruqui wrote:
> Kernel UAPI headers use __packed but don't provide the definition in
> userspace builds.
>
> Add a fallback definition matching the kernel's implementation. This
> follows the same pattern used by BPF and SGX selftests.
Ugh. No, this needs to be fixed
ally something that provides roughly equivalent
functionality. This particular test will still pass because forced preemption
isn't strictly necessary, but this is still gross.
Luckily, KVM selftests already provides APIs to pin tasks, just use those and
the problem naturally goes away.
--
On Fri, Aug 29, 2025, Aqib Faruqui wrote:
> Prevent PAGE_SIZE redefinition warnings that can occur due to namespace
> pollution from included headers.
>
> Add an #ifndef directive before defining PAGE_SIZE to avoid redefinition
> conflicts.
Please provide more details on what is causing the confl
pts Y/N
> values, but the function was incorrectly trying to parse it as an
> integer using strtol().
Nope, it's been an int since commit:
commit d500e1ed3dc873818277e109ccf6407118669236
Author: Sean Christopherson
AuthorDate: Tue Aug 30 23:15:51 2022 +
Commit: Paolo Bonzini
On Wed, Aug 27, 2025, Sebastian Andrzej Siewior wrote:
> On 2025-08-27 12:41:04 [-0700], Sean Christopherson wrote:
> > Michael,
>
> Sean,
>
> would the bellow work by chance? It is a quick shot but it looks
> symmetrical…
Gah, sorry, I flagged your earlier mail and th
Don't register a sigkill callback with vhost_task when creating NX hugepage
recovery threads now that said callback is optional. In addition to
removing what is effectively dead code, not registering a sigkill "handler"
also guards against improper use of __vhost_task_wake().
Sign
it
didn't help KVM do the right thing with respect to signals, and adding a
sanity check in __vhost_task_wake() gives developers a hint as to what
needs to be done in response to sigkill.
Signed-off-by: Sean Christopherson
---
kernel/vhost_task.c | 10 +-
1 file changed, 9 insertions
kernel.org/all/akkletodxkxaa...@google.com
Link: https://lore.kernel.org/all/aj_vep2ehj6l0...@google.com
Suggested-by: Sebastian Andrzej Siewior
Fixes: d96c77bd4eeb ("KVM: x86: switch hugepage recovery thread to vhost_task")
Cc: sta...@vger.kernel.org
Signed-off-by: Sean Christopherson
--
task_wake() and __vhost_task_wake() for the public APIs, and
vhost_task_wake_up_process() for the local helper. [Michael]
- Drag the signalas back from their Spanish holiday. [Sebastian]
v1: https://lore.kernel.org/all/20250826004012.3835150-1-sea...@google.com
Sean Christopherson (3):
vhost_t
On Tue, Aug 26, 2025, Sagi Shahar wrote:
> On Tue, Aug 26, 2025 at 3:29 PM Sagi Shahar wrote:
> >
> > On Tue, Aug 26, 2025 at 3:14 PM Ira Weiny wrote:
> > >
> > > Sean Christopherson wrote:
> > > > Ugh. IMO, this is a KVM bug. Allowing KVM_C
On Tue, Aug 26, 2025, Oliver Upton wrote:
> On Tue, Aug 26, 2025 at 11:51:18AM -0700, Sean Christopherson wrote:
> > On Mon, Aug 25, 2025, Oliver Upton wrote:
> > > The majority of selftests don't even need an irqchip anyway.
> >
> > But it's really, reall
On Tue, Aug 26, 2025, Binbin Wu wrote:
>
>
> On 8/21/2025 12:28 PM, Sagi Shahar wrote:
> > TDX guests' registers cannot be initialized directly using
> > vcpu_regs_set(), hence the stack pointer needs to be initialized by
> > the guest itself, running boot code beginning at the reset vector.
> >
On Mon, Aug 25, 2025, Oliver Upton wrote:
> On Mon, Aug 25, 2025 at 02:11:30PM -0700, Sean Christopherson wrote:
> > On Mon, Aug 25, 2025, Marc Zyngier wrote:
> > > On Mon, 25 Aug 2025 20:52:21 +0100,
> > > Sean Christopherson wrote:
> > > > Is ther
On Wed, Aug 20, 2025, Sagi Shahar wrote:
> TDX require special handling for VM and VCPU initialization for various
> reasons:
> - Special ioctlss for creating VM and VCPU.
> - TDX registers are inaccessible to KVM.
> - TDX require special boot code trampoline for loading parameters.
> - TDX only su
On Mon, Aug 25, 2025, Yan Zhao wrote:
> > + /*
> > +* Handcode "JMP rel8" at the RESET vector to jump back to the TD boot
> > +* code, as there are only 16 bytes at the RESET vector before RIP will
> > +* wrap back to zero. Insert a trailing int3 so that the vCPU crashes
> > +* i
On Tue, Aug 26, 2025, Michael S. Tsirkin wrote:
> On Mon, Aug 25, 2025 at 05:40:09PM -0700, Sean Christopherson wrote:
> > Provide an API in vhost task instead of forcing KVM to solve the problem,
> > as KVM would literally just add an equivalent to VHOST_TASK_FLAGS_KILLED,
>
On Tue, Aug 26, 2025, Binbin Wu wrote:
> On 8/21/2025 12:28 PM, Sagi Shahar wrote:
> > TDX can't set sregs values directly using KVM_SET_SREGS. Expose the
> > default values of certain sregs used by TDX VMs so they can be set
> > manually.
> >
> > Signed-off-by: Sagi Shahar
> > ---
> > .../self
Don't register a sigkill callback with vhost_task when creating NX hugepage
recovery threads now that said callback is optional. In addition to
removing what is effectively dead code, not registering a sigkill "handler"
also guards against improper use of vhost_task_wake().
Sign
it
didn't help KVM do anything useful, and adding a sanity check in
vhost_task_wake() gives developers a hint as to what needs to be done in
response to sigkill.
Signed-off-by: Sean Christopherson
---
kernel/vhost_task.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff
//lore.kernel.org/all/aj_vep2ehj6l0...@google.com
Suggested-by: Sebastian Andrzej Siewior
Fixes: d96c77bd4eeb ("KVM: x86: switch hugepage recovery thread to vhost_task")
Cc: sta...@vger.kernel.org
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/mmu/mmu.c | 2 +-
includ
r-CPU reference counting instead of rcuref_t") landed. I have
no idea why the futex changes exposed the bug, and I don't care all that much,
as this is firmly a KVM bug.
Sean Christopherson (3):
vhost_task: KVM: Don't wake KVM x86's recovery thread if vhost task
was killed
vh
On Mon, Aug 25, 2025, Marc Zyngier wrote:
> On Mon, 25 Aug 2025 20:52:21 +0100,
> Sean Christopherson wrote:
> > Is there a sane way to handle vGIC creation in kvm_arch_vm_post_create()?
> > E.g.
> > could we create a v3 GIC when possible, and fall back to v2? And the
On Mon, Aug 25, 2025, Sebastian Ott wrote:
> irqfd_test on arm triggers the following assertion:
> Test Assertion Failure
> include/kvm_util.h:527: !ret
> pid=3643 tid=3643 errno=11 - Resource temporarily unavailable
> 1 0x004026d7: kvm_irqfd at kvm_util.h:527
> 2
On Thu, Aug 21, 2025, Ira Weiny wrote:
> Need to add the selftest folks.
>
> + linux-kselft...@vger.kernel.org
> + Kees Cook
> + Shuah Khan
>
> Sagi Shahar wrote:
> > Redefinition of is_signed_type() causes compilation warning for tests
> > which use kselftest_harness. Replace the definition wi
On Wed, Aug 20, 2025, Sagi Shahar wrote:
> Redefinition of is_signed_type() causes compilation warning for tests
> which use kselftest_harness. Replace the definition with linux/overflow.h
Heh, tried that:
https://lore.kernel.org/all/18f2ea68-0f7c-465e-917e-e07933599...@sirena.org.uk
There's now
On Wed, Aug 20, 2025, Sean Christopherson wrote:
> On Wed, Aug 20, 2025, Mark Brown wrote:
> > On Tue, Jun 24, 2025 at 04:19:30PM -0700, Sean Christopherson wrote:
> > > Rename is_signed_type() to is_signed_var() to avoid colliding with a macro
> > > of the same name
On Wed, Aug 20, 2025, Mark Brown wrote:
> On Tue, Jun 24, 2025 at 04:19:30PM -0700, Sean Christopherson wrote:
> > Rename is_signed_type() to is_signed_var() to avoid colliding with a macro
> > of the same name defined by linux/overflow.h. Note, overflow.h's version
> >
On Mon, 28 Jul 2025 17:28:43 +0200, Thomas Huth wrote:
> The Free Software Foundation does not reside in "59 Temple Place"
> anymore, so we should not mention that address in the source code here.
> But instead of updating the address to their current location, let's
> rather drop the license boile
On Tue, 24 Jun 2025 16:19:30 -0700, Sean Christopherson wrote:
> Rename is_signed_type() to is_signed_var() to avoid colliding with a macro
> of the same name defined by linux/overflow.h. Note, overflow.h's version
> takes a type as the input, whereas the harness's versi
cally linked
against a libc that doesn't support rseq in any capacity.
Fixes: 3bcbc20942db ("selftests/rseq: Play nice with binaries statically linked
against glibc 2.35+")
Cc: sta...@vger.kernel.org
Suggested-by: Florian Weimer
Reported-by: Thomas Gleixner
Closes: https://lore
On Fri, Aug 15, 2025, Sagi Shahar wrote:
> On Tue, Aug 12, 2025 at 11:22 PM Binbin Wu wrote:
> >
> >
> >
> > On 8/12/2025 4:13 AM, Sean Christopherson wrote:
> > > On Thu, Aug 07, 2025, Sagi Shahar wrote:
> > [...]
> > >&
On Thu, Aug 14, 2025, Sagi Shahar wrote:
> On Mon, Aug 11, 2025 at 3:53 PM Sean Christopherson wrote:
> >
> > On Mon, Aug 11, 2025, Rick P Edgecombe wrote:
> > > But Sean, if you want to save some time I think we can just accelerate
> > > this
> > &
On Thu, Aug 07, 2025, Sagi Shahar wrote:
> From: Ackerley Tng
>
> vm_vaddr_alloc_private allow specifying both the virtual and physical
> addresses for the allocation.
Why?
On Thu, Aug 07, 2025, Sagi Shahar wrote:
> @@ -189,3 +199,19 @@ uint64_t tdg_vp_info(uint64_t *rcx, uint64_t *rdx,
>
> return ret;
> }
> +
> +uint64_t tdg_vp_vmcall_map_gpa(uint64_t address, uint64_t size, uint64_t
> *data_out)
> +{
> + struct tdx_hypercall_args args = {
> +
On Mon, Aug 11, 2025, Rick P Edgecombe wrote:
> But Sean, if you want to save some time I think we can just accelerate this
> other reviewing. As far as new-fangled features, having this upstream is
> important even for that, because we are currently having to keep these tests
> pl
On Thu, Aug 07, 2025, Sagi Shahar wrote:
> +void verify_host_reading_private_mem(void)
> +{
> + uint64_t second_host_read;
> + uint64_t first_host_read;
> + struct kvm_vcpu *vcpu;
> + vm_vaddr_t test_page;
> + uint64_t *host_virt;
> + struct kvm_vm *vm;
> +
> + vm = td_c
On Thu, Aug 07, 2025, Sagi Shahar wrote:
> From: Ackerley Tng
>
> If guest memory is backed by restricted memfd
>
> + UPM is being used, hence encrypted memory region has to be
> registered
> + Can avoid making a copy of guest memory before getting TDX to
> initialize the memory region
>
>
On Thu, Aug 07, 2025, Sagi Shahar wrote:
> From: Erdem Aktas
>
> TDX requires additional IOCTLs to initialize VM and vCPUs to add
> private memory and to finalize the VM memory. Also additional utility
> functions are provided to manipulate a TD, similar to those that
> manipulate a VM in the cur
On Thu, Aug 07, 2025, Sagi Shahar wrote:
> From: Isaku Yamahata
>
> Let kvm_init_vm_address_properties() initialize vm->arch.{s_bit, tag_mask}
> similar to SEV.
>
> Set shared bit position based on guest maximum physical address width
> instead of maximum physical address width, because that is
On Thu, Aug 07, 2025, Sagi Shahar wrote:
> From: Ackerley Tng
>
> Turn vCPU descriptor table initialization into a utility for use by tests
> needing finer control, for example for TDX TD creation.
NAK. "needing finer control" is not a sufficient explanation for why _this_
patch is necessary.
On Thu, Aug 07, 2025, Sagi Shahar wrote:
> From: Ackerley Tng
>
> TDX guests' registers cannot be initialized directly using
> vcpu_regs_set(), hence the stack pointer needs to be initialized by
> the guest itself, running boot code beginning at the reset vector.
>
> Store the stack address as p
On Thu, Aug 07, 2025, Sagi Shahar wrote:
> From: Ackerley Tng
>
Make changelogs standalone, i.e. don't rely on the subject/shortlog for context.
> This allows initializing sregs without setting vCPU registers in
> KVM.
>
> No functional change intended.
>
> Signed-off-by: Ackerley Tng
> Sign
On Thu, Aug 07, 2025, Sagi Shahar wrote:
> From: Ackerley Tng
>
> One-to-one GVA to GPA mappings can be used in the guest to set up boot
> sequences during which paging is enabled, hence requiring a transition
> from using physical to virtual addresses in consecutive instructions.
NAK, this is a
On Thu, Aug 07, 2025, Sagi Shahar wrote:
> This is v8 of the TDX selftests.
>
> This series is based on v6.16
>
> Aside from a rebase, this version includes a minor bug fix for
> "KVM: selftests: Update kvm_init_vm_address_properties() for TDX" which
> was called out in v6 by Ira Weiny.
Folks, t
On Mon, Aug 11, 2025, Shivank Garg wrote:
> This series introduces NUMA-aware memory placement support for KVM guests
> with guest_memfd memory backends. It builds upon Fuad Tabba's work (V17)
> that enabled host-mapping for guest_memfd memory [1].
Is this still actually an RFC? If so, why? If n
On Fri, Aug 01, 2025, Sean Christopherson wrote:
> On Wed, Jul 30, 2025, Dapeng Mi wrote:
> >
> > On 7/30/2025 8:38 AM, Sean Christopherson wrote:
> > > On Tue, Jul 29, 2025, Dapeng Mi wrote:
> > >> BTW, Sean, may I know your plan about the mediated vPMU v5 p
On Wed, Jul 30, 2025, Dapeng Mi wrote:
>
> On 7/30/2025 8:38 AM, Sean Christopherson wrote:
> > On Tue, Jul 29, 2025, Dapeng Mi wrote:
> >> BTW, Sean, may I know your plan about the mediated vPMU v5 patch set?
> >> Thanks.
> > I'll get it out this
On Tue, Jul 29, 2025, Dapeng Mi wrote:
> BTW, Sean, may I know your plan about the mediated vPMU v5 patch set? Thanks.
I'll get it out this week (hopefully tomorrow).
On Fri, Apr 25, 2025, Kan Liang wrote:
> On 2025-04-25 9:43 a.m., Peter Zijlstra wrote:
> > On Fri, Apr 25, 2025 at 09:06:26AM -0400, Liang, Kan wrote:
> >>
> >>
> >> On 2025-04-25 7:15 a.m., Peter Zijlstra wrote:
> >>> On Mon, Mar 24, 2025 at 05:30:50PM +, Mingwei Zhang wrote:
> From: Kan
built (because no vendor modules are selected), let arch code #define
EXPORT_SYMBOL_GPL_FOR_KVM to suppress/override the exports.
Note, the set of symbols to restrict to KVM was generated by manual search
and audit; any "misses" are due to human error, not some grand plan.
Sign
Rework almost all of KVM x86's exports to expose symbols only to KVM's
vendor modules, i.e. to kvm-{amd,intel}.ko. Keep the generic exports that
are guarded by CONFIG_KVM_EXTERNAL_WRITE_TRACKING=y, as they're explicitly
designed/intended for external usage.
Signed-off-by: Sean
Drop the exporting of several kvm_arch_xxx() hooks that are only called
from arch-neutral code, i.e. that are only called from kvm.ko.
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/x86.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index
("KVM: x86: Dedup AVIC vs. PI code for identifying target
vCPU")
Signed-off-by: Sean Christopherson
---
arch/x86/include/asm/kvm_host.h | 3 ---
arch/x86/kvm/irq.c | 28
arch/x86/kvm/lapic.c| 32 ++--
providing a macro
to restrict KVM-specific kernel exports, i.e. to provide symbol exports
for KVM if and only if KVM is built as one or more modules.
Signed-off-by: Sean Christopherson
---
arch/powerpc/include/asm/kvm_types.h | 15
arch/x86/include/asm/kvm_types.h | 10 +++
inclu
o x86's
kvm-{amd,intel}.ko vendor mdoules).
No functional change intended.
Signed-off-by: Sean Christopherson
---
arch/s390/include/asm/kvm_host.h | 2 ++
arch/s390/kvm/priv.c | 8
drivers/s390/crypto/vfio_ap_ops.c | 2 +-
3 files changed, 11 insertions(+), 1 dele
KVM.
Based on kvm/queue.
Sean Christopherson (6):
KVM: s390/vfio-ap: Use kvm_is_gpa_in_memslot() instead of open coded
equivalent
KVM: Export KVM-internal symbols for sub-modules only
KVM: x86: Move kvm_intr_is_single_vcpu() to lapic.c
KVM: x86: Drop pointless exports of kvm_arch_xxx()
On Tue, Apr 22, 2025, Zack Rusin wrote:
> Add a testcase to exercise KVM_CAP_X86_VMWARE_HYPERCALL and validate
> that KVM exits to userspace on hypercalls and registers are correctly
> preserved.
>
> Signed-off-by: Zack Rusin
> Cc: Doug Covelli
> Cc: Paolo Bonzini
> Cc
On Tue, Jul 22, 2025, David Hildenbrand wrote:
> On 22.07.25 16:45, Sean Christopherson wrote:
> > On Tue, Jul 22, 2025, David Hildenbrand wrote:
> > > Just to clarify: this is based on Fuad's stage 1 and should probably
> > > still be
> > > tagge
On Tue, Jul 22, 2025, David Hildenbrand wrote:
> Just to clarify: this is based on Fuad's stage 1 and should probably still be
> tagged "RFC" until stage-1 is finally upstream.
>
> (I was hoping stage-1 would go upstream in 6.17, but I am not sure yet if
> that is
> still feasible looking at the
On Thu, 10 Jul 2025 12:12:20 +0100, Mark Brown wrote:
> In 7e9b231c402a ("KVM: selftests: Add a KVM_IRQFD test to verify
> uniqueness requirements") we added a test for the newly added irqfd
> support but since this feature works with eventfds it won't work unless
> the kernel has been built wth ev
On Mon, May 26, 2025, Sandipan Das wrote:
> > @@ -212,6 +212,18 @@ static void amd_pmu_refresh(struct kvm_vcpu *vcpu)
> > bitmap_set(pmu->all_valid_pmc_idx, 0, pmu->nr_arch_gp_counters);
> > }
> >
> > +static void amd_pmu_refresh(struct kvm_vcpu *vcpu)
> > +{
> > + struct vcpu_svm *svm = t
On Fri, Jun 27, 2025, Kees Cook wrote:
> On Tue, Jun 24, 2025 at 04:19:30PM -0700, Sean Christopherson wrote:
> > Rename is_signed_type() to is_signed_var() to avoid colliding with a macro
> > of the same name defined by linux/overflow.h. Note, overflow.h's version
> >
On Fri, 16 May 2025 16:07:26 -0700, Sean Christopherson wrote:
> The two primary goals of this series are to make the irqbypass concept
> easier to understand, and to address the terrible performance that can
> result from using a list to track connections.
>
> For the first
On Fri, 23 May 2025 23:43:52 +0530, Rahul Kumar wrote:
> Corrected two instances of the misspelled word 'occurences' to
> 'occurrences' in comments explaining node invariants in sparsebit.c.
> These comments describe core behavior of the data structure and
> should be clear.
Applied to kvm-x86 s
~~~
Opportunistically use is_signed_type() to implement is_signed_var() so
that the relationship and differences are obvious.
Fixes: fc92099902fb ("tools headers: Synchronize linux/bits.h with the kernel
sources")
Cc: Vincent Mailhol
Cc: Arnaldo Carvalho de Melo
Signed-off-by: Sean C
On Mon, Jun 02, 2025, Alex Williamson wrote:
> On Fri, 16 May 2025 16:07:26 -0700
> Sean Christopherson wrote:
>
> > The two primary goals of this series are to make the irqbypass concept
> > easier to understand, and to address the terrible performance that can
> >
On Thu, May 15, 2025, Dapeng Mi wrote:
> On 5/15/2025 8:09 AM, Sean Christopherson wrote:
> > On Mon, Mar 24, 2025, Mingwei Zhang wrote:
> >> + return vcpu->kvm->arch.enable_pmu &&
> > This is superfluous, pmu->version should never be non-zero without
Use guard(mutex) to clean up irqbypass's error handling.
Reviewed-by: Kevin Tian
Acked-by: Michael S. Tsirkin
Signed-off-by: Sean Christopherson
---
virt/lib/irqbypass.c | 38 ++
1 file changed, 10 insertions(+), 28 deletions(-)
diff --git a/vir
Use the paired consumer/producer information to disconnect IRQ bypass
producers/consumers in O(1) time (ignoring the cost of __disconnect()).
Reviewed-by: Kevin Tian
Acked-by: Michael S. Tsirkin
Signed-off-by: Sean Christopherson
---
virt/lib/irqbypass.c | 48
soon as a connection is possible.
Signed-off-by: Sean Christopherson
---
drivers/vfio/pci/vfio_pci_intrs.c | 3 +--
drivers/vhost/vdpa.c | 4 ++--
include/linux/irqbypass.h | 2 +-
virt/lib/irqbypass.c | 5 -
4 files changed, 8 insertions(+), 6 deletions(
-by: Yong He
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217379
Link: https://lore.kernel.org/all/20230801115646.33990-1-lik...@tencent.com
Reviewed-by: Kevin Tian
Acked-by: Michael S. Tsirkin
Signed-off-by: Sean Christopherson
---
include/linux/irqbypass.h | 4 ---
virt/lib/irqbypass.c
eventfd_ctx pointer (for all intents and purposes) unnecessarily
obfuscates the code and makes it more brittle.
Reviewed-by: Kevin Tian
Acked-by: Michael S. Tsirkin
Signed-off-by: Sean Christopherson
---
arch/x86/kvm/x86.c| 4 +--
drivers/vfio/pci/vfio_pci_intrs.c | 9
Explicitly track IRQ bypass producer:consumer bindings. This will allow
making removal an O(1) operation; searching through the list to find
information that is trivially tracked (and useful for debug) is wasteful.
Reviewed-by: Kevin Tian
Acked-by: Michael S. Tsirkin
Signed-off-by: Sean
Drop superfluous might_sleep() annotations from irqbypass, mutex_lock()
provides all of the necessary tracking.
Reviewed-by: Kevin Tian
Acked-by: Michael S. Tsirkin
Signed-off-by: Sean Christopherson
---
virt/lib/irqbypass.c | 8
1 file changed, 8 deletions(-)
diff --git a/virt/lib
. E.g.
if try_module_get() fails because irqbypass.ko is being unloaded, then the
kernel has already hit a use-after-free by virtue of executing code whose
lifecycle is tied to irqbypass.ko.
Reviewed-by: Kevin Tian
Acked-by: Michael S. Tsirkin
Signed-off-by: Sean Christopherson
---
virt/lib/irqbyp
tmp == consumer" check from patch 3. [Kevin]
- Require producers to pass in the line IRQ number.
v1: https://lore.kernel.org/all/20250404211449.1443336-1-sea...@google.com
[1] https://lore.kernel.org/all/20230801115646.33990-1-lik...@tencent.com
[2] https://lore.kernel.org/all/202504011
gt;eventsel_hw &=
> > ~ARCH_PERFMON_EVENTSEL_ENABLE;
> > + } else {
> > + int idx = pmc->idx - KVM_FIXED_PMC_BASE_IDX;
> > +
> > + if (allowed)
> > + pmu->fixed_ctr_ctrl_hw = pmu->fixed_
On Fri, May 16, 2025, Sean Christopherson wrote:
> On Mon, Mar 24, 2025, Mingwei Zhang wrote:
> > Reject PMU MSRs interception explicitly in
> > vmx_get_passthrough_msr_slot() since interception of PMU MSRs are
> > specially handled in intel_passthrough_pmu_msrs().
> >
On Mon, Mar 24, 2025, Mingwei Zhang wrote:
> From: Sandipan Das
>
> Add all PMU-related MSRs (including legacy K7 MSRs) to the list of
> possible direct access MSRs. Most of them will not be intercepted when
> using passthrough PMU.
>
> Signed-off-by: Sandipan Das
> Signed-off-by: Mingwei Zhan
On Mon, Mar 24, 2025, Mingwei Zhang wrote:
> Reject PMU MSRs interception explicitly in
> vmx_get_passthrough_msr_slot() since interception of PMU MSRs are
> specially handled in intel_passthrough_pmu_msrs().
>
> Signed-off-by: Mingwei Zhang
> Co-developed-by: Dapeng Mi
> Signed-off-by: Dapeng M
On Mon, Mar 24, 2025, Mingwei Zhang wrote:
> +static void amd_pmu_update_msr_intercepts(struct kvm_vcpu *vcpu)
> +{
> + struct kvm_pmu *pmu = vcpu_to_pmu(vcpu);
> + struct vcpu_svm *svm = to_svm(vcpu);
> + int msr_clear = !!(kvm_mediated_pmu_enabled(vcpu));
> + int i;
> +
> + fo
This shortlog is unnecessarily confusing. It reads as if supported for running
L2 in a vCPU with a mediated PMU is somehow lacking.
On Mon, Mar 24, 2025, Mingwei Zhang wrote:
> Add nested virtualization support for mediated PMU by combining the MSR
> interception bitmaps of vmcs01 and vmcs12.
Do
On Mon, Mar 24, 2025, Mingwei Zhang wrote:
> + /*
> + * Clear hardware selector MSR content and its counter to avoid
> + * leakage and also avoid this guest GP counter get accidentally
> + * enabled during host running when host enable global ctrl.
> + */
> + for (i = 0;
On Mon, Mar 24, 2025, Mingwei Zhang wrote:
> static void kvm_pmu_incr_counter(struct kvm_pmc *pmc)
> {
> - pmc->emulated_counter++;
> - kvm_pmu_request_counter_reprogram(pmc);
> + struct kvm_vcpu *vcpu = pmc->vcpu;
> +
> + /*
> + * For perf-based PMUs, accumulate software-emu
On Thu, May 15, 2025, Kan Liang wrote:
> On 2025-05-14 7:19 p.m., Sean Christopherson wrote:
> >> This naming is confusing on purpose? Pick either guest/host and stick
> >> with it.
> >
> > +1. I also think the inner perf_host_{enter,exit}() helpers are superflou
On Thu, May 15, 2025, Dapeng Mi wrote:
> On 5/15/2025 8:37 AM, Sean Christopherson wrote:
> >> diff --git a/arch/x86/kvm/svm/pmu.c b/arch/x86/kvm/svm/pmu.c
> >> index 153972e944eb..eba086ef5eca 100644
> >> --- a/arch/x86/kvm/svm/pmu.c
> >> +++ b/arch/x8
1 - 100 of 2354 matches
Mail list logo