Called at the end of the endpoint device setup, will be needed for initialization INTx emulation.
Signed-off-by: Jan Kiszka <[email protected]> --- hypervisor/arch/arm-common/ivshmem.c | 4 ++++ hypervisor/arch/x86/ivshmem.c | 4 ++++ hypervisor/include/jailhouse/ivshmem.h | 7 +++++++ hypervisor/ivshmem.c | 9 ++++++--- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/hypervisor/arch/arm-common/ivshmem.c b/hypervisor/arch/arm-common/ivshmem.c index 797d8b5..d484bbd 100644 --- a/hypervisor/arch/arm-common/ivshmem.c +++ b/hypervisor/arch/arm-common/ivshmem.c @@ -42,3 +42,7 @@ int arch_ivshmem_update_msix(struct pci_device *device) return 0; } + +void arch_ivshmem_init(struct ivshmem_endpoint *ive, struct cell *cell) +{ +} diff --git a/hypervisor/arch/x86/ivshmem.c b/hypervisor/arch/x86/ivshmem.c index 49f74e7..1a71bbc 100644 --- a/hypervisor/arch/x86/ivshmem.c +++ b/hypervisor/arch/x86/ivshmem.c @@ -69,3 +69,7 @@ int arch_ivshmem_update_msix(struct pci_device *device) return 0; } + +void arch_ivshmem_init(struct ivshmem_endpoint *ive, struct cell *cell) +{ +} diff --git a/hypervisor/include/jailhouse/ivshmem.h b/hypervisor/include/jailhouse/ivshmem.h index c0fd520..dd27699 100644 --- a/hypervisor/include/jailhouse/ivshmem.h +++ b/hypervisor/include/jailhouse/ivshmem.h @@ -60,5 +60,12 @@ void arch_ivshmem_write_doorbell(struct ivshmem_endpoint *ive); */ int arch_ivshmem_update_msix(struct pci_device *device); +/** + * Architecture-specific initialization of ivshmem endpoint. + * @param ive ivshmem endpoint to initialize. + * @param cell Cell the endpoint will belong to. + */ +void arch_ivshmem_init(struct ivshmem_endpoint *ive, struct cell *cell); + /** @} IVSHMEM */ #endif /* !_JAILHOUSE_IVSHMEM_H */ diff --git a/hypervisor/ivshmem.c b/hypervisor/ivshmem.c index 6f628a7..6f50b96 100644 --- a/hypervisor/ivshmem.c +++ b/hypervisor/ivshmem.c @@ -252,7 +252,7 @@ static struct ivshmem_data **ivshmem_find(struct pci_device *d, int *cellnum) return NULL; } -static void ivshmem_connect_cell(struct ivshmem_data *iv, +static void ivshmem_connect_cell(struct ivshmem_data *iv, struct cell *cell, struct pci_device *d, const struct jailhouse_memory *mem, int cellnum) @@ -283,6 +283,8 @@ static void ivshmem_connect_cell(struct ivshmem_data *iv, remote->remote = NULL; } d->ivshmem_endpoint = ive; + + arch_ivshmem_init(ive, cell); } static void ivshmem_disconnect_cell(struct ivshmem_data *iv, int cellnum) @@ -383,7 +385,7 @@ int ivshmem_init(struct cell *cell, struct pci_device *device) (mem0->size == mem->size)) { if ((*ivp)->eps[1].device) return trace_error(-EBUSY); - ivshmem_connect_cell(*ivp, device, mem, 1); + ivshmem_connect_cell(*ivp, cell, device, mem, 1); printk("Virtual PCI connection established " "\"%s\" <--> \"%s\"\n", cell->config->name, dev0->cell->config->name); @@ -397,7 +399,8 @@ int ivshmem_init(struct cell *cell, struct pci_device *device) *ivp = page_alloc(&mem_pool, 1); if (!(*ivp)) return -ENOMEM; - ivshmem_connect_cell(*ivp, device, mem, 0); + + ivshmem_connect_cell(*ivp, cell, device, mem, 0); connected: printk("Adding virtual PCI device %02x:%02x.%x to cell \"%s\"\n", -- 2.1.4 -- 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.
