Re: vio(4) stops working with debian 9.0 qemu-2.8+dfsg-6

2017-07-11 Thread Karsten Horsmann
Hi Stefan,

thank you for the bug report and your investigation on this.

Cheers
Karsten

Am 10.07.2017 10:27 nachm. schrieb "Mike Larkin" :

> On Mon, Jul 10, 2017 at 10:22:06PM +0200, Stefan Fritsch wrote:
> > On Saturday, 8 July 2017 14:58:59 CEST Stefan Fritsch wrote:
> > > A difference between i386 and amd64 is that on amd64, openbsd uses
> MSI-X for
> > > virtio. Maybe legacy interrupts are broken with vhost-net. This needs
> some
> > > more debugging. But its either a bug in qemu or in the linux kernel,
> not in
> > > openbsd.
> >
> > It's also broken with amd64 if MSI-X is disabled.
> >
> > It's fixed in qemu 2.9. Debian bug report:
> > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867978
> >
> > Cheers,
> > Stefan
> >
>
> Thanks for tracking this down, Stefan!
>
> -ml
>


Re: vio(4) stops working with debian 9.0 qemu-2.8+dfsg-6

2017-07-10 Thread Mike Larkin
On Mon, Jul 10, 2017 at 10:22:06PM +0200, Stefan Fritsch wrote:
> On Saturday, 8 July 2017 14:58:59 CEST Stefan Fritsch wrote:
> > A difference between i386 and amd64 is that on amd64, openbsd uses MSI-X for
> > virtio. Maybe legacy interrupts are broken with vhost-net. This needs some
> > more debugging. But its either a bug in qemu or in the linux kernel, not in
> > openbsd.
> 
> It's also broken with amd64 if MSI-X is disabled.
> 
> It's fixed in qemu 2.9. Debian bug report: 
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867978
> 
> Cheers,
> Stefan
> 

Thanks for tracking this down, Stefan!

-ml



Re: vio(4) stops working with debian 9.0 qemu-2.8+dfsg-6

2017-07-10 Thread Stefan Fritsch
On Saturday, 8 July 2017 14:58:59 CEST Stefan Fritsch wrote:
> A difference between i386 and amd64 is that on amd64, openbsd uses MSI-X for
> virtio. Maybe legacy interrupts are broken with vhost-net. This needs some
> more debugging. But its either a bug in qemu or in the linux kernel, not in
> openbsd.

It's also broken with amd64 if MSI-X is disabled.

It's fixed in qemu 2.9. Debian bug report: 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867978

Cheers,
Stefan



Re: vio(4) stops working with debian 9.0 qemu-2.8+dfsg-6

2017-07-08 Thread Stefan Fritsch
Hi Karsten,

On Wednesday, 5 July 2017 12:51:26 CEST Karsten Horsmann wrote:
> found an very strange problem, which seems more to be an
> qemu/kvm issue. Maybe one of you knows what happens and
> give me an hint to solved this (with vio).
> 
> I use an debian 9.0 kvm/qemu setup with bridge-networking.
> 
> After i upgrade from debian 8.0 to 9.0 i run into a problem
> with my OpenBSD 6.0 i386, OpenBSD 6.1 i386 guests and the
> vio(4) driver.

That's weird. But I don't use i386 much anymore, so I didn't notice it so far. 
It seems qemu does not send rx interrupts to the guest. It does send tx 
interrupts, though. But the problem seems to occur only if vhost is used. As a 
workaround set driver to 'qemu' (instead of 'vhost') in the libvirt xml:


  
  
  
  
  


A difference between i386 and amd64 is that on amd64, openbsd uses MSI-X for 
virtio. Maybe legacy interrupts are broken with vhost-net. This needs some 
more debugging. But its either a bug in qemu or in the linux kernel, not in 
openbsd.

Cheers,
Stefan



vio(4) stops working with debian 9.0 qemu-2.8+dfsg-6

2017-07-05 Thread Karsten Horsmann
Hello,

found an very strange problem, which seems more to be an
qemu/kvm issue. Maybe one of you knows what happens and
give me an hint to solved this (with vio).

I use an debian 9.0 kvm/qemu setup with bridge-networking.

After i upgrade from debian 8.0 to 9.0 i run into a problem
with my OpenBSD 6.0 i386, OpenBSD 6.1 i386 guests and the
vio(4) driver.

I also know that is better to use the amd64 stuff on an amd64 host.
Used this combination for crosscompile for i386 targets.

I tried the 0x2 settings to vio and reboot. No success.
If i change the device to e1000 in qemu/kvm it works.

On google and the archives i found only stuff for the OpenBSD 5.x
and/or KVM below 1.7.

I also destroyed the kvm/qemu default-network and setup
the bridge manually.

The arp table on the guest is empty (only the vio card itself).

The arp table on the hosts:

root@m1:~/install-obsd# brctl showmacs virbr0
port no mac addr is local? ageing timer
  2 52:54:00:5c:cf:5c no  12.32
  2 fe:54:00:5c:cf:5c yes   0.00
  2 fe:54:00:5c:cf:5c yes   0.00
  1 fe:54:00:67:5c:bd yes   0.00
  1 fe:54:00:67:5c:bd yes   0.00

dmesg on the OpenBSD guest 6.1:

OpenBSD 6.1 (GENERIC.MP) #291: Sat Apr  1 13:53:41 MDT 2017
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel Xeon E3-12xx v2 (Ivy Bridge) ("GenuineIntel" 686-class) 3.40 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CF
LUSH,MMX,FXSR,SSE,SSE2,NXE,LONG,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,x2APIC,POPC
NT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,LAHF,FSGSBASE,SMEP,ERMS,ARAT
real mem  = 2146844672 (2047MB)
avail mem = 2092953600 (1995MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 06/23/99, BIOS32 rev. 0 @ 0xfd5a3, SMBIOS rev. 2.8
@ 0xf
68a0 (10 entries)
bios0: vendor SeaBIOS version "1.10.2-1" date 04/01/2014
bios0: QEMU Standard PC (i440FX + PIIX, 1996)
acpi0 at bios0: rev 0
acpi0: sleep states S5
acpi0: tables DSDT FACP APIC
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
# dmesg
OpenBSD 6.1 (GENERIC.MP) #291: Sat Apr  1 13:53:41 MDT 2017
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel Xeon E3-12xx v2 (Ivy Bridge) ("GenuineIntel" 686-class) 3.40 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,NXE,LONG,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,LAHF,FSGSBASE,SMEP,ERMS,ARAT
real mem  = 2146844672 (2047MB)
avail mem = 2092953600 (1995MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 06/23/99, BIOS32 rev. 0 @ 0xfd5a3, SMBIOS rev. 2.8
@ 0xf68a0 (10 entries)
bios0: vendor SeaBIOS version "1.10.2-1" date 04/01/2014
bios0: QEMU Standard PC (i440FX + PIIX, 1996)
acpi0 at bios0: rev 0
acpi0: sleep states S5
acpi0: tables DSDT FACP APIC
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 1000MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel Xeon E3-12xx v2 (Ivy Bridge) ("GenuineIntel" 686-class) 3.40 GHz
cpu1:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,NXE,LONG,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,LAHF,FSGSBASE,SMEP,ERMS,ARAT
ioapic0 at mainbus0: apid 0 pa 0xfec0, version 11, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0: C1(@1 halt!)
acpicpu1 at acpi0: C1(@1 halt!)
"ACPI0006" at acpi0 not configured
"PNP0303" at acpi0 not configured
"PNP0F13" at acpi0 not configured
"PNP0700" at acpi0 not configured
"PNP0501" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"QEMU0002" at acpi0 not configured
"ACPI0010" at acpi0 not configured
bios0: ROM list: 0xc/0x9a00 0xca000/0xe00 0xcb000/0x2400 0xec000/0x4000!
pvbus0 at mainbus0: KVM
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel
0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: 
wd0: 16-sector PIO, LBA48, 30720MB, 62914560 sectors
atapiscsi0 at pciide0 channel 0 drive 1
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0:  ATAPI 5/cdrom
removable
wd0(pciide0:0:0): using PIO mode 4, DMA mode 2
cd0(pciide0:0:1): using PIO mode 4, DMA mode 2
pciide0: channel 1 disabled (no drives)
piixpm0 at pci0 dev 1 function 3 "Intel 82371AB Power"