Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1107433lqo; Fri, 17 May 2024 10:50:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCViDhthx3TYaVlNjPKdcGRYZrcjahu8MVyYqcqjK4Kzwasgdrh87Q3A9mjm6JLqjjVEfXdRmDhLMt4RC25O4quR7/74//aWKr+7XMzSFA== X-Google-Smtp-Source: AGHT+IEdBquFiaGj1pPyHAdCvbef/zle8NdFzk76pBMY9CSJ/RYF5TsqvdFH5vJA3JtI/0Cbxb7h X-Received: by 2002:a17:907:2685:b0:a5c:daf2:1cfb with SMTP id a640c23a62f3a-a5cdaf29605mr943201866b.63.1715968232266; Fri, 17 May 2024 10:50:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715968232; cv=pass; d=google.com; s=arc-20160816; b=sGPrFI4zviePhFCim+9oPcNGGPubV5PUqmuJDhVVzR5G2jVP9QlUzaTvLOwyQ9ZZK6 KWhoGFlbO6wDu70dcbS4gss2ppmCeXjWMgw8aVeGBfJo1pGP3VNlVlC/gtSgjWmYh/qV sbjqsqROWjwg3GOdLeTdxRLJVEan5ixrOH8n6gXqHU1BqLiBXlV594t/vI8m0mqVjqjV LfYyv7Q8ECURLAi++32guf7qt47Ha0VCCnOMKYtDfS3YiXWuueMMtzmUH6Q6ibYUZea5 IQG6taiETwAj9H6NMsOMDHEu9JM2yyzu5MJwntvcMQd105sihp/5FrcNXC1Q3Wjhladj GnDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :reply-to:dkim-signature; bh=fU8sq/AkEJ2xM6e1kKBCrj+vGTO6zKbUVxTUOdmW3f0=; fh=q5W3HLZSfQyM/4zpwTALAoCcj9EarMccDwWNAtndPYA=; b=HlyI194hxV9Yjz3Olsk7s6Cuyb8XuWtMxP8m21sAStiQrfpJTmh7EXHpLFwSKnY7Oa oOptyVfnUK87rTzS1pK1u/eSFHOrkNEEiP+ORfYmsMJyPVEler089CKyVohkC4YXAefj w7NDxzkwsn1Q7JmaIhZx39MClyGTBdAKoSTQgHfsULjSLrzTqbfbwCnmKDCCFIkLmMzf 29Gi4usw+SAmgz2IGEuMemC1Kd+S5SuaQEvzd+gYe3fb9aEdBy8qKw06Kvv6+Ld5hrd2 bX/50iQwIgCLE5VC4w4uhoeyy3lvStBK42syjaqVZREHsMMfbNNly2gOCxv0Hs49Q75y pTuw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=YeP9VDvf; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-182467-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182467-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5cdb323178si283722266b.118.2024.05.17.10.50.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 10:50:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182467-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=YeP9VDvf; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-182467-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182467-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 06BA91F21A6C for ; Fri, 17 May 2024 17:50:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 155FD156257; Fri, 17 May 2024 17:40:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="YeP9VDvf" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B837115538F for ; Fri, 17 May 2024 17:40:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715967650; cv=none; b=JtocjnD7lSRZq2PgU8eS1XXU9erS1C8C83cEjQtE+DZ1H76gsK8KmhxLIYPSsJjczoK4ZiDHN8N5YTJOPTfXFAlDiHytf+5gTN8K5JqxLHSvODiBrdhpmTFcEZYcB2tv+58HBB1i72Dn+HU8m8E9jiN8LgW6ZkQBYcOVva4umak= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715967650; c=relaxed/simple; bh=MOt7a7eVZjErDMDDNmU9MZ31JPtIJ1yFe6IZvXt2XBk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=cJ03mOcLxv76DotaITXW52e4blJt+cx8azsz0EOcHtmOt5JWisyAZ7ljQlVf2vHkuFnWbliiG0cZJkPI/Gz7xbBaKHkvF66PvcEeHn61FbLbHvDIYII0NZbkYc2bDaa4+mPULL3iLMyOZ08zNMr2bNicgibY+1Scf78qzPvA/+s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=YeP9VDvf; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-61d21cf3d3bso164443907b3.3 for ; Fri, 17 May 2024 10:40:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1715967648; x=1716572448; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=fU8sq/AkEJ2xM6e1kKBCrj+vGTO6zKbUVxTUOdmW3f0=; b=YeP9VDvfIq02/yUcAv0lztPJvC3x0XGxUL69wiwHw/LJ7ZCBHVfgWA9M66Md7WpfuJ EtcdQSv2vq9kdNsGMIigY0QvjoxGylkxtXwBuwS1fuz9Q8EXz4gv1G6eP8EHTJkshktt fTRcRFAqS9w0jCvUCS1wOlX2nMPMJJVFyYerGfAuU6MCRbmKLXrXwXPx0XT6VHM3XgVx 0OrDropj1/PQWq83OYEBupDtu1m8uIotS9wTV3IOk9Ww7w+aukmumNFgW/Ck4aqbjWAK BI5j8JEgaUGuApM6SrixJ1Q6WdsoLWKUXq3OoMqrGJFfqKXMPXei58ZuiUFef3F5XW2k xvRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715967648; x=1716572448; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fU8sq/AkEJ2xM6e1kKBCrj+vGTO6zKbUVxTUOdmW3f0=; b=dUKzLamKop54fwEg+CP0vED+fi5I/J3b20gA0MoQVSwTsVJbpVWn+dHnVnkWp0Jem2 cBDL18Viq+8vKFqvu8FHRopYwsjsuRD0w2hI0PpkPoEHJhCxmaBarYJ02oqTktK9pJEt HEOeTlkTuF8IufLu7tLrFV4d0eLc3SBnkd7ZBvH0eRHatHzTQwrjV6e7uOq7XGQCjuaj tyI3llQiTTStnUWUwkMo/HPrVwtshZn5Wshp/7hP3EsreDCh28Wjlajokv1FItcsO97R 3uNNMeJ2aJME3GtP5FYpY+umpPNlmaxpcExcCEnANqIaj9OdhUiqKib0bSFuMf0QNJH3 7LNg== X-Forwarded-Encrypted: i=1; AJvYcCUJ5n/lr8zNBesgxtJ76bcyESkYdLtFaNSvu1LyTikI1fy3iVSoEQ6fYmqOrcN9MQ+3Q93ZihG/eLXdr8jJFjWBU5jxpmk3aMI++/jH X-Gm-Message-State: AOJu0Yw4oLEuCyYXav4Z/ft0fG49tn6GBVheqeSliHb7iUTb5enCKTOR aAXmuUUTOrZpHIghX3ZEIsCxMG7YCeksYtmZ0qoGdJBg3NUa/Tg43dS5iYdFpUqxGzo+EWEUYmk TQA== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:690c:3804:b0:61b:1d66:61c4 with SMTP id 00721157ae682-622b016d66cmr45344297b3.10.1715967647859; Fri, 17 May 2024 10:40:47 -0700 (PDT) Reply-To: Sean Christopherson Date: Fri, 17 May 2024 10:39:11 -0700 In-Reply-To: <20240517173926.965351-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240517173926.965351-1-seanjc@google.com> X-Mailer: git-send-email 2.45.0.215.g3402c0e53f-goog Message-ID: <20240517173926.965351-35-seanjc@google.com> Subject: [PATCH v2 34/49] KVM: x86: Advertise HYPERVISOR in KVM_GET_SUPPORTED_CPUID From: Sean Christopherson To: Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Hou Wenlong , Kechen Lu , Oliver Upton , Maxim Levitsky , Binbin Wu , Yang Weijiang , Robert Hoo Content-Type: text/plain; charset="UTF-8" Unconditionally advertise "support" for the HYPERVISOR feature in CPUID, as the flag simply communicates to the guest that's it's running under a hypervisor. Signed-off-by: Sean Christopherson --- arch/x86/kvm/cpuid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index d1f427284ccc..de898d571faa 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -681,7 +681,8 @@ void kvm_set_cpu_caps(void) F(PCID) | 0 /* Reserved, DCA */ | F(XMM4_1) | F(XMM4_2) | EMUL_F(X2APIC) | F(MOVBE) | F(POPCNT) | EMUL_F(TSC_DEADLINE_TIMER) | F(AES) | F(XSAVE) | - 0 /* OSXSAVE */ | F(AVX) | F(F16C) | F(RDRAND) + 0 /* OSXSAVE */ | F(AVX) | F(F16C) | F(RDRAND) | + EMUL_F(HYPERVISOR) ); kvm_cpu_cap_init(CPUID_1_EDX, -- 2.45.0.215.g3402c0e53f-goog