]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
VFIO: KVM: x86: Drop kvm_arch_{start,end}_assignment()
authorSean Christopherson <seanjc@google.com>
Fri, 23 May 2025 01:17:56 +0000 (18:17 -0700)
committerSean Christopherson <seanjc@google.com>
Wed, 25 Jun 2025 16:51:33 +0000 (09:51 -0700)
commitbbc13ae593e0ea47357ff6e4740c533c16c2ae1e
tree237023a86c121d99253fc0708e7c151a22ab27ab
parentff845e6a84c8c2c717efa6caf4db2d51a05aa9fd
VFIO: KVM: x86: Drop kvm_arch_{start,end}_assignment()

Drop kvm_arch_{start,end}_assignment() and all associated code now that
KVM x86 no longer consumes assigned_device_count.  Tracking whether or not
a VFIO-assigned device is formally associated with a VM is fundamentally
flawed, as such an association is optional for general usage, i.e. is prone
to false negatives.  E.g. prior to commit 2edd9cb79fb3 ("kvm: detect
assigned device via irqbypass manager"), device passthrough via VFIO would
fail to enable IRQ bypass if userspace omitted the formal VFIO<=>KVM
binding.

And device drivers that *need* the VFIO<=>KVM connection, e.g. KVM-GT,
shouldn't be relying on generic x86 tracking infrastructure.

Cc: Jim Mattson <jmattson@google.com>
Link: https://lore.kernel.org/r/20250523011756.3243624-6-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/x86.c
include/linux/kvm_host.h
virt/kvm/vfio.c