2015-11-16 17:59:44

by Alex Thorlton

[permalink] [raw]
Subject: [PATCH 1/2] Remove EFI memmap quirk for UV

Commit a5d90c923bcf ("x86/efi: Quirk out SGI UV") added a quirk to
efi_apply_memmap_quirks to force SGI UV systems to fall back to the old
EFI memmap mechanism. We have a BIOS fix for this issue now, so we no
longer need this quirk in the kernel. This commit removes the quirk
from the function in question.

Signed-off-by: Alex Thorlton <[email protected]>
Acked-by: Mike Travis <[email protected]>
Acked-by: Russ Anderson <[email protected]>
Cc: Matt Fleming <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Hedi Berriche <[email protected]>
Cc: Dimitri Sivanich <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
arch/x86/platform/efi/quirks.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
index 1c7380d..96b417c 100644
--- a/arch/x86/platform/efi/quirks.c
+++ b/arch/x86/platform/efi/quirks.c
@@ -259,12 +259,6 @@ void __init efi_apply_memmap_quirks(void)
pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n");
efi_unmap_memmap();
}
-
- /*
- * UV doesn't support the new EFI pagetable mapping yet.
- */
- if (is_uv_system())
- set_bit(EFI_OLD_MEMMAP, &efi.flags);
}

/*
--
1.8.5.6


2015-11-16 17:59:46

by Alex Thorlton

[permalink] [raw]
Subject: [PATCH 2/2] Remove extra mapping code for UV MMRs

These MMRs get mapped in correctly using the new EFI memmap scheme on
recent BIOSes, so we no longer need to set up these extra mappings for
them.

Signed-off-by: Alex Thorlton <[email protected]>
Acked-by: Mike Travis <[email protected]>
Acked-by: Russ Anderson <[email protected]>
Cc: Matt Fleming <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Hedi Berriche <[email protected]>
Cc: Dimitri Sivanich <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
arch/x86/kernel/apic/x2apic_uv_x.c | 7 -------
1 file changed, 7 deletions(-)

diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index c8d9295..e8db45d 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -712,12 +712,6 @@ static __init void map_mmioh_high(int min_pnode, int max_pnode)
}
}

-static __init void map_low_mmrs(void)
-{
- init_extra_mapping_uc(UV_GLOBAL_MMR32_BASE, UV_GLOBAL_MMR32_SIZE);
- init_extra_mapping_uc(UV_LOCAL_MMR_BASE, UV_LOCAL_MMR_SIZE);
-}
-
static __init void uv_rtc_init(void)
{
long status;
@@ -890,7 +884,6 @@ void __init uv_system_init(void)
return;
}
pr_info("UV: Found %s hub\n", hub);
- map_low_mmrs();

m_n_config.v = uv_read_local_mmr(UVH_RH_GAM_CONFIG_MMR );
m_val = m_n_config.s.m_skt;
--
1.8.5.6

2015-11-16 18:03:46

by Thomas Gleixner

[permalink] [raw]
Subject: Re: [PATCH 1/2] Remove EFI memmap quirk for UV

On Mon, 16 Nov 2015, Alex Thorlton wrote:

CC'ing Matt under his correct e-mail address.

> Commit a5d90c923bcf ("x86/efi: Quirk out SGI UV") added a quirk to
> efi_apply_memmap_quirks to force SGI UV systems to fall back to the old
> EFI memmap mechanism. We have a BIOS fix for this issue now, so we no
> longer need this quirk in the kernel. This commit removes the quirk
> from the function in question.
>
> Signed-off-by: Alex Thorlton <[email protected]>
> Acked-by: Mike Travis <[email protected]>
> Acked-by: Russ Anderson <[email protected]>
> Cc: Matt Fleming <[email protected]>
> Cc: Thomas Gleixner <[email protected]>
> Cc: Ingo Molnar <[email protected]>
> Cc: "H. Peter Anvin" <[email protected]>
> Cc: Hedi Berriche <[email protected]>
> Cc: Dimitri Sivanich <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
>
> ---
> arch/x86/platform/efi/quirks.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
> index 1c7380d..96b417c 100644
> --- a/arch/x86/platform/efi/quirks.c
> +++ b/arch/x86/platform/efi/quirks.c
> @@ -259,12 +259,6 @@ void __init efi_apply_memmap_quirks(void)
> pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n");
> efi_unmap_memmap();
> }
> -
> - /*
> - * UV doesn't support the new EFI pagetable mapping yet.
> - */
> - if (is_uv_system())
> - set_bit(EFI_OLD_MEMMAP, &efi.flags);
> }
>
> /*
> --
> 1.8.5.6
>
>

2015-11-17 09:52:20

by Matt Fleming

[permalink] [raw]
Subject: Re: [PATCH 1/2] Remove EFI memmap quirk for UV

On Mon, 16 Nov, at 07:02:48PM, Thomas Gleixner wrote:
> On Mon, 16 Nov 2015, Alex Thorlton wrote:
>
> CC'ing Matt under his correct e-mail address.
>
> > Commit a5d90c923bcf ("x86/efi: Quirk out SGI UV") added a quirk to
> > efi_apply_memmap_quirks to force SGI UV systems to fall back to the old
> > EFI memmap mechanism. We have a BIOS fix for this issue now, so we no
> > longer need this quirk in the kernel. This commit removes the quirk
> > from the function in question.
> >
> > Signed-off-by: Alex Thorlton <[email protected]>
> > Acked-by: Mike Travis <[email protected]>
> > Acked-by: Russ Anderson <[email protected]>
> > Cc: Matt Fleming <[email protected]>
> > Cc: Thomas Gleixner <[email protected]>
> > Cc: Ingo Molnar <[email protected]>
> > Cc: "H. Peter Anvin" <[email protected]>
> > Cc: Hedi Berriche <[email protected]>
> > Cc: Dimitri Sivanich <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> >
> > ---
> > arch/x86/platform/efi/quirks.c | 6 ------
> > 1 file changed, 6 deletions(-)
> >
> > diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
> > index 1c7380d..96b417c 100644
> > --- a/arch/x86/platform/efi/quirks.c
> > +++ b/arch/x86/platform/efi/quirks.c
> > @@ -259,12 +259,6 @@ void __init efi_apply_memmap_quirks(void)
> > pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n");
> > efi_unmap_memmap();
> > }
> > -
> > - /*
> > - * UV doesn't support the new EFI pagetable mapping yet.
> > - */
> > - if (is_uv_system())
> > - set_bit(EFI_OLD_MEMMAP, &efi.flags);

Awesome! Thanks Alex.

Can I also close https://bugzilla.kernel.org/show_bug.cgi?id=75021 ?

2015-11-17 18:24:36

by Alex Thorlton

[permalink] [raw]
Subject: Re: [PATCH 1/2] Remove EFI memmap quirk for UV

On Tue, Nov 17, 2015 at 09:52:08AM +0000, Matt Fleming wrote:
> Awesome! Thanks Alex.
>
> Can I also close https://bugzilla.kernel.org/show_bug.cgi?id=75021 ?

Yep! Thanks, Matt!

- Alex

2015-11-17 19:33:12

by Borislav Petkov

[permalink] [raw]
Subject: Re: [PATCH 1/2] Remove EFI memmap quirk for UV

On Mon, Nov 16, 2015 at 11:59:40AM -0600, Alex Thorlton wrote:
> Commit a5d90c923bcf ("x86/efi: Quirk out SGI UV") added a quirk to
> efi_apply_memmap_quirks to force SGI UV systems to fall back to the old
> EFI memmap mechanism. We have a BIOS fix for this issue now, so we no
> longer need this quirk in the kernel.

So does that mean that all UV systems out there will get the BIOS update
or at least will have a BIOS update available so that we won't need the
quirk at all?

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.

2015-11-18 01:56:33

by Alex Thorlton

[permalink] [raw]
Subject: Re: [PATCH 1/2] Remove EFI memmap quirk for UV

On Tue, Nov 17, 2015 at 08:32:59PM +0100, Borislav Petkov wrote:
> On Mon, Nov 16, 2015 at 11:59:40AM -0600, Alex Thorlton wrote:
> > Commit a5d90c923bcf ("x86/efi: Quirk out SGI UV") added a quirk to
> > efi_apply_memmap_quirks to force SGI UV systems to fall back to the old
> > EFI memmap mechanism. We have a BIOS fix for this issue now, so we no
> > longer need this quirk in the kernel.
>
> So does that mean that all UV systems out there will get the BIOS update
> or at least will have a BIOS update available so that we won't need the
> quirk at all?

Essentially, yes. The BIOS fix isn't available on UV1, but that's older
hardware at this point, and the distro kernels that run on it will
still have the quirk. This change is mainly so that we can get the
un-quirked code pulled in for the next major distro release.

We won't be checking this down into the stable branches. Mainly just
planning ahead here for future UV and distro releases.

- Alex

2015-11-18 08:00:53

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH 1/2] Remove EFI memmap quirk for UV


* Alex Thorlton <[email protected]> wrote:

> On Tue, Nov 17, 2015 at 08:32:59PM +0100, Borislav Petkov wrote:
> > On Mon, Nov 16, 2015 at 11:59:40AM -0600, Alex Thorlton wrote:
> > > Commit a5d90c923bcf ("x86/efi: Quirk out SGI UV") added a quirk to
> > > efi_apply_memmap_quirks to force SGI UV systems to fall back to the old
> > > EFI memmap mechanism. We have a BIOS fix for this issue now, so we no
> > > longer need this quirk in the kernel.
> >
> > So does that mean that all UV systems out there will get the BIOS update
> > or at least will have a BIOS update available so that we won't need the
> > quirk at all?
>
> Essentially, yes. The BIOS fix isn't available on UV1, but that's older
> hardware at this point, and the distro kernels that run on it will
> still have the quirk. This change is mainly so that we can get the
> un-quirked code pulled in for the next major distro release.

So how about older UV systems that don't want to upgrade the BIOS for whatever
reason but wants to upgrade to a new distro will have a non-booting kernel?

Also, what about UV systems that compile their own kernels for whatever reason?

> We won't be checking this down into the stable branches. Mainly just planning
> ahead here for future UV and distro releases.

But eventually the new kernel will become the stable kernel, and we'll be breaking
old systems with old BIOSen, which is not good.

We should at least check the BIOS version via a DMI quirk and panic in some nicely
informative 'upgrade your BIOS!' way to ease the transition ...

Thanks,

Ingo

2015-11-18 09:23:31

by Borislav Petkov

[permalink] [raw]
Subject: Re: [PATCH 1/2] Remove EFI memmap quirk for UV

On Wed, Nov 18, 2015 at 09:00:47AM +0100, Ingo Molnar wrote:
> We should at least check the BIOS version via a DMI quirk and panic in some nicely
> informative 'upgrade your BIOS!' way to ease the transition ...

Or since we're touching BIOS anyway, maybe stick a bit somewhere which
says "EFI is fixed/quirk not needed anymore" when set and software can
check that bit instead of checking BIOS versions...

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.

2015-11-18 17:00:18

by Alex Thorlton

[permalink] [raw]
Subject: Re: [PATCH 1/2] Remove EFI memmap quirk for UV

On Wed, Nov 18, 2015 at 10:23:16AM +0100, Borislav Petkov wrote:
> On Wed, Nov 18, 2015 at 09:00:47AM +0100, Ingo Molnar wrote:
> > We should at least check the BIOS version via a DMI quirk and panic in some nicely
> > informative 'upgrade your BIOS!' way to ease the transition ...
>
> Or since we're touching BIOS anyway, maybe stick a bit somewhere which
> says "EFI is fixed/quirk not needed anymore" when set and software can
> check that bit instead of checking BIOS versions...

After talking through this with Russ, we agree that we should fix this
up to play nice on UV1, without users needing to add the memmap quirk to
the command line. I'll figure out which check we need to make and spin
another version.

Thanks for looking over this, guys!

- Alex