Am Mon, 8 May 2017 14:46:14 -0700 schrieb jonas <[email protected]>: > > Needs to be 0 for INTx operation. > > OK, when I remove '.num_msix_vectors = 1' from the root cell > configuration, I can see the following in '/var/log/messages': > [ 69.760313] PCI host bridge //vpci@0 ranges: [ 69.764807] MEM > 0x02100000..0x02101fff -> 0x02100000 [ 69.774477] pci-host-generic > 2000000.vpci: PCI host bridge to bus 0000:00 [ 69.781428] pci_bus > 0000:00: root bus resource [bus 00] [ 69.786705] pci_bus 0000:00: > root bus resource [mem 0x02100000-0x02101fff] [ 69.793830] pci_bus > 0000:00: scanning bus [ 69.794718] pci 0000:00:00.0: [1af4:1110] > type 00 class 0xff0000 [ 69.794815] pci 0000:00:00.0: reg 0x10: > [mem 0x00000000-0x000000ff 64bit] [ 69.794981] pci 0000:00:00.0: > calling pci_fixup_ide_bases+0x0/0x50 [ 69.797231] pci_bus 0000:00: > fixups for bus [ 69.797283] PCI: bus0: Fast back to back transfers > disabled [ 69.803007] pci_bus 0000:00: bus scan returning with > max=00 [ 69.803343] pci 0000:00:00.0: fixup irq: got 124 > [ 69.803363] pci 0000:00:00.0: assigning IRQ 124 > [ 69.803433] pci 0000:00:00.0: BAR 0: assigned [mem > 0x02100000-0x021000ff 64bit] [ 69.813181] uio_ivshmem 0000:00:00.0: > enabling device (0000 -> 0002) [ 69.819791] uio_ivshmem > 0000:00:00.0: using jailhouse mode [ 69.825511] uio_ivshmem > 0000:00:00.0: regular IRQs [ 69.836988] The Jailhouse is opening. > > How does this IRQ number correlate to the INTx I should be using when > generating interrupts from the bare-metal inmate to the root-cell?
You do not need to know the number, the uio-driver knows it. And the bare metal inmate does not need to know it since it is just writing to a register to trigger it. It looks like it is working. After loading the driver you should see a new entry in /proc/interrupts. And when the inmate runs you should see the counter going up. Getting an IRQ sent to the inmate will be more tricky, you will need to program the GIC where the x86 code does "int_set_handler". The gic-demo should give a clue. > Does the uio_ivshmem driver take care of generating interrupts from > the root-cell to the bare metal cell, or do I need to modify this as > well? The uio-driver does not actually do anything. It just makes the ressources of the "hardware" visible to userland. I suggest you have a look at the jailhouse specific README. https://github.com/henning-schild/ivshmem-guest-code/blob/jailhouse/README.jailhouse If you did not come across this file yet you might be on the wrong branch of ivshmem-guest-code. Henning > Slightly confused - Jonas -- 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.
