From patchwork Mon Mar 11 12:40:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaishali Thakkar X-Patchwork-Id: 13588746 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.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 52D26C54E60 for ; Mon, 11 Mar 2024 12:40:39 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.691471.1077476 (Exim 4.92) (envelope-from ) id 1rjex9-0001wy-4p; Mon, 11 Mar 2024 12:40:27 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 691471.1077476; Mon, 11 Mar 2024 12:40:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rjex9-0001wo-1O; Mon, 11 Mar 2024 12:40:27 +0000 Received: by outflank-mailman (input) for mailman id 691471; Mon, 11 Mar 2024 12:40:26 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rjex7-0001DQ-Vd for xen-devel@lists.xenproject.org; Mon, 11 Mar 2024 12:40:25 +0000 Received: from mail133-16.atl131.mandrillapp.com (mail133-16.atl131.mandrillapp.com [198.2.133.16]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 876d2021-dfa4-11ee-a1ee-f123f15fe8a2; Mon, 11 Mar 2024 13:40:24 +0100 (CET) Received: from pmta13.mandrill.prod.atl01.rsglab.com (localhost [127.0.0.1]) by mail133-16.atl131.mandrillapp.com (Mailchimp) with ESMTP id 4Ttbw71sPJzB5p4sx for ; Mon, 11 Mar 2024 12:40:23 +0000 (GMT) Received: from [37.26.189.201] by mandrillapp.com id 6e106d0a939c4ed98993494d8a9ebb63; Mon, 11 Mar 2024 12:40:23 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 876d2021-dfa4-11ee-a1ee-f123f15fe8a2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; s=mte1; t=1710160823; x=1710421323; bh=ObAF48AeNm2DpnzGP89I41fPkikpyHP3PqijIW+HbJw=; h=From:Subject:To:Cc:Message-Id:In-Reply-To:References:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=zsEQ87j2Raj6duvyqT7L88rKgjns1yT66T5Hhk6ds9gfjeC/frAIalQhnQh5rlv+X i5UCKxzQRUxwxnNdrPtFK5qtDloWh4/oJDeuIZoY8vigq83FpZKThPi6Sv29af0Oll BEPiLFN/T1ffPpsJsHnxKlo6MbhOcINQ61P1tX1haXN3aedowv0O0UZ5EAPvxDPLEA okdAcl3hh7UZQT0dmnKzQ93rkMuri1AXFC7pfwSm5k4ZLsND2K+uwfWwBBiUXV1W72 EC4Sol5PvLTYboAjI7zRIOOTTC/RrDN/VEkVwaO2ziZFCRYDQnLFS43NmNKJNM5bpS zS6NaQHXVdtmQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1; t=1710160823; x=1710421323; i=vaishali.thakkar@vates.tech; bh=ObAF48AeNm2DpnzGP89I41fPkikpyHP3PqijIW+HbJw=; h=From:Subject:To:Cc:Message-Id:In-Reply-To:References:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=d3BTdvb9m6Ine2ZVIvNrtZIi7F/LCubi9egWqs2/GZFiVT8W7bjDaf/ZVwIon7qS+ us/WtsDn3HJIgWsA2Rn0owd/rhjM/NIiq0a9sH23IE0D7NV8xtGqqhBZsssCU5/O4J cBAWL0sS+ASyTC6Juh/HQBl1X6I1rlHHDSOpvNPzEYLKXdJ9XoMm8rfECUIVZNd8pi Q9KTrUR34NQlnFPiql/Wxhcj8Onvlf80jlAmi9v0fIKWObJqsIn1WQdih6cHbITKFk YalhZNZmP9HJcIARXNW+l0p7+o8voBa2WHZTcz27dUBzc0ca78WVYZGN4Lri5bzCnd DSO6hAoOr1HRg== From: Vaishali Thakkar Subject: =?utf-8?q?=5BPATCH_v2_3/3=5D_x86/svmdebug=3A_Print_sev_and_sev=5Fes?= =?utf-8?q?_vmcb_bits?= X-Mailer: git-send-email 2.44.0 X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1710160820928 To: xen-devel@lists.xenproject.org Cc: jbeulich@suse.com, andrew.cooper3@citrix.com, roger.pau@citrix.com, wl@xen.org, Vaishali Thakkar Message-Id: <0e688a18a97e495352e2b08cb7634abbc238da1b.1710149462.git.vaishali.thakkar@vates.tech> In-Reply-To: References: X-Native-Encoded: 1 X-Report-Abuse: =?utf-8?q?Please_forward_a_copy_of_this_message=2C_including?= =?utf-8?q?_all_headers=2C_to_abuse=40mandrill=2Ecom=2E_You_can_also_report_?= =?utf-8?q?abuse_here=3A_https=3A//mandrillapp=2Ecom/contact/abuse=3Fid=3D30?= =?utf-8?q?504962=2E6e106d0a939c4ed98993494d8a9ebb63?= X-Mandrill-User: md_30504962 Feedback-ID: 30504962:30504962.20240311:md Date: Mon, 11 Mar 2024 12:40:23 +0000 MIME-Version: 1.0 While sev and sev_es bits are not yet enabled in xen, including their status in the VMCB dump could be informational.Therefore, print it via svmdebug. Signed-off-by: Vaishali Thakkar --- Changes since v1: - Pretty printing --- xen/arch/x86/hvm/svm/svmdebug.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/svm/svmdebug.c b/xen/arch/x86/hvm/svm/svmdebug.c index 0d714c728c..ba5fa40071 100644 --- a/xen/arch/x86/hvm/svm/svmdebug.c +++ b/xen/arch/x86/hvm/svm/svmdebug.c @@ -51,8 +51,11 @@ void svm_vmcb_dump(const char *from, const struct vmcb_struct *vmcb) vmcb->exitcode, vmcb->exit_int_info.raw); printk("exitinfo1 = %#"PRIx64" exitinfo2 = %#"PRIx64"\n", vmcb->exitinfo1, vmcb->exitinfo2); - printk("np_ctrl = %#"PRIx64" asid = %#x\n", - vmcb_get_np_ctrl(vmcb), vmcb_get_asid(vmcb)); + printk("asid = %#x np_ctrl = %#"PRIx64" - %s%s%s\n", + vmcb_get_asid(vmcb), vmcb_get_np_ctrl(vmcb), + vmcb_get_np(vmcb) ? "NP" : "", + vmcb_get_sev(vmcb) ? "SEV" : "", + vmcb_get_sev_es(vmcb) ? "SEV_ES" : ""); printk("virtual vmload/vmsave = %d, virt_ext = %#"PRIx64"\n", vmcb->virt_ext.fields.vloadsave_enable, vmcb->virt_ext.bytes); printk("cpl = %d efer = %#"PRIx64" star = %#"PRIx64" lstar = %#"PRIx64"\n",