lkml.org 
[lkml]   [2023]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC 31/48] RISC-V: KVM: Indicate no support user space emulated IRQCHIP
Date
The KVM_INTERRUPT IOCTL is used for the userspace emulated IRQCHIP.
The TEE use case do not support that yet. Return appropriate error
in case any VMM tries to invoke that operation.

Signed-off-by: Atish Patra <atishp@rivosinc.com>
---
arch/riscv/kvm/vcpu.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/riscv/kvm/vcpu.c b/arch/riscv/kvm/vcpu.c
index 20d4800..65f87e1 100644
--- a/arch/riscv/kvm/vcpu.c
+++ b/arch/riscv/kvm/vcpu.c
@@ -716,6 +716,9 @@ long kvm_arch_vcpu_async_ioctl(struct file *filp,

if (ioctl == KVM_INTERRUPT) {
struct kvm_interrupt irq;
+ /* We do not support user space emulated IRQCHIP for TVMs yet */
+ if (is_cove_vcpu(vcpu))
+ return -ENXIO;

if (copy_from_user(&irq, argp, sizeof(irq)))
return -EFAULT;
--
2.25.1
\
 
 \ /
  Last update: 2023-04-20 00:21    [W:0.836 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site