Thank you very much ! That did the trick.

non-root cell loads the driver but craps out on some bogus offset.




[    0.762705] [drm] Initialized
[    0.767062] loop: module loaded
[    0.770444] tg3.c:v3.137 (May 11, 2014)
[    0.774291] tg3 0000:04:00.0: enabling device (0400 -> 0402)

FATAL: Invalid PCI config write, port: cfc, size 4, address port: 80040068
RIP: 0xffffffff817039e8 RSP: 0xffffc900000abb60 FLAGS: 46
RAX: 0x00000000a200009a RBX: 0x0000000000000068 RCX: 0x0000000000000068
RDX: 0x0000000000000cfc RSI: 0x0000000000000097 RDI: 0x0000000080040068
CS: 10 BASE: 0x0000000000000000 AR-BYTES: a09b EFER.LMA 1
CR0: 0x0000000080050033 CR3: 0x0000000001e16000 CR4: 0x00000000001426f0
EFER: 0x0000000000000d01
Parking CPU 2 (Cell: "linux2")


________________________________
From: Jan Kiszka <[email protected]>
Sent: Monday, January 16, 2017 2:54:38 PM
To: Vaidyanath, Rajiv; [email protected]
Subject: Re: Device assignment to non-root

On 2017-01-16 20:42, Vaidyanath, Rajiv wrote:
> I removed MMCONFIG info for tg3 in the non-root config (mem_regions) and
> the driver does not expose any ports in /proc/ioports.  The only entries
> I have in non-root config are pci_devices and pci_caps, for tg3 NIC.
>
>
> When I load the non-root after this change, I still get the invalid PCI
> config write message.
>

>From your non-root cell config:

>         .pci_devices = {
>                 /* PCIDevice: 04:00.0 */
>                 {
>                         .type = JAILHOUSE_PCI_TYPE_DEVICE,
>                         .iommu = 1,
>                         .domain = 0x0,
>                         .bdf = 0x400,
>                         .bar_mask = {
>                                 0xffff0000, 0xffffffff, 0x00000000,
>                                 0x00000000, 0x00000000, 0x00000000,
>                         },
>                         .caps_start = 58,

You need to update this as well. It's the index into the caps array. Now
it's 0 as there are no other devices and no other caps.

>                         .num_caps = 9,
>                         .num_msi_vectors = 1,
>                         .msi_64bits = 1,
>                         .num_msix_vectors = 0,
>                         .msix_region_size = 0x0,
>                         .msix_address = 0x0,
>                 },
>
>        },

Jan

--
Siemens AG, Corporate Technology, CT RDA ITP 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to