Package: linux-2.6
Version: 2.6.32-30
Severity: normal
Tags: squeeze upstream patch

Hi,

As reported in:

        https://bugs.launchpad.net/ubuntu/+source/eucalyptus/+bug/602060

and (in a roundabout way) in:

        http://www.mail-archive.com/qemu-devel@nongnu.org/msg26223.html

the network inside a 2.6.32 kvm/qemu guest stops working if you hotplug a
virtio disk. There is a simple patch that fixes this problem, which was:

        - tested by Alexander Graf in the qemu-devel posting mentioned above,
        - accepted in the mainline kernel some time ago,
        - just tested by myself too.

The patch can be found at http://lkml.org/lkml/2009/11/29/73 as well as
below. Please include this patch, it makes life for KVM users a lot easier!





As all virtio devices perform DMA, we
must enable bus mastering for them to be
spec compliant.

Signed-off-by: Michael S. Tsirkin <m...@redhat.com>
---
 drivers/virtio/virtio_pci.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 28d9cf7..717bae1 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -648,6 +648,7 @@ static int __devinit virtio_pci_probe(struct pci_dev 
*pci_dev,
                goto out_req_regions;
 
        pci_set_drvdata(pci_dev, vp_dev);
+       pci_set_master(pci_dev);
 
        /* we use the subsystem vendor/device id as the virtio vendor/device
         * id.  this allows us to use the same PCI vendor/device id for all




Thanks,

-- 
Wessel Dankers

-- System Information:
Debian Release: 6.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/3 CPU cores)
Locale: LANG=nl_NL.UTF-8, LC_CTYPE=nl_NL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages linux-image-2.6.32-5-amd64 depends on:
ii  debconf [debconf-2.0]         1.5.36     Debian configuration management sy
ii  initramfs-tools [linux-initra 0.98.7     tools for generating an initramfs
ii  linux-base                    2.6.32-30  Linux image base package
ii  module-init-tools             3.12-1     tools for managing Linux kernel mo

Versions of packages linux-image-2.6.32-5-amd64 recommends:
pn  firmware-linux-free           <none>     (no description available)

Versions of packages linux-image-2.6.32-5-amd64 suggests:
pn  grub | lilo                   <none>     (no description available)
ii  linux-doc-2.6.32              2.6.32-30  Linux kernel specific documentatio

Versions of packages linux-image-2.6.32-5-amd64 is related to:
pn  firmware-bnx2                 <none>     (no description available)
pn  firmware-bnx2x                <none>     (no description available)
pn  firmware-ipw2x00              <none>     (no description available)
pn  firmware-ivtv                 <none>     (no description available)
pn  firmware-iwlwifi              <none>     (no description available)
pn  firmware-linux                <none>     (no description available)
pn  firmware-linux-nonfree        <none>     (no description available)
pn  firmware-qlogic               <none>     (no description available)
pn  firmware-ralink               <none>     (no description available)
pn  xen-hypervisor                <none>     (no description available)

-- debconf information excluded

-- Package-specific info:
** Version:
Linux version 2.6.32-5-amd64 (Debian 2.6.32-30) (b...@decadent.org.uk) (gcc 
version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Wed Jan 12 03:40:32 UTC 2011

** Command line:
BOOT_IMAGE=/boot/vmlinuz-2.6.32-5-amd64 root=/dev/mapper/sys-root ro 
console=ttyS0,115200 elevator=noop rootflags=logbufs=8,logbsize=256k,noatime 
quiet

** Not tainted

** Kernel log:
[    0.387896]   alloc irq_desc for 24 on node -1
[    0.387899]   alloc kstat_irqs on node -1
[    0.387922] virtio-pci 0000:00:04.0: irq 24 for MSI/MSI-X
[    0.387924]   alloc irq_desc for 25 on node -1
[    0.387926]   alloc kstat_irqs on node -1
[    0.387940] virtio-pci 0000:00:04.0: irq 25 for MSI/MSI-X
[    0.388631]  vda:
[    0.390785] ata_piix 0000:00:01.1: version 2.13
[    0.390852] ata_piix 0000:00:01.1: setting latency timer to 64
[    0.391039] scsi0 : ata_piix
[    0.391212] scsi1 : ata_piix
[    0.391269] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc000 irq 14
[    0.391271] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc008 irq 15
[    0.401910] FDC 0 is a S82078B
[    0.410013]  vda1 vda2
[    0.410456]   alloc irq_desc for 26 on node -1
[    0.410458]   alloc kstat_irqs on node -1
[    0.410479] virtio-pci 0000:00:03.0: irq 26 for MSI/MSI-X
[    0.410481]   alloc irq_desc for 27 on node -1
[    0.410482]   alloc kstat_irqs on node -1
[    0.410496] virtio-pci 0000:00:03.0: irq 27 for MSI/MSI-X
[    0.410498]   alloc irq_desc for 28 on node -1
[    0.410499]   alloc kstat_irqs on node -1
[    0.410514] virtio-pci 0000:00:03.0: irq 28 for MSI/MSI-X
[    0.413362]   alloc irq_desc for 29 on node -1
[    0.413369]   alloc kstat_irqs on node -1
[    0.413431] virtio-pci 0000:00:05.0: irq 29 for MSI/MSI-X
[    0.413438]   alloc irq_desc for 30 on node -1
[    0.413442]   alloc kstat_irqs on node -1
[    0.413490] virtio-pci 0000:00:05.0: irq 30 for MSI/MSI-X
[    0.414669]  vdb: unknown partition table
[    0.545705] ata2.01: NODEV after polling detection
[    0.546184] ata2.00: ATAPI: QEMU DVD-ROM, 0.12.5, max UDMA/100
[    0.547030] ata2.00: configured for MWDMA2
[    0.548261] scsi 1:0:0:0: CD-ROM            QEMU     QEMU DVD-ROM     0.12 
PQ: 0 ANSI: 5
[    0.568792] sr0: scsi3-mmc drive: 4x/4x xa/form2 tray
[    0.568800] Uniform CD-ROM driver Revision: 3.20
[    0.569416] sr 1:0:0:0: Attached scsi CD-ROM sr0
[    0.578872] sr 1:0:0:0: Attached scsi generic sg0 type 5
[    1.146940] device-mapper: uevent: version 1.0.3
[    1.147400] device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: 
dm-de...@redhat.com
[    1.293013] SGI XFS with ACLs, security attributes, realtime, large 
block/inode numbers, no debug enabled
[    1.296115] SGI XFS Quota Management subsystem
[    1.348953] XFS mounting filesystem dm-0
[    1.541703] Ending clean XFS mount for filesystem: dm-0
[    2.709358] udev[354]: starting version 164
[    2.893556] processor LNXCPU:00: registered as cooling_device0
[    2.894008] processor LNXCPU:01: registered as cooling_device1
[    2.894100] processor LNXCPU:02: registered as cooling_device2
[    2.894449] processor LNXCPU:03: registered as cooling_device3
[    2.895461] input: Power Button as 
/devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
[    2.895476] ACPI: Power Button [PWRF]
[    2.897293] input: PC Speaker as /devices/platform/pcspkr/input/input3
[    2.953568] parport_pc 00:05: reported by Plug and Play ACPI
[    2.954213] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
[    2.955790] piix4_smbus 0000:00:01.3: SMBus Host Controller at 0xb100, 
revision 0
[    3.021181] Error: Driver 'pcspkr' is already registered, aborting...
[    3.393990] input: ImExPS/2 Generic Explorer Mouse as 
/devices/platform/i8042/serio1/input/input4
[    4.217351] loop: module loaded
[    4.487709] XFS mounting filesystem dm-1
[    4.727805] Ending clean XFS mount for filesystem: dm-1
[    4.787790] XFS mounting filesystem dm-3
[    5.011448] Ending clean XFS mount for filesystem: dm-3
[    5.039698] XFS mounting filesystem dm-2
[    5.240278] Ending clean XFS mount for filesystem: dm-2
[    5.291756] XFS mounting filesystem dm-4
[    5.543067] Ending clean XFS mount for filesystem: dm-4
[    5.592136] XFS mounting filesystem dm-5
[    5.920403] Ending clean XFS mount for filesystem: dm-5
[    5.962066] XFS mounting filesystem vdb
[    6.697615] Ending clean XFS mount for filesystem: vdb
[    8.392712] RPC: Registered udp transport module.
[    8.392714] RPC: Registered tcp transport module.
[    8.392716] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    8.535415] Slow work thread pool: Starting up
[    8.536098] Slow work thread pool: Ready
[    8.536432] FS-Cache: Loaded
[    8.589758] FS-Cache: Netfs 'nfs' registered for caching
[    8.612823] Installing knfsd (copyright (C) 1996 o...@monad.swb.de).
[    9.175547] svc: failed to register lockdv1 RPC service (errno 97).
[    9.177496] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery 
directory
[    9.195060] NFSD: starting 90-second grace period
[ 6326.737925] XFS mounting filesystem dm-6
[ 6327.020141] Ending clean XFS mount for filesystem: dm-6
[ 7818.148444] hrtimer: interrupt took 51992795 ns
[11809.208099] CPU0 attaching NULL sched-domain.
[11809.208103] CPU1 attaching NULL sched-domain.
[11809.208105] CPU2 attaching NULL sched-domain.
[11809.208107] CPU3 attaching NULL sched-domain.
[11809.236549] CPU0 attaching sched-domain:
[11809.236553]  domain 0: span 0-2 level CPU
[11809.236555]   groups: 0 1 2
[11809.236560] CPU1 attaching sched-domain:
[11809.236562]  domain 0: span 0-2 level CPU
[11809.236564]   groups: 1 2 0
[11809.236567] CPU2 attaching sched-domain:
[11809.236569]  domain 0: span 0-2 level CPU
[11809.236570]   groups: 2 0 1
[11809.237512] Broke affinity for irq 27
[11809.240165] CPU 3 is now offline

** Model information
sys_vendor: Bochs
product_name: Bochs
product_version: 
chassis_vendor: Bochs
chassis_version: 
bios_vendor: Bochs
bios_version: Bochs

** Loaded modules:
Module                  Size  Used by
tcp_diag                 880  0 
inet_diag               6914  2 tcp_diag
nfsd                  254782  13 
nfs                   241066  0 
lockd                  57603  2 nfsd,nfs
fscache                29834  1 nfs
nfs_acl                 2031  2 nfsd,nfs
auth_rpcgss            33476  2 nfsd,nfs
sunrpc                161541  13 nfsd,nfs,lockd,nfs_acl,auth_rpcgss
loop                   11799  0 
snd_pcm                60503  0 
snd_timer              15582  1 snd_pcm
snd                    46446  2 snd_pcm,snd_timer
soundcore               4598  1 snd
i2c_piix4               8328  0 
parport_pc             18855  0 
psmouse                49777  0 
snd_page_alloc          6249  1 snd_pcm
i2c_core               15712  1 i2c_piix4
parport                27954  1 parport_pc
evdev                   7352  2 
serio_raw               3752  0 
pcspkr                  1699  0 
button                  4650  0 
processor              29935  0 
xfs                   436941  8 
exportfs                3170  2 nfsd,xfs
dm_mod                 53754  21 
sg                     18744  0 
sr_mod                 12602  0 
cdrom                  29415  1 sr_mod
ata_generic             3047  0 
ata_piix               21124  0 
virtio_net             10529  0 
virtio_blk              4225  3 
floppy                 49087  0 
thermal                11674  0 
libata                133632  2 ata_generic,ata_piix
virtio_pci              5535  0 
virtio_ring             3258  1 virtio_pci
virtio                  3309  3 virtio_net,virtio_blk,virtio_pci
thermal_sys            11942  2 processor,thermal
scsi_mod              122149  3 sg,sr_mod,libata

** PCI devices:
00:00.0 Host bridge [0600]: Intel Corporation 440FX - 82441FX PMC [Natoma] 
[8086:1237] (rev 02)
        Subsystem: Red Hat, Inc Qemu virtual machine [1af4:1100]
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- 
<MAbort- >SERR- <PERR- INTx-

00:01.0 ISA bridge [0601]: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton 
II] [8086:7000]
        Subsystem: Red Hat, Inc Qemu virtual machine [1af4:1100]
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0

00:01.1 IDE interface [0101]: Intel Corporation 82371SB PIIX3 IDE 
[Natoma/Triton II] [8086:7010] (prog-if 80 [Master])
        Subsystem: Red Hat, Inc Qemu virtual machine [1af4:1100]
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Region 0: [virtual] Memory at 000001f0 (32-bit, non-prefetchable) 
[size=8]
        Region 1: [virtual] Memory at 000003f0 (type 3, non-prefetchable) 
[size=1]
        Region 2: [virtual] Memory at 00000170 (32-bit, non-prefetchable) 
[size=8]
        Region 3: [virtual] Memory at 00000370 (type 3, non-prefetchable) 
[size=1]
        Region 4: I/O ports at c000 [size=16]
        Kernel driver in use: ata_piix

00:01.3 Bridge [0680]: Intel Corporation 82371AB/EB/MB PIIX4 ACPI [8086:7113] 
(rev 03)
        Subsystem: Red Hat, Inc Qemu virtual machine [1af4:1100]
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 9
        Kernel driver in use: piix4_smbus

00:02.0 VGA compatible controller [0300]: Cirrus Logic GD 5446 [1013:00b8] 
(prog-if 00 [VGA controller])
        Subsystem: Red Hat, Inc Device [1af4:1100]
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- 
<MAbort- >SERR- <PERR- INTx-
        Region 0: Memory at f0000000 (32-bit, prefetchable) [size=32M]
        Region 1: Memory at f2000000 (32-bit, non-prefetchable) [size=4K]
        Expansion ROM at f2010000 [disabled] [size=64K]

00:03.0 Ethernet controller [0200]: Red Hat, Inc Virtio network device 
[1af4:1000]
        Subsystem: Red Hat, Inc Device [1af4:0001]
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- 
<MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 11
        Region 0: I/O ports at c020 [size=32]
        Region 1: Memory at f2020000 (32-bit, non-prefetchable) [size=4K]
        Expansion ROM at f2028000 [disabled] [size=32K]
        Capabilities: <access denied>
        Kernel driver in use: virtio-pci

00:04.0 SCSI storage controller [0100]: Red Hat, Inc Virtio block device 
[1af4:1001]
        Subsystem: Red Hat, Inc Device [1af4:0002]
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- 
<MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 10
        Region 0: I/O ports at c040 [size=64]
        Region 1: Memory at f2030000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>
        Kernel driver in use: virtio-pci

00:05.0 SCSI storage controller [0100]: Red Hat, Inc Virtio block device 
[1af4:1001]
        Subsystem: Red Hat, Inc Device [1af4:0002]
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- 
<MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 10
        Region 0: I/O ports at c080 [size=64]
        Region 1: Memory at f2031000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>
        Kernel driver in use: virtio-pci


** USB devices:
not available



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to