Re: [PATCH] x86/efi: Do not release sub-1MB memory regions when the crashkernel option is specified

2021-04-12 Thread lijiang
Thank you for the comment, H. Peter, Andy and Baoquan. 在 2021年04月12日 17:52, Baoquan He 写道: > On 04/11/21 at 06:49pm, Andy Lutomirski wrote: >> >> >>> On Apr 11, 2021, at 6:14 PM, Baoquan He wrote: >>> >>> On 04/09/21 at 07:59pm, H. Peter Anvin wrote: Why don't we do this unconditionally? At

Re: [PATCH] x86/efi: Do not release sub-1MB memory regions when the crashkernel option is specified

2021-04-09 Thread lijiang
Hi, Baoquan Thank you for the comment. 在 2021年04月09日 20:44, Baoquan He 写道: > On 04/07/21 at 10:03pm, Lianbo Jiang wrote: >> Some sub-1MB memory regions may be reserved by EFI boot services, and the >> memory regions will be released later in the efi_free_boot_services(). >> >> Currently, always res

Re: [PATCH 2/2 v2] iommu: use the __iommu_attach_device() directly for deferred attach

2021-01-21 Thread lijiang
Hi, Christoph 在 2021年01月19日 23:29, Christoph Hellwig 写道: >> +int iommu_do_deferred_attach(struct device *dev, >> + struct iommu_domain *domain) > > I'd remove the "do_" from the name, it doesn't really add any value. > OK. >> +{ >> +const struct iommu_ops *ops = doma

Re: [PATCH 1/2 v2] dma-iommu: use static-key to minimize the impact in the fast-path

2021-01-21 Thread lijiang
Hi, Christoph Thanks for the comment. 在 2021年01月19日 23:26, Christoph Hellwig 写道: > On Tue, Jan 19, 2021 at 07:16:15PM +0800, Lianbo Jiang wrote: >> +static DEFINE_STATIC_KEY_FALSE(__deferred_attach); > Why the strange underscores? Wouldn't iommu_deferred_attach_enabled The variable is defined wi

Re: [PATCH] iommu: check for the deferred attach when attaching a device

2021-01-18 Thread lijiang
在 2021年01月15日 23:15, Robin Murphy 写道: > On 2021-01-15 14:26, lijiang wrote: >> Hi, Robin >> >> Thank you for the comment. >> >> 在 2021年01月13日 01:29, Robin Murphy 写道: >>> On 2021-01-05 07:52, lijiang wrote: >>>> 在 2021年01月05日 11:55, lijia

Re: [PATCH] iommu: check for the deferred attach when attaching a device

2021-01-15 Thread lijiang
Hi, Robin Thank you for the comment. 在 2021年01月13日 01:29, Robin Murphy 写道: > On 2021-01-05 07:52, lijiang wrote: >> 在 2021年01月05日 11:55, lijiang 写道: >>> Hi, >>> >>> Also add Joerg to cc list. >>> >> >> Also add more people to

Re: [PATCH] iommu: check for the deferred attach when attaching a device

2021-01-04 Thread lijiang
在 2021年01月05日 11:55, lijiang 写道: > Hi, > > Also add Joerg to cc list. > Also add more people to cc list, Jerry Snitselaar and Tom Lendacky. Thanks. > Thanks. > Lianbo > 在 2020年12月26日 13:39, Lianbo Jiang 写道: >> Currently, because domain attach allows to be defer

Re: [PATCH] iommu: check for the deferred attach when attaching a device

2021-01-04 Thread lijiang
Hi, Also add Joerg to cc list. Thanks. Lianbo 在 2020年12月26日 13:39, Lianbo Jiang 写道: > Currently, because domain attach allows to be deferred from iommu > driver to device driver, and when iommu initializes, the devices > on the bus will be scanned and the default groups will be allocated. > > Du

Re: [PATCH v3 1/1] kdump: append uts_namespace.name offset to VMCOREINFO

2020-10-01 Thread lijiang
Hi, Alexander 在 2020年09月30日 18:23, Alexander Egorenkov 写道: > The offset of the field 'init_uts_ns.name' has changed > since commit 9a56493f6942 ("uts: Use generic ns_common::count"). > > Link: > https://lore.kernel.org/r/159644978167.604812.1773586504374412107.stgit@localhost.localdomain > > Ma

Re: [PATCH v2 1/1] kdump: append uts_namespace.name offset to VMCOREINFO

2020-09-30 Thread lijiang
Hi, Alexander 在 2020年09月24日 20:46, Alexander Egorenkov 写道: > The offset of the field 'init_uts_ns.name' has changed > since > > commit 9a56493f6942c0e2df1579986128721da96e00d8 > Author: Kirill Tkhai > Date: Mon Aug 3 13:16:21 2020 +0300 > > uts: Use generic ns_common::count > > Link: >

Re: [PATCH v2] docs: admin-guide: update kdump documentation due to change of crash URL

2020-09-23 Thread lijiang
Since crash utility has been moved to github, the original URL is no longer available. Let's update it accordingly. Suggested-by: Dave Young Signed-off-by: Lianbo Jiang --- Documentation/admin-guide/kdump/kdump.rst | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Docum

Re: [PATCH] docs: admin-guide: update kdump documentation due to change of crash URL

2020-09-22 Thread lijiang
在 2020年09月18日 16:09, Lianbo Jiang 写道: > Since crash utility has moved to github, the original URL is no longer ^ has been moved to github Because of the above mistake, I'd like to correct it and reply it with the v2. Thanks. > available. Let's update

Re: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-07-07 Thread lijiang
在 2020年07月03日 19:54, John Ogness 写道: > On 2020-07-02, lijiang wrote: >> About the VMCOREINFO part, I made some tests based on the kernel patch >> v3, the makedumpfile and crash-utility can work as expected with your >> patch(userspace patch), but, unfortunately, the >&g

Re: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-07-03 Thread lijiang
在 2020年07月02日 21:31, Petr Mladek 写道: > On Thu 2020-07-02 17:43:22, lijiang wrote: >> 在 2020年07月02日 17:02, John Ogness 写道: >>> On 2020-07-02, lijiang wrote: >>>> About the VMCOREINFO part, I made some tests based on the kernel patch >>>> v3, the makedumpf

Re: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-07-02 Thread lijiang
在 2020年07月02日 17:02, John Ogness 写道: > On 2020-07-02, lijiang wrote: >> About the VMCOREINFO part, I made some tests based on the kernel patch >> v3, the makedumpfile and crash-utility can work as expected with your >> patch(userspace patch), but, unfortunately, the vmc

Re: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-07-02 Thread lijiang
Hi, John Ogness About the VMCOREINFO part, I made some tests based on the kernel patch v3, the makedumpfile and crash-utility can work as expected with your patch(userspace patch), but, unfortunately, the vmcore-dmesg(kexec-tools) can't correctly read the printk ring buffer information, and get th

Re: [PATCH v2] kexec: Do not verify the signature without the lockdown or mandatory signature

2020-06-18 Thread lijiang
在 2020年06月18日 03:37, Andrew Morton 写道: > On Tue, 2 Jun 2020 12:59:52 +0800 Lianbo Jiang wrote: > >> Signature verification is an important security feature, to protect >> system from being attacked with a kernel of unknown origin. Kexec >> rebooting is a way to replace the running kernel, hence

Re: [PATCH v2] kexec: Do not verify the signature without the lockdown or mandatory signature

2020-06-10 Thread lijiang
I just noticed that I forgot to add Eric Biederman in cc list, so sorry for this. Thanks. Lianbo 在 2020年06月02日 12:59, Lianbo Jiang 写道: > Signature verification is an important security feature, to protect > system from being attacked with a kernel of unknown origin. Kexec > rebooting is a way

Re: [PATCH] kexec: Do not verify the signature without the lockdown or mandatory signature

2020-05-26 Thread lijiang
在 2020年05月27日 11:15, lijiang 写道: > 在 2020年05月26日 21:59, Jiri Bohac 写道: >> On Mon, May 25, 2020 at 01:23:51PM +0800, Lianbo Jiang wrote: >>> So, here, let's simplify the logic to improve code readability. If the >>> KEXEC_SIG_FORCE enabled or kexec lockdown enable

Re: [PATCH] kexec: Do not verify the signature without the lockdown or mandatory signature

2020-05-26 Thread lijiang
在 2020年05月26日 21:59, Jiri Bohac 写道: > On Mon, May 25, 2020 at 01:23:51PM +0800, Lianbo Jiang wrote: >> So, here, let's simplify the logic to improve code readability. If the >> KEXEC_SIG_FORCE enabled or kexec lockdown enabled, signature verification >> is mandated. Otherwise, we lift the bar for a

Re: s390x: kdump kernel can not boot if I load kernel and initrd images via the kexec_file_load syscall.

2020-05-12 Thread lijiang
在 2020年05月13日 01:39, Philipp Rudo 写道: > Hi Lianbo, > > stupid me obviously never tested the kdump+initrd combination... > > The patch below fixed the problem for me. Could please give it a try, too. > Thank you for the patch, Philipp. Kdump kernel can boot on s390x machine with this patch. >

Re: s390x: kdump kernel can not boot if I load kernel and initrd images via the kexec_file_load syscall.

2020-05-12 Thread lijiang
There may be more people who would like to care about this issue. So I added them to cc list. Thanks. Lianbo 在 2020年05月12日 17:47, lijiang 写道: > Also added Dave Young to the cc list. Thanks. > > 在 2020年05月12日 10:52, lijiang 写道: >> 在 2020年05月11日 23:01, Philipp Rudo 写道: >>>

Re: [PATCH 3/3 v3] x86/kdump: clean up all the code related to the backup region

2019-10-14 Thread lijiang
在 2019年10月12日 20:16, Dave Young 写道: > Hi Eric, > > On 10/12/19 at 06:26am, Eric W. Biederman wrote: >> Lianbo Jiang writes: >> >>> When the crashkernel kernel command line option is specified, the >>> low 1MiB memory will always be reserved, which makes that the memory >>> allocated later won't f

crash: `kmem -s` reported "kmem: dma-kmalloc-512: slab: ffffe192c0001000 invalid freepointer: e5ffef4e9a040b7e" on a dumped vmcore

2019-08-01 Thread lijiang
Hi, Tom Recently, i ran into a problem about SME and used crash tool to check the vmcore as follow: crash> kmem -s | grep -i invalid kmem: dma-kmalloc-512: slab: e192c0001000 invalid freepointer: e5ffef4e9a040b7e kmem: dma-kmalloc-512: slab: e192c0001000 invalid freepointer: e5ffef4e9

Re: linux-next: manual merge of the hmm tree with the tip tree

2019-07-04 Thread lijiang
> On Thu, Jul 04, 2019 at 07:03:52PM +1000, Stephen Rothwell wrote: >> Hi all, >> >> Today's linux-next merge of the hmm tree got a conflict in: >> >> include/linux/ioport.h >> >> between commit: >> >> ae9e13d621d6 ("x86/e820, ioport: Add a new I/O resource descriptor >> IORES_DESC_RESERVED"

Re: [PATCH v2 1/2] x86/mm: Identify the end of the kernel area to be reserved

2019-06-16 Thread lijiang
After applied the patch series(v2), the kexec-d kernel and the kdump kernel can successfully boot. Thanks. Tested-by: Lianbo Jiang 在 2019年06月15日 05:15, Lendacky, Thomas 写道: > The memory occupied by the kernel is reserved using memblock_reserve() > in setup_arch(). Currently, the area is from sy

When SME is enabled on Dell PowerEdge R7425(AMD) machine, the first kernel can not successfully boot because of the megaraid_sas failure

2019-06-14 Thread lijiang
Hi, On the Dell PowerEdge R7425(AMD) machine, when SME is enabled, the first kernel can not successfully boot because of the following failure: .. [ 211.950273] megaraid_sas :61:00.0: Init cmd return status FAILED for SCSI host 0 [ 211.982750] megaraid_sas :61:00.0: Failed from meg

Re: [PATCH] x86/mm: Create an SME workarea in the kernel for early encryption

2019-06-13 Thread lijiang
Hi, After applied this patch, i made a test on the following machines. It works well. [a] HPE ProLiant DL385 Gen10 (878612-B21) AMD EPYC 7251 8-Core Processor [b] Dell PowerEdge R7425 AMD EPYC 7401 24-Core Processor [c] AMD Speedway AMD Eng Sample: 2S1405A3VIHF4_28/14_N [d] AMD Ethanol X AMD

Re: [PATCH v2] scsi: smartpqi: properly set both the DMA mask and the coherent DMA mask in pqi_pci_init()

2019-05-29 Thread lijiang
在 2019年05月30日 10:00, Martin K. Petersen 写道: > > Lianbo, > >> When SME is enabled, the smartpqi driver won't work on the HP DL385 >> G10 machine, which causes the failure of kernel boot because it fails >> to allocate pqi error buffer. Please refer to the kernel log: > > Applied to 5.2/scsi-fixes

Re: [PATCH] scsi: smartpqi: properly set both the DMA mask and the coherent DMA mask in pqi_pci_init()

2019-05-24 Thread lijiang
在 2019年05月24日 06:55, don.br...@microchip.com 写道: > -Original Message- > From: linux-scsi-ow...@vger.kernel.org > [mailto:linux-scsi-ow...@vger.kernel.org] On Behalf Of Lendacky, Thomas > Sent: Thursday, May 23, 2019 9:45 AM > To: Lianbo Jiang ; linux-kernel@vger.kernel.org > Cc: don.br...@

Re: [PATCH 2/3 v3] x86/kexec: Set the C-bit in the identity map page table when SEV is active

2019-05-15 Thread lijiang
在 2019年05月15日 21:30, Borislav Petkov 写道: > On Tue, Apr 30, 2019 at 03:44:20PM +0800, Lianbo Jiang wrote: >> When SEV is active, the second kernel image is loaded into the >> encrypted memory. Lets make sure that when kexec builds the >> identity mapping page table it adds the memory encryption mask

Re: [PATCH 1/2 v8] resource: add the new I/O resource descriptor 'IORES_DESC_RESERVED'

2019-01-25 Thread lijiang
在 2018年12月05日 05:33, Lendacky, Thomas 写道: > On 11/29/2018 09:37 PM, Dave Young wrote: >> + more people >> >> On 11/29/18 at 04:09pm, Lianbo Jiang wrote: >>> When doing kexec_file_load, the first kernel needs to pass the e820 >>> reserved ranges to the second kernel. But kernel can not exactly >>> m

Re: [PATCH 1/2 v6] kdump: add the vmcoreinfo documentation

2019-01-15 Thread lijiang
在 2019年01月15日 04:49, Dave Anderson 写道: > > > - Original Message - >> On Mon, Jan 14, 2019 at 03:26:32PM -0500, Dave Anderson wrote: >>> No. It needs *both* the vmlinux file and the vmcore file in order to read >>> kernel >>> virtual memory, so just having a kernel virtual address is insu

Re: [PATCH 1/2 v6] kdump: add the vmcoreinfo documentation

2019-01-15 Thread lijiang
在 2019年01月14日 17:15, Borislav Petkov 写道: > On Mon, Jan 14, 2019 at 01:30:30PM +0800, lijiang wrote: >> I noticed that the checkpatch was coded in Perl. But i am not familiar with >> the Perl program language, that would be beyond my ability to do this, i have >> to learn the

Re: [PATCH 1/2 v6] kdump: add the vmcoreinfo documentation

2019-01-13 Thread lijiang
在 2019年01月11日 22:56, Borislav Petkov 写道: > On Thu, Jan 10, 2019 at 08:19:43PM +0800, Lianbo Jiang wrote: >> This document lists some variables that export to vmcoreinfo, and briefly >> describles what these variables indicate. It should be instructive for >> many people who do not know the vmcorein

Re: [PATCH 1/2 v6] kdump: add the vmcoreinfo documentation

2019-01-13 Thread lijiang
在 2019年01月11日 20:33, Borislav Petkov 写道: > On Thu, Jan 10, 2019 at 08:19:43PM +0800, Lianbo Jiang wrote: >> +init_uts_ns.name.release >> + >> + >> +The version of the Linux kernel. Used to find the corresponding source >> +code from which the kernel has been built. >> + > >

Re: [PATCH 2/2 v5] kdump,vmcoreinfo: Export the value of sme mask to vmcoreinfo

2019-01-07 Thread lijiang
在 2019年01月07日 10:29, Baoquan He 写道: > On 01/07/19 at 09:47am, Lianbo Jiang wrote: >> For AMD machine with SME feature, makedumpfile tools need to know >> whether the crash kernel was encrypted or not. If SME is enabled > ^ crashed >> in the first kernel, the crash kernel's page table(

Re: [PATCH 1/2 v5] kdump: add the vmcoreinfo documentation

2019-01-07 Thread lijiang
在 2019年01月07日 15:55, Hatayama, Daisuke 写道: > Hi, > >> -Original Message- >> From: linux-kernel-ow...@vger.kernel.org >> [mailto:linux-kernel-ow...@vger.kernel.org] On Behalf Of Lianbo Jiang >> Sent: Monday, January 7, 2019 10:48 AM >> To: linux-kernel@vger.kernel.org >> Cc: ke...@lists.inf

Re: [PATCH 1/2 v8] resource: add the new I/O resource descriptor 'IORES_DESC_RESERVED'

2019-01-06 Thread lijiang
在 2018年12月07日 04:11, Borislav Petkov 写道: > On Fri, Nov 30, 2018 at 03:04:44PM +0800, lijiang wrote: >> I have noticed the changes on x86, but for IA64, i'm not sure whether it >> should do the same >> thing, so keep it as before. >> >> If IA64 people would

Re: [PATCH 1/2 v4] kdump: add the vmcoreinfo documentation

2019-01-03 Thread lijiang
在 2019年01月04日 03:28, Kazuhito Hagio 写道: > Hi Lianbo, > > -Original Message- >> +=== >> +What is the VMCOREINFO? >> +=== >> + >> +VMCOREINFO is a special ELF note section. It contains various >> +information from the kernel like structure size, page s

Re: [PATCH 1/2 v3] kdump: add the vmcoreinfo documentation

2018-12-25 Thread lijiang
在 2018年12月26日 11:36, Dave Young 写道: > On 12/26/18 at 11:24am, Dave Young wrote: > + > +KERNEL_IMAGE_SIZE > += > +The size of 'KERNEL_IMAGE_SIZE', currently unused. So remove? >>> >>> I'm not sure whether it should be removed, so i keep it. >> >> Just r

Re: [PATCH 2/2 v3] kdump,vmcoreinfo: Export the value of sme mask to vmcoreinfo

2018-12-17 Thread lijiang
在 2018年12月17日 21:01, Borislav Petkov 写道: > On Sun, Dec 16, 2018 at 09:16:17PM +0800, Lianbo Jiang wrote: >> For AMD machine with SME feature, makedumpfile tools need to know >> whether the crash kernel was encrypted or not. If SME is enabled >> in the first kernel, the crash kernel's page table(pgd

Re: [PATCH 1/2 v3] kdump: add the vmcoreinfo documentation

2018-12-17 Thread lijiang
在 2018年12月17日 21:00, Borislav Petkov 写道: > On Sun, Dec 16, 2018 at 09:16:16PM +0800, Lianbo Jiang wrote: >> +clear_idx >> += >> +The index that the next printk record to read after the last 'clear' >> +command. It indicates the first record after the last SYSLOG_ACTION >> +_CLEAR, like issu

Re: [PATCH 1/2 v8] resource: add the new I/O resource descriptor 'IORES_DESC_RESERVED'

2018-12-11 Thread lijiang
在 2018年12月05日 05:33, Lendacky, Thomas 写道: > On 11/29/2018 09:37 PM, Dave Young wrote: >> + more people >> >> On 11/29/18 at 04:09pm, Lianbo Jiang wrote: >>> When doing kexec_file_load, the first kernel needs to pass the e820 >>> reserved ranges to the second kernel. But kernel can not exactly >>> m

Re: [PATCH 1/2 v8] resource: add the new I/O resource descriptor 'IORES_DESC_RESERVED'

2018-12-09 Thread lijiang
在 2018年12月07日 04:11, Borislav Petkov 写道: > On Fri, Nov 30, 2018 at 03:04:44PM +0800, lijiang wrote: >> I have noticed the changes on x86, but for IA64, i'm not sure whether it >> should do the same >> thing, so keep it as before. >> >> If IA64 people would

Re: [PATCH 2/2 v2] kdump,vmcoreinfo: Export the value of sme mask to vmcoreinfo

2018-12-09 Thread lijiang
在 2018年12月05日 18:24, Dave Young 写道: > On 12/02/18 at 11:08am, Lianbo Jiang wrote: >> For AMD machine with SME feature, makedumpfile tools need to know >> whether the crash kernel was encrypted or not. If SME is enabled >> in the first kernel, the crash kernel's page table(pgd/pud/pmd/pte) >> contai

Re: [PATCH 1/2 v2] kdump: add the vmcoreinfo documentation

2018-12-04 Thread lijiang
在 2018年12月03日 23:08, Borislav Petkov 写道: > Add some more Ccs. > Thanks a lot. There are more people to review and improve this document together, that would be fine. > On Sun, Dec 02, 2018 at 11:08:38AM +0800, Lianbo Jiang wrote: >> This document lists some variables that export to vmcoreinfo,

Re: [tip:x86/mm] kdump, proc/vmcore: Enable kdumping encrypted memory with SME enabled

2018-10-08 Thread lijiang
在 2018年10月08日 21:43, Borislav Petkov 写道: > On Mon, Oct 08, 2018 at 10:59:09AM +0200, Borislav Petkov wrote: >> On Mon, Oct 08, 2018 at 04:47:34PM +0800, lijiang wrote: >>> It looks like a good way to avoid the 'ifdefined', and it's also good >>&

Re: [tip:x86/mm] kdump, proc/vmcore: Enable kdumping encrypted memory with SME enabled

2018-10-08 Thread lijiang
在 2018年10月08日 16:00, Borislav Petkov 写道: > On Mon, Oct 08, 2018 at 03:11:56PM +0800, lijiang wrote: >> I used this ".config" to compile kernel in the attachment, and got a compile >> error. >> Would you like to have a try? >> >> [root@hp-dl385g10-03 linu

Re: [tip:x86/mm] kdump, proc/vmcore: Enable kdumping encrypted memory with SME enabled

2018-10-08 Thread lijiang
在 2018年10月08日 13:37, Borislav Petkov 写道: > On Mon, Oct 08, 2018 at 11:30:56AM +0800, lijiang wrote: >> Yes. As previously mentioned, the correct patch is this one: > > No, that chunk is not needed and I removed it. But I'd leave it as > an exercise to you to figure out why.

Re: [tip:x86/mm] kdump, proc/vmcore: Enable kdumping encrypted memory with SME enabled

2018-10-07 Thread lijiang
在 2018年10月07日 16:47, Borislav Petkov 写道: > On Sun, Oct 07, 2018 at 01:55:33PM +0800, lijiang wrote: >> Here, it may be have a compile error. > > Are you sure? The configs I tried worked fine but I'm open to being > shown configs which fail the build. > Yes. As previou

Re: [tip:x86/mm] kdump, proc/vmcore: Enable kdumping encrypted memory with SME enabled

2018-10-06 Thread lijiang
> index 3e4ba9d753c8..f774c5eb9e3c 100644 > --- a/include/linux/crash_dump.h > +++ b/include/linux/crash_dump.h > @@ -26,6 +26,10 @@ extern int remap_oldmem_pfn_range(struct vm_area_struct > *vma, > > extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, >

Re: [PATCH v7 RESEND 4/4] kdump/vmcore: support encrypted old memory with SME enabled

2018-09-29 Thread lijiang
在 2018年09月29日 16:30, Borislav Petkov 写道: > On Sat, Sep 29, 2018 at 02:24:52PM +0800, lijiang wrote: >> At first, i added an input parameter for read_from_oldmem() because of >> encryption(SME). But >> for avoiding to also add the same parameter for copy_oldmem_page(),

Re: [PATCH v7 RESEND 1/4] x86/ioremap: add a function ioremap_encrypted() to remap kdump old memory

2018-09-27 Thread lijiang
在 2018年09月28日 00:10, Borislav Petkov 写道: > On Thu, Sep 27, 2018 at 10:53:47PM +0800, lijiang wrote: >> If no need to break this line, it will cause a warning of exceeding 80 >> characters per line. > > That's fine - we don't take the 80 cols rule blindly bu

Re: [PATCH v7 RESEND 1/4] x86/ioremap: add a function ioremap_encrypted() to remap kdump old memory

2018-09-27 Thread lijiang
在 2018年09月27日 21:17, Borislav Petkov 写道: > On Thu, Sep 27, 2018 at 03:19:51PM +0800, Lianbo Jiang wrote: >> diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h >> index 6de64840dd22..f8795f9581c7 100644 >> --- a/arch/x86/include/asm/io.h >> +++ b/arch/x86/include/asm/io.h >> @@ -192,

Re: [PATCH 1/4 v8] x86/ioremap: add a function ioremap_encrypted() to remap kdump old memory

2018-09-26 Thread lijiang
When SME is enabled on AMD machine, the memory is encrypted in the first kernel. In this case, SME also needs to be enabled in kdump kernel, and we have to remap the old memory with the memory encryption mask. Here we only talk about the case that SME is active in the first kernel, and only care i

Re: [PATCH 1/4 v7] x86/ioremap: add a function ioremap_encrypted() to remap kdump old memory

2018-09-25 Thread lijiang
Also cc maintainer and other reviewer. Thanks. 在 2018年09月26日 14:18, lijiang 写道: > 在 2018年09月26日 10:21, Baoquan He 写道: >> Hi Lianbo, >> >> On 09/07/18 at 04:18pm, Lianbo Jiang wrote: >>> When SME is enabled on AMD machine, the memory is encrypted in the first >

Re: [PATCH] resource: fix an error which walks through iomem resources

2018-09-19 Thread lijiang
Please ignore this patch, i have put this patch into another patches series, you can refer to the link below: https://lore.kernel.org/patchwork/patch/988431/ https://lore.kernel.org/patchwork/patch/988432/ https://lore.kernel.org/patchwork/patch/988433/ Thanks. 在 2018年09月17日 14:20, Lianbo Jiang

Re: [PATCH 2/2] x86/kexec_file: add reserved e820 ranges to 2nd kernel e820 table

2018-09-18 Thread lijiang
在 2018年09月18日 11:20, Dave Young 写道: > On 09/18/18 at 10:48am, Lianbo Jiang wrote: >> e820 reserved ranges is useful in kdump kernel, we have added this in >> kexec-tools code. >> >> One reason is PCI mmconf (extended mode) requires reserved region >> otherwise it falls back to legacy mode. >> >> Wh

Re: [PATCH 1/5 V5] Add a function(ioremap_encrypted) for kdump when AMD sme enabled

2018-07-03 Thread lijiang
在 2018年07月03日 17:39, Borislav Petkov 写道: > On Tue, Jul 03, 2018 at 10:17:19AM +0800, lijiang wrote: >> for example, the elfcorehdr. In fact, the elfcorehdr and notes > > You mean this? > > ssize_t __weak elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos)

Re: [PATCH 1/5 V5] Add a function(ioremap_encrypted) for kdump when AMD sme enabled

2018-07-03 Thread lijiang
在 2018年07月03日 10:17, lijiang 写道: > 在 2018年07月02日 18:14, Borislav Petkov 写道: >> On Mon, Jul 02, 2018 at 03:26:35PM +0800, Lianbo Jiang wrote: >>> @@ -131,7 +132,8 @@ static void __ioremap_check_mem(resource_size_t addr, >>> unsigned long size, >>> * call

Re: [PATCH 0/2] support kdump for AMD secure memory encryption(sme)

2018-05-22 Thread lijiang
在 2018年05月21日 21:23, Tom Lendacky 写道: > On 5/20/2018 10:45 PM, lijiang wrote: >> 在 2018年05月17日 21:45, lijiang 写道: >>> 在 2018年05月15日 21:31, Tom Lendacky 写道: >>>> On 5/14/2018 8:51 PM, Lianbo Jiang wrote: >>>>> It is convenient to remap the old memory en

Re: [PATCH 0/2] support kdump for AMD secure memory encryption(sme)

2018-05-20 Thread lijiang
在 2018年05月17日 21:45, lijiang 写道: > 在 2018年05月15日 21:31, Tom Lendacky 写道: >> On 5/14/2018 8:51 PM, Lianbo Jiang wrote: >>> It is convenient to remap the old memory encrypted to the second kernel by >>> calling ioremap_encrypted(). >>> >>> When sme e

Re: [PATCH 0/2] support kdump for AMD secure memory encryption(sme)

2018-05-17 Thread lijiang
在 2018年05月15日 21:31, Tom Lendacky 写道: > On 5/14/2018 8:51 PM, Lianbo Jiang wrote: >> It is convenient to remap the old memory encrypted to the second kernel by >> calling ioremap_encrypted(). >> >> When sme enabled on AMD server, we also need to support kdump. Because >> the memory is encrypted in

Re: [PATCH 2/2] support kdump when AMD secure memory encryption is active

2018-05-16 Thread lijiang
在 2018年05月16日 04:18, Tom Lendacky 写道: > On 5/14/2018 8:51 PM, Lianbo Jiang wrote: >> When sme enabled on AMD server, we also need to support kdump. Because >> the memory is encrypted in the first kernel, we will remap the old memory >> encrypted to the second kernel(crash kernel), and sme is also e

Re: [PATCH 2/2] support kdump when AMD secure memory encryption is active

2018-05-16 Thread lijiang
在 2018年05月16日 04:18, Tom Lendacky 写道: > On 5/14/2018 8:51 PM, Lianbo Jiang wrote: >> When sme enabled on AMD server, we also need to support kdump. Because >> the memory is encrypted in the first kernel, we will remap the old memory >> encrypted to the second kernel(crash kernel), and sme is also e

Re: [PATCH 1/2] add a function(ioremap_encrypted) for kdump when AMD sme enabled.

2018-05-16 Thread lijiang
在 2018年05月15日 22:34, Tom Lendacky 写道: > On 5/14/2018 8:51 PM, Lianbo Jiang wrote: >> It is convenient to remap the old memory encrypted to the second kernel >> by calling ioremap_encrypted(). >> >> Signed-off-by: Lianbo Jiang >> --- >> arch/x86/include/asm/io.h | 2 ++ >> arch/x86/mm/ioremap.c