Przeglądaj źródła

KVM: Avoid using x86_emulate_ctxt.vcpu

We can use container_of() instead.

Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity 14 lat temu
rodzic
commit
5197b808a7
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      arch/x86/kvm/x86.c

+ 1 - 1
arch/x86/kvm/x86.c

@@ -4366,7 +4366,7 @@ static void emulator_halt(struct x86_emulate_ctxt *ctxt)
 static void emulator_get_fpu(struct x86_emulate_ctxt *ctxt)
 static void emulator_get_fpu(struct x86_emulate_ctxt *ctxt)
 {
 {
 	preempt_disable();
 	preempt_disable();
-	kvm_load_guest_fpu(ctxt->vcpu);
+	kvm_load_guest_fpu(emul_to_vcpu(ctxt));
 	/*
 	/*
 	 * CR0.TS may reference the host fpu state, not the guest fpu state,
 	 * CR0.TS may reference the host fpu state, not the guest fpu state,
 	 * so it may be clear at this point.
 	 * so it may be clear at this point.