[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [Qemu-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD



On 06/26/14 04:23, Chen, Tiejun wrote:
On 2014/6/26 10:00, Chen, Tiejun wrote:
On 2014/6/26 7:04, Slutz, Donald Christopher wrote:
On 06/24/14 22:49, Chen, Tiejun wrote:
On 2014/5/19 19:22, Gerd Hoffmann wrote:
   Hi,



Gerd,

Sorry I return this discussion again.

As we discussed here, we should never use -vga xxx to avoid occupying
slot 2. Instead, we will just use -device to create that emulated vga
device as you said like this:

-device VGA,vgamem_mb=8,addr=0x4

But looks this may issue another problem. That is we can't see
anything until the vga driver is initialized. I means if we pass
`-device VGA,vgamem_mb=8,addr=0x4', qemu doesn't expose any vga
interface to BIOS. Right? Or I'm still missing something.



QEMU does not directly expose any vga interface to BIOS (SeaBIOS in my case).

However SeaBIOS searches for a vga device on the PCI Host bridge. And my testing
is showing that it finds it.


(d12) Scan for VGA option rom
(d12) Running option rom at c000:0003
(XEN) stdvga.c:147:d12v0 entering stdvga and caching modes



I know for Xen that

tools/firmware/hvmloader/acpi/dsdt.asl

also needs to change:


              /* Make cirrues VGA S3 suspend/resume work in Windows
XP/2003 */
              Device (VGA)
              {
-               Name (_ADR, 0x00020000)
+               // Address of the VGA (device F function 0)
+               Name (_ADR, 0x000F0000)


With this change I still didn't see anything.


This does not match with what I see.

Looks like linux does not care about the acpi data.  Using

xen: ddb4aa5, qemu: 8589744, and seabios: e51488c

and

GRUB_CMDLINE_XEN="dom0_mem=2G loglvl=all guest_loglvl=all console_timestamps=1 
com1=9600,8n1 console=com1 apic_verbosity=verbose crashkernel=256M@256M no-cpuidle"

Config file (/home/don/P-1-5.list0.xfg):

dcs-xen-54:~>cat P-1-5.list0.xfg
builder = "hvm"
cpu_weight = 128
cpus = [
 5,
]
vga = "none"
videoram = 8
device_model_args_hvm = [
 "-monitor",
 "pty",
 "-boot",
 "menu=on",
 "-device",
 "VGA,vgamem_mb=8,addr=0x4",
 "-device",
 "e1000,id=nic0,netdev=net0,mac=00:0c:29:a0:a9:2c,addr=0x5.0x0",
 "-netdev",
 "type=tap,id=net0,ifname=vif9.0-emu,script=/etc/qemu-ifup,downscript=no",
 "-device",
 "xen-platform,addr=0x6.0x0",
]
disk = [
 "/home/don/qemu-img/P-1-5-disk.raw,,hda",
]
device_model_version = "qemu-xen"
maxmem = 3072
maxvcpus = 1
memory = 3072
name = "P-1-5"
serial = "pty"
tsc_mode = "native_paravirt"
uuid = "18cf5fd0-e564-49c4-b63f-e6c3c23b1294"
vcpus = 1
viridian = 0
xen_platform_pci = 0



[root@dcs-xen-54 ~]# xl cre -p -V /home/don/P-1-5.list0.xfg

Gives me a vncviewer screen that says:

Guest has not initialized the display (yet).


[root@dcs-xen-54 ~]# xl unpause 12

Adds the following ([root@dcs-xen-54 ~]# xl dmesg):

(d12) HVM Loader
(d12) Detected Xen v4.5-unstable
(d12) Xenbus rings @0xfeffc000, event channel 1
(d12) System requested SeaBIOS
(d12) CPU speed is 2400 MHz
(d12) Relocating guest memory for lowmem MMIO space disabled
(XEN) irq.c:270: Dom12 PCI link 0 changed 0 -> 5
(d12) PCI-ISA link 0 routed to IRQ5
(XEN) irq.c:270: Dom12 PCI link 1 changed 0 -> 10
(d12) PCI-ISA link 1 routed to IRQ10
(XEN) irq.c:270: Dom12 PCI link 2 changed 0 -> 11
(d12) PCI-ISA link 2 routed to IRQ11
(XEN) irq.c:270: Dom12 PCI link 3 changed 0 -> 5
(d12) PCI-ISA link 3 routed to IRQ5
(d12) pci dev 01:3 INTA->IRQ10
(d12) pci dev 05:0 INTA->IRQ10
(d12) pci dev 06:0 INTA->IRQ11
(d12) No RAM in high memory; setting high_mem resource base to 100000000
(d12) pci dev 06:0 bar 14 size 001000000: 0f0000008
(d12) pci dev 04:0 bar 10 size 000800000: 0f1000008
(d12) pci dev 05:0 bar 30 size 000040000: 0f1800000
(d12) pci dev 05:0 bar 10 size 000020000: 0f1840000
(d12) pci dev 04:0 bar 30 size 000010000: 0f1860000
(d12) pci dev 04:0 bar 18 size 000001000: 0f1870000
(d12) pci dev 06:0 bar 10 size 000000100: 00000c001
(d12) pci dev 05:0 bar 14 size 000000040: 00000c101
(d12) pci dev 01:1 bar 20 size 000000010: 00000c141
(d12) Multiprocessor initialisation:
(d12)  - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [1/8] ... done.
(d12) Testing HVM environment:
(d12)  - REP INSB across page boundaries ... passed
(d12)  - GS base MSRs and SWAPGS ... passed
(d12) Passed 2 of 2 tests
(d12) Writing SMBIOS tables ...
(d12) Loading SeaBIOS ...
(d12) Creating MP tables ...
(d12) Loading ACPI ...
(d12) vm86 TSS at fc00a180
(d12) BIOS map:
(d12)  10000-100d3: Scratch space
(d12)  c0000-fffff: Main BIOS
(d12) E820 table:
(d12)  [00]: 00000000:00000000 - 00000000:000a0000: RAM
(d12)  HOLE: 00000000:000a0000 - 00000000:000c0000
(d12)  [01]: 00000000:000c0000 - 00000000:00100000: RESERVED
(d12)  [02]: 00000000:00100000 - 00000000:bf800000: RAM
(d12)  HOLE: 00000000:bf800000 - 00000000:fc000000
(d12)  [03]: 00000000:fc000000 - 00000001:00000000: RESERVED
(d12) Invoking SeaBIOS ...
(d12) SeaBIOS (version rel-1.7.5-0-ge51488c-20140626_113926-dcs-xen-54)
(d12)
(d12) Found Xen hypervisor signature at 40000000
(d12) Running on QEMU (i440fx)
(d12) xen: copy e820...
(d12) Relocating init from 0x000df629 to 0xbf7ae600 (size 71995)
(d12) CPU Mhz=2400
(d12) Found 7 PCI devices (max PCI bus is 00)
(d12) Allocated Xen hypercall page at bf7ff000
(d12) Detected Xen v4.5-unstable
(d12) xen: copy BIOS tables...
(d12) Copying SMBIOS entry point from 0x00010010 to 0x000f0f50
(d12) Copying MPTABLE from 0xfc001140/fc001150 to 0x000f0e70
(d12) Copying PIR from 0x00010030 to 0x000f0df0
(d12) Copying ACPI RSDP from 0x000100b0 to 0x000f0dc0
(d12) Using pmtimer, ioport 0xb008
(d12) Scan for VGA option rom
(d12) Running option rom at c000:0003
(XEN) stdvga.c:147:d12v0 entering stdvga and caching modes
(d12) pmm call arg1=0
(d12) Turning on vga text mode console
(d12) SeaBIOS (version rel-1.7.5-0-ge51488c-20140626_113926-dcs-xen-54)
(d12) Machine UUID 18cf5fd0-e564-49c4-b63f-e6c3c23b1294
(d12) All threads complete.
(d12) Found 0 lpt ports
(d12) Found 1 serial ports
(d12) ATA controller 1 at 1f0/3f4/0 (irq 14 dev 9)
(d12) ATA controller 2 at 170/374/0 (irq 15 dev 9)
(d12) ata0-0: QEMU HARDDISK ATA-7 Hard-Disk (8192 MiBytes)
(d12) Searching bootorder for: /pci@i0cf8/*@1,1/drive@0/disk@0
(d12) PS2 keyboard initialized
(d12) All threads complete.
(d12) Scan for option roms
(d12) Running option rom at c980:0003
(d12) pmm call arg1=1
(d12) pmm call arg1=0
(d12) pmm call arg1=1
(d12) pmm call arg1=0
(d12) Searching bootorder for: /pci@i0cf8/*@5
(d12)
(d12) Press F12 for boot menu.
(d12)
(d12) Select boot device:
(d12)
(d12) 1. ata0-0: QEMU HARDDISK ATA-7 Hard-Disk (8192 MiBytes)
(d12) 2. iPXE (PCI 00:05.0)


And the VGA screen has the SeaBIOS messages:

SeaBIOS (version rel-1.7.5-0-ge51488c-20140626_113926-dcs-xen-54)
Machine UUID 18cf5fd0-e564-49c4-b63f-e6c3c23b1294

iPXE (http://ipxe.org) 00:05.0 C980 PCI2.10 PnP PMM+BF79C090+BF6FC090 C980




Press F12 for boot menu.

Select boot device:

1. ata0-0: QEMU HARDDISK ATA-7 Hard-Disk (8192 MiBytes)
2. iPXE (PCI 00:05.0)


The line (from above):
(d12) Turning on vga text mode console

allows me to use f12 in seabios which is why the guest is stopped waiting
for a boot device selection.

In the guest (after boot):

[root@P-1-5 ~]# lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:04.0 VGA compatible controller: Technical Corp. Unknown device 1111
00:05.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet 
Controller (rev 03)
00:06.0 Class ff80: XenSource, Inc. Xen Platform Device (rev 01)


Hope all this helps.

   -Don Slutz

Thanks
Tiejun


is what I have for:

-device VGA,vgamem_mb=8,addr=0xF.0x0


Do you mean we need to sync devfn with the passed address to work the
emulated VGA before the real graphic device driver is called?

Thanks
Tiejun

I am not sure, but think that QEMU without Xen does this acpi
adjustment at run time.


I also change seabios's config to include more VGA support but
not sure it is needed.

      -Don Slutz

Thanks
Tiejun






_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.