From: Chao Fan <fanc.fnst@cn.fujitsu.com>
To: Borislav Petkov <bp@alien8.de>
Cc: rafael.j.wysocki@intel.com, Kairui Song <kasong@redhat.com>,
Baoquan He <bhe@redhat.com>,
erik.schmauss@intel.com, x86@kernel.org,
kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
robert.moore@intel.com, mingo@redhat.com, hpa@zytor.com,
tglx@linutronix.de, Dave Young <dyoung@redhat.com>,
akpm@linux-foundation.org, Len Brown <lenb@kernel.org>
Subject: Re: [PATCH v2 2/2] x86, kexec_file_load: make it work with efi=noruntime or efi=old_map
Date: Tue, 22 Jan 2019 11:32:41 +0800 [thread overview]
Message-ID: <20190122033241.GE15754@localhost.localdomain> (raw)
In-Reply-To: <20190121082932.GA29166@zn.tnic>
On Mon, Jan 21, 2019 at 09:29:32AM +0100, Borislav Petkov wrote:
>On Mon, Jan 21, 2019 at 09:18:30AM +0800, Chao Fan wrote:
>> So I have changed as this method and put in my mail thread, you may not
>> notice, so I put here for my function if I need to fill the
>> boot_parameters:
>>
>> static inline acpi_physical_address get_boot_params_rsdp(void)
>> {
>> return boot_params->acpi_rsdp_addr;
>> }
>
>Why do you need that silly wrapper?
>
>> static acpi_physical_address get_rsdp_addr(void)
>> {
>> bool boot_params_rsdp_exist;
>
>What's that bool supposed to do?
>
>> acpi_physical_address pa;
>>
>> pa = get_acpi_rsdp();
>>
>> if (!pa)
>> pa = get_boot_params_rsdp();
>>
>> if (!pa) {
>> pa = efi_get_rsdp_addr();
>> boot_params_rsdp_exist = false;
>> }
>> else
>> boot_params_rsdp_exist = true;
>>
>> if (!pa)
>> pa = bios_get_rsdp_addr();
>>
>> if (pa && !boot_params_rsdp_exist)
>> boot_params.acpi_rsdp_addr = pa;
>>
>> return pa;
>> }
>>
>> At the same time, I notice kernel only parses it when
>> "#ifdef CONFIG_ACPI", we should keep sync with kernel, but I think
>> we are parsing SRAT, CONFIG_ACPI is needed sure, so I am going to
>> update the define of EARLY_SRAT_PARSE:
>>
>> config EARLY_SRAT_PARSE
>> bool "EARLY SRAT parsing"
>> def_bool y
>> depends on RANDOMIZE_BASE && MEMORY_HOTREMOVE && ACPI
>
>Actually, you don't need that anymore - make it unconditionally
>built-in. Because there are a bunch of users which need this and instead
>of complicating this config option with a bunch of dependencies, we can
>just as well have it always on.
According to your reply, I change it as:
vmlinux-objs-y += $(obj)/acpi.o
But I notice the only function call entry is in kaslr.c which needs
RANDOMIZE_BASE, so do I need change it as:
vmlinux-objs-$(CONFIG_RANDOMIZE_BASE) += $(obj)/acpi.o
Thanks,
Chao Fan
>
>Thx.
>
>--
>Regards/Gruss,
> Boris.
>
>Good mailing practices for 400: avoid top-posting and trim the reply.
>
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: Chao Fan <fanc.fnst@cn.fujitsu.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Kairui Song <kasong@redhat.com>, <linux-kernel@vger.kernel.org>,
<tglx@linutronix.de>, <mingo@redhat.com>, <hpa@zytor.com>,
<x86@kernel.org>, Dave Young <dyoung@redhat.com>,
Baoquan He <bhe@redhat.com>, <kexec@lists.infradead.org>,
<akpm@linux-foundation.org>, <robert.moore@intel.com>,
<erik.schmauss@intel.com>, <rafael.j.wysocki@intel.com>,
Len Brown <lenb@kernel.org>
Subject: Re: [PATCH v2 2/2] x86, kexec_file_load: make it work with efi=noruntime or efi=old_map
Date: Tue, 22 Jan 2019 11:32:41 +0800 [thread overview]
Message-ID: <20190122033241.GE15754@localhost.localdomain> (raw)
In-Reply-To: <20190121082932.GA29166@zn.tnic>
On Mon, Jan 21, 2019 at 09:29:32AM +0100, Borislav Petkov wrote:
>On Mon, Jan 21, 2019 at 09:18:30AM +0800, Chao Fan wrote:
>> So I have changed as this method and put in my mail thread, you may not
>> notice, so I put here for my function if I need to fill the
>> boot_parameters:
>>
>> static inline acpi_physical_address get_boot_params_rsdp(void)
>> {
>> return boot_params->acpi_rsdp_addr;
>> }
>
>Why do you need that silly wrapper?
>
>> static acpi_physical_address get_rsdp_addr(void)
>> {
>> bool boot_params_rsdp_exist;
>
>What's that bool supposed to do?
>
>> acpi_physical_address pa;
>>
>> pa = get_acpi_rsdp();
>>
>> if (!pa)
>> pa = get_boot_params_rsdp();
>>
>> if (!pa) {
>> pa = efi_get_rsdp_addr();
>> boot_params_rsdp_exist = false;
>> }
>> else
>> boot_params_rsdp_exist = true;
>>
>> if (!pa)
>> pa = bios_get_rsdp_addr();
>>
>> if (pa && !boot_params_rsdp_exist)
>> boot_params.acpi_rsdp_addr = pa;
>>
>> return pa;
>> }
>>
>> At the same time, I notice kernel only parses it when
>> "#ifdef CONFIG_ACPI", we should keep sync with kernel, but I think
>> we are parsing SRAT, CONFIG_ACPI is needed sure, so I am going to
>> update the define of EARLY_SRAT_PARSE:
>>
>> config EARLY_SRAT_PARSE
>> bool "EARLY SRAT parsing"
>> def_bool y
>> depends on RANDOMIZE_BASE && MEMORY_HOTREMOVE && ACPI
>
>Actually, you don't need that anymore - make it unconditionally
>built-in. Because there are a bunch of users which need this and instead
>of complicating this config option with a bunch of dependencies, we can
>just as well have it always on.
According to your reply, I change it as:
vmlinux-objs-y += $(obj)/acpi.o
But I notice the only function call entry is in kaslr.c which needs
RANDOMIZE_BASE, so do I need change it as:
vmlinux-objs-$(CONFIG_RANDOMIZE_BASE) += $(obj)/acpi.o
Thanks,
Chao Fan
>
>Thx.
>
>--
>Regards/Gruss,
> Boris.
>
>Good mailing practices for 400: avoid top-posting and trim the reply.
>
>
next prev parent reply other threads:[~2019-01-22 3:33 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 9:58 [PATCH 0/2] make kexec work with efi=noruntime or efi=old_map Kairui Song
2019-01-15 9:58 ` Kairui Song
2019-01-15 9:58 ` [PATCH v2 1/2] x86, kexec_file_load: Don't setup EFI info if EFI runtime is not enabled Kairui Song
2019-01-15 9:58 ` Kairui Song
2019-01-15 9:58 ` [PATCH v2 2/2] x86, kexec_file_load: make it work with efi=noruntime or efi=old_map Kairui Song
2019-01-15 9:58 ` Kairui Song
2019-01-15 23:10 ` Borislav Petkov
2019-01-15 23:10 ` Borislav Petkov
2019-01-16 3:32 ` Dave Young
2019-01-16 3:32 ` Dave Young
2019-01-16 5:09 ` Kairui Song
2019-01-16 5:09 ` Kairui Song
2019-01-16 6:51 ` Dave Young
2019-01-16 6:51 ` Dave Young
2019-01-16 22:24 ` Rafael J. Wysocki
2019-01-16 22:24 ` Rafael J. Wysocki
2019-01-16 7:08 ` Kairui Song
2019-01-16 7:08 ` Kairui Song
2019-01-16 9:46 ` Borislav Petkov
2019-01-16 9:46 ` Borislav Petkov
2019-01-17 7:41 ` Kairui Song
2019-01-17 7:41 ` Kairui Song
2019-01-17 7:49 ` Chao Fan
2019-01-17 7:49 ` Chao Fan
2019-01-17 8:20 ` Kairui Song
2019-01-17 8:20 ` Kairui Song
2019-01-17 8:54 ` Dave Young
2019-01-17 8:54 ` Dave Young
2019-01-17 8:53 ` Dave Young
2019-01-17 8:53 ` Dave Young
2019-01-17 9:39 ` Rafael J. Wysocki
2019-01-17 9:39 ` Rafael J. Wysocki
2019-01-18 4:47 ` Kairui Song
2019-01-18 4:47 ` Kairui Song
2019-01-18 9:45 ` Rafael J. Wysocki
2019-01-18 9:45 ` Rafael J. Wysocki
2019-01-18 10:26 ` Borislav Petkov
2019-01-18 10:26 ` Borislav Petkov
2019-01-21 1:18 ` Chao Fan
2019-01-21 1:18 ` Chao Fan
2019-01-21 8:29 ` Borislav Petkov
2019-01-21 8:29 ` Borislav Petkov
2019-01-21 8:43 ` Chao Fan
2019-01-21 8:43 ` Chao Fan
2019-01-21 9:19 ` Borislav Petkov
2019-01-21 9:19 ` Borislav Petkov
2019-01-22 3:32 ` Chao Fan [this message]
2019-01-22 3:32 ` Chao Fan
2019-01-22 12:17 ` Borislav Petkov
2019-01-22 12:17 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190122033241.GE15754@localhost.localdomain \
--to=fanc.fnst@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=bp@alien8.de \
--cc=dyoung@redhat.com \
--cc=erik.schmauss@intel.com \
--cc=hpa@zytor.com \
--cc=kasong@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rafael.j.wysocki@intel.com \
--cc=robert.moore@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.