From: Paolo Bonzini Date: Wed, 26 Apr 2023 19:46:52 +0000 (-0400) Subject: Merge tag 'kvmarm-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm... X-Git-Tag: v6.6.17~4946^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f382a79a66b1a926e30f6d89295fc8fe2c4a86e;p=platform%2Fkernel%2Flinux-rpi.git Merge tag 'kvmarm-6.4' of git://git./linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 updates for 6.4 - Numerous fixes for the pathological lock inversion issue that plagued KVM/arm64 since... forever. - New framework allowing SMCCC-compliant hypercalls to be forwarded to userspace, hopefully paving the way for some more features being moved to VMMs rather than be implemented in the kernel. - Large rework of the timer code to allow a VM-wide offset to be applied to both virtual and physical counters as well as a per-timer, per-vcpu offset that complements the global one. This last part allows the NV timer code to be implemented on top. - A small set of fixes to make sure that we don't change anything affecting the EL1&0 translation regime just after having having taken an exception to EL2 until we have executed a DSB. This ensures that speculative walks started in EL1&0 have completed. - The usual selftest fixes and improvements. --- 4f382a79a66b1a926e30f6d89295fc8fe2c4a86e diff --cc arch/arm64/include/asm/kvm_host.h index 6f7b218,ce75309..b9e3661 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@@ -1005,8 -1023,10 +1023,10 @@@ int kvm_arm_vcpu_arch_get_attr(struct k int kvm_arm_vcpu_arch_has_attr(struct kvm_vcpu *vcpu, struct kvm_device_attr *attr); -long kvm_vm_ioctl_mte_copy_tags(struct kvm *kvm, - struct kvm_arm_copy_mte_tags *copy_tags); +int kvm_vm_ioctl_mte_copy_tags(struct kvm *kvm, + struct kvm_arm_copy_mte_tags *copy_tags); + int kvm_vm_ioctl_set_counter_offset(struct kvm *kvm, + struct kvm_arm_counter_offset *offset); /* Guest/host FPSIMD coordination helpers */ int kvm_arch_vcpu_run_map_fp(struct kvm_vcpu *vcpu); diff --cc arch/arm64/kvm/arm.c index a43e1cb,bb21d0c..95b715c --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@@ -1439,7 -1479,28 +1479,27 @@@ static int kvm_vm_ioctl_set_device_addr } } + static int kvm_vm_has_attr(struct kvm *kvm, struct kvm_device_attr *attr) + { + switch (attr->group) { + case KVM_ARM_VM_SMCCC_CTRL: + return kvm_vm_smccc_has_attr(kvm, attr); + default: + return -ENXIO; + } + } + + static int kvm_vm_set_attr(struct kvm *kvm, struct kvm_device_attr *attr) + { + switch (attr->group) { + case KVM_ARM_VM_SMCCC_CTRL: + return kvm_vm_smccc_set_attr(kvm, attr); + default: + return -ENXIO; + } + } + -long kvm_arch_vm_ioctl(struct file *filp, - unsigned int ioctl, unsigned long arg) +int kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { struct kvm *kvm = filp->private_data; void __user *argp = (void __user *)arg;