mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-09-05 13:11:44 +00:00
kvm: Fix virtio block PCI device IRQ configuration
This patch fixes up hang when guest kernel tries to setup virtio block device. Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
8c5038ac8b
commit
406f1a89c8
+1
-2
@@ -107,8 +107,7 @@ static struct pci_device_header blk_virtio_pci_device = {
|
||||
.subsys_vendor_id = PCI_SUBSYSTEM_VENDOR_ID_REDHAT_QUMRANET,
|
||||
.subsys_id = PCI_SUBSYSTEM_ID_VIRTIO_BLK,
|
||||
.bar[0] = IOPORT_VIRTIO | PCI_BASE_ADDRESS_SPACE_IO,
|
||||
/* XXX: Is this IRQ setup OK? */
|
||||
.irq_pin = 1,
|
||||
.irq_pin = 0,
|
||||
.irq_line = VIRTIO_BLK_IRQ,
|
||||
};
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@ int main(int argc, char *argv[])
|
||||
const char *kernel_cmdline = NULL;
|
||||
const char *kvm_dev = "/dev/kvm";
|
||||
unsigned long ram_size = 64UL << 20;
|
||||
bool enable_virtio = false;
|
||||
bool single_step = false;
|
||||
int i;
|
||||
|
||||
@@ -73,9 +72,6 @@ int main(int argc, char *argv[])
|
||||
} else if (option_matches(argv[i], "--single-step")) {
|
||||
single_step = true;
|
||||
continue;
|
||||
} else if (option_matches(argv[i], "--enable-virtio")) {
|
||||
enable_virtio = true;
|
||||
continue;
|
||||
} else if (option_matches(argv[i], "--mem=")) {
|
||||
unsigned long val = atol(&argv[i][6]) << 20;
|
||||
if (val < ram_size)
|
||||
@@ -121,9 +117,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
early_printk__init();
|
||||
pci__init();
|
||||
|
||||
if (enable_virtio)
|
||||
blk_virtio__init();
|
||||
blk_virtio__init();
|
||||
|
||||
for (;;) {
|
||||
kvm__run(kvm);
|
||||
|
||||
Reference in New Issue
Block a user