Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp870323rdb; Fri, 23 Feb 2024 02:42:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXikRjjXizK0SwMFrDuHp5qj2YVgnA1mWajbIzBc3GPiTAt0J3LY3OmkyhkSVu3zWFi562tgU3DE9ZD9uZovDvh0fJLIGcKAf+1pxRiLg== X-Google-Smtp-Source: AGHT+IFr8uSxRweDpvjbdq79g28o2I+Eq0p1OuVJroVWnQ6sjF7IrPeCXvNscH+yjAOngfgXUFQV X-Received: by 2002:aa7:93da:0:b0:6e4:d868:ac35 with SMTP id y26-20020aa793da000000b006e4d868ac35mr1222314pff.19.1708684957295; Fri, 23 Feb 2024 02:42:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708684957; cv=pass; d=google.com; s=arc-20160816; b=wcwn7uYW9poxEyLEDBfL0M1W0YZZHZEHfeg64PhkdCJd/lP3kQK0zQPVOeO4bPFqyJ hDukz1ck1MTtdULQNl4GEKeS66AoVEMPpObly5r2ICHe6tAocC+hIyK22bWd5Gx/n5MK iDtpwkXIGK5x6fTgZbymbwmdTFHHBZDCWTqVt/8ZTdGIAOYQAE3i1nlb9kEoA7cUPJDN 4RpOH66MPh4XjeXSvvo95TzFna3lg9SKPid1+ZgRFfW+aCnhh8Bn9Cy3sZkRZm6l52KI Rat6M+GTfyZevfvsJPWbUgf0JqVFW0z5X2emnNFT8XNOLxM/xsHkGcd8GGGSvpmMfDQ4 3Mvg== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78163-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bx21-20020a056a00429500b006e4dfe1f6a2si1061080pfb.84.2024.02.23.02.42.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 02:42:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78163-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78163-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id F2F7B2876B3 for ; Fri, 23 Feb 2024 10:42:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B8C67E110; Fri, 23 Feb 2024 10:40:22 +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 ; 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 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: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 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 --- arch/x86/kvm/svm/sev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.1