aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/kvm/arm.c7
-rw-r--r--arch/arm64/include/asm/kvm_emulate.h11
-rw-r--r--arch/mips/kvm/mips.c1
-rw-r--r--arch/s390/kvm/intercept.c9
-rw-r--r--arch/x86/kvm/ioapic.c2
-rw-r--r--arch/x86/kvm/x86.c4
6 files changed, 24 insertions, 10 deletions
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index 03e9273f1876..08bb84f2ad58 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -1312,6 +1312,13 @@ static int init_hyp_mode(void)
1312 goto out_err; 1312 goto out_err;
1313 } 1313 }
1314 1314
1315 err = create_hyp_mappings(kvm_ksym_ref(__bss_start),
1316 kvm_ksym_ref(__bss_stop), PAGE_HYP_RO);
1317 if (err) {
1318 kvm_err("Cannot map bss section\n");
1319 goto out_err;
1320 }
1321
1315 /* 1322 /*
1316 * Map the Hyp stack pages 1323 * Map the Hyp stack pages
1317 */ 1324 */
diff --git a/arch/arm64/include/asm/kvm_emulate.h b/arch/arm64/include/asm/kvm_emulate.h
index fd9d5fd788f5..f5ea0ba70f07 100644
--- a/arch/arm64/include/asm/kvm_emulate.h
+++ b/arch/arm64/include/asm/kvm_emulate.h
@@ -178,11 +178,6 @@ static inline bool kvm_vcpu_dabt_isvalid(const struct kvm_vcpu *vcpu)
178 return !!(kvm_vcpu_get_hsr(vcpu) & ESR_ELx_ISV); 178 return !!(kvm_vcpu_get_hsr(vcpu) & ESR_ELx_ISV);
179} 179}
180 180
181static inline bool kvm_vcpu_dabt_iswrite(const struct kvm_vcpu *vcpu)
182{
183 return !!(kvm_vcpu_get_hsr(vcpu) & ESR_ELx_WNR);
184}
185
186static inline bool kvm_vcpu_dabt_issext(const struct kvm_vcpu *vcpu) 181static inline bool kvm_vcpu_dabt_issext(const struct kvm_vcpu *vcpu)
187{ 182{
188 return !!(kvm_vcpu_get_hsr(vcpu) & ESR_ELx_SSE); 183 return !!(kvm_vcpu_get_hsr(vcpu) & ESR_ELx_SSE);
@@ -203,6 +198,12 @@ static inline bool kvm_vcpu_dabt_iss1tw(const struct kvm_vcpu *vcpu)
203 return !!(kvm_vcpu_get_hsr(vcpu) & ESR_ELx_S1PTW); 198 return !!(kvm_vcpu_get_hsr(vcpu) & ESR_ELx_S1PTW);
204} 199}
205 200
201static inline bool kvm_vcpu_dabt_iswrite(const struct kvm_vcpu *vcpu)
202{
203 return !!(kvm_vcpu_get_hsr(vcpu) & ESR_ELx_WNR) ||
204 kvm_vcpu_dabt_iss1tw(vcpu); /* AF/DBM update */
205}
206
206static inline bool kvm_vcpu_dabt_is_cm(const struct kvm_vcpu *vcpu) 207static inline bool kvm_vcpu_dabt_is_cm(const struct kvm_vcpu *vcpu)
207{ 208{
208 return !!(kvm_vcpu_get_hsr(vcpu) & ESR_ELx_CM); 209 return !!(kvm_vcpu_get_hsr(vcpu) & ESR_ELx_CM);
diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
index ce961495b5e1..622037d851a3 100644
--- a/arch/mips/kvm/mips.c
+++ b/arch/mips/kvm/mips.c
@@ -14,6 +14,7 @@
14#include <linux/err.h> 14#include <linux/err.h>
15#include <linux/kdebug.h> 15#include <linux/kdebug.h>
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/uaccess.h>
17#include <linux/vmalloc.h> 18#include <linux/vmalloc.h>
18#include <linux/fs.h> 19#include <linux/fs.h>
19#include <linux/bootmem.h> 20#include <linux/bootmem.h>
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c
index 1cab8a177d0e..7a27eebab28a 100644
--- a/arch/s390/kvm/intercept.c
+++ b/arch/s390/kvm/intercept.c
@@ -119,8 +119,13 @@ static int handle_validity(struct kvm_vcpu *vcpu)
119 119
120 vcpu->stat.exit_validity++; 120 vcpu->stat.exit_validity++;
121 trace_kvm_s390_intercept_validity(vcpu, viwhy); 121 trace_kvm_s390_intercept_validity(vcpu, viwhy);
122 WARN_ONCE(true, "kvm: unhandled validity intercept 0x%x\n", viwhy); 122 KVM_EVENT(3, "validity intercept 0x%x for pid %u (kvm 0x%pK)", viwhy,
123 return -EOPNOTSUPP; 123 current->pid, vcpu->kvm);
124
125 /* do not warn on invalid runtime instrumentation mode */
126 WARN_ONCE(viwhy != 0x44, "kvm: unhandled validity intercept 0x%x\n",
127 viwhy);
128 return -EINVAL;
124} 129}
125 130
126static int handle_instruction(struct kvm_vcpu *vcpu) 131static int handle_instruction(struct kvm_vcpu *vcpu)
diff --git a/arch/x86/kvm/ioapic.c b/arch/x86/kvm/ioapic.c
index c7220ba94aa7..1a22de70f7f7 100644
--- a/arch/x86/kvm/ioapic.c
+++ b/arch/x86/kvm/ioapic.c
@@ -594,7 +594,7 @@ static void kvm_ioapic_reset(struct kvm_ioapic *ioapic)
594 ioapic->irr = 0; 594 ioapic->irr = 0;
595 ioapic->irr_delivered = 0; 595 ioapic->irr_delivered = 0;
596 ioapic->id = 0; 596 ioapic->id = 0;
597 memset(ioapic->irq_eoi, 0x00, IOAPIC_NUM_PINS); 597 memset(ioapic->irq_eoi, 0x00, sizeof(ioapic->irq_eoi));
598 rtc_irq_eoi_tracking_reset(ioapic); 598 rtc_irq_eoi_tracking_reset(ioapic);
599} 599}
600 600
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 6c633de84dd7..e375235d81c9 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5733,13 +5733,13 @@ static int kvmclock_cpu_online(unsigned int cpu)
5733 5733
5734static void kvm_timer_init(void) 5734static void kvm_timer_init(void)
5735{ 5735{
5736 int cpu;
5737
5738 max_tsc_khz = tsc_khz; 5736 max_tsc_khz = tsc_khz;
5739 5737
5740 if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) { 5738 if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) {
5741#ifdef CONFIG_CPU_FREQ 5739#ifdef CONFIG_CPU_FREQ
5742 struct cpufreq_policy policy; 5740 struct cpufreq_policy policy;
5741 int cpu;
5742
5743 memset(&policy, 0, sizeof(policy)); 5743 memset(&policy, 0, sizeof(policy));
5744 cpu = get_cpu(); 5744 cpu = get_cpu();
5745 cpufreq_get_policy(&policy, cpu); 5745 cpufreq_get_policy(&policy, cpu);