Skip to content

Commit cb24c61

Browse files
committed
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull vkm fixes from Paolo Bonzini: "Two simple but important bugfixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: MIPS: Fix build errors for 32bit kernel KVM: nVMX: fixes for preemption timer migration
2 parents d45f47a + 3d9fdc2 commit cb24c61

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

Documentation/virt/kvm/api.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4339,14 +4339,15 @@ Errors:
43394339
#define KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE 0x00000001
43404340

43414341
struct kvm_vmx_nested_state_hdr {
4342-
__u32 flags;
43434342
__u64 vmxon_pa;
43444343
__u64 vmcs12_pa;
4345-
__u64 preemption_timer_deadline;
43464344

43474345
struct {
43484346
__u16 flags;
43494347
} smm;
4348+
4349+
__u32 flags;
4350+
__u64 preemption_timer_deadline;
43504351
};
43514352

43524353
struct kvm_vmx_nested_state_data {

arch/mips/kvm/emulate.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,6 +1722,7 @@ enum emulation_result kvm_mips_emulate_store(union mips_instruction inst,
17221722
vcpu->arch.gprs[rt], *(u32 *)data);
17231723
break;
17241724

1725+
#if defined(CONFIG_64BIT) && defined(CONFIG_KVM_MIPS_VZ)
17251726
case sdl_op:
17261727
run->mmio.phys_addr = kvm_mips_callbacks->gva_to_gpa(
17271728
vcpu->arch.host_cp0_badvaddr) & (~0x7);
@@ -1815,6 +1816,7 @@ enum emulation_result kvm_mips_emulate_store(union mips_instruction inst,
18151816
vcpu->arch.pc, vcpu->arch.host_cp0_badvaddr,
18161817
vcpu->arch.gprs[rt], *(u64 *)data);
18171818
break;
1819+
#endif
18181820

18191821
#ifdef CONFIG_CPU_LOONGSON64
18201822
case sdc2_op:
@@ -2002,6 +2004,7 @@ enum emulation_result kvm_mips_emulate_load(union mips_instruction inst,
20022004
}
20032005
break;
20042006

2007+
#if defined(CONFIG_64BIT) && defined(CONFIG_KVM_MIPS_VZ)
20052008
case ldl_op:
20062009
run->mmio.phys_addr = kvm_mips_callbacks->gva_to_gpa(
20072010
vcpu->arch.host_cp0_badvaddr) & (~0x7);
@@ -2073,6 +2076,7 @@ enum emulation_result kvm_mips_emulate_load(union mips_instruction inst,
20732076
break;
20742077
}
20752078
break;
2079+
#endif
20762080

20772081
#ifdef CONFIG_CPU_LOONGSON64
20782082
case ldc2_op:

arch/x86/include/uapi/asm/kvm.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,14 +408,15 @@ struct kvm_vmx_nested_state_data {
408408
};
409409

410410
struct kvm_vmx_nested_state_hdr {
411-
__u32 flags;
412411
__u64 vmxon_pa;
413412
__u64 vmcs12_pa;
414-
__u64 preemption_timer_deadline;
415413

416414
struct {
417415
__u16 flags;
418416
} smm;
417+
418+
__u32 flags;
419+
__u64 preemption_timer_deadline;
419420
};
420421

421422
struct kvm_svm_nested_state_data {

arch/x86/kvm/vmx/nested.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6176,6 +6176,7 @@ static int vmx_set_nested_state(struct kvm_vcpu *vcpu,
61766176
goto error_guest_mode;
61776177
}
61786178

6179+
vmx->nested.has_preemption_timer_deadline = false;
61796180
if (kvm_state->hdr.vmx.flags & KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE) {
61806181
vmx->nested.has_preemption_timer_deadline = true;
61816182
vmx->nested.preemption_timer_deadline =

0 commit comments

Comments
 (0)