Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp229386imn; Fri, 29 Jul 2022 05:22:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR7JvVVWFzmscT7C5aKImgDywkFTw+L/K/NrZfNsUCOY8Lts6w8+Ae2+W5TrSbgwOpd/90qm X-Received: by 2002:a17:902:7046:b0:16d:9102:c79b with SMTP id h6-20020a170902704600b0016d9102c79bmr3696725plt.120.1659097355314; Fri, 29 Jul 2022 05:22:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659097355; cv=none; d=google.com; s=arc-20160816; b=QsiLEbhSVHUp2UguOMSx48GSnKD78ninkwJ2+7KVGuBU3as1NQVqc0Z/EfdQB+69bp rFmA17dcFTKbDZUPbQb3p+CkIQwf8Io5ufKyCUNkuVoCudN4dCt8sfAzelTJMy9qipcj uOkbldPkxm4T1b45kvYgnMn64tx2SRXdl3gH0kfVdsOgB8hIpePtIeg0LjfV8JvLwnwV qQG46AzSMM0QV1nnbaJ5p1FeK8cqAGVSSRgDxdv7DI4IDfiC1gr1vhueCsgUDb5hklNH wH54ESVW+86WSp+0HJeMlGJJssS+cUxLuG6KQOY/KrV5NdsLlN+UYrF9wZnaH1JCLXGl 35hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Pfc8Nxncdvifh3HqwO+7tnHHwY3637hojb3G/uNoKb0=; b=h67s2vfQ8RWZaNj2747Sr54USEZu2VURV7WzDpb7q0JBpfG+P6GvCxlmDwqzWBokM3 EFbQm91Uifmii4FmetfSGyVmbXRS8OL4VQCTmyRg9cZC179rQ9vZsPeyusvHUfpuqWQA TkjwamfPXAb2YlrFzlKGZ+J+fuUz/Zk4oC8jeRlyunhJ3fSpiZSPlm9I+UUXtxOd1CFm kVfX/D4vlWN61msqebu/jWdtjkzfI+SxiNsml3MFvC+N8N9iv50y/xPbnbexygR7SJIi 8KeL2uCIZD7ZRSam7dgDKjSLS+ht4jN5ncuNu9O1lu9sekhQfQKt4J9gOYZ2jF0b7M9w IO/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AusHQAaI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f62-20020a636a41000000b0040dd4c11cb8si4045904pgc.679.2022.07.29.05.22.19; Fri, 29 Jul 2022 05:22:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AusHQAaI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236129AbiG2MDO (ORCPT + 99 others); Fri, 29 Jul 2022 08:03:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236075AbiG2MDL (ORCPT ); Fri, 29 Jul 2022 08:03:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29127863DF; Fri, 29 Jul 2022 05:03:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B376F61EED; Fri, 29 Jul 2022 12:03:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D36DC433C1; Fri, 29 Jul 2022 12:03:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659096190; bh=C4owJoJbiJY8z4Ue5e98Blzfaibi9xP4wmji4tk/3+Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AusHQAaIfH7Lxpn+JB7bIJYGJYwYth+HzubZ42i+xYqgP97b81F5pS46C/y3lYS9E a0kHGubE1KrtyycAYB0eYdGM8iRFfskLZ8cEgd1M12JRU0lTa40ObXZhjOvr08CvMi ajgGSubSGyuwIHJLweNwyLS3OOCsGSeynPJc5fVGr3CA5E8MWVE2ZU5cIsevdL5ToL jFB51jTwEO4+5feB5HVlyJyn8cJDFyLR2YqzuJwmwLiPbe3OFz5FxYaXKrpNDxBGVS /iJj1FGDoplFtuxIETf6zUi3tg6x5tgbfX8kXxvCSaCEEpFHJfKN9O1+YzOILKtLwF ZILimrn4kwwtg== Date: Fri, 29 Jul 2022 15:03:05 +0300 From: Jarkko Sakkinen To: Paolo Bonzini Cc: Jarkko Sakkinen , Harald Hoyer , Sean Christopherson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , "open list:KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86)" , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Subject: Re: [PATCH] KVM: SVM: Dump Virtual Machine Save Area (VMSA) to klog Message-ID: References: <20220728050919.24113-1-jarkko@profian.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 28, 2022 at 05:15:43PM +0200, Paolo Bonzini wrote: > On 7/28/22 07:09, Jarkko Sakkinen wrote: > > As Virtual Machine Save Area (VMSA) is essential in troubleshooting > > attestation, dump it to the klog with the KERN_DEBUG level of priority. > > > > Cc: Jarkko Sakkinen > > Suggested-by: Harald Hoyer > > Signed-off-by: Jarkko Sakkinen > > --- > > arch/x86/kvm/svm/sev.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c > > index 0c240ed04f96..6d44aaba321a 100644 > > --- a/arch/x86/kvm/svm/sev.c > > +++ b/arch/x86/kvm/svm/sev.c > > @@ -603,6 +603,9 @@ static int sev_es_sync_vmsa(struct vcpu_svm *svm) > > save->xss = svm->vcpu.arch.ia32_xss; > > save->dr6 = svm->vcpu.arch.dr6; > > + pr_debug("Virtual Machine Save Area (VMSA):\n"); > > + print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1, save, sizeof(*save), false); > > + > > return 0; > > } > > Queued, thanks. > > Paolo Ugh, I made a mistake, sorry. It should have been: print_hex_dump(KERN_DEBUG, "VMSA:", DUMP_PREFIX_NONE, 16, 1, save, sizeof(*save), false); I sent wrong version of the patch. BR, Jarkko