|
| 1 | +From 3813cbba7fe44c7d98ef9036639d40f573f080b9 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Charalampos Mainas < [email protected]> |
| 3 | +Date: Tue, 12 Dec 2023 17:32:13 +0200 |
| 4 | +Subject: [PATCH] Export kvm_vm_ioctl_irq_line |
| 5 | + |
| 6 | +A small patch to export the kvm_vm_ioctl_irq_line function, in order to |
| 7 | +allow Hedge to use it. |
| 8 | +This function is required for serial console. |
| 9 | + |
| 10 | +Signed-off-by: Matias Ezequiel Vara Larsen < [email protected]> |
| 11 | +Signed-off-by: Charalampos Mainas < [email protected]> |
| 12 | +--- |
| 13 | + arch/arm64/kvm/arm.c | 7 +++++++ |
| 14 | + arch/x86/kvm/x86.c | 7 +++++++ |
| 15 | + include/linux/kvm_host.h | 2 ++ |
| 16 | + 3 files changed, 16 insertions(+) |
| 17 | + |
| 18 | +diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c |
| 19 | +index b1a0181b0..c2d200f00 100644 |
| 20 | +--- a/arch/arm64/kvm/arm.c |
| 21 | ++++ b/arch/arm64/kvm/arm.c |
| 22 | +@@ -934,6 +934,13 @@ int kvm_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level *irq_level, |
| 23 | + return -EINVAL; |
| 24 | + } |
| 25 | + |
| 26 | ++int hedge_kvm_arch_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level *irq_event, |
| 27 | ++ bool line_status) |
| 28 | ++{ |
| 29 | ++ return kvm_vm_ioctl_irq_line(kvm, irq_event, line_status); |
| 30 | ++} |
| 31 | ++EXPORT_SYMBOL(hedge_kvm_arch_vm_ioctl_irq_line); |
| 32 | ++ |
| 33 | + static int kvm_vcpu_set_target(struct kvm_vcpu *vcpu, |
| 34 | + const struct kvm_vcpu_init *init) |
| 35 | + { |
| 36 | +diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c |
| 37 | +index 8c17063a4..9b9ed9523 100644 |
| 38 | +--- a/arch/x86/kvm/x86.c |
| 39 | ++++ b/arch/x86/kvm/x86.c |
| 40 | +@@ -4920,6 +4920,13 @@ int kvm_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level *irq_event, |
| 41 | + return 0; |
| 42 | + } |
| 43 | + |
| 44 | ++int hedge_kvm_arch_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level *irq_event, |
| 45 | ++ bool line_status) |
| 46 | ++{ |
| 47 | ++ return kvm_vm_ioctl_irq_line(kvm, irq_event, line_status); |
| 48 | ++} |
| 49 | ++EXPORT_SYMBOL(hedge_kvm_arch_vm_ioctl_irq_line); |
| 50 | ++ |
| 51 | + int kvm_vm_ioctl_enable_cap(struct kvm *kvm, |
| 52 | + struct kvm_enable_cap *cap) |
| 53 | + { |
| 54 | +diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h |
| 55 | +index 9508cb5ef..bca063db8 100644 |
| 56 | +--- a/include/linux/kvm_host.h |
| 57 | ++++ b/include/linux/kvm_host.h |
| 58 | +@@ -1455,4 +1455,6 @@ int hedge_kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *r |
| 59 | + int hedge_kvm_coalesced_mmio_init(struct kvm *kvm); |
| 60 | + int hedge_kvm_vm_ioctl_set_memory_region(struct kvm *kvm, |
| 61 | + struct kvm_userspace_memory_region *mem); |
| 62 | ++int hedge_kvm_arch_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level *irq_event, |
| 63 | ++ bool line_status); |
| 64 | + #endif |
| 65 | +-- |
| 66 | +2.40.1 |
| 67 | + |
0 commit comments