[Spice-devel] Vioserial of Windows guest OS on Qemu 0.15

Charles.Tsai-蔡清海-研究發展部 charles.tsai at cloudena.com
Mon Jan 16 01:17:16 PST 2012


Vadim,

I just ran the Qemu monitor to get the PCI information. The information is listed belowe.
From the listed information, I did not see anything wrong with the BAR0.
-----------


INFO:
  Bus  0, device   0, function 0:
    Host bridge: PCI device 8086:1237
      id ""
  Bus  0, device   1, function 0:
    ISA bridge: PCI device 8086:7000
      id ""
  Bus  0, device   1, function 1:
    IDE controller: PCI device 8086:7010
      BAR4: I/O at 0xc000 [0xc00f].
      id ""
  Bus  0, device   1, function 2:
    USB controller: PCI device 8086:7020
      IRQ 10.
      BAR4: I/O at 0xc020 [0xc03f].
      id ""
  Bus  0, device   1, function 3:
    Bridge: PCI device 8086:7113
      IRQ 9.
      id ""
  Bus  0, device   2, function 0:
    VGA controller: PCI device 1b36:0100
      IRQ 5.
      BAR0: 32 bit memory at 0xf0000000 [0xf3ffffff].
      BAR1: 32 bit memory at 0xf4000000 [0xf7ffffff].
      BAR2: 32 bit memory at 0xf8000000 [0xf8001fff].
      BAR3: I/O at 0xc040 [0xc05f].
      BAR6: 32 bit memory at 0xffffffffffffffff [0x0000fffe].
      id ""
  Bus  0, device   3, function 0:
    Ethernet controller: PCI device 10ec:8139
      IRQ 10.
      BAR0: I/O at 0xc100 [0xc1ff].
      BAR1: 32 bit memory at 0xffffffffffffffff [0x000000fe].
      BAR6: 32 bit memory at 0xffffffffffffffff [0x0000fffe].
      id "net0"
  Bus  0, device   4, function 0:
    RAM controller: PCI device 1af4:1002
      IRQ 11.
      BAR0: I/O at 0xc200 [0xc21f].
      id "balloon0"
  Bus  0, device   5, function 0:
    Class 1920: PCI device 1af4:1003
      IRQ 11.
      BAR0: I/O at 0xc220 [0xc23f].
      BAR1: 32 bit memory at 0xf8040000 [0xf8040fff].
      id "virtio-serial0"



QTREE:
bus: main-system-bus
  type System
  dev: hpet, id ""
    gpio-in 1
    dev-prop: timers = 3
    dev-prop: msi = off
    irq 32
    mmio 00000000fed00000/0000000000000400
  dev: i440FX-pcihost, id ""
    irq 0
    bus: pci.0
      type PCI
      dev: virtio-balloon-pci, id "balloon0"
        dev-prop: indirect_desc = on
        dev-prop: event_idx = on
        bus-prop: addr = 04.0
        bus-prop: romfile = <null>
        bus-prop: rombar = 1
        bus-prop: multifunction = on
        bus-prop: command_serr_enable = on
        class RAM controller, addr 00:04.0, pci id 1af4:1002 (sub 1af4:0005)
        bar 0: i/o at 0xc200 [0xc21f]
      dev: rtl8139, id "net0"
        dev-prop: mac = 52:54:00:e8:dc:b1
        dev-prop: vlan = <null>
        dev-prop: netdev = hostnet0
        dev-prop: bootindex = -1
        bus-prop: addr = 03.0
        bus-prop: romfile = "pxe-rtl8139.rom"
        bus-prop: rombar = 1
        bus-prop: multifunction = on
        bus-prop: command_serr_enable = on
        class Ethernet controller, addr 00:03.0, pci id 10ec:8139 (sub 1af4:1100)
        bar 0: i/o at 0xc100 [0xc1ff]
        bar 1: mem at 0xffffffffffffffff [0xfe]
        bar 6: mem at 0xffffffffffffffff [0xfffe]
      dev: virtio-serial-pci, id "virtio-serial0"
        dev-prop: ioeventfd = on
        dev-prop: vectors = 32
        dev-prop: class = 0x780
        dev-prop: indirect_desc = on
        dev-prop: event_idx = on
        dev-prop: max_ports = 31
        bus-prop: addr = 05.0
        bus-prop: romfile = <null>
        bus-prop: rombar = 1
        bus-prop: multifunction = on
        bus-prop: command_serr_enable = on
        class Class 0780, addr 00:05.0, pci id 1af4:1003 (sub 1af4:0003)
        bar 0: i/o at 0xc220 [0xc23f]
        bar 1: mem at 0xf8040000 [0xf8040fff]
        bus: virtio-serial0.0
          type virtio-serial-bus
          dev: virtserialport, id "channel0"
            dev-prop: chardev = charchannel0
            bus-prop: nr = 1
            bus-prop: name = "com.redhat.spice.0"
            port 1, guest on, host on, throttle off
      dev: PIIX4_PM, id ""
        dev-prop: smb_io_base = 45312
        bus-prop: addr = 01.3
        bus-prop: romfile = <null>
        bus-prop: rombar = 1
        bus-prop: multifunction = off
        bus-prop: command_serr_enable = on
        class Bridge, addr 00:01.3, pci id 8086:7113 (sub 1af4:1100)
        bus: i2c
          type I2C
          dev: smbus-eeprom, id ""
            bus-prop: address = 87
          dev: smbus-eeprom, id ""
            bus-prop: address = 86
          dev: smbus-eeprom, id ""
            bus-prop: address = 85
          dev: smbus-eeprom, id ""
            bus-prop: address = 84
          dev: smbus-eeprom, id ""
            bus-prop: address = 83
          dev: smbus-eeprom, id ""
            bus-prop: address = 82
          dev: smbus-eeprom, id ""
            bus-prop: address = 81
          dev: smbus-eeprom, id ""
            bus-prop: address = 80
      dev: piix3-usb-uhci, id ""
        dev-prop: masterbus = <null>
        dev-prop: firstport = 0
        bus-prop: addr = 01.2
        bus-prop: romfile = <null>
        bus-prop: rombar = 1
        bus-prop: multifunction = off
        bus-prop: command_serr_enable = on
        class USB controller, addr 00:01.2, pci id 8086:7020 (sub 1af4:1100)
        bar 4: i/o at 0xc020 [0xc03f]
        bus: usb.0
          type USB
          dev: usb-tablet, id "input0"
            bus-prop: port = <null>
            addr 0.1, port 1, speed 12, name QEMU USB Tablet, attached
      dev: piix3-ide, id ""
        bus-prop: addr = 01.1
        bus-prop: romfile = <null>
        bus-prop: rombar = 1
        bus-prop: multifunction = off
        bus-prop: command_serr_enable = on
        class IDE controller, addr 00:01.1, pci id 8086:7010 (sub 1af4:1100)
        bar 4: i/o at 0xc000 [0xc00f]
        bus: ide.1
          type IDE
        bus: ide.0
          type IDE
          dev: ide-drive, id "ide0-0-0"
            dev-prop: drive = drive-ide0-0-0
            dev-prop: logical_block_size = 512
            dev-prop: physical_block_size = 512
            dev-prop: min_io_size = 0
            dev-prop: opt_io_size = 0
            dev-prop: bootindex = 1
            dev-prop: discard_granularity = 0
            dev-prop: ver = "0.15.0"
            dev-prop: serial = "QM00001"
            bus-prop: unit = 0
      dev: qxl-vga, id ""
        dev-prop: ram_size = 67108864
        dev-prop: vram_size = 67108864
        dev-prop: revision = 3
        dev-prop: debug = 0
        dev-prop: guestdebug = 0
        dev-prop: cmdlog = 0
        bus-prop: addr = 02.0
        bus-prop: romfile = "vgabios-qxl.bin"
        bus-prop: rombar = 1
        bus-prop: multifunction = off
        bus-prop: command_serr_enable = on
        class VGA controller, addr 00:02.0, pci id 1b36:0100 (sub 1af4:1100)
        bar 0: mem at 0xf0000000 [0xf3ffffff]
        bar 1: mem at 0xf4000000 [0xf7ffffff]
        bar 2: mem at 0xf8000000 [0xf8001fff]
        bar 3: i/o at 0xc040 [0xc05f]
        bar 6: mem at 0xffffffffffffffff [0xfffe]
      dev: PIIX3, id ""
        bus-prop: addr = 01.0
        bus-prop: romfile = <null>
        bus-prop: rombar = 1
        bus-prop: multifunction = on
        bus-prop: command_serr_enable = on
        class ISA bridge, addr 00:01.0, pci id 8086:7000 (sub 1af4:1100)
        bus: isa.0
          type ISA
          dev: isa-serial, id "serial0"
            dev-prop: index = 0
            dev-prop: iobase = 0x3f8
            dev-prop: irq = 4
            dev-prop: chardev = charserial0
            isa irq 4
          dev: isa-fdc, id ""
            dev-prop: driveA = <null>
            dev-prop: driveB = <null>
            dev-prop: bootindexA = -1
            dev-prop: bootindexB = -1
            isa irq 6
          dev: port92, id ""
          dev: vmmouse, id ""
          dev: vmport, id ""
          dev: i8042, id ""
            isa irqs 1,12
          dev: isa-pit, id ""
            dev-prop: irq = 0
            dev-prop: iobase = 0x40
          dev: mc146818rtc, id ""
            dev-prop: base_year = 2000
      dev: i440FX, id ""
        bus-prop: addr = 00.0
        bus-prop: romfile = <null>
        bus-prop: rombar = 1
        bus-prop: multifunction = off
        bus-prop: command_serr_enable = on
        class Host bridge, addr 00:00.0, pci id 8086:1237 (sub 1af4:1100)
  dev: ioapic, id ""
    gpio-in 24
    irq 0
    mmio 00000000fec00000/0000000000001000
  dev: fw_cfg, id ""
    dev-prop: ctl_iobase = 0x510
    dev-prop: data_iobase = 0x511
    irq 0
    mmio ffffffffffffffff/0000000000000002
    mmio ffffffffffffffff/0000000000000002
  dev: kvmclock, id ""
    irq 0
  dev: apic, id ""
    dev-prop: id = 0
    irq 0
    mmio 00000000fee00000/0000000000100000


-----Original Message-----
From: Vadim Rozenfeld [mailto:vrozenfe at redhat.com] 
Sent: Monday, January 16, 2012 3:14 PM
To: Charles.Tsai-蔡清海-研究發展部
Cc: Stefan Hajnoczi; Alon Levy; spice-devel at lists.freedesktop.org; Alex Huang-黃必賢-研究發展部; qemu-devel
Subject: RE: [Spice-devel] Vioserial of Windows guest OS on Qemu 0.15

On Mon, 2012-01-16 at 10:02 +0800, Charles.Tsai-蔡清海-研究發展部 wrote:
> Vadim,
> 
> Thank you for your prompt reply. Here are the information for our test case.
> 
> 
> 1) we use the following command line to launch the guest OS
> 
> 
> /usr/bin/kvm -S -M pc-0.14 -enable-kvm -m 1024 -smp 
> 1,sockets=1,cores=1,threads=1 -name win_xp -uuid 
> d9388815-ddd3-c38e-33c2-a9d5fcc7a775 -nodefconfig -nodefaults -chardev 
> socket,id=charmonitor,path=/var/lib/libvirt/qemu/win_xp.monitor,server
> ,nowait -mon chardev=charmonitor,id=monitor,mode=readline
> -rtc base=localtime
> -device 
> virtio-serial-pci,id=virtio-serial0,bus=pci.0,multifunction=on,addr=0x
> 5.0x0 -drive 
> file=/media/Images/Windows-XP.img,if=none,id=drive-ide0-0-0,format=raw
> -device 
> ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=
> 1
> -netdev tap,fd=17,id=hostnet0
> -device 
> rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:e8:dc:b1,bus=pci.0,multif
> unction=on,addr=0x3.0x0
> -chardev pty,id=charserial0
> -device isa-serial,chardev=charserial0,id=serial0
> -chardev spicevmc,id=charchannel0,name=vdagent
> -device 
> virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=chann
> el0,name=com.redhat.spice.0
> -usb -device usb-tablet,id=input0
> -spice port=5900,addr=0.0.0.0,disable-ticketing
> -vga qxl -global qxl-vga.vram_size=67108864 -device 
> virtio-balloon-pci,id=balloon0,bus=pci.0,multifunction=on,addr=0x4.0x0
> 
> 
> 
> 2). In Guest Windows XP OS
> 
> 
> When the following callback function of the vioserial device  is called in guest OS. The allocated resources is empty.
> 
> 
> VIOSerialEvtDevicePrepareHardware() ---This function is to get the I/O address of the vioserial device and map the physical address to the logical address space.
> 
> I added the following trace and the value of nListSize is ZERO.
> TraceEvents(TRACE_LEVEL_INFORMATION, DBG_PNP, "%s (nListSize=%d)\n", 
> __FUNCTION__,nListSize);
> 
> 
> So far, we have tested Qemu 0.14 without any problem but Qemu 0.15 seemed to be broken in vioserial device.
> Let me know if you need further information. Thanks.
> 
Hi Charles,
You're right. 
If WdfCmResourceListGetCount returns zero, it must be a problem with resources list.
Output of "info pci" and "info qtree" commands could be helpful in analyzing this problem.

Best regards,
Vadim.
> 
> 
> 
> -----Original Message-----
> From: Vadim Rozenfeld [mailto:vrozenfe at redhat.com]
> Sent: Sunday, January 15, 2012 7:42 PM
> To: Stefan Hajnoczi
> Cc: Charles.Tsai-蔡清海-研究發展部; Alon Levy; 
> spice-devel at lists.freedesktop.org; Alex Huang-黃必賢-研究發展部; qemu-devel
> Subject: Re: [Spice-devel] Vioserial of Windows guest OS on Qemu 0.15
> 
> On Sun, 2012-01-15 at 11:27 +0000, Stefan Hajnoczi wrote:
> > 2012/1/14 Charles.Tsai-蔡清海-研究發展部 <charles.tsai at cloudena.com>:
> > >        I tested Qemu 0.15 for Windows XP guest OS. But I found that the Virtual Serial I/O driver failed in driver initialization.
> > >        The root cause of this problem is because the hardware resources(I/O in this device) is not allocated to the virtual serial I/O.
> > >        When I debugged on the vioserial driver, no hardware resource actually is allocated to this device.
> > >        This bug seems to be in the area of Qemu. Do you know whom I can consult to fix this problem? Please let me know if you know the group or the person.
> > 
> > I have CCed Vadim (virtio Windows driver) and the QEMU mailing list.
> > 
> > Please post your QEMU command-line so we can see how the guest is configured.
> > 
> > You mentioned that you debugged the driver and hardware resources 
> > weren't allocated.  Do you have a virtio PCI device inside the guest 
> > for this virtio-serial device?  Were you able to tell which part of 
> > driver initialization failed (finding the PCI device, mapping its 
> > resources (BARs), etc)?
> > 
> > Stefan
> 
> Could you post "pci info" output?
> 
> thanks,
> Vadim.
> 




More information about the Spice-devel mailing list