From nobody Thu Apr 25 19:48:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678102769; cv=none; d=zohomail.com; s=zohoarc; b=BQfynH2NB+9ABdm21ffCncMKImf6iYd5UXMbXzCbOYZfFsF9lF3BJKc90fLMpgRxKJe4FeJQ5419Lfx5s0Q8rE9UikMe8Ze8F2rO3/XF/ex8gcXWSL89BeGnOC+q5D3XBoIw18arm+dsJc4PaYdap0qseAgwBWbX1TK0hBIrazQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678102769; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=a52mpo1/RFjg8xoL/5hpmtEvlLdLH2qoaOk2DtLCNSI=; b=JU4nW9Pz+XVqnxuqDG4ouuuxsZc2AycnvHfC5ffZ+SnfPX4fOgJrzxEL32i2HwzpNlAP5hbdNjbV8+y4ffcvyEL/fRVTGwYmDzC7BV7+fVD0Da3RmQpwpA/UxgJJa8HIFi1gqg9n9/07KSOtDldRBogwaUhC81C6i4MPz+zk4Lc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1678102769632462.1623820438082; Mon, 6 Mar 2023 03:39:29 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-81-tyNKaTTRObaRfDODoBFb5w-1; Mon, 06 Mar 2023 06:39:19 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7815318E092B; Mon, 6 Mar 2023 11:39:17 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5D5291121339; Mon, 6 Mar 2023 11:39:17 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 04A23194658D; Mon, 6 Mar 2023 11:39:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0E4E31946586 for ; Mon, 6 Mar 2023 11:39:16 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 01C4D440DD; Mon, 6 Mar 2023 11:39:16 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 80B17175AD for ; Mon, 6 Mar 2023 11:39:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678102768; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=a52mpo1/RFjg8xoL/5hpmtEvlLdLH2qoaOk2DtLCNSI=; b=S/EIL4XioXUGGGlXb+zbmsh3VzhL85flp3aVRPmYyTZcyUSxgu7q2rcu2P4NH10eGIc89f bkuMU7XjNJX8GWsbjb4n+H1zp76kLqeUnHyURLGbTsN2CGAJ1SvHgrIXERbYBtaq6J8fPn 6cAh5gVLOmRET9Qep+RSzG7v1yQJjxM= X-MC-Unique: tyNKaTTRObaRfDODoBFb5w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 1/2] examples: systemtap: Warn users to properly update 'amd-sev-es-vmsa.stp' Date: Mon, 6 Mar 2023 12:39:12 +0100 Message-Id: <032165bc2c33fe1ca01c42013031b4384744fe25.1678102692.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1678102770298100001 Content-Type: text/plain; charset="utf-8" The script references a very specific line in the kernel source code and a very specific struct. Further changes to the kernel are likely going to break it. Set the expectations by adding a warning to the reader. Signed-off-by: Peter Krempa Reviewed-by: Daniel P. Berrang=C3=A9 --- examples/systemtap/amd-sev-es-vmsa.stp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/systemtap/amd-sev-es-vmsa.stp b/examples/systemtap/am= d-sev-es-vmsa.stp index 551ed739b7..7bd079be71 100644 --- a/examples/systemtap/amd-sev-es-vmsa.stp +++ b/examples/systemtap/amd-sev-es-vmsa.stp @@ -19,6 +19,10 @@ # A script that captures the VMSA blob for the boot vCPU and # first additional vCPU, when a KVM guest is booted with SEV-ES # +# NOTE: This directly references specific structures and places in the +# kernel source code. It is expected that this example will need to = be +# editted to match the kernel you intend to run it against. +# # The captured VMSA will be printed to the console in hex format, # and can be converted to the required binary format by feeding # it through --=20 2.39.2 From nobody Thu Apr 25 19:48:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678102764; cv=none; d=zohomail.com; s=zohoarc; b=d8O+m0BRBJYpDhtUSpeOv7b1Au2ZL+XAX26JS75dz0Y891OZTU/+hXuxNS990Pzt8FQzKgBNx9TvL2tkaM/fn3n0C+9+ki8k4VgejqKgqotkqqK3j0InK8GNXJ8SzyFwqAbJ9uoZ/dubMMOv9lwC7dwlehZTzBU/fecM6QW7Nbc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678102764; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=I2TJWT3E2O+RubXtWch2y/Za3ZcseR9bO2u3t4plcpk=; b=H4KY3scMXWfbJF3c0uS8Pa9FIx3JBd5ADufKJlguTDL2eC1awGWFNUl3nbWQlqNgNmIQEQJ/R9juxco7iF9FFVUTAgdlYUijJV2FohUzdDnd251rWukEO3omr9iiKEeoEsRZ2qqREVlYkGW0pMOLGutl1nvy+VWRWJbpRTGSSTs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1678102764843707.8550840444381; Mon, 6 Mar 2023 03:39:24 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-231-hhUZl9kGMGOtU1se12UZzQ-1; Mon, 06 Mar 2023 06:39:21 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A38AA3C025A1; Mon, 6 Mar 2023 11:39:18 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 901512026D4B; Mon, 6 Mar 2023 11:39:18 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 83F97194658C; Mon, 6 Mar 2023 11:39:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id DDBC11946586 for ; Mon, 6 Mar 2023 11:39:16 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CBD3B440DD; Mon, 6 Mar 2023 11:39:16 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 54D84175AD for ; Mon, 6 Mar 2023 11:39:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678102763; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=I2TJWT3E2O+RubXtWch2y/Za3ZcseR9bO2u3t4plcpk=; b=AsweRzbuexIklhXwkmpIWLy+RtzuqkXurF1KAfSHTEoXwT+qJc3Vqs7kLG3wp2pHPo+vUZ y+DDcftsvdzmRGTQkphAt1qVI6aDBXlrROs6IJoBMVKyTAy2bDDdiaZBM/spm+ZS9zSFUR dhOb63Dy8aWefSf8AqO0tbx25RVjrJc= X-MC-Unique: hhUZl9kGMGOtU1se12UZzQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 2/2] examples: systemtap: Update to linux-6.3 (rc1) Date: Mon, 6 Mar 2023 12:39:13 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1678102766314100001 Content-Type: text/plain; charset="utf-8" The 'vmsa' struct was moved out of 'struct vcpu_svm' into the 'sev_es' sub-struct in linux commit: commit b67a4cc35c9f726999fa29880713ce72d4e39e8d Author: Peter Gonda Date: Thu Oct 21 10:42:59 2021 -0700 KVM: SEV: Refactor out sev_es_state struct Move SEV-ES vCPU metadata into new sev_es_state struct from vcpu_svm. Also update the line reference to have more margin. Signed-off-by: Peter Krempa Reviewed-by: Daniel P. Berrang=C3=A9 --- examples/systemtap/amd-sev-es-vmsa.stp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/systemtap/amd-sev-es-vmsa.stp b/examples/systemtap/am= d-sev-es-vmsa.stp index 7bd079be71..2ac0b6eb53 100644 --- a/examples/systemtap/amd-sev-es-vmsa.stp +++ b/examples/systemtap/amd-sev-es-vmsa.stp @@ -46,7 +46,7 @@ function dump_vmsa(addr:long) { # is the one beween the call to clflush_cache_range(...) and the # call to sev_issue_cmd(kvm, SEV_CMD_LAUNCH_UPDATE...). # -# Line 632 is correct for Linux v6.0 -probe module("kvm_amd").statement("__sev_launch_update_vmsa@arch/x86/kvm/s= vm/sev.c:632") { - dump_vmsa($svm->vmsa) +# Line 635 is correct for Linux v6.3 +probe module("kvm_amd").statement("__sev_launch_update_vmsa@arch/x86/kvm/s= vm/sev.c:635") { + dump_vmsa($svm->sev_es->vmsa) } --=20 2.39.2