Commit cb24c61b authored by Linus Torvalds's avatar Linus Torvalds

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
parents d45f47a4 3d9fdc25
...@@ -4339,14 +4339,15 @@ Errors: ...@@ -4339,14 +4339,15 @@ Errors:
#define KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE 0x00000001 #define KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE 0x00000001
struct kvm_vmx_nested_state_hdr { struct kvm_vmx_nested_state_hdr {
__u32 flags;
__u64 vmxon_pa; __u64 vmxon_pa;
__u64 vmcs12_pa; __u64 vmcs12_pa;
__u64 preemption_timer_deadline;
struct { struct {
__u16 flags; __u16 flags;
} smm; } smm;
__u32 flags;
__u64 preemption_timer_deadline;
}; };
struct kvm_vmx_nested_state_data { struct kvm_vmx_nested_state_data {
......
...@@ -1722,6 +1722,7 @@ enum emulation_result kvm_mips_emulate_store(union mips_instruction inst, ...@@ -1722,6 +1722,7 @@ enum emulation_result kvm_mips_emulate_store(union mips_instruction inst,
vcpu->arch.gprs[rt], *(u32 *)data); vcpu->arch.gprs[rt], *(u32 *)data);
break; break;
#if defined(CONFIG_64BIT) && defined(CONFIG_KVM_MIPS_VZ)
case sdl_op: case sdl_op:
run->mmio.phys_addr = kvm_mips_callbacks->gva_to_gpa( run->mmio.phys_addr = kvm_mips_callbacks->gva_to_gpa(
vcpu->arch.host_cp0_badvaddr) & (~0x7); vcpu->arch.host_cp0_badvaddr) & (~0x7);
...@@ -1815,6 +1816,7 @@ enum emulation_result kvm_mips_emulate_store(union mips_instruction inst, ...@@ -1815,6 +1816,7 @@ enum emulation_result kvm_mips_emulate_store(union mips_instruction inst,
vcpu->arch.pc, vcpu->arch.host_cp0_badvaddr, vcpu->arch.pc, vcpu->arch.host_cp0_badvaddr,
vcpu->arch.gprs[rt], *(u64 *)data); vcpu->arch.gprs[rt], *(u64 *)data);
break; break;
#endif
#ifdef CONFIG_CPU_LOONGSON64 #ifdef CONFIG_CPU_LOONGSON64
case sdc2_op: case sdc2_op:
...@@ -2002,6 +2004,7 @@ enum emulation_result kvm_mips_emulate_load(union mips_instruction inst, ...@@ -2002,6 +2004,7 @@ enum emulation_result kvm_mips_emulate_load(union mips_instruction inst,
} }
break; break;
#if defined(CONFIG_64BIT) && defined(CONFIG_KVM_MIPS_VZ)
case ldl_op: case ldl_op:
run->mmio.phys_addr = kvm_mips_callbacks->gva_to_gpa( run->mmio.phys_addr = kvm_mips_callbacks->gva_to_gpa(
vcpu->arch.host_cp0_badvaddr) & (~0x7); vcpu->arch.host_cp0_badvaddr) & (~0x7);
...@@ -2073,6 +2076,7 @@ enum emulation_result kvm_mips_emulate_load(union mips_instruction inst, ...@@ -2073,6 +2076,7 @@ enum emulation_result kvm_mips_emulate_load(union mips_instruction inst,
break; break;
} }
break; break;
#endif
#ifdef CONFIG_CPU_LOONGSON64 #ifdef CONFIG_CPU_LOONGSON64
case ldc2_op: case ldc2_op:
......
...@@ -408,14 +408,15 @@ struct kvm_vmx_nested_state_data { ...@@ -408,14 +408,15 @@ struct kvm_vmx_nested_state_data {
}; };
struct kvm_vmx_nested_state_hdr { struct kvm_vmx_nested_state_hdr {
__u32 flags;
__u64 vmxon_pa; __u64 vmxon_pa;
__u64 vmcs12_pa; __u64 vmcs12_pa;
__u64 preemption_timer_deadline;
struct { struct {
__u16 flags; __u16 flags;
} smm; } smm;
__u32 flags;
__u64 preemption_timer_deadline;
}; };
struct kvm_svm_nested_state_data { struct kvm_svm_nested_state_data {
......
...@@ -6176,6 +6176,7 @@ static int vmx_set_nested_state(struct kvm_vcpu *vcpu, ...@@ -6176,6 +6176,7 @@ static int vmx_set_nested_state(struct kvm_vcpu *vcpu,
goto error_guest_mode; goto error_guest_mode;
} }
vmx->nested.has_preemption_timer_deadline = false;
if (kvm_state->hdr.vmx.flags & KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE) { if (kvm_state->hdr.vmx.flags & KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE) {
vmx->nested.has_preemption_timer_deadline = true; vmx->nested.has_preemption_timer_deadline = true;
vmx->nested.preemption_timer_deadline = vmx->nested.preemption_timer_deadline =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment