]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm: Fix virtio block PCI device IRQ configuration
authorPekka Enberg <penberg@kernel.org>
Mon, 3 Jan 2011 16:21:11 +0000 (18:21 +0200)
committerPekka Enberg <penberg@kernel.org>
Mon, 3 Jan 2011 16:21:11 +0000 (18:21 +0200)
This patch fixes up hang when guest kernel tries to setup virtio block device.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/blk-virtio.c
tools/kvm/main.c

index 906ab8bb1465101a0dee1f8808be740dd9a459fd..a53bdcc1975f9dc727f8a146bdc97ee53f38ee51 100644 (file)
@@ -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,
 };
 
index c12d3d0ad5a0f3a8c2d367e84694c96d02c3f940..1fd930181bb0f8e302909d42b8e2a21220ae3197 100644 (file)
@@ -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);