On 12.10.18 22:34, Robert Davis wrote:
Hello everyone!
I have been getting up to speed on the jailhouse project over the last few
weeks and have a few questions that I was hoping you all could help with.
1) What are the rules for assigning virtual memory addresses to the inmates?
All the demos show high ram starting at 0x00200000. When this memregion is too
large it will overlap with the virtual addresses of any PCI device memregions
assigned to the inmate.
You are free to use a different guest-physical start address (virt_start) or
split the high RAM into more pieces. The inmate bootloader will tell Linux where
to find them.
2) Do the virtual addresses of PCI devices(memregions) need to match the
physical address within nonroot cells?
Yes, we are not virtualizing that. The BARs well then contain wrong values, and
the guest will no longer be able to find the regions.
When I remove the overlap(seen in 3xmem) by separating the high ram memregion
into parts that are assigned higher virtual addresses I receive this error and
the inmate fails to boot:
FATAL: Invalid PCI MMCONFIG write, device 0a:00.0, reg: 110, size: 4
That is first of all an attempt to write to some extended capability at 0x110
which is not allowed by the configuration. If that is a reason or a symptom is
hard to say at this point. Check first what capability is behind that address.
RIP: 0xffffffff8206838f RSP: 0xffffc90000c4fc28 FLAGS: 10082
RAX: 0x0000000000002000 RBX: 0xffffc90010a00110 RCX: 0x0000000000000000
RDX: 0x00000000000000ff RSI: 0xffffc90010000000 RDI: 0x0000000000000000
CS: 10 BASE: 0x0000000000000000 AR-BYTES: a09b EFER.LMA 1
CR0: 0x0000000080050033 CR3: 0x0000000002a21000 CR4: 0x00000000000426e0
EFER: 0x0000000000000d01
Parking CPU 8 (Cell: "Inmate-2")
2) How can an inmate and the rootcell share a DMA memory region? I have
assigned a USB addon card to the inmate, however the USB card shares a memory
region with all the other USB ports. When I ignore the overlapping virtual
addresses the inmate will boot and the other PCI device will be detected and
used (VGA). Unfortunately the USB ports are detected but no devices can be
supported. It appears as though the inmate is unable to use the DMA memregion
reserved within the nonroot config. No errors are displayed in the jailhouse
console.
I suppose with "sharing" you mean that some MMIO regions of those PCI devices
end up on the same page, right? You can break up MMIO pages into smaller chunks.
Jailhouse will then intercept any access and ensure that only assigned
sub-regions are accessibly to the particular guest. Make sure to specify which
access widths are allowed.
Or do you mean something else (I didn't study your configs yet).
Jan
Looking through dmesg shows the following errors:
[ 38.935495] xhci_hcd 0000:0a:00.0: Error while assigning device slot ID
[ 38.935503] xhci_hcd 0000:0a:00.0: Max number of devices this xHCI host
supports is 32.
[ 38.935517] usb usb1-port1: couldn't allocate usb_device
[ 51.222660] xhci_hcd 0000:0a:00.0: Error while assigning device slot ID
[ 51.222667] xhci_hcd 0000:0a:00.0: Max number of devices this xHCI host
supports is 32.
[ 51.222673] usb usb2-port1: couldn't allocate usb_device
[ 63.510447] xhci_hcd 0000:0a:00.0: Error while assigning device slot ID
[ 63.510453] xhci_hcd 0000:0a:00.0: Max number of devices this xHCI host
supports is 32.
[ 63.510458] usb usb1-port3: couldn't allocate usb_device
[ 75.798442] xhci_hcd 0000:0a:00.0: Error while assigning device slot ID
[ 75.798449] xhci_hcd 0000:0a:00.0: Max number of devices this xHCI host
supports is 32.
[ 75.798454] usb usb1-port4: couldn't allocate usb_device
Please let me know what you think the issue may be. I have been going through
my kernel config to verify the appropriate modules are there.
I'll be happy to provide any additional information you deem is necessary.
Thank you for your help!
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
--
You received this message because you are subscribed to the Google Groups
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.