Message ID | 20240223204233.3337324-3-seanjc@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-79129-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp835473dyb; Fri, 23 Feb 2024 12:45:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX4P1h7nQjGGKZ5FxxotiXYDu0Vpfo20YqOejZDdh+4/jt5ZQPefDsa6mRiZkzrRLAev34OYh3aB0LpBVC52cvi4CtaQQ== X-Google-Smtp-Source: AGHT+IGhH3hCgRtHzWo4LDj31CwYdX2wyF92w7Qcc1OwHQmW+0VRx2M0k3PsutWaN6iLfeN9KyNe X-Received: by 2002:a1f:ec01:0:b0:4d1:4e3a:d13a with SMTP id k1-20020a1fec01000000b004d14e3ad13amr1098870vkh.12.1708721154468; Fri, 23 Feb 2024 12:45:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708721154; cv=pass; d=google.com; s=arc-20160816; b=uOMy2Ii1x9zypZjE+pDGWQY/NjVr0mVIJA3JfdCYNmI2snKSF0vXyn4TcI/y/3B7g/ niDb8FEVyp65RkNVvU5bmkBBLaU8xCMozJ/UTyzCoqwvHKgTOYJxiL/23AtLvN+WQ7Tu FrQxh6xiTgrB68Hk5TOIs6D23l7RaK+ekCMJUCpcmxphPOZhlfnOBwwVwfhYx9nykuB3 vMVx0ZHuIBUQeUEgP9zGdgl+yRyr4/Yp8o5FzGCQAzCUULRno6GUsNiaq6Bvlto0+4Ff aSwlXoadeG3dafrkLdIY0OYu45rc1iqE0w/ZWBJAfjVdqHTUSWTuAujwvfe4ByZXwRjS GMiQ== 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=VjNX97VdvJmEYHLw9j+I1sJUr3uD5daxjuOHv2NtViI=; fh=z1kV35XTK7qgx0lSaxuY8o4BsjL8ypDp7UODYZbJc98=; b=b4N2CDCcNeU+OZzaJZSPUTgONzncQbGl8WHP3fkpPhK8oAZFaxr2XUF5/VGB/OBL84 WFesLYZ13KarZs+7pb8j/Z7Jl1Co161AxKbEVSvQ7VEaYwRA/h5xvwE74Foxamkl4slN l2i1c2bCgZI8WWhFVTML1ytwgPR4nq3e0tb9IqhTAlG10eL173ZrSYxcaz5h5YYdtAdh htlXcYKnQRaB7YUFova9Zg12UisIpGWHjKHdz7uxZUkA35IUboP44dUy3ZWYJmzVWilu Ehoa7EX7JDxp0lYTx6c3HtEYu713a1ugYaPbCrDxoSkoQd34zt0BXmRKFy5rFDG+NeYl +pYA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=I7Hxh3uX; 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-79129-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79129-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id gf14-20020a056214250e00b0068fe276cf6esi1146661qvb.330.2024.02.23.12.45.54 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 12:45:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79129-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=I7Hxh3uX; 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-79129-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79129-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9F04A1C252D0 for <ouuuleilei@gmail.com>; Fri, 23 Feb 2024 20:45:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01354155A4D; Fri, 23 Feb 2024 20:42:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="I7Hxh3uX" Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (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 BB8A314F9E6 for <linux-kernel@vger.kernel.org>; Fri, 23 Feb 2024 20:42:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708720961; cv=none; b=I+imoX+3JU6RUvqiaMqBqQk33I8nIv/fZwagFkhQJ9LaWSnVb/Ux8yLQUPIqVPHgWSsxFHO70P45PnQuBEnG2J4eKTgJzW3VA+jza5HrkBzxXeukdRmcJFODSg8BMGrUF029jkkzrIhkTYiJ2H7a6R90j8aJL0dGP1e/ETRl5lE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708720961; c=relaxed/simple; bh=5TYRB9geZwbqkO8y1Zhk51uKaBiKt/CcTaK+FICMgNs=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=UG7UMbfpHf1mkf5VKldpPIrLerlP0OLdt78Btd4mwa8mgSqn8nwG3l2PB6iUDczvAfVQHljWtiaulpM/vLFeJHbmgxNiNkWA2DiQrKDNbEuk3h0weZLep59c6gtAcQDBCM9z5Rq5cYoeVxLnBL+DWikxVslgf2h9WD/9CAVKejc= 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=I7Hxh3uX; arc=none smtp.client-ip=209.85.219.202 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-yb1-f202.google.com with SMTP id 3f1490d57ef6-dc6b26ce0bbso1444264276.1 for <linux-kernel@vger.kernel.org>; Fri, 23 Feb 2024 12:42:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708720959; x=1709325759; 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=VjNX97VdvJmEYHLw9j+I1sJUr3uD5daxjuOHv2NtViI=; b=I7Hxh3uX8BnJaemgx0Njltxn68vW0zYIPjlZ/bw9KPcduCDk80NHhx8k30DSpCh/9d dq2CfWXUjrr1N43UKvhpPlJtS261/DJBWNTulG19Ekfl0r3Ppxy9ZuV33xhMqtUqNzzd +KVXHjDHTzoOKqA4O/Q4lyTz4Icby/+iqMh++l+Pa4fkCKQWMHpibrPMrGjIMjPeJQJF 8D/0Cf+I8Aj9MwsyRgWg85MZs6vwW7PSFdBJ4Ydv0wfeBPC5xwnjFIDp8xPl7rA0WxaY MXYcTfDaT1XiPq5sqiqkZN2jmj41vVR4oINpWmlJ8EyJXql0y9qv9xKb4PXEdgV7n2xO ULNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708720959; x=1709325759; 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=VjNX97VdvJmEYHLw9j+I1sJUr3uD5daxjuOHv2NtViI=; b=HRBj6LACk4zvcTj4Ro498mC8lJ8b11cBswSB77NY9P6Q1i0R3kswIXjG5+2c9Z8ZOF m6GaRVBiuZbB8B8EZPjrfeSq2Nj1IqhpYxb3vsZgEZ8IUJj5QnEEnHEFMorpT6fX6bXz c4/Xn2Hj54ySamsxzywshFZOXv4oKclzBAZNTyUNHi6Vdsl+HPKc4Lka8gbD6pCaQgnE G/FsECNjw6uqN9UViNQzVPd2RocBqvCtIrQv/BMWCAcW4lrHCLgwmbZud4NmCfHUjyXS 3BljMOppy+PubB7gUYcTZoTP68EWCnU4xxiHyoOTCmQaGlxI02nmpBwIyMsrWjK1U5cH pT3w== X-Forwarded-Encrypted: i=1; AJvYcCU+NCCOXcdWWIbcZFeRDVdFYN1aUkfZaT6hMge+KIWmlZzH/u3MmGw71hc6SlbXBg9CTCWIBN4HpxXUSUq1KlKhVkqbUWsVT8QK0f9b X-Gm-Message-State: AOJu0YwaGEi1O3UvfN90xoCqu+qOZfDdyhkdNXrAp+sBU51nuxd1k3tS EPdn1w/UxQDb9QfqbgAcDAAc0jQ7EMXRpQWVSNwwB9mPy4QnKtVjjWSL1reLW1LHJ81sz7z9ST7 5zQ== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a25:69ce:0:b0:dc7:9218:df47 with SMTP id e197-20020a2569ce000000b00dc79218df47mr246758ybc.5.1708720958891; Fri, 23 Feb 2024 12:42:38 -0800 (PST) Reply-To: Sean Christopherson <seanjc@google.com> Date: Fri, 23 Feb 2024 12:42:27 -0800 In-Reply-To: <20240223204233.3337324-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> Mime-Version: 1.0 References: <20240223204233.3337324-1-seanjc@google.com> X-Mailer: git-send-email 2.44.0.rc0.258.g7320e95886-goog Message-ID: <20240223204233.3337324-3-seanjc@google.com> Subject: [PATCH 2/8] KVM: SVM: Wrap __svm_sev_es_vcpu_run() with #ifdef CONFIG_KVM_AMD_SEV From: Sean Christopherson <seanjc@google.com> To: Sean Christopherson <seanjc@google.com>, Paolo Bonzini <pbonzini@redhat.com> Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Tom Lendacky <thomas.lendacky@amd.com>, Michael Roth <michael.roth@amd.com>, Alexey Kardashevskiy <aik@amd.com> Content-Type: text/plain; charset="UTF-8" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791723992919031774 X-GMAIL-MSGID: 1791723992919031774 |
Series |
KVM: SVM: Clean up VMRUN=>#VMEXIT assembly
|
|
Commit Message
Sean Christopherson
Feb. 23, 2024, 8:42 p.m. UTC
Compile (and link) __svm_sev_es_vcpu_run() if and only if SEV support is
actually enabled. This will allow dropping non-existent 32-bit "support"
from __svm_sev_es_vcpu_run() without causing undue confusion.
Intentionally don't provide a stub (but keep the declaration), as any sane
compiler, even with things like KASAN enabled, should eliminate the call
to __svm_sev_es_vcpu_run() since sev_es_guest() unconditionally returns
"false" if CONFIG_KVM_AMD_SEV=n.
Signed-off-by: Sean Christopherson <seanjc@google.com>
---
arch/x86/kvm/svm/vmenter.S | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kvm/svm/vmenter.S b/arch/x86/kvm/svm/vmenter.S index ee5d5a30da88..7ee363d7517c 100644 --- a/arch/x86/kvm/svm/vmenter.S +++ b/arch/x86/kvm/svm/vmenter.S @@ -291,6 +291,7 @@ SYM_FUNC_START(__svm_vcpu_run) SYM_FUNC_END(__svm_vcpu_run) +#ifdef CONFIG_KVM_AMD_SEV /** * __svm_sev_es_vcpu_run - Run a SEV-ES vCPU via a transition to SVM guest mode * @svm: struct vcpu_svm * @@ -389,3 +390,4 @@ SYM_FUNC_START(__svm_sev_es_vcpu_run) _ASM_EXTABLE(1b, 3b) SYM_FUNC_END(__svm_sev_es_vcpu_run) +#endif /* CONFIG_KVM_AMD_SEV */