From patchwork Thu Mar 5 12:12:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 10021 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n25CCxj3021642 for ; Thu, 5 Mar 2009 12:12:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753721AbZCEMM5 (ORCPT ); Thu, 5 Mar 2009 07:12:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753584AbZCEMM5 (ORCPT ); Thu, 5 Mar 2009 07:12:57 -0500 Received: from outbound-sin.frontbridge.com ([207.46.51.80]:54449 "EHLO SG2EHSOBE002.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753209AbZCEMMz (ORCPT ); Thu, 5 Mar 2009 07:12:55 -0500 Received: from mail81-sin-R.bigfish.com (10.3.40.3) by SG2EHSOBE002.bigfish.com (10.3.40.22) with Microsoft SMTP Server id 8.1.340.0; Thu, 5 Mar 2009 12:12:50 +0000 Received: from mail81-sin (localhost.localdomain [127.0.0.1]) by mail81-sin-R.bigfish.com (Postfix) with ESMTP id F0B6B18001DE; Thu, 5 Mar 2009 12:12:49 +0000 (UTC) X-BigFish: VPS1(zzzzzzz32i65h) X-Spam-TCS-SCL: 4:0 Received: by mail81-sin (MessageSwitch) id 1236255169342823_19534; Thu, 5 Mar 2009 12:12:49 +0000 (UCT) Received: from ausb3extmailp02.amd.com (ausb3extmailp02.amd.com [163.181.251.22]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail81-sin.bigfish.com (Postfix) with ESMTP id AD5106F004E; Thu, 5 Mar 2009 12:12:48 +0000 (UTC) Received: from ausb3twp02.amd.com ([163.181.250.38]) by ausb3extmailp02.amd.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id n25CCgeR005580; Thu, 5 Mar 2009 06:12:45 -0600 X-WSS-ID: 0KG18L0-02-DE9-01 Received: from sausexbh2.amd.com (SAUSEXBH2.amd.com [163.181.22.102]) by ausb3twp02.amd.com (Tumbleweed MailGate 3.5.1) with ESMTP id 2644416A03C4; Thu, 5 Mar 2009 06:12:36 -0600 (CST) Received: from sausexmb2.amd.com ([163.181.3.157]) by sausexbh2.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 5 Mar 2009 06:12:42 -0600 Received: from SDRSEXMB1.amd.com ([172.20.3.116]) by sausexmb2.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 5 Mar 2009 06:12:41 -0600 Received: from seurexmb1.amd.com ([165.204.82.130]) by SDRSEXMB1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 5 Mar 2009 13:12:34 +0100 Received: from lemmy.amd.com ([165.204.85.93]) by seurexmb1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 5 Mar 2009 13:12:33 +0100 Received: by lemmy.amd.com (Postfix, from userid 41430) id 9B70B5392D; Thu, 5 Mar 2009 13:12:33 +0100 (CET) From: Joerg Roedel To: Avi Kivity , Marcelo Tosatti CC: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Joerg Roedel Subject: [PATCH 1/6] kvm/x86/svm: force new asid on vcpu migration Date: Thu, 5 Mar 2009 13:12:28 +0100 Message-ID: <1236255153-4432-2-git-send-email-joerg.roedel@amd.com> X-Mailer: git-send-email 1.5.6.4 In-Reply-To: <1236255153-4432-1-git-send-email-joerg.roedel@amd.com> References: <1236255153-4432-1-git-send-email-joerg.roedel@amd.com> X-OriginalArrivalTime: 05 Mar 2009 12:12:33.0702 (UTC) FILETIME=[AA202C60:01C99D8B] MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 1821c20..0e66bca 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -180,7 +180,7 @@ static inline void kvm_write_cr2(unsigned long val) static inline void force_new_asid(struct kvm_vcpu *vcpu) { - to_svm(vcpu)->asid_generation--; + to_svm(vcpu)->asid_generation = 0; } static inline void flush_guest_tlb(struct kvm_vcpu *vcpu) @@ -716,6 +716,7 @@ static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu) svm->vmcb->control.tsc_offset += delta; vcpu->cpu = cpu; kvm_migrate_timers(vcpu); + force_new_asid(vcpu); } for (i = 0; i < NR_HOST_SAVE_USER_MSRS; i++)