Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp317274ima; Fri, 15 Mar 2019 03:34:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYwcVoCv4vusJ1DkgiT4Y6TNrLOT40UbpCWetd4/ThgPKb8O9Lt/6wtw5mN3iLARM4kXQT X-Received: by 2002:a63:4146:: with SMTP id o67mr2750361pga.122.1552646065101; Fri, 15 Mar 2019 03:34:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552646065; cv=none; d=google.com; s=arc-20160816; b=NDwrILFSwwN9UIwC6SAKHhMuJv2OnwRq75Z7bdyH27RvahPBHaADH7lIM+3vsWr36Y ZOclgCtEbOzW0JW7u+cdlZ9oC8ka+s1Zebvn1tAHDnE/QMWrpdEi3oiK2eFbLL5JomeL MI1z/lkbAtg59u/CsyWqPSt4BqNIrEoyWmewNlYkwH7yh9/BKsh/mNG9sdXkxUenswjW YoFYSWHF09B3ssWFilyn3ezaR9EeExfY30y1vqGaXWZhQQtp+R+IE3xZxc8CvS/kDQrH Bft/CnKl8MtYILsEcRreSSYkqH8Ug1tQXHnK9eR0j9+6NOgAjEF5GWrSWQy7HU+6UwiQ 8QfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=guCsajv2+b/OfTtYcsml3cMQVd15Wc4yhTJ464Bk1/c=; b=S0cR+NZzJE4uEzZcyfmaNf+e45CC3re+LbJSTIkfZNxPSz7Jsa/KsCWLnuaDlvCFdo JLPJdbDEtTFLZrRGHsipotGGAjxCBz/Um2lliYmiRazPB0IVTnNW7TJKUljcelZ8Dwo7 S9uOB6Vw2JPzsMea28BcH8kUlz98Gkp43wwVFesgAMmW5Iw0nTSltjG+LSk8QCUiReVZ npoYtNdeBnnklHhPflq4LGqH6+GGCxKUTNalNp7YyLP+oPnhGvG4xaD0GdfRGaGNCONk u8FfqfBylHAmwd194O1SUThmGPBY066rqFZ1G06GoOz9ZICf5i8AC/2h4ucdBqg/oYUo MqOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y142si1661856pfb.149.2019.03.15.03.34.10; Fri, 15 Mar 2019 03:34:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728816AbfCOKcT (ORCPT + 99 others); Fri, 15 Mar 2019 06:32:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61628 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728719AbfCOKcT (ORCPT ); Fri, 15 Mar 2019 06:32:19 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 67CC659462; Fri, 15 Mar 2019 10:32:19 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-12-223.pek2.redhat.com [10.72.12.223]) by smtp.corp.redhat.com (Postfix) with ESMTP id 74B415C21F; Fri, 15 Mar 2019 10:32:05 +0000 (UTC) From: Lianbo Jiang To: linux-kernel@vger.kernel.org Cc: kexec@lists.infradead.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, akpm@linux-foundation.org, dyoung@redhat.com, brijesh.singh@amd.com, thomas.lendacky@amd.com, bhe@redhat.com Subject: [PATCH 0/3] Add kdump support for the SEV enabled guest Date: Fri, 15 Mar 2019 18:32:00 +0800 Message-Id: <20190315103203.13128-1-lijiang@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 15 Mar 2019 10:32:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For the AMD SEV machines, add kdump support when the SEV is enabled. Test tools: makedumpfile[v1.6.5]: git://git.code.sf.net/p/makedumpfile/code commit ("Add support for AMD Secure Memory Encryption") Note: This patch was merged into the devel branch. crash-7.2.5: https://github.com/crash-utility/crash.git kexec-tools-2.0.19: git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git commit <942d813cda35> ("Fix for the kmem '-i' option on Linux 5.0") http://lists.infradead.org/pipermail/kexec/2019-March/022576.html Note: The second kernel cann't boot without this patch. kernel: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git commit ("Merge branch 'akpm' (patches from Andrew)") Test steps: [1] load the vmlinux and initrd for kdump # kexec -p /boot/vmlinuz-5.0.0+ --initrd=/boot/initramfs-5.0.0+kdump.img --command-line="BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.0.0+ ro resume=UUID=126c5e95-fc8b-48d6-a23b-28409198a52e console=ttyS0,115200 earlyprintk=serial irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10 rootflags=nofail acpi_no_memhotplug transparent_hugepage=never disable_cpu_apicid=0" [2] trigger panic # echo 1 > /proc/sys/kernel/sysrq # echo c > /proc/sysrq-trigger [3] check and parse the vmcore # crash vmlinux /var/crash/127.0.0.1-2019-03-15-05\:03\:42/vmcore Lianbo Jiang (3): kexec: Do not map the kexec area as decrypted when SEV is active kexec: Set the C-bit in the identity map page table when SEV is active kdump,proc/vmcore: Enable kdumping encrypted memory when SEV was active arch/x86/kernel/machine_kexec_64.c | 20 +++++++++++++++++--- fs/proc/vmcore.c | 6 +++--- 2 files changed, 20 insertions(+), 6 deletions(-) -- 2.17.1