Message ID | 20240223104009.632194-7-pbonzini@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-78163-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp500308dyb; Fri, 23 Feb 2024 02:44:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXSGOWYsltrtOn+GAVJPkypCLS7huC/QuXhol1zeqUXrRyE/JVbrjJDUWRnudR/esmrnNKdiH0tYYVGp+vnyv9oEUNHxw== X-Google-Smtp-Source: AGHT+IFCR2Amq37xB8FpShJcZO2fljXvXzmDqb0gu97fPBz21T8+GWf+hKuwkfehrfjc/aicSQCv X-Received: by 2002:a17:906:3987:b0:a3f:be8:5282 with SMTP id h7-20020a170906398700b00a3f0be85282mr928101eje.18.1708685040176; Fri, 23 Feb 2024 02:44:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708685040; cv=pass; d=google.com; s=arc-20160816; b=sl54RXwnWeJI8H5Cmkgx8nuPJsWsGoNlY6PQ9CmK6IkRp7Vc1kkjpZMKY1lnfVteik IIW1IqjKAWT6BCSAmPT6SOqwtd1MwIIp1AsYYfUxOZ1WeEFGUiWIa8wy9voEim0haHcm EKzX2UWfx/jTNc6xZe8HPmHVRseTksbNr7FvDarhlqdJFAHdW78gdv9m6htiZfva6e16 IZpu8xg1/BTIGhSOlvld8/Yye81dbwtbNTjDAu25XKLub8aHjdvjq+chQMAEIGvSREHH olpRQFVOy6MD0/uuS0jsZhV5cMncO+wqxnuaU+3I5UvQ/p9zHPDer/zVzLFUuI3HSEvj VsGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=/d+3soBxX8Esy8j47TVH8Z004bmpwg8FksG075eEEEk=; fh=TLdZJsFzSA0fpm6Q4iUv+uB0sG0oU+h3Bp6HiSGyZm8=; b=XR+tO8ZPbnlChFwuVWv4cytG9QhB0qDwRqOpZ/2C+7G31iPLupaayVq7WaQxsGJ5g8 Wb7DoW1bgWQHv0JQOq2V8S9NMXkmDhQJ7NCGs50tuEUS2FpuEwwLbBudbOUnoEOfi9IP 3G8WmAP5+4Fj296CbyZXVBXoRKay2wx9uYwKiKw6mVavIU2QmjvB+EL08PWkqiomYsqn UEz6uHcDT+T5ZmD/gGwlFDZbmyxle4TTB/aZdgjuenXv027IMiale+k7lsl0nxE2IY6Z KpuZCMFcMLeh5nwpEMeN3oARJPevmQ1dOlP349VYwe/NRqBkTwroMFUAO1iEDAFROvvl Xbuw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WVBmRb48; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-78163-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78163-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id lr13-20020a170906fb8d00b00a3e72ead652si4750058ejb.877.2024.02.23.02.43.59 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 02:44:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78163-ouuuleilei=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=@redhat.com header.s=mimecast20190719 header.b=WVBmRb48; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-78163-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78163-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 C72761F21784 for <ouuuleilei@gmail.com>; Fri, 23 Feb 2024 10:43:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C68C67AE75; Fri, 23 Feb 2024 10:40:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WVBmRb48" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD0497AE45 for <linux-kernel@vger.kernel.org>; Fri, 23 Feb 2024 10:40:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708684820; cv=none; b=FdRsl4DLEHSbsOi/dv8iBpfjDbtLA66yn3myHfjFlqoXtYi/EJKSE25Zutkbm2o5af3F2JwmWF35GTcTknLyQc3ICK/YBWhoC/zKvjUuYTGg04wmTOQ68QEhB3AZ38jbIrPritE811y/d2+0rR2vYcJh2sfuiAOr9d95ihS1tXk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708684820; c=relaxed/simple; bh=pU+I1UNsFigwwYduAuVyFUMAum80+uoBu3TqnVl6ud4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=byDBgTHZJwSfHQMGsNcpF4UD9juu8UtW/aTp7Fuia9lNqsgUdoqJxtwI+LFBv5F1RJZ6S350dkAAGj3qlzAjYMBaaeeAO8VRA75f6W5VlTCcthwBvhXC8x1jFyDPYF3xgnoniUfOT8DQDDJAAzDV+q2eVt0CP3ZYD8UhVeEPlM4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=WVBmRb48; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708684817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/d+3soBxX8Esy8j47TVH8Z004bmpwg8FksG075eEEEk=; b=WVBmRb48GRqajvfTbDMi+UVbZRLzePhP3ojg8v4Vfzof5zsN7qCzPg6IKO1nt/LScB/0uU awXyyfCf8P0T/VWU0YdfHdxPDvXTrpCbrzgDbVuUqlqfgTa6AIAYNjulkw5qrPgKW2vijd 4zNIXdsW+g+TbGR10AJA71SKHid86Is= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-56-2OYUTg_bN8qaFMvQcjEpww-1; Fri, 23 Feb 2024 05:40:12 -0500 X-MC-Unique: 2OYUTg_bN8qaFMvQcjEpww-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8FE1729AA2CF; Fri, 23 Feb 2024 10:40:11 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6A420112132A; Fri, 23 Feb 2024 10:40:11 +0000 (UTC) From: Paolo Bonzini <pbonzini@redhat.com> To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: seanjc@google.com, michael.roth@amd.com, aik@amd.com Subject: [PATCH v2 06/11] KVM: SEV: disable DEBUG_SWAP by default Date: Fri, 23 Feb 2024 05:40:04 -0500 Message-Id: <20240223104009.632194-7-pbonzini@redhat.com> In-Reply-To: <20240223104009.632194-1-pbonzini@redhat.com> References: <20240223104009.632194-1-pbonzini@redhat.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 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791686124960976922 X-GMAIL-MSGID: 1791686124960976922 |
Series |
KVM: SEV: allow customizing VMSA features
|
|
Commit Message
Paolo Bonzini
Feb. 23, 2024, 10:40 a.m. UTC
Disable all VMSA features in KVM_SEV_INIT and KVM_SEV_ES_INIT. They are
not actually supported by SEV (a SEV guest does not have a VMSA to which
you can apply features) and they cause unexpected changes in measurement
for SEV-ES.
Going on, the way to enable them will be to use a new initialization ioctl
that takes the VMSA features as a parameter.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
arch/x86/kvm/svm/sev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Fri, Feb 23, 2024, Paolo Bonzini wrote: > Disable all VMSA features in KVM_SEV_INIT and KVM_SEV_ES_INIT. They are > not actually supported by SEV (a SEV guest does not have a VMSA to which > you can apply features) and they cause unexpected changes in measurement > for SEV-ES. Sorry :-( I've done my best to avoid having to deal with attestation, so it's a bit of a blind spot for me.
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index b0e97f9617e3..06e03a6fe7e4 100644 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -267,7 +267,7 @@ static int sev_guest_init(struct kvm *kvm, struct kvm_sev_cmd *argp) sev->active = true; sev->es_active = argp->id == KVM_SEV_ES_INIT; - sev->vmsa_features = sev_supported_vmsa_features; + sev->vmsa_features = 0; asid = sev_asid_new(sev); if (asid < 0)