diff options
| author | Louis Burda <quent.burda@gmail.com> | 2022-09-06 13:04:50 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2022-09-06 13:15:58 +0200 |
| commit | 24d7c448e49e3dc2abbf3bc804247fb30410775a (patch) | |
| tree | ae1500766c726f97b23bd3e05738dc063eab05c3 | |
| parent | 647ced3c3389a01515aea1e391830fd8e7134931 (diff) | |
| download | cachepc-24d7c448e49e3dc2abbf3bc804247fb30410775a.tar.gz cachepc-24d7c448e49e3dc2abbf3bc804247fb30410775a.zip | |
Fix kvm-amd module
| -rwxr-xr-x | Makefile | 2 | ||||
| -rw-r--r-- | kmod/kvm.c | 16 | ||||
| -rwxr-xr-x | patch.diff | 2 |
3 files changed, 9 insertions, 11 deletions
@@ -3,7 +3,7 @@ PWD := $(shell pwd) .PHONY: all reset clean prepare build -all: reset clean prepare build test/eviction test/access test/kvm test/sev +all: reset clean prepare build test/eviction test/access test/kvm test/sev test/sev-es clean: $(MAKE) -C $(KERNEL_SOURCE) SUBDIRS=arch/x86/kvm clean @@ -270,7 +270,7 @@ cachepc_kvm_ioctl(struct file *file, unsigned int cmd, unsigned long argp) { void __user *arg_user; uint32_t u32; - int r; + int ret; arg_user = (void __user *)argp; switch (cmd) { @@ -279,9 +279,9 @@ cachepc_kvm_ioctl(struct file *file, unsigned int cmd, unsigned long argp) if (!arg_user) return -EINVAL; if (copy_from_user(&u32, arg_user, sizeof(uint32_t))) return -EFAULT; - r = smp_call_function_single(2, + ret = smp_call_function_single(2, cachepc_kvm_single_access_test, &u32, true); - WARN_ON(r != 0); + WARN_ON(ret != 0); if (copy_to_user(arg_user, &u32, sizeof(uint32_t))) return -EFAULT; break; @@ -290,9 +290,9 @@ cachepc_kvm_ioctl(struct file *file, unsigned int cmd, unsigned long argp) if (!arg_user) return -EINVAL; if (copy_from_user(&u32, arg_user, sizeof(uint32_t))) return -EFAULT; - r = smp_call_function_single(2, + ret = smp_call_function_single(2, cachepc_kvm_single_eviction_test, &u32, true); - WARN_ON(r != 0); + WARN_ON(ret != 0); if (copy_to_user(arg_user, &u32, sizeof(uint32_t))) return -EFAULT; break; @@ -301,9 +301,9 @@ cachepc_kvm_ioctl(struct file *file, unsigned int cmd, unsigned long argp) if (!arg_user) return -EINVAL; if (copy_from_user(&u32, arg_user, sizeof(uint32_t))) return -EFAULT; - r = smp_call_function_single(2, + ret = smp_call_function_single(2, cachepc_kvm_init_pmc_ioctl, &u32, true); - WARN_ON(r != 0); + WARN_ON(ret != 0); break; default: return -EINVAL; @@ -364,5 +364,3 @@ cachepc_kvm_exit(void) cachepc_release_ds(cachepc_ctx, cachepc_ds); cachepc_release_ctx(cachepc_ctx); } - - @@ -27,7 +27,7 @@ index b804444e16d4..66a4d56e331a 100644 vmx/evmcs.o vmx/nested.o vmx/posted_intr.o -kvm-amd-y += svm/svm.o svm/vmenter.o svm/pmu.o svm/nested.o svm/avic.o svm/sev.o +kvm-amd-y += svm/svm.o svm/vmenter.o svm/pmu.o svm/nested.o svm/avic.o svm/sev.o \ -+ svm/cachepc/cachepc.o svm/cachepc/util.o svm/cachepc/kvm.o ++ svm/cachepc/cachepc.o svm/cachepc/util.o obj-$(CONFIG_KVM) += kvm.o obj-$(CONFIG_KVM_INTEL) += kvm-intel.o |
