From: Thomas Gleixner <tglx@linutronix.de>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
x86@kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
jailhouse-dev@googlegroups.com
Subject: Re: [PATCH 01/10] x86/apic: Install an empty physflat_init_apic_ldr
Date: Fri, 17 Nov 2017 22:43:48 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1711172225310.2186@nanos> (raw)
In-Reply-To: <7476b80e275c27beb7d30d564c55966d66d1a825.1510817211.git.jan.kiszka@siemens.com>
On Thu, 16 Nov 2017, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> As the comment already stated, there is no need for setting up LDR in
I prefer to have a proper reference to documentation why this is not
needed than to a comment which is technically dubious.
> physflat mode as it remains unused. flat_init_apic_ldr only served as a
> placeholder for a nop operation so far, causing no harm.
>
> That will change when running over the Jailhouse hypervisor. Here we
> must not touch LDR in a way that destroys the mapping originally set up
> by the Linux root cell. Jailhouse enforces this setting in order to
> efficiently validate any IPI requests sent by a cell.
>
> Avoid a needless clash caused by flat_init_apic_ldr by installing a true
> nop handler.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> arch/x86/kernel/apic/apic_flat_64.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/apic/apic_flat_64.c b/arch/x86/kernel/apic/apic_flat_64.c
> index aa85690e9b64..34bfdfe29a04 100644
> --- a/arch/x86/kernel/apic/apic_flat_64.c
> +++ b/arch/x86/kernel/apic/apic_flat_64.c
> @@ -218,6 +218,11 @@ static int physflat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
> return 0;
> }
>
> +void physflat_init_apic_ldr(void)
static ?
> +{
> + /* LDR is not used in physflat mode. */
flat_init_apic_ldr() also fiddles with DFR ...
> +}
> +
> static void physflat_send_IPI_allbutself(int vector)
> {
> default_send_IPI_mask_allbutself_phys(cpu_online_mask, vector);
> @@ -251,8 +256,7 @@ static struct apic apic_physflat __ro_after_init = {
> .dest_logical = 0,
> .check_apicid_used = NULL,
>
> - /* not needed, but shouldn't hurt: */
> - .init_apic_ldr = flat_init_apic_ldr,
> + .init_apic_ldr = physflat_init_apic_ldr,
>
> .ioapic_phys_id_map = NULL,
> .setup_apic_routing = NULL,
> --
> 2.12.3
>
>
next prev parent reply other threads:[~2017-11-17 21:44 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-16 7:26 [PATCH 00/10] x86: Add support for running as secondary Jailhouse guest Jan Kiszka
2017-11-16 7:26 ` [PATCH 01/10] x86/apic: Install an empty physflat_init_apic_ldr Jan Kiszka
2017-11-17 21:43 ` Thomas Gleixner [this message]
2017-11-16 7:26 ` [PATCH 02/10] x86: jailhouse: Add infrastructure for running in non-root cell Jan Kiszka
2017-11-17 21:54 ` Thomas Gleixner
2017-11-18 19:21 ` Jan Kiszka
2017-11-20 11:22 ` Thomas Gleixner
2017-11-16 7:26 ` [PATCH 03/10] x86: jailhouse: Enable APIC and SMP support Jan Kiszka
2017-11-17 22:42 ` Thomas Gleixner
2017-11-20 14:39 ` Konrad Rzeszutek Wilk
2017-11-20 17:26 ` Thomas Gleixner
2017-11-16 7:26 ` [PATCH 04/10] x86: jailhouse: Enable PMTIMER Jan Kiszka
2017-11-17 22:44 ` Thomas Gleixner
2017-11-16 7:26 ` [PATCH 05/10] x86: jailhouse: Set up timekeeping Jan Kiszka
2017-11-17 22:49 ` Thomas Gleixner
2017-11-18 19:23 ` Jan Kiszka
2017-11-20 11:24 ` Thomas Gleixner
2017-11-20 12:21 ` Jan Kiszka
2017-11-23 18:36 ` Thomas Gleixner
2017-11-23 19:48 ` Jan Kiszka
2017-11-16 7:26 ` [PATCH 06/10] x86: jailhouse: Avoid access of unsupported platform resources Jan Kiszka
2017-11-17 22:57 ` Thomas Gleixner
2017-11-17 22:59 ` Thomas Gleixner
2017-11-16 7:26 ` [PATCH 07/10] x86: jailhouse: Silence ACPI warning Jan Kiszka
2017-11-16 7:26 ` [PATCH 08/10] x86: jailhouse: Halt instead of failing to restart Jan Kiszka
2017-11-16 7:26 ` [PATCH 09/10] x86: jailhouse: Wire up IOAPIC for legacy UART ports Jan Kiszka
2017-11-17 23:14 ` Thomas Gleixner
2017-11-16 7:26 ` [PATCH 10/10] x86: jailhouse: Initialize PCI support Jan Kiszka
2017-11-18 21:15 ` [PATCH 00/10] x86: Add support for running as secondary Jailhouse guest H. Peter Anvin
2017-11-20 7:00 ` Jan Kiszka
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=alpine.DEB.2.20.1711172225310.2186@nanos \
--to=tglx@linutronix.de \
--cc=hpa@zytor.com \
--cc=jailhouse-dev@googlegroups.com \
--cc=jan.kiszka@siemens.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®