Jan Beulich
2010-Nov-18 16:55 UTC
[Xen-devel] [PATCH] x86-64: one more adjustment for Fam10 MMCONF enabling
The BASE_VALID() macro needs adjustment to match the other changes done to the original Linux code (which are all queued to be merged into Linus'' tree), plus per Hypertransport specification the range 0xff00000000-0xffffffffff also needs to be excluded. Signed-off-by: Jan Beulich <jbeulich@novell.com> --- a/xen/arch/x86/x86_64/mmconf-fam10h.c +++ b/xen/arch/x86/x86_64/mmconf-fam10h.c @@ -33,7 +33,7 @@ static struct pci_hostbridge_probe pci_p #define SIZE (UNIT << 8) /* need to avoid (0xfd<<32) and (0xfe<<32), ht used space */ #define FAM10H_PCI_MMCONF_BASE (0xfcULL<<32) -#define BASE_VALID(b) ((b != (0xfdULL << 32)) && (b != (0xfeULL << 32))) +#define BASE_VALID(b) ((b) + SIZE <= (0xfdULL<<32) || (b) >= (1ULL<<40)) static void __init get_fam10h_pci_mmconf_base(void) { unsigned int i, j, bus, slot, hi_mmio_num; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Sander Eikelenboom
2010-Nov-23 21:37 UTC
Re: [Xen-devel] [PATCH] x86-64: one more adjustment for Fam10 MMCONF enabling
Hello Jan, Is there anything i have to configure for the "Fam10 MMCONF" to be enabled ? From what i see from my "xm dmesg" it''s not enabled, although it''s a family 10h cpu (phenom x6) (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level) (XEN) ACPI: IRQ0 used by override. (XEN) ACPI: IRQ2 used by override. (XEN) ACPI: IRQ9 used by override. (XEN) Enabling APIC mode: Flat. Using 2 I/O APICs (XEN) ACPI: HPET id: 0x8300 base: 0xfed00000 (XEN) PCI: MCFG configuration 0: base e0000000 segment 0 buses 0 - 255 (XEN) PCI: Not using MMCONFIG. (XEN) Table is not found! (XEN) Using ACPI (MADT) for SMP configuration information (XEN) mapped APIC to ffff82c3ffffe000 (fee00000) (XEN) mapped IOAPIC to ffff82c3ffffd000 (fec00000) (XEN) mapped IOAPIC to ffff82c3ffffc000 (fec20000) (XEN) IRQ limits: 56 GSI, 1112 MSI/MSI-X (XEN) Using scheduler: SMP Credit Scheduler (credit) (XEN) Detected 3200.244 MHz processor. (XEN) Initing memory sharing. (XEN) AMD Fam10h machine check reporting enabled (XEN) I/O virtualisation disabled Complete xm dmesg attached xen_changeset : Mon Nov 22 19:16:34 2010 +0000 22418:c0c1f5f0745e -- Sander Thursday, November 18, 2010, 5:55:30 PM, you wrote:> The BASE_VALID() macro needs adjustment to match the other changes > done to the original Linux code (which are all queued to be merged > into Linus'' tree), plus per Hypertransport specification the range > 0xff00000000-0xffffffffff also needs to be excluded.> Signed-off-by: Jan Beulich <jbeulich@novell.com>> --- a/xen/arch/x86/x86_64/mmconf-fam10h.c > +++ b/xen/arch/x86/x86_64/mmconf-fam10h.c > @@ -33,7 +33,7 @@ static struct pci_hostbridge_probe pci_p > #define SIZE (UNIT << 8) > /* need to avoid (0xfd<<32) and (0xfe<<32), ht used space */ > #define FAM10H_PCI_MMCONF_BASE (0xfcULL<<32) > -#define BASE_VALID(b) ((b != (0xfdULL << 32)) && (b != (0xfeULL << 32))) > +#define BASE_VALID(b) ((b) + SIZE <= (0xfdULL<<32) || (b) >= (1ULL<<40)) > static void __init get_fam10h_pci_mmconf_base(void) > { > unsigned int i, j, bus, slot, hi_mmio_num;-- Best regards, Sander mailto:linux@eikelenboom.it _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2010-Nov-24 08:30 UTC
Re: [Xen-devel] [PATCH] x86-64: one more adjustment for Fam10 MMCONF enabling
>>> On 23.11.10 at 22:37, Sander Eikelenboom <linux@eikelenboom.it> wrote: > Is there anything i have to configure for the "Fam10 MMCONF" to be enabled ? > From what i see from my "xm dmesg" it''s not enabled, although it''s a family > 10h cpu (phenom x6) > > (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) > (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level) > (XEN) ACPI: IRQ0 used by override. > (XEN) ACPI: IRQ2 used by override. > (XEN) ACPI: IRQ9 used by override. > (XEN) Enabling APIC mode: Flat. Using 2 I/O APICs > (XEN) ACPI: HPET id: 0x8300 base: 0xfed00000 > (XEN) PCI: MCFG configuration 0: base e0000000 segment 0 buses 0 - 255 > (XEN) PCI: Not using MMCONFIG.Your BIOS apparently sets up MCFG (including a valid ACPI table) but fails to reserve the range in the E820 table, which is taken as a strong indication to not use it. For Linux, it''s being debated whether the command line override ("mmcfg=amd-fam10" in the Xen case) should force a reserved region into the E820 table (so that the later check succeeds). I''m intending to submit a corresponding Xen patch if on the Linux side the decision is taken to do so (albeit I''m not fully convinced that this is the right thing to do, I agree to the point being made that this would normally only be done when the command line option was explicitly given - the exception being a DMI white listed set of systems). There''s no other workaround I know of, since Xen (other than Linux) doesn''t have a mechanism to force an E820 reserved region from the command line. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Sander Eikelenboom
2010-Nov-24 08:49 UTC
Re: [Xen-devel] [PATCH] x86-64: one more adjustment for Fam10 MMCONF enabling
Thanks for the info !, it''s quite unfortunate most things eventually end at the bios. -- Sander Wednesday, November 24, 2010, 9:30:51 AM, you wrote:>>>> On 23.11.10 at 22:37, Sander Eikelenboom <linux@eikelenboom.it> wrote: >> Is there anything i have to configure for the "Fam10 MMCONF" to be enabled ? >> From what i see from my "xm dmesg" it''s not enabled, although it''s a family >> 10h cpu (phenom x6) >> >> (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) >> (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level) >> (XEN) ACPI: IRQ0 used by override. >> (XEN) ACPI: IRQ2 used by override. >> (XEN) ACPI: IRQ9 used by override. >> (XEN) Enabling APIC mode: Flat. Using 2 I/O APICs >> (XEN) ACPI: HPET id: 0x8300 base: 0xfed00000 >> (XEN) PCI: MCFG configuration 0: base e0000000 segment 0 buses 0 - 255 >> (XEN) PCI: Not using MMCONFIG.> Your BIOS apparently sets up MCFG (including a valid ACPI table) > but fails to reserve the range in the E820 table, which is taken as > a strong indication to not use it. For Linux, it''s being debated > whether the command line override ("mmcfg=amd-fam10" in the > Xen case) should force a reserved region into the E820 table (so > that the later check succeeds). I''m intending to submit a > corresponding Xen patch if on the Linux side the decision is > taken to do so (albeit I''m not fully convinced that this is the > right thing to do, I agree to the point being made that this > would normally only be done when the command line option > was explicitly given - the exception being a DMI white listed set > of systems).> There''s no other workaround I know of, since Xen (other than > Linux) doesn''t have a mechanism to force an E820 reserved > region from the command line.> Jan-- Best regards, Sander mailto:linux@eikelenboom.it _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel