Received: by 10.223.176.5 with SMTP id f5csp1879722wra; Wed, 31 Jan 2018 13:02:13 -0800 (PST) X-Google-Smtp-Source: AH8x225PWHtNb3BUX1EYrnj3b4VAw3w3whEXScgr+947JXH5hJh31ZQcNIb3RjSWWwREZvACGc+I X-Received: by 10.99.170.73 with SMTP id x9mr27420327pgo.393.1517432533027; Wed, 31 Jan 2018 13:02:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517432532; cv=none; d=google.com; s=arc-20160816; b=UAzI567TsS1x+k//MxJa50+WzIAdpe92dL9zr4vX6jzDYsCTU7+oc1JIhf87YE9RCw Kt2AVaqZFOP6otBLRQskjH3xdV5AL4zmQoodt3d5eOgQdM0NoeY3ObMhm2a6XuwIgSxY mFP3cAh7igyMhI5sIuqx4+bqWeU3p+VTDIEW2qToPf/BB/0R9Tt3Whcvrj3RHNmFugon R8CDuSHCzBkt4Mu2nKnx8+Rn8Tp+Fo/VQgFXNYO53QJCJrml/lgEy56gt+dq761kw7Cv qTEU/JHmQgUs8Ej4Qz5T9JJZIc7dqLOazHjnjAlzsNz3UTM8fTKHe1Cnr78WDtgn257N XlEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=hj4Q50nO82rsNmXUn7AtEGVO04MPVm/7CGx+ZS6pnzk=; b=YLTVHik6Q7Q/Tp+zuL5gj6IlUaDJd2V4mxQJTExbhI+m5L0URC8LGLfQoGnQlYPhOb P/prN/52+llFAxFuR6y7iETrcGeA8lmbyXSN1r8J5AAiiH//z6btjt6yrVbhJR8U0elq nVtxkseseIepb6wmkNKUW9YXQAl6vMCsEpLxP4Eb4+xLyH2MKJHyLldgXMWYuJ4HnyEx 76WvjDazaOTHP3IyjwiH9fPBS7n1O/bHQieNxlCUpymWIBqNCfe116wl6crjFtl21FJF rVU/9Q1K6sgzRpqFFScobtoO2TBs2GAzJhcATW1efVQMc9dNrmPkUltEauBl0zxmQJuj zLBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g15si157385pgo.87.2018.01.31.13.01.57; Wed, 31 Jan 2018 13:02:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752438AbeAaVAx (ORCPT + 99 others); Wed, 31 Jan 2018 16:00:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37643 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751674AbeAaVAw (ORCPT ); Wed, 31 Jan 2018 16:00:52 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AE5C83A9E4; Wed, 31 Jan 2018 21:00:51 +0000 (UTC) Received: from [10.36.116.69] (ovpn-116-69.ams2.redhat.com [10.36.116.69]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D1C09600C0; Wed, 31 Jan 2018 21:00:45 +0000 (UTC) Subject: Re: [PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL To: Jim Mattson Cc: KarimAllah Ahmed , KarimAllah Ahmed , kvm list , LKML , the arch/x86 maintainers , Asit Mallick , Arjan Van De Ven , Dave Hansen , Andi Kleen , Andrea Arcangeli , Linus Torvalds , Tim Chen , Thomas Gleixner , Dan Williams , Jun Nakajima , David Woodhouse , Greg KH , Andy Lutomirski , Ashok Raj References: <1517427467-28567-1-git-send-email-karahmed@amazon.de> <1517427467-28567-5-git-send-email-karahmed@amazon.de> <06cb88da-f355-41ed-380f-7daa8ddf6159@amazon.com> <67dca2bb-1298-c7fa-f681-018e4edc6725@redhat.com> From: Paolo Bonzini Message-ID: <16d89e09-fbfc-4a08-00a6-40cfb4776018@redhat.com> Date: Wed, 31 Jan 2018 16:00:43 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 31 Jan 2018 21:00:52 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/01/2018 15:54, Jim Mattson wrote: > You seem to be making the assumption that there is one L2. What if > there are 100 L2s, and only one has write-access to IA32_SPEC_CTRL? Or > what if there once was such an L2, but it's been gone for months? The > current mechanism penalizes *all* L2s if any L2, ever, has > write-access to IA32_SPEC_CTRL. Yes, but how would moving the field into struct loaded_vmcs do anything? Only vmon/vmoff would change anything in vmx->nested.vmcs02. Even then, L1 vmexits will also be penalized because L1 has probably done an RDMSR/WRMSR on L2->L1 vmexit. So I don't think it's an issue? Paolo