Re: [Patch] Virtio drivers for OpenBSD V8

2012-09-02 Thread Stefan Fritsch
On Saturday 01 September 2012, LEVAI Daniel wrote:

  I've just started to test this with an OpenBSD guest on a Linux
  host. vio0 NIC and the virtio disk work like a charm.
  I have a slightly (~10%) better performance with the ide
  emulation than with virtio, but nevertheless it works.

Thanks for testing. How did you test the performance? 

 Well, weird thing is that some time after I've sent this mail, a
 few messages appeared in the logs while updating /usr/ports on the
 guest:
 
 virtio timeout vioblk0: sc_queued 5 vq_num 128
 vq_avail_idx: 27965 vq_avail-idx: 27965 vq_avail-flags: 1
 vq_used_idx:  27960 vq_used-idx:  27960 vq_used-flags:  0
 
 
 Are these errors or just some debug information for the devs?

These are just debugging leftovers. I will remove them in the next 
version.



Re: [Patch] Virtio drivers for OpenBSD V8

2012-09-01 Thread LEVAI Daniel
 Here comes the next revision. Changes from v7:
[...]

Hi!


I've just started to test this with an OpenBSD guest on a Linux host.
vio0 NIC and the virtio disk work like a charm.
I have a slightly (~10%) better performance with the ide emulation than
with virtio, but nevertheless it works.

Here is how I use qemu on a Slackware32 -current:

qemu-kvm \
-enable-kvm \
-cpu 
kvm32,+fxsr,+3dnow,+3dnowext,+abm,+cx16,+popcnt,+sse,+sse2,+sse4a,+svm,+ht,+vme,+mmx,+clflush,+pse36,+pat,+cmov,+mca,+pge,+mtrr,+sep,+apic,+cx8,+mce,+pae,+msr,+tsc,+pse,+de,+fpu,+popcnt,+cx16,+monitor,+sse3,+lm,+rdtscp,+pdpe1gb,+fxsr_opt,+mmxext,+nx,+syscall,+lahf_lm
 
-smp 2 \
-m 512 \
-drive 
index=0,media=disk,file=openbsd-${RELEASE}.img,if=virtio,cache=writeback,format=qcow2
 \
-net nic,model=virtio,macaddr=${MAC_ADDRESS} -net 
tap,ifname=tap0,script=no,downscript=no \
-curses

Here is a dmesg from the guest:


OpenBSD 5.2-current (GENERIC.MP) #0: Sat Sep  1 15:08:51 CEST 2012
dani...@openbsd.my.domain:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Common 32-bit KVM processor (AuthenticAMD 686-class, 512KB L2 cache) 
3.11 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,MMXX,FFXSR,3DNOW2,3DNOW,SSE3,CX16,POPCNT,LAHF,SVM,ABM,SSE4A
real mem  = 536387584 (511MB)
avail mem = 516661248 (492MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 06/23/99, BIOS32 rev. 0 @ 0xff046, SMBIOS 
rev. 2.4 @ 0xfd900 (11 entries)
bios0: vendor Bochs version Bochs date 01/01/2007
bios0: Bochs Bochs
acpi0 at bios0: rev 0
acpi0: sleep states S3 S4 S5
acpi0: tables DSDT FACP SSDT APIC HPET
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
acpihpet0 at acpi0: 1 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
mpbios0 at bios0: Intel MP Specification 1.4
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 1000MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Common 32-bit KVM processor (AuthenticAMD 686-class, 512KB L2 cache) 
3.11 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,MMXX,FFXSR,3DNOW2,3DNOW,SSE3,CX16,POPCNT,LAHF,SVM,ABM,SSE4A
mpbios0: bus 0 is type PCI   
mpbios0: bus 1 is type ISA   
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 11, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
bios0: ROM list: 0xc/0x8c00 0xc9000/0xa00 0xca000/0x2400
vmt0 at mainbus0
vmware: open failed, eax=564d5868, ecx=001e, edx=5658
vmt0: failed to open backdoor RPC channel (TCLO protocol)
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
pciide0: channel 0 disabled (no drives)
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: QEMU, QEMU DVD-ROM, 1.0, ATAPI 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2
piixpm0 at pci0 dev 1 function 3 Intel 82371AB Power rev 0x03: apic 2 int 9
iic0 at piixpm0
iic0: addr 0x19 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01= 
02= 03= 04= 05= 06= 07=
iic0: addr 0x1b 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01= 
02= 03= 04= 05= 06= 07=
iic0: addr 0x1c 0f=00 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01= 
02= 03= 04= 05= 06= 07=
iic0: addr 0x1d 0f=00 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01= 
02= 03= 04= 05= 06= 07=
iic0: addr 0x1e 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01= 
02= 03= 04= 05= 06= 07=
iic0: addr 0x1f 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01= 
02= 03= 04= 05= 06= 07=
iic0: addr 0x29 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0 words 
00= 01= 02= 03= 04= 05= 06= 07=
iic0: addr 0x2b 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0 words 
00= 01= 02= 03= 04= 05= 06= 07=
iic0: addr 0x4c 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0 words 
00= 01= 02= 03= 04= 05= 06= 07=
iic0: addr 0x4e 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0 words 
00= 01= 02= 03= 04= 05= 06= 07=
vga1 at pci0 dev 2 function 0 Cirrus Logic CL-GD5446 rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
virtio0 at pci0 dev 3 function 0 Qumranet Virtio Network rev 0x00 Virtio 
Network Device
vio0 at virtio0 +MAC -GSO -MrgRXBuf +Status +CtrlVQ +CtrlRX -CtrlVLAN 
-CtrlRXExtra -NotifyOnEmpty +RingIndirectDesc 

Re: [Patch] Virtio drivers for OpenBSD V8

2012-09-01 Thread LEVAI Daniel
On szo, szept 01, 2012 at 16:00:06 +0200, LEVAI Daniel wrote:
  Here comes the next revision. Changes from v7:
 [...]
 
 Hi!
 
 
 I've just started to test this with an OpenBSD guest on a Linux host.
 vio0 NIC and the virtio disk work like a charm.
 I have a slightly (~10%) better performance with the ide emulation than
 with virtio, but nevertheless it works.
[...]

Well, weird thing is that some time after I've sent this mail, a few
messages appeared in the logs while updating /usr/ports on the guest:

virtio timeout vioblk0: sc_queued 5 vq_num 128
vq_avail_idx: 27965 vq_avail-idx: 27965 vq_avail-flags: 1
vq_used_idx:  27960 vq_used-idx:  27960 vq_used-flags:  0


Are these errors or just some debug information for the devs?


Daniel

-- 
LÉVAI Dániel
PGP key ID = 0x83B63A8F
Key fingerprint = DBEC C66B A47A DFA2 792D  650C C69B BE4C 83B6 3A8F