Received: by 10.223.176.5 with SMTP id f5csp1885947wra; Wed, 31 Jan 2018 13:06:52 -0800 (PST) X-Google-Smtp-Source: AH8x226W03AfxUE3UZrm8a2IkNNQ1UodaWPOFpgvXoOaZA5y5i7aWZAiayil/ce65Z+b7yxMGiNJ X-Received: by 2002:a17:902:8215:: with SMTP id x21-v6mr30003784pln.381.1517432812692; Wed, 31 Jan 2018 13:06:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517432812; cv=none; d=google.com; s=arc-20160816; b=wc0IqU618VbCwjIQHQKmz5haXwKW/K7OX4XLDUySd3MI3mzxmGOC7IQ8wsQz1Ar75K JqJh780Tb+VTT+W4Eom1nDnf0emG9sm8JB3t8YX4/YmlB0kZziqoa1vRcpOKBOxSRtVH 54y0aMATV3F1g2xaZRaL8Z0ZoIrW2ZUmLGq1Vzv/Soys9JWwfyLGxV3pPrgVF0lE3ZNb mF0S8cfkwaqUKclquTyWNUYtinEAjmMzN7P0eROCo/gxTdNcy3v8O71DvSD4spr5iUze j26eQAt0j9lei2VQ3Bipfad/9RIkJgBz6aVBiUK41X+oR2QW2qWsCpvqoQA6C7oeYb0t 8i7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=l09aDjlZLVLeIYEpQkObRlAYdG/HoII3/rz9B6BkHZU=; b=yny97S+qbCGrW/gCadKTrehzLNtQWtQcJQ3TUo218EnOApkd5PhsEpUB9ZUQL67cle fAiNpDpZTwaRBv2Y5SSSn8NXnrHbKbFj26SgSxZmwCTCpVqQEck6Q/6EqniW1liFPmvw swlX0SVeb81txIoTuTfrUhxoFwVjLS+uRkzw0LnkCdQrCWFyvtJ6Cu59gtOKF1WwoVQM OHK2/QrBYMJD8pSbYtDQ45Sk7i9ADZgmkH0sU8zIfSZc4rNkCcR/B05D3g23hLq/SKAu TLWPQe/AagCUw0yadLIEr8DF55WEGGZRd9PLBIYmZc/YR57C8oRtQ1NargnOPmy+FjZG gvEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=NsRYpBC4; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5si381721pgs.608.2018.01.31.13.06.37; Wed, 31 Jan 2018 13:06:52 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=NsRYpBC4; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753135AbeAaVFq (ORCPT + 99 others); Wed, 31 Jan 2018 16:05:46 -0500 Received: from mail-io0-f175.google.com ([209.85.223.175]:39155 "EHLO mail-io0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751985AbeAaVFm (ORCPT ); Wed, 31 Jan 2018 16:05:42 -0500 Received: by mail-io0-f175.google.com with SMTP id b198so16714549iof.6 for ; Wed, 31 Jan 2018 13:05:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=l09aDjlZLVLeIYEpQkObRlAYdG/HoII3/rz9B6BkHZU=; b=NsRYpBC47BP8v84poGUYai5GogBZ0s4W2DJIbSBDx34g9cx4u+TtKcem4AD5/zkItT Yu2cl78crn+58r/kOb2e58SV8OrF1c6/zLsggEDguCYZqvpMO6xYq7P7XhcRUS0jS6u0 66p8+vP1FvH+NW8F+hCSpL8fH0pAQ1Aqs8XZCOMpmMbYcwS65RjCWCyYUKj8734fln91 G7spyUqeeTkFMSJT4cLkShfKsnWe451pqDX7X2EJjbTZ08DxmWo1SplFskjrvSUj4dY6 42/oyRZ2Z3U0I44YxuuqgQxbTS1/CJxyHuLbzLr615Nck9f+p1v1xslt0mAm62T7jQws OnOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=l09aDjlZLVLeIYEpQkObRlAYdG/HoII3/rz9B6BkHZU=; b=AGBms0egCZLlj6gOkR4cFO4+M42d5kcWgRwQ3EPOdmi4z7NdxzJMt/svRBJxN047uG LaRlkPHybX+8GAtPvCajjMUJj+HWAMyQvgms32wMpvrcj+YQKeXZzNq5fw3IPfRArpvA 7BdjbjhDz/h/IP7MVE4efCxz6AM7yZOTHsyyojIPcWZ8Zybuy8O4fEJ0mXbhIjUF8H5m ML46ZXssFqOs5Lh6TzsHP5TovdcuvN0R5VOx/aRAD0Iv6pt3LiEyeQgp7Rppi3/ZvYFd fzt14AEMvugCl/jvYKAgr+PKs9pzyArsRXpwx+MMBZyssMlkQkCdIGOZSBxieXOxTjbA 3zJg== X-Gm-Message-State: AKwxytfT8Y3okBg7phvhdvigf+UDKekbud9tIUa8YPezC4nELJIwHLKD 02Uoye9DrLCFZfdG8LTKKCMXetihuOn/MGcpuXHmTQ== X-Received: by 10.107.28.201 with SMTP id c192mr34472381ioc.26.1517432741402; Wed, 31 Jan 2018 13:05:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.128.7 with HTTP; Wed, 31 Jan 2018 13:05:40 -0800 (PST) In-Reply-To: <16d89e09-fbfc-4a08-00a6-40cfb4776018@redhat.com> 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> <16d89e09-fbfc-4a08-00a6-40cfb4776018@redhat.com> From: Jim Mattson Date: Wed, 31 Jan 2018 13:05:40 -0800 Message-ID: Subject: Re: [PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL To: Paolo Bonzini 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 31, 2018 at 1:00 PM, Paolo Bonzini wrote: > Yes, but how would moving the field into struct loaded_vmcs do anything? > Only vmon/vmoff would change anything in vmx->nested.vmcs02. My suggestion was that nested_vmx_merge_msr_bitmap should set the vmcs02 version of save_spec_ctrl_on_exit based on the calculated value of the write permission bit for IA32_SPEC_CTRL in the vmcs02 MSR permission bitmap. > 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? Yes, it sucks to be L1 in this situation.