kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] KVM: x86: add KVM_CAP_DEVICE_CTRL
@ 2022-12-15 11:52 Wei Wang
  2022-12-16 17:12 ` Sean Christopherson
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Wang @ 2022-12-15 11:52 UTC (permalink / raw)
  To: pbonzini, seanjc; +Cc: kvm, linux-kernel, Wei Wang

KVM_CAP_DEVICE_CTRL allows userspace to create emulated device in KVM.
For example, userspace VFIO implementation needs to create a kvm_device
(i.e. KVM_DEV_TYPE_VFIO) on x86. So add the cap to allow userspace for
such use cases.

Signed-off-by: Wei Wang <wei.w.wang@intel.com>
---
 arch/x86/kvm/x86.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 69227f77b201..1cdc4469652c 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4410,6 +4410,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 	case KVM_CAP_VAPIC:
 	case KVM_CAP_ENABLE_CAP:
 	case KVM_CAP_VM_DISABLE_NX_HUGE_PAGES:
+	case KVM_CAP_DEVICE_CTRL:
 		r = 1;
 		break;
 	case KVM_CAP_EXIT_HYPERCALL:
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-20  1:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-15 11:52 [PATCH v1] KVM: x86: add KVM_CAP_DEVICE_CTRL Wei Wang
2022-12-16 17:12 ` Sean Christopherson
2022-12-19 13:29   ` Wang, Wei W
2022-12-19 20:35     ` Sean Christopherson
2022-12-20  1:34       ` Wang, Wei W

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).