Re: [PATCH 1/2] KVMM: export needed symbols

From: Marc Zyngier
Date: Mon May 18 2020 - 03:41:53 EST


On 2020-05-18 07:58, Anastassios Nanos wrote:
Expose a set of KVM functions to the kernel, in order to be
able to spawn a VM instance without assistance from user-space.
To handle a guest instance, the system needs access to the following
functions:

kvm_arch_vcpu_run_map_fp
kvm_arch_vcpu_ioctl_get_regs
kvm_arch_vcpu_ioctl_set_regs
kvm_arm_get_reg
kvm_arm_set_reg
kvm_arch_vcpu_ioctl_get_sregs
kvm_arch_vcpu_ioctl_set_sregs
kvm_vcpu_preferred_target
kvm_vcpu_ioctl_set_cpuid2
kvm_vcpu_ioctl_get_cpuid2
kvm_dev_ioctl_get_cpuid
kvm_arch_vcpu_ioctl_run
kvm_arch_vcpu_ioctl_get_regs
kvm_arch_vcpu_ioctl_set_regs
kvm_arch_vcpu_ioctl_get_sregs
kvm_arch_vcpu_ioctl_set_sregs
kvm_vcpu_initialized
kvm_arch_vcpu_ioctl_run
kvm_arch_vcpu_ioctl_vcpu_init
kvm_coalesced_mmio_init
kvm_create_vm
kvm_destroy_vm
kvm_vm_ioctl_set_memory_region
kvm_vm_ioctl_create_vcpu

Signed-off-by: Anastassios Nanos <ananos@xxxxxxxxxxxxxxx>
Signed-off-by: Charalampos Mainas <cmainas@xxxxxxxxxxxxxxx>
Signed-off-by: Konstantinos Papazafeiropoulos <kostis@xxxxxxxxxxxxxxx>
Signed-off-by: Stratos Psomadakis <psomas@xxxxxxxxxxxxxxx>
---
arch/arm64/include/asm/kvm_host.h | 6 ++++
arch/arm64/kvm/fpsimd.c | 6 ++++
arch/arm64/kvm/guest.c | 48 +++++++++++++++++++++++++++++++
arch/x86/kvm/cpuid.c | 25 ++++++++++++++++
arch/x86/kvm/x86.c | 31 ++++++++++++++++++++
include/linux/kvm_host.h | 24 ++++++++++++++++
virt/kvm/arm/arm.c | 18 ++++++++++++
virt/kvm/coalesced_mmio.c | 6 ++++
virt/kvm/kvm_main.c | 23 +++++++++++++++
9 files changed, 187 insertions(+)

In general, we don't export synbols without a user in the tree.
And if/when we do, the sensible thing to do would be to export
them as GPL only.

M.
--
Jazz is not dead. It just smells funny...