Default arm virt machine broken

Bug #1790975 reported by Jonathan Marler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Invalid
Undecided
Unassigned

Bug Description

This occurs on qemu_v3.0.0 but not on qemu_v2.12.2 (built from qemu_v3.0.0 tag on github)

Symptom: You'll see something like this in the kernel output:

[ 1.285210] OF: PCI: host bridge /pcie@10000000 ranges:
[ 1.286246] OF: PCI: IO 0x3eff0000..0x3effffff -> 0x00000000
[ 1.287061] OF: PCI: MEM 0x10000000..0x3efeffff -> 0x10000000
[ 1.287820] OF: PCI: MEM 0x8000000000..0xffffffffff -> 0x8000000000
[ 1.289312] pci-host-generic 4010000000.pcie: can't claim ECAM area [mem 0x10000000-0x1fffffff]: address conflict with /pcie@10000000 [mem 0x10000000-0x3efeffff]
[ 1.290984] pci-host-generic: probe of 4010000000.pcie failed with error -16

Qemu Command Line: qemu-system-arm -machine virt -m 1024M -kernel zImage -serial stdio

I can post my zImage if anyone has problems reproducing with their own zImage.

Note that this problem breaks pci making the machine unusable.

Revision history for this message
Jonathan Marler (marler8997) wrote :

Oh, I forgot, I should have also posted the relevant DTS contents:

 pcie@10000000 {
  interrupt-map-mask = <0x1800 0x0 0x0 0x7>;
  interrupt-map = <0x0 0x0 0x0 0x1 0x8001 0x0 0x0 0x0 0x3 0x4 0x0 0x0 0x0 0x2 0x8001 0x0 0x0 0x0 0x4 0x4 0x0 0x0 0x0 0x3 0x8001 0x0 0x0 0x0 0x5 0x4 0x0 0x0 0x0 0x4 0x8001 0x0 0x0 0x0 0x6 0x4 0x800 0x0 0x0 0x1 0x8001 0x0 0x0 0x0 0x4 0x4 0x800 0x0 0x0 0x2 0x8001 0x0 0x0 0x0 0x5 0x4 0x800 0x0 0x0 0x3 0x8001 0x0 0x0 0x0 0x6 0x4 0x800 0x0 0x0 0x4 0x8001 0x0 0x0 0x0 0x3 0x4 0x1000 0x0 0x0 0x1 0x8001 0x0 0x0 0x0 0x5 0x4 0x1000 0x0 0x0 0x2 0x8001 0x0 0x0 0x0 0x6 0x4 0x1000 0x0 0x0 0x3 0x8001 0x0 0x0 0x0 0x3 0x4 0x1000 0x0 0x0 0x4 0x8001 0x0 0x0 0x0 0x4 0x4 0x1800 0x0 0x0 0x1 0x8001 0x0 0x0 0x0 0x6 0x4 0x1800 0x0 0x0 0x2 0x8001 0x0 0x0 0x0 0x3 0x4 0x1800 0x0 0x0 0x3 0x8001 0x0 0x0 0x0 0x4 0x4 0x1800 0x0 0x0 0x4 0x8001 0x0 0x0 0x0 0x5 0x4>;
  #interrupt-cells = <0x1>;
  ranges = <0x1000000 0x0 0x0 0x0 0x3eff0000 0x0 0x10000 0x2000000 0x0 0x10000000 0x0 0x10000000 0x0 0x2eff0000 0x3000000 0x80 0x0 0x80 0x0 0x80 0x0>;
  reg = <0x40 0x10000000 0x0 0x10000000>;
  msi-parent = <0x8002>;
  dma-coherent;
  bus-range = <0x0 0xff>;
  linux,pci-domain = <0x0>;
  #size-cells = <0x2>;
  #address-cells = <0x3>;
  device_type = "pci";
  compatible = "pci-host-ecam-generic";
 };

Revision history for this message
Jonathan Marler (marler8997) wrote :

I tried to triage this a bit today.

I'm running a 32-bit linux kernel and I think that's the problem. The ECAM address base is at 0x4010000000, but it gets truncated to 0x10000000 because it's only a 32-bit kernel, but since it's truncated, it conflicts with VIRT_PCIE_MMIO (see hw/arm/virt.c) whose range is from 0x10000000 to 0x3efeffff which matches what we see in the error message.

summary: - arm virt ecam pcie conflict
+ Default arm virt machine broken
description: updated
Revision history for this message
Eric Auger (augere) wrote :

Hi Jonathan,

I sent an email yesterday on the qemu ML.

"
Please can you try using
qemu-system-arm -machine virt,highmem=off -m 1024M -kernel zImage
-serial stdio

Does your guest support LPAE? This may be the cause.

Thanks

Eric
"

Revision history for this message
Jonathan Marler (marler8997) wrote :

LPAE is actually disabled in my kernel config. Knowing the cause now, I can see that qemu would not be able to detect this problem. This error should have been detected in the linux kernel with an indication that the ECAM window was using a 40-bit address but LPAE was not enabled.

Changed in qemu:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.