Skip to contentSkip to conversation

virtio-blk issues

Qemu-devel Christoph Hellwig 4 participants 7 messages Mar 3, 2009 – Mar 18, 2009

lore
Share & tools
lore
#0 lore raw

I've been trying to move setup from kvm 72 in debian testing to the current qemu CVS. The setup is using 7 virtio_blk disks and used to work on the old setup, but with current qemu the kernel (current Linus' HEAD from a few days ago) hangs when trying to setup the irq routing for the virtio_pci devices:

virtio pci 0000:00:06.0: can't derive routing for PCI INT A virtio pci 0000:00:06.0: PCI INT A: no GSI - using IRQ 9

Below is the config file I'm using. When commenting out the drive lines so that only the first two are left the system boots, although rather slowly compared to kvm (this is using the minimal kvm support in qemu upstream, without it it's of course even slower).

#!/bin/sh

/opt/qemu/bin/qemu -m 1000 -enable-kvm -kernel $1 \
	-drive file=/dev/vg00/qemu-root,if=virtio,media=disk \
	-drive file=/dev/vg00/qemu-test,if=virtio,media=disk \
	-drive file=/dev/vg00/qemu-test-log,if=virtio,media=disk \
	-drive file=/dev/vg00/qemu-test-rt,if=virtio,media=disk \
	-drive file=/dev/vg00/qemu-scratch,if=virtio,media=disk \
	-drive file=/dev/vg00/qemu-scratch-log,if=virtio,media=disk \
	-drive file=/dev/vg00/qemu-scratch-rt,if=virtio,media=disk \
	-append "root=/dev/vda console=tty0 console=ttyS0,38400n8"
#1 lore raw
Quoted 8 lines · Christoph Hellwig

I've been trying to move setup from kvm 72 in debian testing to the current qemu CVS. The setup is using 7 virtio_blk disks and used to work on the old setup, but with current qemu the kernel (current Linus' HEAD from a few days ago) hangs when trying to setup the irq routing for the virtio_pci devices:

virtio pci 0000:00:06.0: can't derive routing for PCI INT A virtio pci 0000:00:06.0: PCI INT A: no GSI - using IRQ 9

IIRC this is partly a bios issue. Real PIIX3 based systems never have more than ~5 PCI slots, so it doesn't have interrupt routing for more devices.

There are two solutions: Fix the bios to handle machines with large numbers of PCI slots, or have create multifunction PCI devices so lots of virtio instances don't use so many virtual PCI slots.

Paul

#2 lore raw
Quoted 10 lines · Paul Brook
Quoted 8 lines · Christoph Hellwig

I've been trying to move setup from kvm 72 in debian testing to the current qemu CVS. The setup is using 7 virtio_blk disks and used to work on the old setup, but with current qemu the kernel (current Linus' HEAD from a few days ago) hangs when trying to setup the irq routing for the virtio_pci devices:

virtio pci 0000:00:06.0: can't derive routing for PCI INT A virtio pci 0000:00:06.0: PCI INT A: no GSI - using IRQ 9

Quoted 7 lines

IIRC this is partly a bios issue. Real PIIX3 based systems never have more than ~5 PCI slots, so it doesn't have interrupt routing for more devices.

There are two solutions: Fix the bios to handle machines with large numbers of PCI slots, or have create multifunction PCI devices so lots of virtio instances don't use so many virtual PCI slots.

Or we could try to create a pc+PIIX style VM. Surely having more than two disks should not be that uncommon..

#3 lore raw
In reply to Paul Brook
Quoted 8 lines · Paul Brook
Quoted 6 lines · Christoph Hellwig

I've been trying to move setup from kvm 72 in debian testing to the current qemu CVS. The setup is using 7 virtio_blk disks and used to work on the old setup, but with current qemu the kernel (current Linus' HEAD from a few days ago) hangs when trying to setup the irq routing for the virtio_pci devices:

Quoted 8 lines
Quoted 3 lines

virtio pci 0000:00:06.0: can't derive routing for PCI INT A virtio pci 0000:00:06.0: PCI INT A: no GSI - using IRQ 9

IIRC this is partly a bios issue. Real PIIX3 based systems never have more than ~5 PCI slots, so it doesn't have interrupt routing for more devices.

There are two solutions: Fix the bios to handle machines with large numbers of PCI slots, or have create multifunction PCI devices so lots of virtio instances don't use so many virtual PCI slots.

You then those the ability to hotplug individual block devices (not that that's a terribly useful feature anyway).

Regards,

Anthony Liguori

Quoted 4 lines

Paul

#4 lore raw
In reply to Paul Brook
Quoted 8 lines · Paul Brook
Quoted 6 lines · Christoph Hellwig

I've been trying to move setup from kvm 72 in debian testing to the current qemu CVS. The setup is using 7 virtio_blk disks and used to work on the old setup, but with current qemu the kernel (current Linus' HEAD from a few days ago) hangs when trying to setup the irq routing for the virtio_pci devices:

Quoted 9 lines
Quoted 3 lines

virtio pci 0000:00:06.0: can't derive routing for PCI INT A virtio pci 0000:00:06.0: PCI INT A: no GSI - using IRQ 9

IIRC this is partly a bios issue. Real PIIX3 based systems never have more than ~5 PCI slots, so it doesn't have interrupt routing for more devices.

There are two solutions: Fix the bios to handle machines with large numbers of PCI slots, or have create multifunction PCI devices so lots of virtio instances don't use so many virtual PCI slots.

The kvm bios supports 32 slots; I don't know if upstream bochs picked up these changes.

In any case I'd like to see a virtio-blk controller which can support an arbitrary number of disks, much like a SCSI controller. A pci slot or function per disk is wasteful.

Signature · 1 line
error compiling committee.c: too many arguments to function
#5 lore raw
Quoted 2 lines · Avi Kivity

The kvm bios supports 32 slots; I don't know if upstream bochs picked up these changes.

I tried using the kvm pc-bios with upstream qemu, but it fails pretty early on when the kernel tries to initialize the timer interrupt.

What's the protocol for syncing all those bios changes?

Quoted 3 lines

In any case I'd like to see a virtio-blk controller which can support an arbitrary number of disks, much like a SCSI controller. A pci slot or function per disk is wasteful.

I'll see what I can do.

#6 lore raw
Quoted 9 lines · Christoph Hellwig
Quoted 2 lines · Avi Kivity

The kvm bios supports 32 slots; I don't know if upstream bochs picked up these changes.

I tried using the kvm pc-bios with upstream qemu, but it fails pretty early on when the kernel tries to initialize the timer interrupt.

Interrupt routing is different between kvm and qemu due to HPET sending interrupts to PIC IRQ0 and IOAPIC INTI2; the kvm up to 2.6.29 only supports 1:1 mapping between PIC and IOAPIC pins 0-15.

Quoted 2 lines

What's the protocol for syncing all those bios changes?

I merge them occasionally, but in this case, syncing the changes would cause one or the other to break.

What is needed is to sync the qemu changes, and additionally add code to detect the non-existence of non-1:1 mapping and revert back to the old behavior in that case (and disable HPET as well).

Quoted 5 lines
Quoted 2 lines

In any case I'd like to see a virtio-blk controller which can support an arbitrary number of disks, much like a SCSI controller. A pci slot or function per disk is wasteful.

I'll see what I can do.

Did I mention my wishlist includes indirect virtio requests, where a virtio ring entry points to an sglist instead of the buffer? Right now a 1MB request will consume 256 ring entries, which kills concurrency with many disks on a single ring.

Signature · 1 line
error compiling committee.c: too many arguments to function