summaryrefslogtreecommitdiff
path: root/arch/riscv/kvm/vcpu_vector.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2025-09-01 23:47:23 +0100
committerMark Brown <broonie@kernel.org>2025-09-01 23:47:23 +0100
commit4de51e81379aa3acbceddb7aec18a36b733fb6cb (patch)
tree5d607ac61193a5d0fc4c5e56913af25f59593d37 /arch/riscv/kvm/vcpu_vector.c
parent7446284023e8ef694fb392348185349c773eefb3 (diff)
parent431f6c88cb5d2d62d579d4d78f5c1a2583465ffb (diff)
spi: spi-fsl-lpspi: Generic fixes and support for
Merge series from James Clark <james.clark@linaro.org>: Various fixes for LPSI along with some refactorings. None of the fixes are strictly related to S32G, however these changes all originate from the work to support S32G devices. The only commits that are strictly related are for the new s32g2 and s32g3 compatible strings.
Diffstat (limited to 'arch/riscv/kvm/vcpu_vector.c')
-rw-r--r--arch/riscv/kvm/vcpu_vector.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/kvm/vcpu_vector.c b/arch/riscv/kvm/vcpu_vector.c
index a5f88cb717f3..05f3cc2d8e31 100644
--- a/arch/riscv/kvm/vcpu_vector.c
+++ b/arch/riscv/kvm/vcpu_vector.c
@@ -182,6 +182,8 @@ int kvm_riscv_vcpu_set_reg_vector(struct kvm_vcpu *vcpu,
struct kvm_cpu_context *cntx = &vcpu->arch.guest_context;
unsigned long reg_val;
+ if (reg_size != sizeof(reg_val))
+ return -EINVAL;
if (copy_from_user(&reg_val, uaddr, reg_size))
return -EFAULT;
if (reg_val != cntx->vector.vlenb)