Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp673386lqd; Wed, 24 Apr 2024 13:22:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVVJPnheblONjeEGCkblVYIOlWf8M++9ui5zi4vMqf3eEwHtuLBny9EIGu2eStQX0pqMR39pp+uXhN2I3FXsQAmvbFeEXeu7m1JyWaDqA== X-Google-Smtp-Source: AGHT+IHsA0CcMLsrHuiL1T2juljlSJg+0Xeh1Kzmwv8oKNBLHUV45dn9ZUlFJfuQ2Uo8Th8E74g+ X-Received: by 2002:a05:6214:16a:b0:6a0:5c29:59eb with SMTP id y10-20020a056214016a00b006a05c2959ebmr4115818qvs.47.1713990127600; Wed, 24 Apr 2024 13:22:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713990127; cv=pass; d=google.com; s=arc-20160816; b=giZOJ7uQGmqSuQ2uEdkIGyCPONsvb68cqv6VHgp2EhpwIYhpO7hBXPmGQ6Aeul58Cn ztAVcmi9xayp725mX8F8zyeyC2Fa+2I0VXipZbZZ+KZvWs3srOyhTy09fXwYDUZ5pp5Y gm7Pmj/nbzO/96pnFNVwOiCGYr7rokVB1XaVc875gZpV+K7ydhh0MIDBps6hKlSMJreJ hu2CvXtE5+BgJ9mDRXvdlElGSrF3cnecvvsHXGNQFevIlvtZsfbiQlAns7iRYOX0SDap syZ1o9XPRfsqj94m2+LjuCe8jiCzdocPJYJSE3KAYc+Q6FDqdmUUcUTuf4mYMnpvKIxW FJOA== 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 :dkim-signature; bh=kJKivmW0J/DCohVbY4PLH/Gsm5HkrpKk4PumvPQkGTk=; fh=LO6DzkDAEtH17mk0NAJkOZiGe27x4q9kwBeDOI33hOU=; b=JbISX+TlS6j3W3FEHUePJf5fHN3aph3ghzTNfNaLj9j9S3/x/OQneuPOCHSqrwPI0g GvXvk1yi67tfmJlRPl9JGYhZ0Qd5Jl/jImP2erMzHtLwgWKcz57UfLH4k3pmIaU173YT sUY7fWS9SKOEbM3BqTB23Ado/RNiod8IBfvzOvBVcO8PsVFr35zA93Hhq/xAKxF3u9O9 JktASUYw6vTZstBdJ5Y0uqc8RcHvdeNgjF85V1cFQXJeeU+TbpnSJZtV3SbxQNXQnGdy JYWQW5Ks3mQIfssVXmpYqlAOokE561ZCTr5h21g38ENu67SQMeXyFTltjKb0V+nOy8Nc d/Vg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=LJWhaOBS; 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-crypto+bounces-3830-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3830-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id r16-20020a056214125000b0069e9680ddc8si16824982qvv.440.2024.04.24.13.22.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 13:22:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-3830-linux.lists.archive=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=LJWhaOBS; 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-crypto+bounces-3830-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3830-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8A8E81C23160 for ; Wed, 24 Apr 2024 20:22:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5604D140363; Wed, 24 Apr 2024 20:21:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="LJWhaOBS" X-Original-To: linux-crypto@vger.kernel.org Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.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 2F05E1EB30 for ; Wed, 24 Apr 2024 20:21:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713990114; cv=none; b=kpb3Kquz8uODrgz0seXN0oqqYnuikFlU8BHzCuWuIxobZ9XIVt5tV5t53JNFSzUjEab1aVjq6l0VYnNsUDGc8KHF2F3xWfgGHPybfCAaqHHibT+6eR2N2BI5KyA3M5r81sd/CCibzSEHRkNOvgzF6L2z+NsMkJX+ZcdcdNFQLtQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713990114; c=relaxed/simple; bh=TGEtv5XOiits4mamBa9OAfqfGV4U4S70ayjHE1cLPf0=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Hdj6Cev2R2oNkgBYgx1qHkxug4Twm0zrlEpIebc2auxzo4IAhbdSi/byXeHfX+9S9v2/zujubSM6QtKX43THqOOympN13CoDk8kS9PyO56udUND6Qknv9ZV8w2tJJNd1RAl0MiBCvdEiMnfYSf8zvEToNPdMo33aBM2gaLGmBRw= 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=LJWhaOBS; arc=none smtp.client-ip=209.85.128.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-yw1-f202.google.com with SMTP id 00721157ae682-61b4ede655aso4163337b3.0 for ; Wed, 24 Apr 2024 13:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1713990111; x=1714594911; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=kJKivmW0J/DCohVbY4PLH/Gsm5HkrpKk4PumvPQkGTk=; b=LJWhaOBS23+m4cbeffQxfBi2+LhQiaxH0g4aN0wnbucjwJjOE43th6w3x5Kshx4k/1 ksdbN/ffqddNeAOLSEXHRP0jRaxbX7Mq5pLjMASW7l7reMdVrUCcm+1JmbqVCFgWqa6p 9ypcuIzdQkWkyknbyeg6yjMPyGOoNk4dhRDK7Z1TCPMrFznKIsUS0C4Bczwd6AiKEm2L /XNvlN3itMS4rlQRGCrMoJhRQ/mlJsBw/sgDL59KZ4FEC+zL/5qTDiNpzkah+Emu0cp8 XPFettXTUNO68E+4Yu30UQGHJvKxs/khMkvXnaALWx8vrx+nPO029a34YdOxWqbOF1ey GfHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713990111; x=1714594911; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kJKivmW0J/DCohVbY4PLH/Gsm5HkrpKk4PumvPQkGTk=; b=ctncIiBgrpG2tkpixNCQP1mH8nQkUi+cECebFFYBXKGfB+c4xXPr0Ndl5b1zZMYvCa 5rPkun+2/ezT44jW2yi3Ee1ds+W0y4OUGj2piWd4JqYEvuFHMizFdvYPhgd0Niz2yaa/ wwLYxmIpu7iaj3kT6yyPhAnM9yjDYSxvu1YeEKnEEX7/pHQNJRePjqcN0LtOu3oRw8pq m8MEdsxXggP8cMGn/IO/q6FpyecO/vmKuxfXwB97yrSbSFKfvLrAAkcBjc9XfTWwlZnh cfzD+s8ivXsPXt//yeobUaMGmawKbLsZHHbHyNllMA2KSxcFJUlxfgcHwlVmJaWZi8rk 2W1Q== X-Forwarded-Encrypted: i=1; AJvYcCUonNOZpyJLqxcXpY+iXlyOFYijwH8/2xgAe8mXMbKBoETBPDrBJRMHHEk0yn3p+pGfnigD+BXJm0ji79OiayS53KoBkoz4j7Gogqxg X-Gm-Message-State: AOJu0YzK/gY0kADN3Pd3yqUH5fnrO1n7Q6w7joEp4ndvrBC31hz6UThv rBlJcZeaGy9O4uguAXeUvYDQFm9dEUrJdJSxpMBaRzk3j/JorVPWGD88UjrEtgwznJKgw5qH+Zf H3w== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a25:c54c:0:b0:de1:d49:7ff6 with SMTP id v73-20020a25c54c000000b00de10d497ff6mr385878ybe.7.1713990111258; Wed, 24 Apr 2024 13:21:51 -0700 (PDT) Date: Wed, 24 Apr 2024 13:21:49 -0700 In-Reply-To: <20240421180122.1650812-4-michael.roth@amd.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240421180122.1650812-1-michael.roth@amd.com> <20240421180122.1650812-4-michael.roth@amd.com> Message-ID: Subject: Re: [PATCH v14 03/22] KVM: SEV: Add GHCB handling for Hypervisor Feature Support requests From: Sean Christopherson To: Michael Roth Cc: kvm@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, linux-crypto@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, jroedel@suse.de, thomas.lendacky@amd.com, hpa@zytor.com, ardb@kernel.org, pbonzini@redhat.com, vkuznets@redhat.com, jmattson@google.com, luto@kernel.org, dave.hansen@linux.intel.com, slp@redhat.com, pgonda@google.com, peterz@infradead.org, srinivas.pandruvada@linux.intel.com, rientjes@google.com, dovmurik@linux.ibm.com, tobin@ibm.com, bp@alien8.de, vbabka@suse.cz, kirill@shutemov.name, ak@linux.intel.com, tony.luck@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, alpergun@google.com, jarkko@kernel.org, ashish.kalra@amd.com, nikunj.dadhania@amd.com, pankaj.gupta@amd.com, liam.merwick@oracle.com, Brijesh Singh Content-Type: text/plain; charset="us-ascii" On Sun, Apr 21, 2024, Michael Roth wrote: > diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c > index 6e31cb408dd8..1d2264e93afe 100644 > --- a/arch/x86/kvm/svm/sev.c > +++ b/arch/x86/kvm/svm/sev.c > @@ -33,9 +33,11 @@ > #include "cpuid.h" > #include "trace.h" > > -#define GHCB_VERSION_MAX 1ULL > +#define GHCB_VERSION_MAX 2ULL > #define GHCB_VERSION_MIN 1ULL This needs a userspace control. Being unable to limit the GHCB version advertised to the guest is going to break live migration of SEV-ES VMs, e.g. if a pool of hosts has some kernels running this flavor of KVM, and some hosts running an older KVM that doesn't support v2.