From: Avi Kivity Subject: [PATCH 15/16] KVM: Avoid using x86_emulate_ctxt.vcpu Date: Wed, 20 Apr 2011 16:07:58 +0300 Message-ID: <1303304879-13019-16-git-send-email-avi@redhat.com> References: <1303304879-13019-1-git-send-email-avi@redhat.com> To: Marcelo Tosatti , kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:57282 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754995Ab1DTNIS (ORCPT ); Wed, 20 Apr 2011 09:08:18 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3KD8Ibs011022 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 20 Apr 2011 09:08:18 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p3KD8Dd6021195 for ; Wed, 20 Apr 2011 09:08:17 -0400 In-Reply-To: <1303304879-13019-1-git-send-email-avi@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: We can use container_of() instead. Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 5d853d5..65a5b0c 100644 --- a/arch/x86/kvm/x86.c +++ b/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) { 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, * so it may be clear at this point. -- 1.7.1