Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3821653pxy; Tue, 4 May 2021 10:39:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqPNzMgfMLoKL9hfwPbqCX9OJDqzSTFJtcqEdt7hI7knsrDuFypLBCU8z6t08PDXyb9HgT X-Received: by 2002:a63:1719:: with SMTP id x25mr23883424pgl.103.1620149941800; Tue, 04 May 2021 10:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620149941; cv=none; d=google.com; s=arc-20160816; b=H9jVpH50RI260Sown3RY5qeiI9IoNsgTohtY5or540F+O4GooaicfOZUoED+gpK7NW pMFTAvMY0hAoSyY6hiPux7cvDjKhXyp5RUBLnxa5kDHyIMRadnTBj5gz6RscGOcUkSiZ rwRGjLU6G3eeCpOc4H4pXOG13UQxyHYx+kUXnTxneZmCMsP3cweKJzcOBS0bazzoNh/W Rv4S0Yjybh42qahRADBnNTAzFujo1aF30JeRjVWUncUfdQm5qvZgILlrnZrQOyIhp9lA DZxc2t4vpRkjG6X5BEHtWSuqmQSeCAOnqKFKkvx4zkFLrb5l9k5wX+ngGdjpuHAonstf w8Sg== 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=uQJdUXEx8maMY/qSJE4caWuHD5W+mMvJWFUW8MPsCdU=; b=gGzxYHYyRWngNCIbGU231247/sz8sIjG2tZv2ihQtfRo8Robq9NEg2hApGhznabOk+ VU4UhfCr0LLqB8XUb/+Zz+qxgm4LBFbeeFUUyxvUyE37Su02gybcyESMqZE1sNuUMnwD 3V63uNCFNt65zGLVq/TwC3n5oXuH7Mz3/fcvFElEbloFkXIuNP5MNRyREZMxW86GC9Zi 3q3lUUyGbtc6VIDOy/bi4V7yFykFLShxQ/G2e//KZwEOW0Thz6OjNisSVqTUNS8pIKDW la3n+44aGQNEdhb2w40SUyO9aeQuz9L7dDTlNA4otP7FEVpGNbHoEhAPQ/OL4MnLfR/g lXrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Z2XmxRIG; 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 t33si3891979pgk.133.2021.05.04.10.38.46; Tue, 04 May 2021 10:39:01 -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=Z2XmxRIG; 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 S231579AbhEDRih (ORCPT + 99 others); Tue, 4 May 2021 13:38:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230482AbhEDRig (ORCPT ); Tue, 4 May 2021 13:38:36 -0400 Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D78E5C061574 for ; Tue, 4 May 2021 10:37:41 -0700 (PDT) Received: by mail-oi1-x231.google.com with SMTP id m13so9511248oiw.13 for ; Tue, 04 May 2021 10:37:41 -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=uQJdUXEx8maMY/qSJE4caWuHD5W+mMvJWFUW8MPsCdU=; b=Z2XmxRIGEs+aA4d/74oGwD1FDn7Q/Ilim4Q3Irnx6sHCVz04n1GuGScOZxS9lR4fCj RtJM0jmmdBmsSzCLagcOsZoI8m1ZRmA9MwQDDml9y0Qex4//GXkmWj0so2jXOtt2a2Ab HvrVVvhWBloMqucQDbYcoW/CCULw4c8CnxT8XqvqIBXTOos8tWFxvEurwpPqEBJG/UuJ Wynls0Y4wQizGcvvBGQTBM+r/scTdza0iJxOclAIQtisUI3IV+8nk/0S+NIZO28bAb00 Ae/bMhto+kK2yEyj3j57ymNqa2h2KAhNGwkRwMVfWCMDoYIKWgiSms5nvpNuCy/Ks9Dz TOiQ== 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=uQJdUXEx8maMY/qSJE4caWuHD5W+mMvJWFUW8MPsCdU=; b=GuKmqSxOnDHKIzeF9aQczq0TQR/dB1asJfIHqLOqua7YIxdz6CKkuI4c9cgOGzEQj/ A7x9RsXOOaeD0upIYRDX1o5Vzyl9m6mE2qtqDDGPEpU/RAzaIu11mlBvcHjxFoWl9xti kPz96YsPrdTe07QcSqHQLsk/AeoDaQxVBQoN2wHCHoxwEe+gf6Dqrmr9/DAV0hWzCq0S y7fiBcNcXgVzrA6/LW88GrBZHme1ARrXlhV5cryRXbd8n7yJs8ulDjt19txvhBNCmgTY QqKt9s1NI5d1jTnu9CAIqgB4N7LMXy1Ma+ZpmnZLbs0uqlehGW3lBWw/3qtcih796yut ZZOQ== X-Gm-Message-State: AOAM5328AdCOUTqSlXsiy7UXoFzLiblrxZu4LrCFrmp+qoFsP8SYwV8p o5Uel+ikjHzdY8Zu3t0G9dVusT2gKH2pHvM5LMeEAA== X-Received: by 2002:a05:6808:b2f:: with SMTP id t15mr3814416oij.6.1620149860953; Tue, 04 May 2021 10:37:40 -0700 (PDT) MIME-Version: 1.0 References: <20210504171734.1434054-1-seanjc@google.com> <20210504171734.1434054-2-seanjc@google.com> In-Reply-To: <20210504171734.1434054-2-seanjc@google.com> From: Jim Mattson Date: Tue, 4 May 2021 10:37:29 -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: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).