diff mbox series

[RFC,3/6] KVM: x86: add async ioctl support

Message ID 20241118123948.4796-4-kalyazin@amazon.com (mailing list archive)
State New
Headers show
Series KVM: x86: async PF user | expand

Commit Message

Nikita Kalyazin Nov. 18, 2024, 12:39 p.m. UTC
x86 has not had support for async ioctls.
This patch adds an arch implementation, but does not add any of the
ioctls just yet.

Signed-off-by: Nikita Kalyazin <kalyazin@amazon.com>
---
 arch/x86/kvm/Kconfig | 1 +
 arch/x86/kvm/x86.c   | 6 ++++++
 2 files changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
index ebd1ec6600bc..191dfba3e27a 100644
--- a/arch/x86/kvm/Kconfig
+++ b/arch/x86/kvm/Kconfig
@@ -46,6 +46,7 @@  config KVM
 	select KVM_GENERIC_HARDWARE_ENABLING
 	select KVM_WERROR if WERROR
 	select KVM_USERFAULT
+	select HAVE_KVM_VCPU_ASYNC_IOCTL
 	help
 	  Support hosting fully virtualized guest machines using hardware
 	  virtualization extensions.  You will need a fairly recent
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index ba0ad76f53bc..800493739043 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -13619,6 +13619,12 @@  void kvm_arch_gmem_invalidate(kvm_pfn_t start, kvm_pfn_t end)
 }
 #endif
 
+long kvm_arch_vcpu_async_ioctl(struct file *filp,
+			       unsigned int ioctl, unsigned long arg)
+{
+	return -ENOIOCTLCMD;
+}
+
 int kvm_spec_ctrl_test_value(u64 value)
 {
 	/*