On Wed, Dec 04, 2013 at 09:33:18AM -0800, Matthew Dempsky wrote: > On Wed, Dec 4, 2013 at 9:19 AM, Jiri B <ji...@devio.us> wrote: > > I have problem to compile it :/ > > Are you sure you applied the patch cleanly? I'd recommend running > > cd /usr/src/sys > ftp https://codereview.appspot.com/download/issue33540044_80001.diff > patch < issue33540044_80001.diff > > > In file included from ../../../../dev/pci/vioscsi.c:889: > > vioscsi.c should only be 432 lines long, so I suspect you accidentally > applied the patch three times?
You were right, PEBKAC issue. This is iscsi lun path-through via virtio-scsi on RHEVM 3.3: -%- virtio1 at pci0 dev 4 function 0 vendor "Qumranet", unknown product 0x1004 rev 0x00: Virtio SCSI host Device vioscsi0 at virtio1: qsize 128 scsibus1 at vioscsi0: 255 targets sd0 at scsibus1 targ 0 lun 0: <RH-str02, VIRTUAL-DISK, 0001> SCSI3 0/direct fixed t10.jbelka_ sd0: 112640MB, 512 bytes/sector, 230686720 sectors virtio1: apic 0 int 11 -%- virtio1 should be a HBA? http://www.ovirt.org/Features/Virtio-SCSI qemu-kvm cmd: -%- # ps axww | grep 'qemu.*obsd' 25739 ? Sl 6:18 /usr/libexec/qemu-kvm -name test-obsd -S -M rhel6.5.0 -cpu SandyBridge -enable-kvm -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 4571ad62-1505-48f4-a897-7888734b81f2 -smbios type=1,manufacturer=Red Hat,product=RHEV Hypervisor,version=6.5-20131127.0.el6,serial=4C4C4544-0058-3410-8058-C3C04F38354A,uuid=4571ad62-1505-48f4-a897-7888734b81f2 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/test-obsd.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=2013-12-04T19:39:38,driftfix=slew -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw,serial= -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -drive file=/rhev/data-center/mnt/10.34.63.199:_jbelka_jb33/3a2b98c! 2-74a0-45fa-8112-331099642625/images/9f1673a3-23a6-4b78-98e8-6a810bb570b4/9679f3dd-9dc7-413d-a0b2-926acb4128c2,if=none,id=drive-virtio-disk0,format=raw,serial=9f1673a3-23a6-4b78-98e8-6a810bb570b4,cache=none,werror=stop,rerror=stop,aio=threads -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/dev/mapper/1jbelka,if=none,id=drive-scsi0-0-0-0,format=raw,serial=,cache=none,werror=stop,rerror=stop,aio=native -device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0 -netdev tap,fd=31,id=hostnet0,vhost=on,vhostfd=32 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:e3:3f:9f,bus=pci.0,addr=0x3 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channels/4571ad62-1505-48f4-a897-7888734b81f2.com.redhat.rhevm.vdsm,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm -chardev socket,id=charchannel1! ,path=/var/lib/libvirt/qemu/channels/4571ad62-1505-48f4-a897-7888734b81f2.org.qemu.guest_agent.0,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.qemu.guest_agent.0 -chardev spicevmc,id=charchannel2,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=3,chardev=charchannel2,id=channel2,name=com.redhat.spice.0 -spice port=5902,tls-port=5903,addr=0,x509-dir=/etc/pki/vdsm/libvirt-spice,tls-channel=main,tls-channel=display,tls-channel=inputs,tls-channel=cursor,tls-channel=playback,tls-channel=record,tls-channel=smartcard,tls-channel=usbredir,seamless-migration=on -k en-us -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=33554432 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -%- full dmesg: -%- OpenBSD 5.4-current (GENERIC) #0: Wed Dec 4 20:32:28 CET 2013 r...@test-obsd.rhev.lab.eng.brq.redhat.com:/usr/src/sys/arch/amd64/compile/GENERIC real mem = 1056952320 (1007MB) avail mem = 1020768256 (973MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.4 @ 0x3ffffe90 (10 entries) bios0: vendor Seabios version "0.5.1" date 01/01/2007 bios0: Red Hat RHEV Hypervisor acpi0 at bios0: rev 0 acpi0: sleep states S5 acpi0: tables DSDT FACP SSDT APIC SSDT acpi0: wakeup devices acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat acpiprt0 at acpi0: bus 0 (PCI0) acpicpu0 at acpi0 mpbios0 at bios0: Intel MP Specification 1.4 cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel Xeon E312xx (Sandy Bridge), 3292.78 MHz cpu0: FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 16-way L2 cache cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped cpu0: smt 0, core 0, package 0 cpu0: apic clock running at 1000MHz mpbios0: bus 0 is type PCI mpbios0: bus 1 is type ISA ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 24 pins pci0 at mainbus0 bus 0 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, 0.12> ATAPI 5/cdrom removable cd0(pciide0:1:0): using PIO mode 0 uhci0 at pci0 dev 1 function 2 "Intel 82371SB USB" rev 0x01: apic 0 int 11 piixpm0 at pci0 dev 1 function 3 "Intel 82371AB Power" rev 0x03: apic 0 int 9 iic0 at piixpm0 iic0: addr 0x4c 48=00 words 00=0000 01=0000 02=0000 03=0000 04=0000 05=0000 06=0000 07=0000 iic0: addr 0x4e 48=00 words 00=0000 01=0000 02=0000 03=0000 04=0000 05=0000 06=0000 07=0000 vga1 at pci0 dev 2 function 0 unknown vendor 0x1b36 product 0x0100 rev 0x04 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: address 00:1a:4a:e3:3f:9f virtio0: apic 0 int 11 virtio1 at pci0 dev 4 function 0 vendor "Qumranet", unknown product 0x1004 rev 0x00: Virtio SCSI host Device vioscsi0 at virtio1: qsize 128 scsibus1 at vioscsi0: 255 targets sd0 at scsibus1 targ 0 lun 0: <RH-str02, VIRTUAL-DISK, 0001> SCSI3 0/direct fixed t10.jbelka_ sd0: 112640MB, 512 bytes/sector, 230686720 sectors virtio1: apic 0 int 11 virtio2 at pci0 dev 5 function 0 "Qumranet Virtio Console" rev 0x00: Virtio Console Device virtio2: no matching child driver; not configured virtio3 at pci0 dev 6 function 0 "Qumranet Virtio Storage" rev 0x00: Virtio Block Device vioblk0 at virtio3 scsibus2 at vioblk0: 2 targets sd1 at scsibus2 targ 0 lun 0: <VirtIO, Block Device, > SCSI3 0/direct fixed sd1: 10240MB, 512 bytes/sector, 20971520 sectors virtio3: apic 0 int 10 virtio4 at pci0 dev 7 function 0 "Qumranet Virtio Memory" rev 0x00: Virtio Memory Balloon Device viomb0 at virtio4 virtio4: apic 0 int 11 isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 pckbd0 at pckbc0 (kbd slot) pckbc0: using irq 1 for kbd slot wskbd0 at pckbd0: console keyboard, using wsdisplay0 pms0 at pckbc0 (aux slot) pckbc0: using irq 12 for aux slot wsmouse0 at pms0 mux 0 pcppi0 at isa0 port 0x61 spkr0 at pcppi0 fdc0 at isa0 port 0x3f0/6 irq 6 drq 2 fd0 at fdc0 drive 0: density unknown fd1 at fdc0 drive 1: density unknown usb0 at uhci0: USB revision 1.0 uhub0 at usb0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 nvram: invalid checksum mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges vscsi0 at root scsibus3 at vscsi0: 256 targets softraid0 at root scsibus4 at softraid0: 256 targets root on sd1a (b3ab731fec1724a5.a) swap on sd1b dump on sd1b clock: unknown CMOS layout -%- pcidump: -%- Domain /dev/pci0: 0:0:0: Intel 82441FX 0x0000: Vendor ID: 8086 Product ID: 1237 0x0004: Command: 0003 Status: 0000 0x0008: Class: 06 Subclass: 00 Interface: 00 Revision: 02 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 00 0x0010: BAR empty (00000000) 0x0014: BAR empty (00000000) 0x0018: BAR empty (00000000) 0x001c: BAR empty (00000000) 0x0020: BAR empty (00000000) 0x0024: BAR empty (00000000) 0x0028: Cardbus CIS: 00000000 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100 0x0030: Expansion ROM Base Address: 00000000 0x0038: 00000000 0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00 0:1:0: Intel 82371SB ISA 0x0000: Vendor ID: 8086 Product ID: 7000 0x0004: Command: 0007 Status: 0200 0x0008: Class: 06 Subclass: 01 Interface: 00 Revision: 00 0x000c: BIST: 00 Header Type: 80 Latency Timer: 00 Cache Line Size: 00 0x0010: BAR empty (00000000) 0x0014: BAR empty (00000000) 0x0018: BAR empty (00000000) 0x001c: BAR empty (00000000) 0x0020: BAR empty (00000000) 0x0024: BAR empty (00000000) 0x0028: Cardbus CIS: 00000000 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100 0x0030: Expansion ROM Base Address: 00000000 0x0038: 00000000 0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00 0:1:1: Intel 82371SB IDE 0x0000: Vendor ID: 8086 Product ID: 7010 0x0004: Command: 0007 Status: 0280 0x0008: Class: 01 Subclass: 01 Interface: 80 Revision: 00 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 00 0x0010: BAR empty (00000000) 0x0014: BAR empty (00000000) 0x0018: BAR empty (00000000) 0x001c: BAR empty (00000000) 0x0020: BAR io addr: 0x0000c000/0x0010 0x0024: BAR empty (00000000) 0x0028: Cardbus CIS: 00000000 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100 0x0030: Expansion ROM Base Address: 00000000 0x0038: 00000000 0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00 0:1:2: Intel 82371SB USB 0x0000: Vendor ID: 8086 Product ID: 7020 0x0004: Command: 0007 Status: 0000 0x0008: Class: 0c Subclass: 03 Interface: 00 Revision: 01 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 00 0x0010: BAR empty (00000000) 0x0014: BAR empty (00000000) 0x0018: BAR empty (00000000) 0x001c: BAR empty (00000000) 0x0020: BAR io addr: 0x0000c020/0x0020 0x0024: BAR empty (00000000) 0x0028: Cardbus CIS: 00000000 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100 0x0030: Expansion ROM Base Address: 00000000 0x0038: 00000000 0x003c: Interrupt Pin: 04 Line: 0b Min Gnt: 00 Max Lat: 00 0:1:3: Intel 82371AB Power 0x0000: Vendor ID: 8086 Product ID: 7113 0x0004: Command: 0003 Status: 0280 0x0008: Class: 06 Subclass: 80 Interface: 00 Revision: 03 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 00 0x0010: BAR empty (00000000) 0x0014: BAR empty (00000000) 0x0018: BAR empty (00000000) 0x001c: BAR empty (00000000) 0x0020: BAR empty (00000000) 0x0024: BAR empty (00000000) 0x0028: Cardbus CIS: 00000000 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100 0x0030: Expansion ROM Base Address: 00000000 0x0038: 00000000 0x003c: Interrupt Pin: 01 Line: 09 Min Gnt: 00 Max Lat: 00 0:2:0: unknown unknown 0x0000: Vendor ID: 1b36 Product ID: 0100 0x0004: Command: 0007 Status: 0000 0x0008: Class: 03 Subclass: 00 Interface: 00 Revision: 04 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 00 0x0010: BAR mem 32bit addr: 0xf0000000/0x04000000 0x0014: BAR mem 32bit addr: 0xf4000000/0x02000000 0x0018: BAR mem 32bit addr: 0xf6000000/0x00002000 0x001c: BAR io addr: 0x0000c040/0x0020 0x0020: BAR empty (00000000) 0x0024: BAR empty (00000000) 0x0028: Cardbus CIS: 00000000 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100 0x0030: Expansion ROM Base Address: f6010000 0x0038: 00000000 0x003c: Interrupt Pin: 01 Line: 0a Min Gnt: 00 Max Lat: 00 0:3:0: Qumranet Virtio Network 0x0000: Vendor ID: 1af4 Product ID: 1000 0x0004: Command: 0007 Status: 0010 0x0008: Class: 02 Subclass: 00 Interface: 00 Revision: 00 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 00 0x0010: BAR io addr: 0x0000c060/0x0020 0x0014: BAR mem 32bit addr: 0xf6020000/0x00001000 0x0018: BAR empty (00000000) 0x001c: BAR empty (00000000) 0x0020: BAR empty (00000000) 0x0024: BAR empty (00000000) 0x0028: Cardbus CIS: 00000000 0x002c: Subsystem Vendor ID: 1af4 Product ID: 0001 0x0030: Expansion ROM Base Address: f6030000 0x0038: 00000000 0x003c: Interrupt Pin: 01 Line: 0b Min Gnt: 00 Max Lat: 00 0x0040: Capability 0x11: Extended Message Signaled Interrupts (MSI-X) 0:4:0: Qumranet unknown 0x0000: Vendor ID: 1af4 Product ID: 1004 0x0004: Command: 0007 Status: 0010 0x0008: Class: 01 Subclass: 00 Interface: 00 Revision: 00 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 00 0x0010: BAR io addr: 0x0000c080/0x0040 0x0014: BAR mem 32bit addr: 0xf6040000/0x00001000 0x0018: BAR empty (00000000) 0x001c: BAR empty (00000000) 0x0020: BAR empty (00000000) 0x0024: BAR empty (00000000) 0x0028: Cardbus CIS: 00000000 0x002c: Subsystem Vendor ID: 1af4 Product ID: 0008 0x0030: Expansion ROM Base Address: 00000000 0x0038: 00000000 0x003c: Interrupt Pin: 01 Line: 0b Min Gnt: 00 Max Lat: 00 0x0040: Capability 0x11: Extended Message Signaled Interrupts (MSI-X) 0:5:0: Qumranet Virtio Console 0x0000: Vendor ID: 1af4 Product ID: 1003 0x0004: Command: 0007 Status: 0010 0x0008: Class: 07 Subclass: 80 Interface: 00 Revision: 00 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 00 0x0010: BAR io addr: 0x0000c0c0/0x0020 0x0014: BAR mem 32bit addr: 0xf6041000/0x00001000 0x0018: BAR empty (00000000) 0x001c: BAR empty (00000000) 0x0020: BAR empty (00000000) 0x0024: BAR empty (00000000) 0x0028: Cardbus CIS: 00000000 0x002c: Subsystem Vendor ID: 1af4 Product ID: 0003 0x0030: Expansion ROM Base Address: 00000000 0x0038: 00000000 0x003c: Interrupt Pin: 01 Line: 0a Min Gnt: 00 Max Lat: 00 0x0040: Capability 0x11: Extended Message Signaled Interrupts (MSI-X) 0:6:0: Qumranet Virtio Storage 0x0000: Vendor ID: 1af4 Product ID: 1001 0x0004: Command: 0007 Status: 0010 0x0008: Class: 01 Subclass: 00 Interface: 00 Revision: 00 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 00 0x0010: BAR io addr: 0x0000c100/0x0040 0x0014: BAR mem 32bit addr: 0xf6042000/0x00001000 0x0018: BAR empty (00000000) 0x001c: BAR empty (00000000) 0x0020: BAR empty (00000000) 0x0024: BAR empty (00000000) 0x0028: Cardbus CIS: 00000000 0x002c: Subsystem Vendor ID: 1af4 Product ID: 0002 0x0030: Expansion ROM Base Address: 00000000 0x0038: 00000000 0x003c: Interrupt Pin: 01 Line: 0a Min Gnt: 00 Max Lat: 00 0x0040: Capability 0x11: Extended Message Signaled Interrupts (MSI-X) 0:7:0: Qumranet Virtio Memory 0x0000: Vendor ID: 1af4 Product ID: 1002 0x0004: Command: 0007 Status: 0000 0x0008: Class: 05 Subclass: 00 Interface: 00 Revision: 00 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 00 0x0010: BAR io addr: 0x0000c140/0x0020 0x0014: BAR empty (00000000) 0x0018: BAR empty (00000000) 0x001c: BAR empty (00000000) 0x0020: BAR empty (00000000) 0x0024: BAR empty (00000000) 0x0028: Cardbus CIS: 00000000 0x002c: Subsystem Vendor ID: 1af4 Product ID: 0005 0x0030: Expansion ROM Base Address: 00000000 0x0038: 00000000 0x003c: Interrupt Pin: 01 Line: 0b Min Gnt: 00 Max Lat: 00 -%- But something is odd... -%- # dmesg | tail ASC/ASCQ: Illegal Field in CDB sd0(vioscsi0:0:0): Check Condition (error 0x70) on opcode 0x28 SENSE KEY: Illegal Request ASC/ASCQ: Illegal Field in CDB sd0(vioscsi0:0:0): Check Condition (error 0x70) on opcode 0x28 SENSE KEY: Illegal Request ASC/ASCQ: Illegal Field in CDB sd0(vioscsi0:0:0): Check Condition (error 0x70) on opcode 0x28 SENSE KEY: Illegal Request ASC/ASCQ: Illegal Field in CDB -%- I will try to do normal disk and compare with Linux. jirib