search for: qemu_irq_get_opaque

Displaying 2 results from an estimated 2 matches for "qemu_irq_get_opaque".

2009 May 20
9
[PATCH] qemu: msi irq allocation api
...ate = qemu_mallocz(nentries * sizeof *state); + qemu_irq *irqs; + if (!state) + return NULL; + irqs = qemu_allocate_irqs(ioapic_send_msi, state, nentries); + if (!irqs) + qemu_free(state); + return irqs; +} + +static void ioapic_free_msi(qemu_irq *irq) +{ + qemu_free(qemu_irq_get_opaque(irq[0])); + qemu_free_irqs(irq); +} + +static int ioapic_update_msi(qemu_irq irq, uint64_t addr, uint32_t data, + int masked) +{ + struct msi_state *state = qemu_irq_get_opaque(irq); + int vector = qemu_irq_get_vector(irq); + state[vector].addr = addr; + s...
2009 May 20
9
[PATCH] qemu: msi irq allocation api
...ate = qemu_mallocz(nentries * sizeof *state); + qemu_irq *irqs; + if (!state) + return NULL; + irqs = qemu_allocate_irqs(ioapic_send_msi, state, nentries); + if (!irqs) + qemu_free(state); + return irqs; +} + +static void ioapic_free_msi(qemu_irq *irq) +{ + qemu_free(qemu_irq_get_opaque(irq[0])); + qemu_free_irqs(irq); +} + +static int ioapic_update_msi(qemu_irq irq, uint64_t addr, uint32_t data, + int masked) +{ + struct msi_state *state = qemu_irq_get_opaque(irq); + int vector = qemu_irq_get_vector(irq); + state[vector].addr = addr; + s...