From patchwork Mon Aug 2 14:46:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 116529 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o72Ejh9k005570 for ; Mon, 2 Aug 2010 14:45:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751852Ab0HBOpK (ORCPT ); Mon, 2 Aug 2010 10:45:10 -0400 Received: from va3ehsobe003.messaging.microsoft.com ([216.32.180.13]:54018 "EHLO VA3EHSOBE003.bigfish.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751284Ab0HBOpJ (ORCPT ); Mon, 2 Aug 2010 10:45:09 -0400 Received: from mail138-va3-R.bigfish.com (10.7.14.253) by VA3EHSOBE003.bigfish.com (10.7.40.23) with Microsoft SMTP Server id 8.1.340.0; Mon, 2 Aug 2010 14:44:54 +0000 Received: from mail138-va3 (localhost.localdomain [127.0.0.1]) by mail138-va3-R.bigfish.com (Postfix) with ESMTP id BD8581700C7; Mon, 2 Aug 2010 14:44:47 +0000 (UTC) X-SpamScore: 1 X-BigFish: VS1(zzzz1202hzzz32i87h2a8h) X-FB-SS: 13, X-FB-DOMAIN-IP-MATCH: fail Received: from mail138-va3 (localhost.localdomain [127.0.0.1]) by mail138-va3 (MessageSwitch) id 1280760283755747_531; Mon, 2 Aug 2010 14:44:43 +0000 (UTC) Received: from VA3EHSMHS030.bigfish.com (unknown [10.7.14.238]) by mail138-va3.bigfish.com (Postfix) with ESMTP id B506BB70054; Mon, 2 Aug 2010 14:44:43 +0000 (UTC) Received: from ausb3extmailp02.amd.com (163.181.251.22) by VA3EHSMHS030.bigfish.com (10.7.99.40) with Microsoft SMTP Server (TLS) id 14.0.482.44; Mon, 2 Aug 2010 14:43:54 +0000 Received: from ausb3twp02.amd.com ([163.181.250.38]) by ausb3extmailp02.amd.com (Switch-3.2.7/Switch-3.2.7) with SMTP id o72EiIGE020764; Mon, 2 Aug 2010 09:44:21 -0500 X-WSS-ID: 0L6J4WX-02-4IW-02 X-M-MSG: Received: from sausexhtp02.amd.com (sausexhtp02.amd.com [163.181.3.152]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by ausb3twp02.amd.com (Tumbleweed MailGate 3.7.2) with ESMTP id 27E80C85D4; Mon, 2 Aug 2010 09:43:44 -0500 (CDT) Received: from storexhtp02.amd.com (172.24.4.4) by sausexhtp02.amd.com (163.181.3.152) with Microsoft SMTP Server (TLS) id 8.2.254.0; Mon, 2 Aug 2010 09:43:44 -0500 Received: from gwo.osrc.amd.com (165.204.16.204) by storexhtp02.amd.com (172.24.4.4) with Microsoft SMTP Server id 8.2.254.0; Mon, 2 Aug 2010 10:43:43 -0400 Received: from lemmy.osrc.amd.com (lemmy.osrc.amd.com [165.204.15.93]) by gwo.osrc.amd.com (Postfix) with ESMTP id F359F49C1DD; Mon, 2 Aug 2010 15:43:42 +0100 (BST) Received: by lemmy.osrc.amd.com (Postfix, from userid 1000) id 2D7C39FC01; Mon, 2 Aug 2010 16:46:48 +0200 (CEST) From: Joerg Roedel To: Avi Kivity , Marcelo Tosatti CC: , , Joerg Roedel Subject: [PATCH 2/2] KVM: SVM: Check for asid != 0 on nested vmrun Date: Mon, 2 Aug 2010 16:46:45 +0200 Message-ID: <1280760405-22591-3-git-send-email-joerg.roedel@amd.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1280760405-22591-1-git-send-email-joerg.roedel@amd.com> References: <1280760405-22591-1-git-send-email-joerg.roedel@amd.com> MIME-Version: 1.0 X-Reverse-DNS: ausb3extmailp02.amd.com Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 02 Aug 2010 14:45:43 +0000 (UTC) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 083fa88..7a2feb9 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -2020,6 +2020,9 @@ static bool nested_vmcb_checks(struct vmcb *vmcb) if ((vmcb->control.intercept & (1ULL << INTERCEPT_VMRUN)) == 0) return false; + if (vmcb->control.asid == 0) + return false; + return true; }