mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
libqos: Added MSI-X support
Added MSI-X support for qtest PCI. Added MSI-X support for virtio-pci. Added MSI-X test case in virtio-blk-test. Signed-off-by: Marc Marí <marc.mari.barcelo@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
e11199554c
commit
5836811398
7 changed files with 426 additions and 62 deletions
|
@ -78,12 +78,25 @@ void qvirtio_set_driver_ok(const QVirtioBus *bus, QVirtioDevice *d)
|
|||
QVIRTIO_DRIVER_OK | QVIRTIO_DRIVER | QVIRTIO_ACKNOWLEDGE);
|
||||
}
|
||||
|
||||
bool qvirtio_wait_isr(const QVirtioBus *bus, QVirtioDevice *d, uint8_t mask,
|
||||
bool qvirtio_wait_queue_isr(const QVirtioBus *bus, QVirtioDevice *d,
|
||||
QVirtQueue *vq, uint64_t timeout)
|
||||
{
|
||||
do {
|
||||
clock_step(10);
|
||||
if (bus->get_queue_isr_status(d, vq)) {
|
||||
break; /* It has ended */
|
||||
}
|
||||
} while (--timeout);
|
||||
|
||||
return timeout != 0;
|
||||
}
|
||||
|
||||
bool qvirtio_wait_config_isr(const QVirtioBus *bus, QVirtioDevice *d,
|
||||
uint64_t timeout)
|
||||
{
|
||||
do {
|
||||
clock_step(10);
|
||||
if (bus->get_isr_status(d) & mask) {
|
||||
if (bus->get_config_isr_status(d)) {
|
||||
break; /* It has ended */
|
||||
}
|
||||
} while (--timeout);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue