kvm-tools -- cleanup
cover kvm-tools -- cleanup
Please review, I hope I didn't miss anything. Testing is appereciated and comments as well.
Thanks,
Cyrill
PATCH 1/2 kvm tools: Gather Virtio-PCI constants into one place
It's better than have them sprinkled in.c files. Note that pin for ring device is changed so it no longer shared with block device (it is done in a sake of simplicity).
Also comment style if a bit tuned up in virtio-pci.h just to be consistent.
--- tools/kvm/include/kvm/virtio-pci-dev.h | 40 +++++++++++++++++++++++++++++++++ tools/kvm/include/kvm/virtio-pci.h | 31 ++++++++++++++++++------- tools/kvm/virtio-blk.c | 11 --------- tools/kvm/virtio-console.c | 10 -------- tools/kvm/virtio-net.c | 10 -------- tools/kvm/virtio-rng.c | 10 -------- 6 files changed, 67 insertions(+), 45 deletions(-)
tools/kvm/include/kvm/virtio-pci-dev.h new file +40 -0
@@ -0,0 +1,40 @@ +#ifndef VIRTIO_PCI_DEV_H_ +#define VIRTIO_PCI_DEV_H_ + +/* +* Virtio PCI device constants and resources +* they do use (such as irqs and pins). +*/ + +#define PCI_DEVICE_ID_VIRTIO_NET 0x1000 +#define PCI_DEVICE_ID_VIRTIO_BLK 0x1001 +#define PCI_DEVICE_ID_VIRTIO_CONSOLE 0x1003 +#define PCI_DEVICE_ID_VIRTIO_RNG 0x1004 + +#define PCI_SUBSYSTEM_ID_VIRTIO_NET 0x0001 +#define PCI_SUBSYSTEM_ID_VIRTIO_BLK 0x0002 +#define PCI_SUBSYSTEM_ID_VIRTIO_CONSOLE 0x0003 +#define PCI_SUBSYSTEM_ID_VIRTIO_RNG 0x0004 + +enum { +PCI_VIRTIO_BLK_DEVNUM =1 , +PCI_VIRTIO_CONSOLE_DEVNUM =2 , +PCI_VIRTIO_NET_DEVNUM =3 , +PCI_VIRTIO_RNG_DEVNUM =4 , +}; + +enum { +VIRTIO_BLK_PIN =1 , +VIRTIO_CONSOLE_PIN =2 , +VIRTIO_NET_PIN =3 , +VIRTIO_RNG_PIN =4 , +}; + +enum { +VIRTIO_RNG_IRQ =11 , +VIRTIO_CONSOLE_IRQ =13 , +VIRTIO_NET_IRQ =14 , +VIRTIO_BLK_IRQ =15 , +}; + +#endif /* VIRTIO_PCI_DEV_H_ */
tools/kvm/include/kvm/virtio-pci.h +23 -8
@@ -34,26 +34,41 @@/* A 16-bit r/w queue notifier */ #define VIRTIO_PCI_QUEUE_NOTIFY 16 -/* An 8-bit device status register. */ +/* An 8-bit device status register */ #define VIRTIO_PCI_STATUS 18 -/* An 8-bit r/o interrupt status register. Reading the value will return the -* current contents of the ISR and will also clear it. This is effectively -* a read-and-acknowledge. */ +/* +* An 8-bit r/o interrupt status register. +* +* Reading the value will return the current contents of +* the ISR and will also clear it. This is effectively +* a read-and-acknowledge. +*/ #define VIRTIO_PCI_ISR 19 -/* MSI-X registers: only enabled if MSI-X is enabled. */ -/* A 16-bit vector for configuration changes. */ +/* +* MSI-X registers: only enabled if MSI-X is enabled. +*/ + +/* A 16-bit vector for configuration changes */ #define VIRTIO_MSI_CONFIG_VECTOR 20 -/* A 16-bit vector for selected queue notifications. */ +/* A 16-bit vector for selected queue notifications */ #define VIRTIO_MSI_QUEUE_VECTOR 22/* Vector value used to disable MSI for queue */ #define VIRTIO_MSI_NO_VECTOR 0xffff -/* Config space size */ +/* +* Config space size. +*/ #define VIRTIO_PCI_CONFIG_NOMSI 20#define VIRTIO_PCI_CONFIG_MSI 24 +/* +* Virtio config space constants. +*/ +#define PCI_VENDOR_ID_REDHAT_QUMRANET 0x1af4 +#define PCI_SUBSYSTEM_VENDOR_ID_REDHAT_QUMRANET 0x1af4 +#endif /* _LINUX_VIRTIO_PCI_H */
tools/kvm/virtio-blk.c +1 -10
@@ -1,6 +1,7 @@#include "kvm/virtio-blk.h" #include "kvm/virtio-pci.h" +#include "kvm/virtio-pci-dev.h" #include "kvm/disk-image.h" #include "kvm/virtio.h"
@@ -17,9 +18,6 @@#include <inttypes.h> #include <pthread.h> -#define VIRTIO_BLK_IRQ 15 -#define VIRTIO_BLK_PIN 1 -#define NUM_VIRT_QUEUES 1#define VIRTIO_BLK_QUEUE_SIZE 128
@@ -223,11 +221,6 @@ static struct ioport_operations virtio_b .io_out = virtio_blk_pci_io_out, }; -#define PCI_VENDOR_ID_REDHAT_QUMRANET 0x1af4 -#define PCI_DEVICE_ID_VIRTIO_BLK 0x1001 -#define PCI_SUBSYSTEM_VENDOR_ID_REDHAT_QUMRANET 0x1af4 -#define PCI_SUBSYSTEM_ID_VIRTIO_BLK 0x0002 -static struct pci_device_header virtio_blk_pci_device = { .vendor_id =PCI_VENDOR_ID_REDHAT_QUMRANET , .device_id =PCI_DEVICE_ID_VIRTIO_BLK ,
@@ -241,8 +234,6 @@ static struct pci_device_header virtio_b .irq_line = VIRTIO_BLK_IRQ, }; -#define PCI_VIRTIO_BLK_DEVNUM 1 -void virtio_blk__init (struct kvm *self) {if (!self->disk_image)
tools/kvm/virtio-console.c +1 -9
@@ -1,5 +1,6 @@#include "kvm/virtio-console.h" #include "kvm/virtio-pci.h" +#include "kvm/virtio-pci-dev.h" #include "kvm/disk-image.h" #include "kvm/virtio.h" #include "kvm/ioport.h"
@@ -23,14 +24,10 @@#include <unistd.h> #include <fcntl.h> -#define VIRTIO_CONSOLE_IRQ 13 -#define VIRTIO_CONSOLE_PIN 2 -#define VIRTIO_CONSOLE_QUEUE_SIZE 128#define VIRTIO_CONSOLE_NUM_QUEUES 2#define VIRTIO_CONSOLE_RX_QUEUE 0#define VIRTIO_CONSOLE_TX_QUEUE 1 -#define PCI_VIRTIO_CONSOLE_DEVNUM 2struct console_device {pthread_mutex_t mutex;
@@ -227,11 +224,6 @@ static struct ioport_operations virtio_c .io_out = virtio_console_pci_io_out, }; -#define PCI_VENDOR_ID_REDHAT_QUMRANET 0x1af4 -#define PCI_DEVICE_ID_VIRTIO_CONSOLE 0x1003 -#define PCI_SUBSYSTEM_VENDOR_ID_REDHAT_QUMRANET 0x1af4 -#define PCI_SUBSYSTEM_ID_VIRTIO_CONSOLE 0x0003 -static struct pci_device_header virtio_console_pci_device = { .vendor_id =PCI_VENDOR_ID_REDHAT_QUMRANET , .device_id =PCI_DEVICE_ID_VIRTIO_CONSOLE ,
tools/kvm/virtio-net.c +1 -9
@@ -1,5 +1,6 @@#include "kvm/virtio-net.h" #include "kvm/virtio-pci.h" +#include "kvm/virtio-pci-dev.h" #include "kvm/virtio.h" #include "kvm/ioport.h" #include "kvm/types.h"
@@ -20,14 +21,10 @@#include <unistd.h> #include <sys/wait.h> -#define VIRTIO_NET_IRQ 14 -#define VIRTIO_NET_PIN 3 -#define VIRTIO_NET_QUEUE_SIZE 128#define VIRTIO_NET_NUM_QUEUES 2#define VIRTIO_NET_RX_QUEUE 0#define VIRTIO_NET_TX_QUEUE 1 -#define PCI_VIRTIO_NET_DEVNUM 3struct net_device {pthread_mutex_t mutex;
@@ -263,11 +260,6 @@ static struct ioport_operations virtio_n .io_out = virtio_net_pci_io_out, }; -#define PCI_VENDOR_ID_REDHAT_QUMRANET 0x1af4 -#define PCI_DEVICE_ID_VIRTIO_NET 0x1000 -#define PCI_SUBSYSTEM_VENDOR_ID_REDHAT_QUMRANET 0x1af4 -#define PCI_SUBSYSTEM_ID_VIRTIO_NET 0x0001 -static struct pci_device_header virtio_net_pci_device = { .vendor_id =PCI_VENDOR_ID_REDHAT_QUMRANET , .device_id =PCI_DEVICE_ID_VIRTIO_NET ,
tools/kvm/virtio-rng.c +1 -9
@@ -1,6 +1,7 @@#include "kvm/virtio-rng.h" #include "kvm/virtio-pci.h" +#include "kvm/virtio-pci-dev.h" #include "kvm/disk-image.h" #include "kvm/virtio.h"
@@ -20,15 +21,6 @@#include <inttypes.h> #include <pthread.h> -#define PCI_VENDOR_ID_REDHAT_QUMRANET 0x1af4 -#define PCI_DEVICE_ID_VIRTIO_RNG 0x1004 -#define PCI_SUBSYSTEM_VENDOR_ID_REDHAT_QUMRANET 0x1af4 -#define PCI_SUBSYSTEM_ID_VIRTIO_RNG 0x0004 -#define PCI_VIRTIO_RNG_DEVNUM 4 - -#define VIRTIO_RNG_IRQ 11 -#define VIRTIO_RNG_PIN 1 -#define NUM_VIRT_QUEUES 1#define VIRTIO_RNG_QUEUE_SIZE 128
Re: [patch 1/2] kvm tools: Gather Virtio-PCI constants into one place
Quoted 5 lines · Cyrill Gorcunov
It's better than have them sprinkled
in.cfiles. Note that pin for ring device is changed so it no longer shared with block device (it is done in a sake of simplicity).Also comment style if a bit tuned up in
virtio-pci.h
^^
Have no idea what 'if' is doing here O_o
Quoted 5 lines
just to be consistent.
Reported-by Ingo Molnar <[email protected]>Signed-off-by Cyrill Gorcunov <[email protected]>---
Signature · 2 lines
Thanks, Cyrill
Re: [patch 1/2] kvm tools: Gather Virtio-PCI constants into one place
In reply to Cyrill GorcunovQuoted 10 lines · Cyrill Gorcunov
It's better than have them sprinkled
in.cfiles. Note that pin for ring device is changed so it no longer shared with block device (it is done in a sake of simplicity).Also comment style if a bit tuned up in
virtio-pci.hjust to be consistent.Reported-by Ingo Molnar <[email protected]>Signed-off-by Cyrill Gorcunov <[email protected]>---
...
tools/kvm/include/kvm/virtio-pci-dev.h line 32
Quoted 8 lines
tools/kvm/include/kvm/virtio-pci-dev.h new file +8
-0+ +enum { +VIRTIO_BLK_PIN =1 , +VIRTIO_CONSOLE_PIN =2 , +VIRTIO_NET_PIN =3 , +VIRTIO_RNG_PIN =4 , +}; +
Btw, probably the better way would be to make it like that
enum {
PCI_INTA = 1,
PCI_INTB = 2,
PCI_INTC = 3,
PCI_INTD = 4,
};enum {
VIRTIO_BLK_PIN = PCI_INTA,
VIRTIO_CONSOLE_PIN = PCI_INTB,
VIRTIO_NET_PIN = PCI_INTC,
VIRTIO_RNG_PIN = PCI_INTD,
};So we would know the connection way and pin shares if needed.
Signature · 2 lines
Thanks, Cyrill
PATCH 2/2 kvm tools - Cleanup IRQs definitions for virtio pci devices
In reply to Cyrill GorcunovThis also requires to tune up mptable code. Note the srcbusirq need to follow specification convention, so we merge device number and pin into one field inside mptable_set_default_int_src helper.
--- tools/kvm/include/kvm/virtio-pci-dev.h | 16 +++++-- tools/kvm/mptable.c | 67 ++++++++++++++++++++++++--------- 2 files changed, 61 insertions(+), 22 deletions(-)
tools/kvm/include/kvm/virtio-pci-dev.h +12 -4
@@ -30,11 +30,19 @@ enum { VIRTIO_RNG_PIN = 4, }; +/* +* The IRQ numbers should confirm Linux IRQ numbering +* scheme model, which supposes devices to start IRQs +* from 32 ... 127, but 0x30-0x3f are used for ISA +* interrupts so we choose 0x40 as the origin. +*/ +#define VIRTIO_PCI_DEV_FIRST_IRQ 0x40 +enum { -VIRTIO_RNG_IRQ =11 , -VIRTIO_CONSOLE_IRQ =13 , -VIRTIO_NET_IRQ =14 , -VIRTIO_BLK_IRQ =15 , +VIRTIO_RNG_IRQ =VIRTIO_PCI_DEV_FIRST_IRQ +0 , +VIRTIO_CONSOLE_IRQ =VIRTIO_PCI_DEV_FIRST_IRQ +1 , +VIRTIO_NET_IRQ =VIRTIO_PCI_DEV_FIRST_IRQ +2 , +VIRTIO_BLK_IRQ =VIRTIO_PCI_DEV_FIRST_IRQ +3 , };#endif /* VIRTIO_PCI_DEV_H_ */
tools/kvm/mptable.c +49 -18
99 lines not on this page · raw message
Re: [patch 2/2] kvm tools - Cleanup IRQs definitions for virtio pci devices
Quoted 6 lines · Cyrill Gorcunov
This also requires to tune up mptable code. Note the srcbusirq need to follow specification convention, so we merge device number and pin into one field inside
mptable_set_default_int_srchelper.Signed-off-by Cyrill Gorcunov <[email protected]>
This seems to break virtio drivers on my box.
penberg@tiger:~/linux/tools/kvm$ ./kvm run --params="root=/dev/vda1" --image=/home/penberg/images/debian_squeeze_amd64_standard.img Warning: Config tap device error. Are you root? [ 0.000000] Linux version 2.6.39-rc6+ (penberg@tiger) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #29 SMP Wed May 4 20:32:24 EEST 2011 [ 0.000000] Command line: notsc nolapic noacpi pci=conf1 console=ttyS0 root=/dev/vda1 [ 0.000000] BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: 0000000000000000 - 000000000009fc00 (usable) [ 0.000000] BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved) [ 0.000000] BIOS-e820: 00000000000f0000 - 00000000000fffff (reserved) [ 0.000000] BIOS-e820: 0000000000100000 - 0000000004000000 (usable) [ 0.000000] NX (Execute Disable) protection: active [ 0.000000] DMI not present or invalid. [ 0.000000] No AGP bridge found [ 0.000000] last_pfn = 0x4000 max_arch_pfn = 0x400000000 [ 0.000000] x86 PAT enabled: cpu 0, old 0x0, new 0x7010600070106 [ 0.000000] CPU MTRRs all blank - virtualized system. [ 0.000000] found SMP MP-table at [ffff8800000f01f0] f01f0 [ 0.000000] init_memory_mapping: 0000000000000000-0000000004000000 [ 0.000000] ACPI Error: A valid RSDP was not found (20110316/tbxfroot-219) [ 0.000000] No NUMA configuration found [ 0.000000] Faking a node at 0000000000000000-0000000004000000 [ 0.000000] Initmem setup node 0 0000000000000000-0000000004000000 [ 0.000000] NODE_DATA [0000000003ffb000 - 0000000003ffffff] [ 0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00 [ 0.000000] kvm-clock: cpu 0, msr 0:1d112c1, boot clock [ 0.000000] Zone PFN ranges: [ 0.000000] DMA 0x00000010 -> 0x00001000 [ 0.000000] DMA32 0x00001000 -> 0x00100000 [ 0.000000] Normal empty [ 0.000000] Movable zone start PFN for each node [ 0.000000] early_node_map[2] active PFN ranges [ 0.000000] 0: 0x00000010 -> 0x0000009f [ 0.000000] 0: 0x00000100 -> 0x00004000 [ 0.000000] Intel MultiProcessor Specification v1.4 [ 0.000000] MPTABLE: OEM ID: KVMCPU00 [ 0.000000] MPTABLE: Product ID: 0.1 [ 0.000000] MPTABLE: APIC at: 0xFEE00000 [ 0.000000] Processor #0 (Bootup-CPU) [ 0.000000] IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, GSI 0-23 [ 0.000000] Processors: 1 [ 0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs [ 0.000000] PM: Registered nosave memory: 000000000009f000 - 00000000000a0000 [ 0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000f0000 [ 0.000000] PM: Registered nosave memory: 00000000000f0000 - 00000000000ff000 [ 0.000000] PM: Registered nosave memory: 00000000000ff000 - 0000000000100000 [ 0.000000] Allocating PCI resources starting at 4000000 (gap: 4000000:fc000000) [ 0.000000] Booting paravirtualized kernel on KVM [ 0.000000] setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:1 nr_node_ids:1 [ 0.000000] PERCPU: Embedded 26 pages/cpu @ffff880003c00000 s77504 r8192 d20800 u2097152 [ 0.000000] kvm-clock: cpu 0, msr 0:3c122c1, primary cpu clock [ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 16042 [ 0.000000] Policy zone: DMA32 [ 0.000000] Kernel command line: notsc nolapic noacpi pci=conf1 console=ttyS0 root=/dev/vda1 [ 0.000000] notsc: Kernel compiled with CONFIG_X86_TSC, cannot disable TSC completely. [ 0.000000] PID hash table entries: 256 (order: -1, 2048 bytes) [ 0.000000] Checking aperture... [ 0.000000] No AGP bridge found [ 0.000000] Memory: 47768k/65536k available (7267k kernel code, 452k absent, 17316k reserved, 6033k data, 920k init) [ 0.000000] SLUB: Genslabs=15, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] Hierarchical RCU implementation. [ 0.000000] RCU-based detection of stalled CPUs is disabled. [ 0.000000] NR_IRQS:4352 nr_irqs:256 16 [ 0.000000] Console: colour *CGA 80x25 [ 0.000000] console [ttyS0] enabled [ 0.000000] Detected 1995.237 MHz processor. [ 0.010000] Calibrating delay loop (skipped) preset value.. 3990.47 BogoMIPS (lpj=19952370) [ 0.010000] pid_max: default: 32768 minimum: 301 [ 0.010000] Dentry cache hash table entries: 8192 (order: 4, 65536 bytes) [ 0.010000] Inode-cache hash table entries: 4096 (order: 3, 32768 bytes) [ 0.010000] Mount-cache hash table entries: 256 [ 0.010000] Initializing cgroup subsys ns [ 0.010029] ns_cgroup deprecated: consider using the 'clone_children' flag without the ns_cgroup. [ 0.012242] Initializing cgroup subsys freezer [ 0.013472] mce: CPU supports 32 MCE banks [ 0.014900] SMP alternatives: switching to UP code [ 0.202195] Freeing SMP alternatives: 24k freed [ 0.203506] ftrace: allocating 26766 entries in 105 pages [ 0.220152] SMP disabled [ 0.220822] Performance Events: unsupported p6 CPU model 15 no PMU driver, software events only. [ 0.231058] NMI watchdog disabled (cpu0): hardware events not enabled [ 0.232703] Brought up 1 CPUs [ 0.233450] Total of 1 processors activated (3990.47 BogoMIPS). [ 0.235382] print_constraints: dummy: [ 0.236561] Time: 20:12:16 Date: 05/05/11 [ 0.237665] NET: Registered protocol family 16 [ 0.238958] PCI: Using configuration type 1 for base access [ 0.241971] bio: create slab <bio-0> at 0 [ 0.243110] ACPI: Interpreter disabled. [ 0.244119] vgaarb: loaded [ 0.244924] SCSI subsystem initialized [ 0.245994] usbcore: registered new interface driver usbfs [ 0.247402] usbcore: registered new interface driver hub [ 0.248755] usbcore: registered new device driver usb [ 0.250136] Advanced Linux Sound Architecture Driver Version 1.0.24. [ 0.251633] PCI: Probing PCI hardware [ 0.254610] Bluetooth: Core ver 2.16 [ 0.255456] NET: Registered protocol family 31 [ 0.256577] Bluetooth: HCI device and connection manager initialized [ 0.258187] Bluetooth: HCI socket layer initialized [ 0.260014] Bluetooth: L2CAP socket layer initialized [ 0.261323] Bluetooth: SCO socket layer initialized [ 0.262590] cfg80211: Calling CRDA to update world regulatory domain [ 0.264410] Switching to clocksource kvm-clock [ 0.268895] pnp: PnP ACPI: disabled [ 0.268895] Switched to NOHz mode on CPU #0 [ 0.268895] NET: Registered protocol family 2 [ 0.268895] IP route cache hash table entries: 512 (order: 0, 4096 bytes) [ 0.269490] TCP established hash table entries: 2048 (order: 3, 32768 bytes) [ 0.271306] TCP bind hash table entries: 2048 (order: 3, 32768 bytes) [ 0.272949] TCP: Hash tables configured (established 2048 bind 2048) [ 0.274531] TCP reno registered [ 0.275318] UDP hash table entries: 128 (order: 0, 4096 bytes) [ 0.276768] UDP-Lite hash table entries: 128 (order: 0, 4096 bytes) [ 0.278368] NET: Registered protocol family 1 [ 0.279587] RPC: Registered udp transport module. [ 0.280696] RPC: Registered tcp transport module. [ 0.281755] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.283443] kvm: no hardware support [ 0.284298] platform rtc_cmos: registered platform RTC device (no PNP device found) [ 0.286456] audit: initializing netlink socket (disabled) [ 0.287845] type=2000 audit(1304626335.280:1): initialized [ 0.310777] HugeTLB registered 2 MB page size, pre-allocated 0 pages [ 0.314176] VFS: Disk quotas dquot_6.5.2 [ 0.315246] Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.317736] fuse init (API version 7.16) [ 0.318760] Installing v9fs 9p2000 file system support [ 0.319971] msgmni has been set to 93 [ 0.321298] io scheduler noop registered [ 0.322339] io scheduler deadline registered [ 0.323444] io scheduler cfq registered (default) [ 0.324699] pci_hotplug: PCI Hot Plug PCI Core version: 0.5 [ 0.326116] pciehp: PCI Express Hot Plug Controller Driver version: 0.4 [ 0.327852] virtio-pci 0000:00:02.0: enabling device (0000 -> 0001) [ 0.329448] virtio-pci 0000:00:02.0: can't find IRQ for PCI INT B; please try using pci=biosirq [ 0.331788] virtio-pci 0000:00:0a.0: enabling device (0000 -> 0001) [ 0.333397] virtio-pci 0000:00:0a.0: can't find IRQ for PCI INT A; please try using pci=biosirq [ 0.335690] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 0.358999] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A [ 0.382317] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A [ 0.405555] serial8250: ttyS2 at I/O 0x3e8 (irq = 4) is a 16550A [ 0.407353] virtio_console virtio0: Error -16 initializing vqs [ 0.408695] virtio_console: probe of virtio0 failed with error -16 [ 0.410446] lp: driver loaded but no devices found [ 0.411776] ppdev: user-space parallel port driver [ 0.413003] Linux agpgart interface v0.103 [ 0.414080] [drm] Initialized drm 1.1.0 20060810 [ 0.416261] brd: module loaded [ 0.417546] loop: module loaded [ 0.418470] virtio_blk: probe of virtio1 failed with error -16 [ 0.420806] Fixed MDIO Bus: probed [ 0.421717] sky2: driver version 1.28 [ 0.422684] PPP generic driver version 2.4.2 [ 0.423777] tun: Universal TUN/TAP device driver, 1.6 [ 0.425037] tun: (C) 1999-2004 Max Krasnyansky <[email protected]> [ 0.426588] console [netcon0] enabled [ 0.427454] netconsole: network logging started [ 0.428536] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.430087] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 0.431484] uhci_hcd: USB Universal Host Controller Interface driver [ 0.433134] usbcore: registered new interface driver usbserial [ 0.434611] usbserial: USB Serial Driver core [ 0.435727] USB Serial support registered for pl2303 [ 0.436931] usbcore: registered new interface driver pl2303 [ 0.438214] pl2303: Prolific PL2303 USB to serial adaptor driver [ 0.439730] usbcore: registered new interface driver isight_firmware [ 0.441390] usbcore: registered new interface driver sisusb [ 0.442838] i8042: PNP: No PS/2 controller found. Probing ports directly. [ 1.016545] i8042: Can't read CTR while initializing i8042 [ 1.017954] i8042: probe of i8042 failed with error -5 [ 1.019305] mousedev: PS/2 mouse device common for all mice [ 1.020764] usbcore: registered new interface driver appletouch [ 1.022547] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0 [ 1.024189] rtc0: alarms up to one day, 114 bytes nvram [ 1.025490] applesmc: supported laptop not found! [ 1.026560] applesmc: driver init failed (ret=-19)! [ 1.027745] device-mapper: uevent: version 1.0.3 [ 1.028871] device-mapper: ioctl: 4.20.0-ioctl (2011-02-02) initialised: [email protected] [ 1.031040] device-mapper: multipath: version 1.3.0 loaded [ 1.032514] device-mapper: multipath round-robin: version 1.0.0 loaded [ 1.034229] Bluetooth: Generic Bluetooth USB driver ver 0.6 [ 1.035647] usbcore: registered new interface driver btusb [ 1.037031] cpuidle: using governor ladder [ 1.038056] cpuidle: using governor menu [ 1.039027] EFI Variables Facility v0.08 2004-May-17 [ 1.040495] usbcore: registered new interface driver usbhid [ 1.041746] usbhid: USB HID core driver [ 1.043358] ALSA device list: [ 1.044042] #0: Virtual MIDI Card 1 [ 1.044903] nf_conntrack version 0.5.0 (373 buckets, 1492 max) [ 1.046694] ip_tables: (C) 2000-2006 Netfilter Core Team [ 1.047912] TCP cubic registered [ 1.048820] NET: Registered protocol family 10 [ 1.050518] ip6_tables: (C) 2000-2006 Netfilter Core Team [ 1.051879] NET: Registered protocol family 17 [ 1.053066] Bridge firewalling registered [ 1.054164] Bluetooth: RFCOMM TTY layer initialized [ 1.055401] Bluetooth: RFCOMM socket layer initialized [ 1.056696] Bluetooth: RFCOMM ver 1.11 [ 1.057633] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 1.058964] Bluetooth: BNEP filters: protocol multicast [ 1.060340] Installing 9P2000 support [ 1.061301] Registering the dns_resolver key type [ 1.062595] registered taskstats version 1 [ 1.063689] Magic number: 11:657:244 [ 1.064801] rtc_cmos rtc_cmos: setting system clock to 2011-05-05 20:12:16 UTC (1304626336) [ 1.066872] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found [ 1.068349] EDD information not available. [ 1.069666] md: Waiting for all devices to be available before autodetect [ 1.071386] md: If you don't use raid, use raid=noautodetect [ 1.072930] md: Autodetecting RAID arrays. [ 1.073947] md: Scanned 0 and added 0 devices. [ 1.075044] md: autorun ... [ 1.075750] md: ... autorun DONE. [ 1.076662] VFS: Cannot open root device "vda1" or unknown-block(0,0) [ 1.078252] Please append a correct "root=" boot option; here are the available partitions: [ 1.080293] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) [ 1.082157] Pid: 1, comm: swapper Not tainted 2.6.39-rc6+ #29 [ 1.083437] Call Trace: [ 1.084000] [<ffffffff81709759>] panic+0x91/0x1a8 [ 1.085116] [<ffffffff817098b1>] ? printk+0x41/0x48 [ 1.086358] [<ffffffff81d13118>] mount_block_root+0x1ea/0x29e [ 1.087810] [<ffffffff81d13222>] mount_root+0x56/0x5a [ 1.089088] [<ffffffff81d13396>] prepare_namespace+0x170/0x19d [ 1.090497] [<ffffffff81d126b0>] kernel_init+0x12a/0x135 [ 1.091801] [<ffffffff81082f47>] ? schedule_tail+0x27/0xb0 [ 1.093210] [<ffffffff817150e4>] kernel_thread_helper+0x4/0x10 [ 1.094686] [<ffffffff81d12586>] ? parse_early_options+0x20/0x20 [ 1.096203] [<ffffffff817150e0>] ? gs_change+0x13/0x13
# KVM session terminated.
Re: [patch 2/2] kvm tools - Cleanup IRQs definitions for virtio pci devices
Quoted 10 lines · Pekka Enberg
Quoted 6 lines · Cyrill Gorcunov
This also requires to tune up mptable code. Note the srcbusirq need to follow specification convention, so we merge device number and pin into one field inside
mptable_set_default_int_srchelper.Signed-off-by Cyrill Gorcunov <[email protected]>This seems to break virtio drivers on my box.
Crap, thanks Pekka, I'll recheck. Drop this series for a while then.
Signature · 2 lines
Thanks, Cyrill
Pekka Enberg
AppliedRe: [patch 2/2] kvm tools - Cleanup IRQs definitions for virtio pci devices
Quoted 4 lines · Cyrill Gorcunov
Quoted 2 lines
This seems to break virtio drivers on my box.
Crap, thanks Pekka, I'll recheck. Drop this series for a while then.
I merged the first patch and fixed up PCI_VIRTIO_BLK_DEVNUM to 10.
Pekka
Re: [patch 2/2] kvm tools - Cleanup IRQs definitions for virtio pci devices
Quoted 9 lines · Pekka Enberg
Quoted 4 lines · Cyrill Gorcunov
Quoted 2 lines
This seems to break virtio drivers on my box.
Crap, thanks Pekka, I'll recheck. Drop this series for a while then.
I merged the first patch and fixed up
PCI_VIRTIO_BLK_DEVNUMto 10.Pekka
Hmm, I don't think it's correct but rather workaround, if only I not miss something...
Signature · 2 lines
Thanks, Cyrill
Re: [patch 2/2] kvm tools - Cleanup IRQs definitions for virtio pci devices
Quoted 11 lines · Cyrill Gorcunov
Quoted 7 lines · Pekka Enberg
Quoted 4 lines · Cyrill Gorcunov
Quoted 2 lines
This seems to break virtio drivers on my box.
Crap, thanks Pekka, I'll recheck. Drop this series for a while then.
I merged the first patch and fixed up
PCI_VIRTIO_BLK_DEVNUMto 10.Hmm, I don't think it's correct but rather workaround, if only I not miss something...
It's correct because commit b764422bb0b46b00b896f6d4538ac3d3dde9e56b ("kvm tools: Add support for multiple virtio-blk") changed it to 10.