diff options
author | Babu Moger <babu.moger@amd.com> | 2018-03-16 16:37:22 -0400 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2018-03-28 22:47:06 +0200 |
commit | 7fbc85a5fb2b018d7030cba53f4c42ab90304acd (patch) | |
tree | 8bb27a5770caf4b1f612f735115f33b91d0672ab /arch/x86/kvm/vmx.c | |
parent | dd60d217062f4527f4a94af8b3a2e9666c26f903 (diff) | |
download | lwn-7fbc85a5fb2b018d7030cba53f4c42ab90304acd.tar.gz lwn-7fbc85a5fb2b018d7030cba53f4c42ab90304acd.zip |
KVM: VMX: Fix the module parameters for vmx
The vmx module parameters are supposed to be unsigned variants.
Also fixed the checkpatch errors like the one below.
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+module_param(ple_gap, uint, S_IRUGO);
Signed-off-by: Babu Moger <babu.moger@amd.com>
[Expanded uint to unsigned int in code. - Radim]
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 0e5510ebd3f2..4eb252b13121 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -175,24 +175,24 @@ module_param_named(preemption_timer, enable_preemption_timer, bool, S_IRUGO); #define KVM_VMX_DEFAULT_PLE_WINDOW_MAX \ INT_MAX / KVM_VMX_DEFAULT_PLE_WINDOW_GROW -static int ple_gap = KVM_VMX_DEFAULT_PLE_GAP; -module_param(ple_gap, int, S_IRUGO); +static unsigned int ple_gap = KVM_VMX_DEFAULT_PLE_GAP; +module_param(ple_gap, uint, 0444); -static int ple_window = KVM_VMX_DEFAULT_PLE_WINDOW; -module_param(ple_window, int, S_IRUGO); +static unsigned int ple_window = KVM_VMX_DEFAULT_PLE_WINDOW; +module_param(ple_window, uint, 0444); /* Default doubles per-vcpu window every exit. */ -static int ple_window_grow = KVM_VMX_DEFAULT_PLE_WINDOW_GROW; -module_param(ple_window_grow, int, S_IRUGO); +static unsigned int ple_window_grow = KVM_VMX_DEFAULT_PLE_WINDOW_GROW; +module_param(ple_window_grow, uint, 0444); /* Default resets per-vcpu window every exit to ple_window. */ -static int ple_window_shrink = KVM_VMX_DEFAULT_PLE_WINDOW_SHRINK; -module_param(ple_window_shrink, int, S_IRUGO); +static unsigned int ple_window_shrink = KVM_VMX_DEFAULT_PLE_WINDOW_SHRINK; +module_param(ple_window_shrink, uint, 0444); /* Default is to compute the maximum so we can never overflow. */ -static int ple_window_actual_max = KVM_VMX_DEFAULT_PLE_WINDOW_MAX; -static int ple_window_max = KVM_VMX_DEFAULT_PLE_WINDOW_MAX; -module_param(ple_window_max, int, S_IRUGO); +static unsigned int ple_window_actual_max = KVM_VMX_DEFAULT_PLE_WINDOW_MAX; +static unsigned int ple_window_max = KVM_VMX_DEFAULT_PLE_WINDOW_MAX; +module_param(ple_window_max, uint, 0444); extern const ulong vmx_return; @@ -6984,7 +6984,7 @@ out: return ret; } -static int __grow_ple_window(int val) +static unsigned int __grow_ple_window(unsigned int val) { if (ple_window_grow < 1) return ple_window; @@ -6999,7 +6999,8 @@ static int __grow_ple_window(int val) return val; } -static int __shrink_ple_window(int val, int modifier, int minimum) +static unsigned int __shrink_ple_window(unsigned int val, + unsigned int modifier, unsigned int minimum) { if (modifier < 1) return ple_window; |