qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] ACPI error when mapping a 2GB BAR w/ 4GB of RAM
@ 2010-09-17 20:00 Cam Macdonell
  2010-09-17 20:04 ` [Qemu-devel] " Chris Wright
  2010-09-19 17:15 ` [Qemu-devel] " Avi Kivity
  0 siblings, 2 replies; 9+ messages in thread
From: Cam Macdonell @ 2010-09-17 20:00 UTC (permalink / raw)
  To: qemu-devel@nongnu.org Developers, linux-kernel, Chris Wright

After fixing the resource_size_t return value with
pci_resource_alignment, I see one other strange behaviour only when
using 4GB of RAM and a 2GB BAR.  I haven't found any other combination
of RAM/BAR size that triggers this bug.  I am using 2.6.36-rc3.

ACPI Error: The DSDT has been corrupted or replaced - old, new headers
below (20100702/tbutils-372)
ACPI: DSDT (null) 01F15 (v01   BXPC   BXDSDT 00000001 INTL 20090123)
ACPI:      (null) 00000 (v00                 00000000      00000000)
ACPI Error: Please send DMI info to linux-acpi@vger.kernel.org
If system does not work as expected, please boot with acpi=copy_dsdt
(20100702/tbutils-378)
ACPI: PCI Interrupt Link [LNKC] disabled and referenced, BIOS bug
ACPI Exception: AE_AML_INVALID_RESOURCE_TYPE, Evaluating _CRS
(20100702/pci_link-283)
ACPI: Unable to set IRQ for PCI Interrupt Link [LNKC]. Try pci=noacpi
or acpi=off
virtio-pci 0000:00:03.0: PCI INT A: no GSI - using ISA IRQ 11
Non-volatile memory driver v1.3
Linux agpgart interface v0.103
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled

with acpi=off, the ACPI error output goes away, but the boot does not
get any further.

here are the PCI writes from Qemu related to this BAR's assignment in
case they are helpful,

pci_write_config: (val) 0x80000004 -> 0x18 (addr)
IVSHMEM: guest pci addr = 80000000, guest h/w addr = 4312137728, size = 80000000
pci_read_config: (val) 0x80000004 <- 0x18 (addr)
pci_write_config: (val) 0x1 -> 0x1c (addr)
IVSHMEM: guest pci addr = 180000000, guest h/w addr = 4312137728, size
= 80000000
pci_read_config: (val) 0x1 <- 0x1c (addr)

Any pointers are appreciated,
Cam

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] Re: ACPI error when mapping a 2GB BAR w/ 4GB of RAM
  2010-09-17 20:00 [Qemu-devel] ACPI error when mapping a 2GB BAR w/ 4GB of RAM Cam Macdonell
@ 2010-09-17 20:04 ` Chris Wright
  2010-09-17 20:52   ` Cam Macdonell
  2010-09-19 17:15 ` [Qemu-devel] " Avi Kivity
  1 sibling, 1 reply; 9+ messages in thread
From: Chris Wright @ 2010-09-17 20:04 UTC (permalink / raw)
  To: Cam Macdonell
  Cc: Chris Wright, qemu-devel@nongnu.org Developers, linux-kernel

* Cam Macdonell (cam@cs.ualberta.ca) wrote:
> After fixing the resource_size_t return value with
> pci_resource_alignment, I see one other strange behaviour only when
> using 4GB of RAM and a 2GB BAR.  I haven't found any other combination
> of RAM/BAR size that triggers this bug.  I am using 2.6.36-rc3.
> 
> ACPI Error: The DSDT has been corrupted or replaced - old, new headers
> below (20100702/tbutils-372)
> ACPI: DSDT (null) 01F15 (v01   BXPC   BXDSDT 00000001 INTL 20090123)
> ACPI:      (null) 00000 (v00                 00000000      00000000)
> ACPI Error: Please send DMI info to linux-acpi@vger.kernel.org
> If system does not work as expected, please boot with acpi=copy_dsdt
> (20100702/tbutils-378)
> ACPI: PCI Interrupt Link [LNKC] disabled and referenced, BIOS bug
> ACPI Exception: AE_AML_INVALID_RESOURCE_TYPE, Evaluating _CRS
> (20100702/pci_link-283)
> ACPI: Unable to set IRQ for PCI Interrupt Link [LNKC]. Try pci=noacpi
> or acpi=off
> virtio-pci 0000:00:03.0: PCI INT A: no GSI - using ISA IRQ 11
> Non-volatile memory driver v1.3
> Linux agpgart interface v0.103
> Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled

IIRC,  the pci hole is only 1.5G in the BIOS, can you verify that
seabios is doing the right thing?

thanks,
-chris

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Re: ACPI error when mapping a 2GB BAR w/ 4GB of RAM
  2010-09-17 20:04 ` [Qemu-devel] " Chris Wright
@ 2010-09-17 20:52   ` Cam Macdonell
  2010-09-17 20:53     ` Cam Macdonell
  0 siblings, 1 reply; 9+ messages in thread
From: Cam Macdonell @ 2010-09-17 20:52 UTC (permalink / raw)
  To: Chris Wright; +Cc: qemu-devel@nongnu.org Developers, linux-kernel

On Fri, Sep 17, 2010 at 2:04 PM, Chris Wright <chrisw@redhat.com> wrote:
> * Cam Macdonell (cam@cs.ualberta.ca) wrote:
>> After fixing the resource_size_t return value with
>> pci_resource_alignment, I see one other strange behaviour only when
>> using 4GB of RAM and a 2GB BAR.  I haven't found any other combination
>> of RAM/BAR size that triggers this bug.  I am using 2.6.36-rc3.
>>
>> ACPI Error: The DSDT has been corrupted or replaced - old, new headers
>> below (20100702/tbutils-372)
>> ACPI: DSDT (null) 01F15 (v01   BXPC   BXDSDT 00000001 INTL 20090123)
>> ACPI:      (null) 00000 (v00                 00000000      00000000)
>> ACPI Error: Please send DMI info to linux-acpi@vger.kernel.org
>> If system does not work as expected, please boot with acpi=copy_dsdt
>> (20100702/tbutils-378)
>> ACPI: PCI Interrupt Link [LNKC] disabled and referenced, BIOS bug
>> ACPI Exception: AE_AML_INVALID_RESOURCE_TYPE, Evaluating _CRS
>> (20100702/pci_link-283)
>> ACPI: Unable to set IRQ for PCI Interrupt Link [LNKC]. Try pci=noacpi
>> or acpi=off
>> virtio-pci 0000:00:03.0: PCI INT A: no GSI - using ISA IRQ 11
>> Non-volatile memory driver v1.3
>> Linux agpgart interface v0.103
>> Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
>
> IIRC,  the pci hole is only 1.5G in the BIOS, can you verify that
> seabios is doing the right thing?

I'm not sure what the right thing for seabios to do is.  Here is the
seabios output related to the device.

PCI: bus=0 devfn=0x20: vendor_id=0x1af4 device_id=0x1110
region 0: 0xf2040000
init smm
init boot device ordering

<snip>

Attempting to init PCI bdf 00:04.0 (vd 1af4:1110)
Attempting to map option rom on dev 00:04.0
Option rom sizing returned 0 0
Checking rom 0x000c9800 (sig aa55 size 17)
Checking rom 0x000cc000 (sig aa55 size 2)
Checking rom 0x000c9000 (sig aa55 size 4)
Checking rom 0x000c9800 (sig aa55 size 17)
Checking rom 0x000cc000 (sig aa55 size 2)
Mapping hd drive 0x000fdb50 to 0
Running option rom at c980:0003
Running option rom at cc00:0003
pmm_malloc zone=0x000f515c handle=ffffffff size=36 align=10
ret=0x000fdaf0 (detail=0x7ffefca0)
ebda moved from 9fc00 to 9f400
pmm_malloc zone=0x000f5154 handle=ffffffff size=2048 align=10
ret=0x0009f800 (detail=0x7ffefb40)
finalize PMM
malloc finalize

when using a BAR of 2GB or less, there is an additional write to the
PCI space of the device, which may be from the bios

pci_write_config: (val) 0xffffffff -> 0x18 (addr)
pci_read_config: (val) 0x80000004 <- 0x18 (addr)
pci_write_config: (val) 0x4 -> 0x18 (addr)
pci_write_config: (val) 0x3 -> 0x4 (addr)
pci_read_config: (val) 0x0 <- 0x1c (addr)
pci_write_config: (val) 0xffffffff -> 0x1c (addr)
IVSHMEM: guest pci addr = ffffffff00000000, guest h/w addr =
4312137728, size = 80000000

so is it succeeding with smaller sizes (> 2GB) because it fits in the
bios' pci hole?

Cam

>
> thanks,
> -chris
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Re: ACPI error when mapping a 2GB BAR w/ 4GB of RAM
  2010-09-17 20:52   ` Cam Macdonell
@ 2010-09-17 20:53     ` Cam Macdonell
  2010-09-17 21:15       ` Chris Wright
  0 siblings, 1 reply; 9+ messages in thread
From: Cam Macdonell @ 2010-09-17 20:53 UTC (permalink / raw)
  To: Chris Wright; +Cc: qemu-devel@nongnu.org Developers, linux-kernel

On Fri, Sep 17, 2010 at 2:52 PM, Cam Macdonell <cam@cs.ualberta.ca> wrote:
> On Fri, Sep 17, 2010 at 2:04 PM, Chris Wright <chrisw@redhat.com> wrote:
>> * Cam Macdonell (cam@cs.ualberta.ca) wrote:
>>> After fixing the resource_size_t return value with
>>> pci_resource_alignment, I see one other strange behaviour only when
>>> using 4GB of RAM and a 2GB BAR.  I haven't found any other combination
>>> of RAM/BAR size that triggers this bug.  I am using 2.6.36-rc3.
>>>
>>> ACPI Error: The DSDT has been corrupted or replaced - old, new headers
>>> below (20100702/tbutils-372)
>>> ACPI: DSDT (null) 01F15 (v01   BXPC   BXDSDT 00000001 INTL 20090123)
>>> ACPI:      (null) 00000 (v00                 00000000      00000000)
>>> ACPI Error: Please send DMI info to linux-acpi@vger.kernel.org
>>> If system does not work as expected, please boot with acpi=copy_dsdt
>>> (20100702/tbutils-378)
>>> ACPI: PCI Interrupt Link [LNKC] disabled and referenced, BIOS bug
>>> ACPI Exception: AE_AML_INVALID_RESOURCE_TYPE, Evaluating _CRS
>>> (20100702/pci_link-283)
>>> ACPI: Unable to set IRQ for PCI Interrupt Link [LNKC]. Try pci=noacpi
>>> or acpi=off
>>> virtio-pci 0000:00:03.0: PCI INT A: no GSI - using ISA IRQ 11
>>> Non-volatile memory driver v1.3
>>> Linux agpgart interface v0.103
>>> Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
>>
>> IIRC,  the pci hole is only 1.5G in the BIOS, can you verify that
>> seabios is doing the right thing?
>
> I'm not sure what the right thing for seabios to do is.  Here is the
> seabios output related to the device.
>
> PCI: bus=0 devfn=0x20: vendor_id=0x1af4 device_id=0x1110
> region 0: 0xf2040000
> init smm
> init boot device ordering
>
> <snip>
>
> Attempting to init PCI bdf 00:04.0 (vd 1af4:1110)
> Attempting to map option rom on dev 00:04.0
> Option rom sizing returned 0 0
> Checking rom 0x000c9800 (sig aa55 size 17)
> Checking rom 0x000cc000 (sig aa55 size 2)
> Checking rom 0x000c9000 (sig aa55 size 4)
> Checking rom 0x000c9800 (sig aa55 size 17)
> Checking rom 0x000cc000 (sig aa55 size 2)
> Mapping hd drive 0x000fdb50 to 0
> Running option rom at c980:0003
> Running option rom at cc00:0003
> pmm_malloc zone=0x000f515c handle=ffffffff size=36 align=10
> ret=0x000fdaf0 (detail=0x7ffefca0)
> ebda moved from 9fc00 to 9f400
> pmm_malloc zone=0x000f5154 handle=ffffffff size=2048 align=10
> ret=0x0009f800 (detail=0x7ffefb40)
> finalize PMM
> malloc finalize
>
> when using a BAR of 2GB or less, there is an additional write to the
> PCI space of the device, which may be from the bios
>
> pci_write_config: (val) 0xffffffff -> 0x18 (addr)
> pci_read_config: (val) 0x80000004 <- 0x18 (addr)
> pci_write_config: (val) 0x4 -> 0x18 (addr)
> pci_write_config: (val) 0x3 -> 0x4 (addr)
> pci_read_config: (val) 0x0 <- 0x1c (addr)
> pci_write_config: (val) 0xffffffff -> 0x1c (addr)
> IVSHMEM: guest pci addr = ffffffff00000000, guest h/w addr =
> 4312137728, size = 80000000
>
> so is it succeeding with smaller sizes (> 2GB) because it fits in the
> bios' pci hole?

sorry that should be "< 2GB".

>
> Cam
>
>>
>> thanks,
>> -chris
>>
>>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Re: ACPI error when mapping a 2GB BAR w/ 4GB of RAM
  2010-09-17 20:53     ` Cam Macdonell
@ 2010-09-17 21:15       ` Chris Wright
  2010-09-17 21:45         ` Cam Macdonell
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Wright @ 2010-09-17 21:15 UTC (permalink / raw)
  To: Cam Macdonell
  Cc: Chris Wright, qemu-devel@nongnu.org Developers, linux-kernel

* Cam Macdonell (cam@cs.ualberta.ca) wrote:
> On Fri, Sep 17, 2010 at 2:52 PM, Cam Macdonell <cam@cs.ualberta.ca> wrote:
> > On Fri, Sep 17, 2010 at 2:04 PM, Chris Wright <chrisw@redhat.com> wrote:
> >> * Cam Macdonell (cam@cs.ualberta.ca) wrote:
> >>> After fixing the resource_size_t return value with
> >>> pci_resource_alignment, I see one other strange behaviour only when
> >>> using 4GB of RAM and a 2GB BAR.  I haven't found any other combination
> >>> of RAM/BAR size that triggers this bug.  I am using 2.6.36-rc3.
> >>>
> >>> ACPI Error: The DSDT has been corrupted or replaced - old, new headers
> >>> below (20100702/tbutils-372)
> >>> ACPI: DSDT (null) 01F15 (v01   BXPC   BXDSDT 00000001 INTL 20090123)
> >>> ACPI:      (null) 00000 (v00                 00000000      00000000)
> >>> ACPI Error: Please send DMI info to linux-acpi@vger.kernel.org
> >>> If system does not work as expected, please boot with acpi=copy_dsdt
> >>> (20100702/tbutils-378)
> >>> ACPI: PCI Interrupt Link [LNKC] disabled and referenced, BIOS bug
> >>> ACPI Exception: AE_AML_INVALID_RESOURCE_TYPE, Evaluating _CRS
> >>> (20100702/pci_link-283)
> >>> ACPI: Unable to set IRQ for PCI Interrupt Link [LNKC]. Try pci=noacpi
> >>> or acpi=off
> >>> virtio-pci 0000:00:03.0: PCI INT A: no GSI - using ISA IRQ 11
> >>> Non-volatile memory driver v1.3
> >>> Linux agpgart interface v0.103
> >>> Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
> >>
> >> IIRC,  the pci hole is only 1.5G in the BIOS, can you verify that
> >> seabios is doing the right thing?
> >
> > I'm not sure what the right thing for seabios to do is.  Here is the
> > seabios output related to the device.
> >
> > PCI: bus=0 devfn=0x20: vendor_id=0x1af4 device_id=0x1110
> > region 0: 0xf2040000
> > init smm
> > init boot device ordering
> >
> > <snip>
> >
> > Attempting to init PCI bdf 00:04.0 (vd 1af4:1110)
> > Attempting to map option rom on dev 00:04.0
> > Option rom sizing returned 0 0
> > Checking rom 0x000c9800 (sig aa55 size 17)
> > Checking rom 0x000cc000 (sig aa55 size 2)
> > Checking rom 0x000c9000 (sig aa55 size 4)
> > Checking rom 0x000c9800 (sig aa55 size 17)
> > Checking rom 0x000cc000 (sig aa55 size 2)
> > Mapping hd drive 0x000fdb50 to 0
> > Running option rom at c980:0003
> > Running option rom at cc00:0003
> > pmm_malloc zone=0x000f515c handle=ffffffff size=36 align=10
> > ret=0x000fdaf0 (detail=0x7ffefca0)
> > ebda moved from 9fc00 to 9f400
> > pmm_malloc zone=0x000f5154 handle=ffffffff size=2048 align=10
> > ret=0x0009f800 (detail=0x7ffefb40)
> > finalize PMM
> > malloc finalize
> >
> > when using a BAR of 2GB or less, there is an additional write to the
> > PCI space of the device, which may be from the bios
> >
> > pci_write_config: (val) 0xffffffff -> 0x18 (addr)
> > pci_read_config: (val) 0x80000004 <- 0x18 (addr)
> > pci_write_config: (val) 0x4 -> 0x18 (addr)
> > pci_write_config: (val) 0x3 -> 0x4 (addr)
> > pci_read_config: (val) 0x0 <- 0x1c (addr)
> > pci_write_config: (val) 0xffffffff -> 0x1c (addr)
> > IVSHMEM: guest pci addr = ffffffff00000000, guest h/w addr =
> > 4312137728, size = 80000000
> >
> > so is it succeeding with smaller sizes (> 2GB) because it fits in the
> > bios' pci hole?
> 
> sorry that should be "< 2GB".

It seems most likely...< 2GB also means <= 1GB (which would fit in
the hole).  Although, I have to admit, I'm not sure how seabios handles
the hole nowadays.

What about 2GB with 32bit BAR?

thanks,
-chris

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Re: ACPI error when mapping a 2GB BAR w/ 4GB of RAM
  2010-09-17 21:15       ` Chris Wright
@ 2010-09-17 21:45         ` Cam Macdonell
  2010-09-19 17:08           ` Avi Kivity
  0 siblings, 1 reply; 9+ messages in thread
From: Cam Macdonell @ 2010-09-17 21:45 UTC (permalink / raw)
  To: Chris Wright; +Cc: qemu-devel@nongnu.org Developers, linux-kernel

On Fri, Sep 17, 2010 at 3:15 PM, Chris Wright <chrisw@redhat.com> wrote:
> * Cam Macdonell (cam@cs.ualberta.ca) wrote:
>> On Fri, Sep 17, 2010 at 2:52 PM, Cam Macdonell <cam@cs.ualberta.ca> wrote:
>> > On Fri, Sep 17, 2010 at 2:04 PM, Chris Wright <chrisw@redhat.com> wrote:
>> >> * Cam Macdonell (cam@cs.ualberta.ca) wrote:
>> >>> After fixing the resource_size_t return value with
>> >>> pci_resource_alignment, I see one other strange behaviour only when
>> >>> using 4GB of RAM and a 2GB BAR.  I haven't found any other combination
>> >>> of RAM/BAR size that triggers this bug.  I am using 2.6.36-rc3.
>> >>>
>> >>> ACPI Error: The DSDT has been corrupted or replaced - old, new headers
>> >>> below (20100702/tbutils-372)
>> >>> ACPI: DSDT (null) 01F15 (v01   BXPC   BXDSDT 00000001 INTL 20090123)
>> >>> ACPI:      (null) 00000 (v00                 00000000      00000000)
>> >>> ACPI Error: Please send DMI info to linux-acpi@vger.kernel.org
>> >>> If system does not work as expected, please boot with acpi=copy_dsdt
>> >>> (20100702/tbutils-378)
>> >>> ACPI: PCI Interrupt Link [LNKC] disabled and referenced, BIOS bug
>> >>> ACPI Exception: AE_AML_INVALID_RESOURCE_TYPE, Evaluating _CRS
>> >>> (20100702/pci_link-283)
>> >>> ACPI: Unable to set IRQ for PCI Interrupt Link [LNKC]. Try pci=noacpi
>> >>> or acpi=off
>> >>> virtio-pci 0000:00:03.0: PCI INT A: no GSI - using ISA IRQ 11
>> >>> Non-volatile memory driver v1.3
>> >>> Linux agpgart interface v0.103
>> >>> Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
>> >>
>> >> IIRC,  the pci hole is only 1.5G in the BIOS, can you verify that
>> >> seabios is doing the right thing?
>> >
>> > I'm not sure what the right thing for seabios to do is.  Here is the
>> > seabios output related to the device.
>> >
>> > PCI: bus=0 devfn=0x20: vendor_id=0x1af4 device_id=0x1110
>> > region 0: 0xf2040000
>> > init smm
>> > init boot device ordering
>> >
>> > <snip>
>> >
>> > Attempting to init PCI bdf 00:04.0 (vd 1af4:1110)
>> > Attempting to map option rom on dev 00:04.0
>> > Option rom sizing returned 0 0
>> > Checking rom 0x000c9800 (sig aa55 size 17)
>> > Checking rom 0x000cc000 (sig aa55 size 2)
>> > Checking rom 0x000c9000 (sig aa55 size 4)
>> > Checking rom 0x000c9800 (sig aa55 size 17)
>> > Checking rom 0x000cc000 (sig aa55 size 2)
>> > Mapping hd drive 0x000fdb50 to 0
>> > Running option rom at c980:0003
>> > Running option rom at cc00:0003
>> > pmm_malloc zone=0x000f515c handle=ffffffff size=36 align=10
>> > ret=0x000fdaf0 (detail=0x7ffefca0)
>> > ebda moved from 9fc00 to 9f400
>> > pmm_malloc zone=0x000f5154 handle=ffffffff size=2048 align=10
>> > ret=0x0009f800 (detail=0x7ffefb40)
>> > finalize PMM
>> > malloc finalize
>> >
>> > when using a BAR of 2GB or less, there is an additional write to the
>> > PCI space of the device, which may be from the bios
>> >
>> > pci_write_config: (val) 0xffffffff -> 0x18 (addr)
>> > pci_read_config: (val) 0x80000004 <- 0x18 (addr)
>> > pci_write_config: (val) 0x4 -> 0x18 (addr)
>> > pci_write_config: (val) 0x3 -> 0x4 (addr)
>> > pci_read_config: (val) 0x0 <- 0x1c (addr)
>> > pci_write_config: (val) 0xffffffff -> 0x1c (addr)
>> > IVSHMEM: guest pci addr = ffffffff00000000, guest h/w addr =
>> > 4312137728, size = 80000000
>> >
>> > so is it succeeding with smaller sizes (> 2GB) because it fits in the
>> > bios' pci hole?
>>
>> sorry that should be "< 2GB".
>
> It seems most likely...< 2GB also means <= 1GB (which would fit in
> the hole).  Although, I have to admit, I'm not sure how seabios handles
> the hole nowadays.
>
> What about 2GB with 32bit BAR?

The bios seems to ignore it and the guest can't map it as it cannot
find an alignment for it.  Seems strange since with 1GB of RAM and 2GB
BAR, everything should map below 4GB.

>
> thanks,
> -chris
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Re: ACPI error when mapping a 2GB BAR w/ 4GB of RAM
  2010-09-17 21:45         ` Cam Macdonell
@ 2010-09-19 17:08           ` Avi Kivity
  0 siblings, 0 replies; 9+ messages in thread
From: Avi Kivity @ 2010-09-19 17:08 UTC (permalink / raw)
  To: Cam Macdonell
  Cc: Chris Wright, qemu-devel@nongnu.org Developers, linux-kernel

  On 09/17/2010 11:45 PM, Cam Macdonell wrote:
> >  It seems most likely...<  2GB also means<= 1GB (which would fit in
> >  the hole).  Although, I have to admit, I'm not sure how seabios handles
> >  the hole nowadays.
> >
> >  What about 2GB with 32bit BAR?
>
> The bios seems to ignore it and the guest can't map it as it cannot
> find an alignment for it.  Seems strange since with 1GB of RAM and 2GB
> BAR, everything should map below 4GB.
>

There are only two possible locations, 0-2GB and 2-4GB.  The first 
clashes with RAM, the second clashes with the bios and fixed-function 
devices.

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] ACPI error when mapping a 2GB BAR w/ 4GB of RAM
  2010-09-17 20:00 [Qemu-devel] ACPI error when mapping a 2GB BAR w/ 4GB of RAM Cam Macdonell
  2010-09-17 20:04 ` [Qemu-devel] " Chris Wright
@ 2010-09-19 17:15 ` Avi Kivity
  2010-09-22  1:19   ` Robert Hancock
  1 sibling, 1 reply; 9+ messages in thread
From: Avi Kivity @ 2010-09-19 17:15 UTC (permalink / raw)
  To: Cam Macdonell
  Cc: Chris Wright, qemu-devel@nongnu.org Developers, linux-kernel

  On 09/17/2010 10:00 PM, Cam Macdonell wrote:
> After fixing the resource_size_t return value with
> pci_resource_alignment, I see one other strange behaviour only when
> using 4GB of RAM and a 2GB BAR.  I haven't found any other combination
> of RAM/BAR size that triggers this bug.  I am using 2.6.36-rc3.
>
> ACPI Error: The DSDT has been corrupted or replaced - old, new headers
> below (20100702/tbutils-372)
> ACPI: DSDT (null) 01F15 (v01   BXPC   BXDSDT 00000001 INTL 20090123)
> ACPI:      (null) 00000 (v00                 00000000      00000000)
> ACPI Error: Please send DMI info to linux-acpi@vger.kernel.org
> If system does not work as expected, please boot with acpi=copy_dsdt
> (20100702/tbutils-378)
> ACPI: PCI Interrupt Link [LNKC] disabled and referenced, BIOS bug
> ACPI Exception: AE_AML_INVALID_RESOURCE_TYPE, Evaluating _CRS
> (20100702/pci_link-283)
> ACPI: Unable to set IRQ for PCI Interrupt Link [LNKC]. Try pci=noacpi
> or acpi=off
> virtio-pci 0000:00:03.0: PCI INT A: no GSI - using ISA IRQ 11
> Non-volatile memory driver v1.3
> Linux agpgart interface v0.103
> Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
>
> with acpi=off, the ACPI error output goes away, but the boot does not
> get any further.
>
> here are the PCI writes from Qemu related to this BAR's assignment in
> case they are helpful,
>
> pci_write_config: (val) 0x80000004 ->  0x18 (addr)
> IVSHMEM: guest pci addr = 80000000, guest h/w addr = 4312137728, size = 80000000
> pci_read_config: (val) 0x80000004<- 0x18 (addr)
> pci_write_config: (val) 0x1 ->  0x1c (addr)
> IVSHMEM: guest pci addr = 180000000, guest h/w addr = 4312137728, size
> = 80000000
> pci_read_config: (val) 0x1<- 0x1c (addr)
>
> Any pointers are appreciated,
>

Looks like the BAR was temporarily mapped @ 2GB which screwed up memory.

Try changing the write order to first write the top half of the BAR, 
then the lower half.

Strange that there is no enable bit in the BAR, so you can't move it 
atomically?  Maybe we need to clear PCI_CMD_MEMORY, play with the BAR, 
and reenable PCI_CMD_MEMORY.

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] ACPI error when mapping a 2GB BAR w/ 4GB of RAM
  2010-09-19 17:15 ` [Qemu-devel] " Avi Kivity
@ 2010-09-22  1:19   ` Robert Hancock
  0 siblings, 0 replies; 9+ messages in thread
From: Robert Hancock @ 2010-09-22  1:19 UTC (permalink / raw)
  To: Avi Kivity
  Cc: Chris Wright, Cam Macdonell, qemu-devel@nongnu.org Developers,
	linux-kernel

On 09/19/2010 11:15 AM, Avi Kivity wrote:
> On 09/17/2010 10:00 PM, Cam Macdonell wrote:
>> After fixing the resource_size_t return value with
>> pci_resource_alignment, I see one other strange behaviour only when
>> using 4GB of RAM and a 2GB BAR. I haven't found any other combination
>> of RAM/BAR size that triggers this bug. I am using 2.6.36-rc3.
>>
>> ACPI Error: The DSDT has been corrupted or replaced - old, new headers
>> below (20100702/tbutils-372)
>> ACPI: DSDT (null) 01F15 (v01 BXPC BXDSDT 00000001 INTL 20090123)
>> ACPI: (null) 00000 (v00 00000000 00000000)
>> ACPI Error: Please send DMI info to linux-acpi@vger.kernel.org
>> If system does not work as expected, please boot with acpi=copy_dsdt
>> (20100702/tbutils-378)
>> ACPI: PCI Interrupt Link [LNKC] disabled and referenced, BIOS bug
>> ACPI Exception: AE_AML_INVALID_RESOURCE_TYPE, Evaluating _CRS
>> (20100702/pci_link-283)
>> ACPI: Unable to set IRQ for PCI Interrupt Link [LNKC]. Try pci=noacpi
>> or acpi=off
>> virtio-pci 0000:00:03.0: PCI INT A: no GSI - using ISA IRQ 11
>> Non-volatile memory driver v1.3
>> Linux agpgart interface v0.103
>> Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
>>
>> with acpi=off, the ACPI error output goes away, but the boot does not
>> get any further.
>>
>> here are the PCI writes from Qemu related to this BAR's assignment in
>> case they are helpful,
>>
>> pci_write_config: (val) 0x80000004 -> 0x18 (addr)
>> IVSHMEM: guest pci addr = 80000000, guest h/w addr = 4312137728, size
>> = 80000000
>> pci_read_config: (val) 0x80000004<- 0x18 (addr)
>> pci_write_config: (val) 0x1 -> 0x1c (addr)
>> IVSHMEM: guest pci addr = 180000000, guest h/w addr = 4312137728, size
>> = 80000000
>> pci_read_config: (val) 0x1<- 0x1c (addr)
>>
>> Any pointers are appreciated,
>>
>
> Looks like the BAR was temporarily mapped @ 2GB which screwed up memory.
>
> Try changing the write order to first write the top half of the BAR,
> then the lower half.
>
> Strange that there is no enable bit in the BAR, so you can't move it
> atomically? Maybe we need to clear PCI_CMD_MEMORY, play with the BAR,
> and reenable PCI_CMD_MEMORY.

I and others have suggested on several occasions that we should be 
disabling memory decode during BAR sizing (this previously bit us when 
the BAR was moved over top of the MMCONFIG aperture causing it to 
swallow up PCI config accesses), but it's ended up being NAKed by Linus 
and others as being too dangerous (apparently some host bridges and such 
do stupid things like disable RAM access if you do that to them).

I expect you should be able to do this with a 64-bit BAR, perhaps with 
ordering changes, but with a 32-bit there's just not enough address 
space for it to be likely to fit.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-09-22  1:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-17 20:00 [Qemu-devel] ACPI error when mapping a 2GB BAR w/ 4GB of RAM Cam Macdonell
2010-09-17 20:04 ` [Qemu-devel] " Chris Wright
2010-09-17 20:52   ` Cam Macdonell
2010-09-17 20:53     ` Cam Macdonell
2010-09-17 21:15       ` Chris Wright
2010-09-17 21:45         ` Cam Macdonell
2010-09-19 17:08           ` Avi Kivity
2010-09-19 17:15 ` [Qemu-devel] " Avi Kivity
2010-09-22  1:19   ` Robert Hancock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).