Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3832644pxy; Tue, 4 May 2021 10:54:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4PAj8bCWROMvBU4vUiEcSRJjR2rgeZZQ/zaJOIaF5pVevOIMAUS9rSA/oO52oht+Kr1Rz X-Received: by 2002:a17:906:5584:: with SMTP id y4mr15155246ejp.120.1620150894161; Tue, 04 May 2021 10:54:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620150894; cv=none; d=google.com; s=arc-20160816; b=hmtGOeBNhO3YyhEhgSyTRdYbFoCX6cqWSZcr1R/NqlxFenndjfM7TD1TV68md9eelz z8OnHBTfzeItwN0tp2UsrJQtQk5o7b/lhgwBclwr2XrSzYQlmfdiG4uypnFY6n0c2q/0 0E6G5r0N/uSze8xU7vjSEwHGaco7jipEYoYEkiE1X50FnSPq0KFN0dXGT7UbxVK6exQQ +TGmYDAFKN0777/OzqvEZEgZFignzSQpgGiuB4GlwGgytm1CT9J2woGjkiiMAkEZtT3c M2CuoMRTNXx9dYB5u5O/13hEDco83fsveylXwdFC4uks2O0ckGSq8ZbOwHN9DOSs6EK/ 7hoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zBVMDvBEgjOjeMHbsEdTwYO7oiRFE8elSZdEfzu5kjo=; b=bHzITvXwZ09Oe6iOqEEkX9QDOhM/NFN5wTopud7EEwL+16JiyfoZmIg11/pW3i5QTB rX3w+IoOxCheb1Ulhzotv2UhjlNuMiZLnjGh+ow/X2+2IciM8rj6e2okwQA3vclEBHfZ hdwmpSWlcTbX+1WS3JyLIrsfnmLSja4+ZGrnw0tySvof2tSMfLrQKmq9NUsOKWhAKMqR InNJNWR/LZMPt6QVCkIwVAROYHcs9JnAxmE8azTvJOyV2/CTnIDli3lHLx1ba+g4xzOh Ptic5KBorZNov1C7w+cbQ2UTMWRdJhvFnr9ff6YvqIRgm34MXawGxxxOGtGzsXd1Bu+R OeAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Hwj5AUvM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id sb9si3597180ejb.615.2021.05.04.10.54.25; Tue, 04 May 2021 10:54:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Hwj5AUvM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232248AbhEDRyP (ORCPT + 99 others); Tue, 4 May 2021 13:54:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232222AbhEDRyO (ORCPT ); Tue, 4 May 2021 13:54:14 -0400 Received: from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A1D4C061574 for ; Tue, 4 May 2021 10:53:18 -0700 (PDT) Received: by mail-ot1-x32b.google.com with SMTP id 92-20020a9d02e50000b029028fcc3d2c9eso9047380otl.0 for ; Tue, 04 May 2021 10:53:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zBVMDvBEgjOjeMHbsEdTwYO7oiRFE8elSZdEfzu5kjo=; b=Hwj5AUvMrkRZauysJ4VIPZwfbnyHCjpUlARF9+kvnwXT7wKAuwkiCxrkcYY3bdDBFn TEUc9RwalezA/Ckl+j7dqQymKma/SAYUwK6AZOImiV1IE93bVdcOVHcVLfFeoXtIFSjO WyHBfaAyMJTsNoGt94zojRlK4hvKRV5Ben96Dd/KEqG/L93A93JlgiO5/MJ2FkiKokPO LP0HemyBSPR8eJiHlwoMtgTUvV3pAn0H4u8Mhgg+MQX5P45th0DljBpemVYxJyuoxshY Au9dpfeGBkduOEELK7ULyvyGjy53epUFFrz1yA9X6WHSYSNU7nc5bdsIuKUpL/ggN3+k LcJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zBVMDvBEgjOjeMHbsEdTwYO7oiRFE8elSZdEfzu5kjo=; b=EtOjA9cWFI7NeX5ieylfHyM5sTOGzCqtnXu3Dj6LUlGhk6+JtyzccbuTAzs8gzMD7D BLhWBRAGATNFUatemFwzzdm0nM+ZAcpHqgfM9+AzvJJ29OKl6DEvsh/2RR1gsbiDT989 tlLwrvPoux4Y4xd4ntxjvvAolHTt22YUjhuUio6Yg69rE1zjO43uEV2+sKkc0Vy943VG zhF8AS76QV7RADkvcMb1o5Pq8JVk/xG4vpVgMRB/SQuD8zSYnsNABFfJTUtPejLeuv6B jwhJpw6cMk7XHU/17UhwmB/LYZzNfEhKLXw84E2V7Xrt6Y4aCGoquDhQkUAnG9qcERgr Mo5g== X-Gm-Message-State: AOAM531nBIWt7ir7xJGdNuWVKxlgNTlDFYapadyhYoa87szAT7LCITDY PIVYpGUHygvZVCa/jYV6NCpDzlrsXkMAsNNEjIdVcA== X-Received: by 2002:a9d:1b4d:: with SMTP id l71mr20519674otl.241.1620150797159; Tue, 04 May 2021 10:53:17 -0700 (PDT) MIME-Version: 1.0 References: <20210504171734.1434054-1-seanjc@google.com> <20210504171734.1434054-2-seanjc@google.com> In-Reply-To: From: Jim Mattson Date: Tue, 4 May 2021 10:53:06 -0700 Message-ID: Subject: Re: [PATCH 01/15] KVM: VMX: Do not adverise RDPID if ENABLE_RDTSCP control is unsupported To: Sean Christopherson Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , kvm list , LKML , Xiaoyao Li , Reiji Watanabe Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 4, 2021 at 10:37 AM Jim Mattson wrote: > > On Tue, May 4, 2021 at 10:17 AM Sean Christopherson wrote: > > > > Clear KVM's RDPID capability if the ENABLE_RDTSCP secondary exec control is > > unsupported. Despite being enumerated in a separate CPUID flag, RDPID is > > bundled under the same VMCS control as RDTSCP and will #UD in VMX non-root > > if ENABLE_RDTSCP is not enabled. > > > > Fixes: 41cd02c6f7f6 ("kvm: x86: Expose RDPID in KVM_GET_SUPPORTED_CPUID") > > Cc: stable@vger.kernel.org > > Signed-off-by: Sean Christopherson > > But KVM will happily emulate RDPID if the instruction causes a #UD > VM-exit, won't it? See commit fb6d4d340e05 (KVM: x86: emulate RDPID). Oh, after reading the second patch, I now see why this is needed. You mispelled 'advertise' in the summary line. Reviewed-by: Jim Mattson