From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9FD2CCCF9EE for ; Tue, 28 Oct 2025 10:45:48 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vDhCL-00078C-F1; Tue, 28 Oct 2025 06:45:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vDhCJ-00077v-Ca for qemu-devel@nongnu.org; Tue, 28 Oct 2025 06:45:03 -0400 Received: from sea.source.kernel.org ([172.234.252.31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vDhCC-0005G7-Sn for qemu-devel@nongnu.org; Tue, 28 Oct 2025 06:45:03 -0400 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 3755248D04; Tue, 28 Oct 2025 10:44:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E850BC4CEE7; Tue, 28 Oct 2025 10:44:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761648290; bh=h8501RLCvk0sAQpvh5X2ZPt7W4L9j55A6z9KIhoa3Y0=; h=From:To:Cc:Subject:Date:From; b=XAcezd0olupOL5OfdE5nyoJZ/xWtz1WKbINzLENqovJTImmtLzs954cz6fHgvGyg8 8tT4wTOV+0eklqYFXainyrZlva7TOmtvFdwLxLCSaQsufrOjJMVEnqXNTk11Whbys4 sKx/Tx0J9ZtLAIqxpJP17Doo//8TMz8Fs96QzeEp/JLKAnqbqPuyNl1ZYZUGYIpi3A q3uq08Q8cwc7xv6FFd6PWkh2zXPWqe8tE8uO5nTdiEn8y4R7Ek1d1UzdCxHKPLfZ39 CgUOEunnEYPYshWwxmTo+MntJCCQaFowIjPHbP4OGI1rGhTpmaUNYqpz57TIq45+lQ 4Y+gVco4TbhyQ== From: "Naveen N Rao (AMD)" To: qemu-devel Cc: Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , Eric Blake , Markus Armbruster , Marcelo Tosatti , Zhao Liu , Nikunj A Dadhania , Tom Lendacky , Michael Roth , Roy Hopkins , Srikanth Aithal Subject: [PATCH v3 0/9] target/i386: SEV: Add support for enabling VMSA SEV features Date: Tue, 28 Oct 2025 16:13:25 +0530 Message-ID: X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=172.234.252.31; envelope-from=naveen@kernel.org; helo=sea.source.kernel.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org This series adds support for enabling VMSA SEV features for SEV-ES and SEV-SNP guests through the Qemu command line. This is already supported for IGVM files, so some of that code has been generalized and reused. Debug-swap is already supported in KVM today, while patches for enabling Secure TSC have been accepted for the upcoming kernel release. I have tested this with a simple IGVM file generated by the buildigvm tool, and it did not show any issues with IGVM compatibility. - Naveen --- v2: http://lore.kernel.org/r/cover.1758794556.git.naveen@kernel.org Changes since v2: - Clarify that debug-swap property only works for SEV-ES/SEV-SNP guests, and update commit log to clarify the same (Markus) - Update commit log to clarify need for a new tsc-frequency property and its interaction with the one on the cpu object (Tom) Naveen N Rao (AMD) (9): target/i386: SEV: Generalize handling of SVM_SEV_FEAT_SNP_ACTIVE target/i386: SEV: Ensure SEV features are only set through qemu cli or IGVM target/i386: SEV: Consolidate SEV feature validation to common init path target/i386: SEV: Validate that SEV-ES is enabled when VMSA features are used target/i386: SEV: Enable use of KVM_SEV_INIT2 for SEV-ES guests target/i386: SEV: Add support for enabling debug-swap SEV feature target/i386: SEV: Add support for enabling Secure TSC SEV feature target/i386: SEV: Add support for setting TSC frequency for Secure TSC target/i386: SEV: Refactor check_sev_features() target/i386/sev.h | 4 +- target/i386/sev.c | 171 +++++++++++++++++++++++++++++++++++++--------- qapi/qom.json | 17 ++++- 3 files changed, 157 insertions(+), 35 deletions(-) base-commit: 36076d24f04ea9dc3357c0fbe7bb14917375819c -- 2.51.0