Han, Weidong
2009-Sep-01 06:01 UTC
[Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
This patch supports basic gfx passthrough on QEMU: - disable emulated VGA adpater if there is passthroughed gfx - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 - register/unregister legacy VGA I/O ports and MMIOs for passthroughed gfx Signed-off-by: Ben Lin <ben.y.lin@intel.com> Signed-off-by: Weidong Han <weidong.han@intel.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Teo En Ming (Zhang Enming)
2009-Sep-01 06:31 UTC
RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Hi, How about the patch for loading vga bios from .bin file and the 1:1 bar mapping in version 2 release? Thanks for the version 2. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com -----Original Message----- From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, Weidong Sent: Tuesday, September 01, 2009 2:01 PM To: ''xen-devel@lists.xensource.com'' Cc: Lin, Ben Y; ''bengheng@eecs.umich.edu''; Kay,Allen M; ''Keir.Fraser@eu.citrix.com''; ''Jean Guyader'' Subject: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d This patch supports basic gfx passthrough on QEMU: - disable emulated VGA adpater if there is passthroughed gfx - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 - register/unregister legacy VGA I/O ports and MMIOs for passthroughed gfx Signed-off-by: Ben Lin <ben.y.lin@intel.com> Signed-off-by: Weidong Han <weidong.han@intel.com> No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Teo En Ming (Zhang Enming)
2009-Sep-01 06:51 UTC
RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Hi Weidong, So I apply version 2 patch 1, and version 2 patch 2 which are posted today, then apply xen-load-vbios-file.patch xen-vBAR-pBAR.patch qemu-change-for-vBAR-pBAR.patch qemu-claim-cycle-for-secondary-gfx-passthrough.patch which were posted by you on 31st August 2009? Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com -----Original Message----- From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Teo En Ming (Zhang Enming) Sent: Tuesday, September 01, 2009 2:31 PM To: weidong.han@intel.com; xen-devel@lists.xensource.com Cc: ''Lin, Ben Y''; ''Kay,Allen M''; Keir.Fraser@eu.citrix.com; ''Jean Guyader''; bengheng@eecs.umich.edu Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Hi, How about the patch for loading vga bios from .bin file and the 1:1 bar mapping in version 2 release? Thanks for the version 2. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com -----Original Message----- From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, Weidong Sent: Tuesday, September 01, 2009 2:01 PM To: ''xen-devel@lists.xensource.com'' Cc: Lin, Ben Y; ''bengheng@eecs.umich.edu''; Kay,Allen M; ''Keir.Fraser@eu.citrix.com''; ''Jean Guyader'' Subject: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d This patch supports basic gfx passthrough on QEMU: - disable emulated VGA adpater if there is passthroughed gfx - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 - register/unregister legacy VGA I/O ports and MMIOs for passthroughed gfx Signed-off-by: Ben Lin <ben.y.lin@intel.com> Signed-off-by: Weidong Han <weidong.han@intel.com> No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Han, Weidong
2009-Sep-01 06:55 UTC
RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Teo En Ming (Zhang Enming) wrote:> Hi Weidong, > > So I apply version 2 patch 1, and version 2 patch 2 which are posted > today, then apply >No. Don''t apply the below patches based on version 2 patches. Pls use them with the version 1 patches. Regards, Weidong> xen-load-vbios-file.patch > xen-vBAR-pBAR.patch > qemu-change-for-vBAR-pBAR.patch > qemu-claim-cycle-for-secondary-gfx-passthrough.patch > > which were posted by you on 31st August 2009? > > Regards, > > Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) > BEng(Hons)(Mechanical Engineering) > Technical Support Engineer > Information Technology Department > Asiasoft Online Pte Ltd > Tampines Central 1 #04-01 Tampines Plaza > Singapore 529541 > Republic of Singapore > Mobile: +65-9648-9798 > MSN: teoenming@hotmail.com > > -----Original Message----- > From: xen-devel-bounces@lists.xensource.com > [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Teo En > Ming (Zhang Enming) > Sent: Tuesday, September 01, 2009 2:31 PM > To: weidong.han@intel.com; xen-devel@lists.xensource.com > Cc: ''Lin, Ben Y''; ''Kay,Allen M''; Keir.Fraser@eu.citrix.com; ''Jean > Guyader''; bengheng@eecs.umich.edu > Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d > > Hi, > > How about the patch for loading vga bios from .bin file and the 1:1 > bar mapping in version 2 release? > > Thanks for the version 2. > > Regards, > > Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) > BEng(Hons)(Mechanical Engineering) > Technical Support Engineer > Information Technology Department > Asiasoft Online Pte Ltd > Tampines Central 1 #04-01 Tampines Plaza > Singapore 529541 > Republic of Singapore > Mobile: +65-9648-9798 > MSN: teoenming@hotmail.com > -----Original Message----- > From: xen-devel-bounces@lists.xensource.com > [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, > Weidong Sent: Tuesday, September 01, 2009 2:01 PM > To: ''xen-devel@lists.xensource.com'' > Cc: Lin, Ben Y; ''bengheng@eecs.umich.edu''; Kay,Allen M; > ''Keir.Fraser@eu.citrix.com''; ''Jean Guyader'' > Subject: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d > > This patch supports basic gfx passthrough on QEMU: > - disable emulated VGA adpater if there is passthroughed gfx > - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 > - register/unregister legacy VGA I/O ports and MMIOs for > passthroughed gfx > > Signed-off-by: Ben Lin <ben.y.lin@intel.com> > Signed-off-by: Weidong Han <weidong.han@intel.com> > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: > 08/31/09 17:52:00 > > No virus found in this outgoing message. > Checked by AVG - www.avg.com > Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: > 08/31/09 17:52:00 > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: > 08/31/09 17:52:00 > > No virus found in this outgoing message. > Checked by AVG - www.avg.com > Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: > 08/31/09 17:52:00_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Han, Weidong
2009-Sep-01 06:59 UTC
RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Teo En Ming (Zhang Enming) wrote:> Hi, > > How about the patch for loading vga bios from .bin file and the 1:1 > bar mapping in version 2 release?Let''s make the basic patches better and acceptable first. I haven''t rebased the hacks patches on version 2 patches. Currently pls use the hack patches with version 1 patches. Regards, Weidong> > Thanks for the version 2. > > Regards, > > Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) > BEng(Hons)(Mechanical Engineering) > Technical Support Engineer > Information Technology Department > Asiasoft Online Pte Ltd > Tampines Central 1 #04-01 Tampines Plaza > Singapore 529541 > Republic of Singapore > Mobile: +65-9648-9798 > MSN: teoenming@hotmail.com > -----Original Message----- > From: xen-devel-bounces@lists.xensource.com > [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, > Weidong Sent: Tuesday, September 01, 2009 2:01 PM > To: ''xen-devel@lists.xensource.com'' > Cc: Lin, Ben Y; ''bengheng@eecs.umich.edu''; Kay,Allen M; > ''Keir.Fraser@eu.citrix.com''; ''Jean Guyader'' > Subject: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d > > This patch supports basic gfx passthrough on QEMU: > - disable emulated VGA adpater if there is passthroughed gfx > - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 > - register/unregister legacy VGA I/O ports and MMIOs for > passthroughed gfx > > Signed-off-by: Ben Lin <ben.y.lin@intel.com> > Signed-off-by: Weidong Han <weidong.han@intel.com> > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: > 08/31/09 17:52:00 > > No virus found in this outgoing message. > Checked by AVG - www.avg.com > Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: > 08/31/09 17:52:00_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jean Guyader
2009-Sep-01 11:53 UTC
Re: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
On Tue, Sep 01, 2009 at 02:01:11AM -0400, Han, Weidong wrote:> This patch supports basic gfx passthrough on QEMU: > - disable emulated VGA adpater if there is passthroughed gfx > - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 > - register/unregister legacy VGA I/O ports and MMIOs for passthroughed gfx > > Signed-off-by: Ben Lin <ben.y.lin@intel.com> > Signed-off-by: Weidong Han <weidong.han@intel.com>Acked-by: Jean Guyader <jean.guyader@citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Teo En Ming (Zhang Enming)
2009-Sep-01 19:00 UTC
RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Teo En Ming (Zhang Enming) wrote:> Hi, > > How about the patch for loading vga bios from .bin file and the 1:1 > bar mapping in version 2 release?Let''s make the basic patches better and acceptable first. I haven''t rebased the hacks patches on version 2 patches. Currently pls use the hack patches with version 1 patches. Regards, Weidong> > Thanks for the version 2. > > Regards, > > Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) > BEng(Hons)(Mechanical Engineering) > Technical Support Engineer > Information Technology Department > Asiasoft Online Pte Ltd > Tampines Central 1 #04-01 Tampines Plaza > Singapore 529541 > Republic of Singapore > Mobile: +65-9648-9798 > MSN: teoenming@hotmail.com > -----Original Message----- > From: xen-devel-bounces@lists.xensource.com > [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, > Weidong Sent: Tuesday, September 01, 2009 2:01 PM > To: ''xen-devel@lists.xensource.com'' > Cc: Lin, Ben Y; ''bengheng@eecs.umich.edu''; Kay,Allen M; > ''Keir.Fraser@eu.citrix.com''; ''Jean Guyader'' > Subject: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d > > This patch supports basic gfx passthrough on QEMU: > - disable emulated VGA adpater if there is passthroughed gfx > - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 > - register/unregister legacy VGA I/O ports and MMIOs for > passthroughed gfx > > Signed-off-by: Ben Lin <ben.y.lin@intel.com> > Signed-off-by: Weidong Han <weidong.han@intel.com> > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: > 08/31/09 17:52:00 > > No virus found in this outgoing message. > Checked by AVG - www.avg.com > Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: > 08/31/09 17:52:00_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mr. Teo En Ming (Zhang Enming)
2009-Sep-01 19:24 UTC
Re: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Dear Weidong, I checked out xen 3.5-unstable changeset 20145. I applied *xen-gfx-passthrough.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bin> to changeset 20145. **There were some errors with* ** /Reversed/ (or previously applied) /patch detected/! Assume -R <http://www.google.com.sg/url?sa=t&source=web&ct=res&cd=2&url=http%3A%2F%2Fubuntuforums.org%2Fshowthread.php%3Ft%3D555032&ei=kHCdSvGwH5ze6APtzem4AQ&rct=j&q=reversed+patch+detected&usg=AFQjCNHs2YXFZTPfMG-VGfXZgmuhqM5xGw> So I think the maintainers of xen-unstable had applied some of the patches from ***xen-gfx-passthrough.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bin> *you posted to the tree. Then I applied the rest of the patches: *qemu-gfx-passthrough.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/bintJIxIJU9it.bin> **xen-load-vbios-file.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/binBhcfOvfwKC.bin> **xen-vBAR-pBAR.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/bins09ti77jB2.bin> **qemu-change-for-vBAR-pBAR.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/bin5Tp1Qi5LaR.bin> **qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/bingGoDCQZtlM.bin>* to changeset 20145 without problems. Here are the test results. Note that all of the test results are based on starting Windows XP Home HVM domU while in X server on dom0. If I try to start domU in text mode on dom0 (without X server), then the screen output will be garbaged and I won''t be able to type anything at all in dom0 text mode. Test results with pvops dom 0 kernel 2.6.30-rc3 ============================ A. 1 VCPU ===== Tried starting win xp home domu with vcpu=1. DomU crashed and exited, leaving only dom0. (XEN) HVM1: HVM Loader (XEN) HVM1: Detected Xen v3.5-unstable (XEN) HVM1: CPU speed is 2800 MHz (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 (XEN) HVM1: pci dev 01:2 INTD->IRQ5 (XEN) HVM1: pci dev 01:3 INTA->IRQ10 (XEN) HVM1: pci dev 02:0 INTA->IRQ11 (XEN) HVM1: pci dev 03:0 INTA->IRQ5 (XEN) HVM1: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM1: Multiprocessor initialisation: (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment: (XEN) HVM1: - REP INSB across page boundaries ... passed (XEN) HVM1: - GS base MSRs and SWAPGS ... passed (XEN) HVM1: Passed 2 of 2 tests (XEN) HVM1: Writing SMBIOS tables ... (XEN) HVM1: Loading ROMBIOS ... (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM1: Creating MP tables ... (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... (XEN) HVM1: Loading PCI Option ROM ... (XEN) HVM1: - Manufacturer: http://etherboot.org (XEN) HVM1: - Product name: gPXE (XEN) HVM1: Loading ACPI ... (XEN) HVM1: - Lo data: 000ea020-000ea04f (XEN) HVM1: - Hi data: fc003000-fc01261f (XEN) HVM1: vm86 TSS at fc012800 (XEN) HVM1: BIOS map: (XEN) HVM1: c0000-cf7ff: VGA BIOS (XEN) HVM1: cf800-dbfff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS (XEN) HVM1: Invoking ROMBIOS ... (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! (XEN) realmode.c:115:d1 Failed to emulate insn. (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 00 00 00 00 00 (XEN) domain_crash called from realmode.c:166 (XEN) Domain 1 (vcpu#0) crashed on cpu#1: (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: c000:[<000000000000b4b4>] (XEN) RFLAGS: 0000000000000082 CONTEXT: hvm guest (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: 0000000000010593 (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: 000000000000966a (XEN) rbp: 000000000000a1a4 rsp: 0000000000009662 r8: 0000000000000000 (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000 (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: 0000000000000000 (XEN) cr3: 0000000000800000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 B. 2 VCPU ===== I switched to vcpu=2 for win xp home hvm domU. Now domU does not crash. xm list shows domU running. But vncviewer pops up a QEMU monitor. Looks like win xp home hvm domU did not start. All I get is a QEMU monitor. (XEN) HVM2: HVM Loader (XEN) HVM2: Detected Xen v3.5-unstable (XEN) HVM2: CPU speed is 2800 MHz (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 (XEN) HVM2: pci dev 01:2 INTD->IRQ5 (XEN) HVM2: pci dev 01:3 INTA->IRQ10 (XEN) HVM2: pci dev 02:0 INTA->IRQ11 (XEN) HVM2: pci dev 03:0 INTA->IRQ5 (XEN) HVM2: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM2: Multiprocessor initialisation: (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: Testing HVM environment: (XEN) HVM2: - REP INSB across page boundaries ... passed (XEN) HVM2: - GS base MSRs and SWAPGS ... passed (XEN) HVM2: Passed 2 of 2 tests (XEN) HVM2: Writing SMBIOS tables ... (XEN) HVM2: Loading ROMBIOS ... (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM2: Creating MP tables ... (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... (XEN) HVM2: Loading PCI Option ROM ... (XEN) HVM2: - Manufacturer: http://etherboot.org (XEN) HVM2: - Product name: gPXE (XEN) HVM2: Loading ACPI ... (XEN) HVM2: - Lo data: 000ea020-000ea04f (XEN) HVM2: - Hi data: fc003000-fc01261f (XEN) HVM2: vm86 TSS at fc012800 (XEN) HVM2: BIOS map: (XEN) HVM2: c0000-cf7ff: VGA BIOS (XEN) HVM2: cf800-dbfff: Etherboot ROM (XEN) HVM2: eb000-eb175: SMBIOS tables (XEN) HVM2: f0000-fffff: Main BIOS (XEN) HVM2: Invoking ROMBIOS ... (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ The same thing happens when testing under pvops dom 0 kernel 2.6.31-rc6. Test results with pvops dom 0 kernel 2.6.31-rc6 ============================ A. 1 VCPU ===== (XEN) HVM1: HVM Loader (XEN) HVM1: Detected Xen v3.5-unstable (XEN) HVM1: CPU speed is 2800 MHz (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 (XEN) HVM1: pci dev 01:2 INTD->IRQ5 (XEN) HVM1: pci dev 01:3 INTA->IRQ10 (XEN) HVM1: pci dev 02:0 INTA->IRQ11 (XEN) HVM1: pci dev 03:0 INTA->IRQ5 (XEN) HVM1: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM1: Multiprocessor initialisation: (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment: (XEN) HVM1: - REP INSB across page boundaries ... passed (XEN) HVM1: - GS base MSRs and SWAPGS ... passed (XEN) HVM1: Passed 2 of 2 tests (XEN) HVM1: Writing SMBIOS tables ... (XEN) HVM1: Loading ROMBIOS ... (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM1: Creating MP tables ... (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... (XEN) HVM1: Loading PCI Option ROM ... (XEN) HVM1: - Manufacturer: http://etherboot.org (XEN) HVM1: - Product name: gPXE (XEN) HVM1: Loading ACPI ... (XEN) HVM1: - Lo data: 000ea020-000ea04f (XEN) HVM1: - Hi data: fc003000-fc01261f (XEN) HVM1: vm86 TSS at fc012800 (XEN) HVM1: BIOS map: (XEN) HVM1: c0000-cf7ff: VGA BIOS (XEN) HVM1: cf800-dbfff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS (XEN) HVM1: Invoking ROMBIOS ... (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! (XEN) realmode.c:115:d1 Failed to emulate insn. (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 00 00 00 00 00 (XEN) domain_crash called from realmode.c:166 (XEN) Domain 1 (vcpu#0) crashed on cpu#1: (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: c000:[<000000000000b4b4>] (XEN) RFLAGS: 0000000000000086 CONTEXT: hvm guest (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: 0000000000021f0f (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: 000000000000966a (XEN) rbp: 000000000000d49c rsp: 0000000000009662 r8: 0000000000000000 (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000 (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: 0000000000000000 (XEN) cr3: 0000000000800000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 B. 2 VCPU ===== (XEN) HVM2: HVM Loader (XEN) HVM2: Detected Xen v3.5-unstable (XEN) HVM2: CPU speed is 2800 MHz (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 (XEN) HVM2: pci dev 01:2 INTD->IRQ5 (XEN) HVM2: pci dev 01:3 INTA->IRQ10 (XEN) HVM2: pci dev 02:0 INTA->IRQ11 (XEN) HVM2: pci dev 03:0 INTA->IRQ5 (XEN) HVM2: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM2: Multiprocessor initialisation: (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: Testing HVM environment: (XEN) HVM2: - REP INSB across page boundaries ... passed (XEN) HVM2: - GS base MSRs and SWAPGS ... passed (XEN) HVM2: Passed 2 of 2 tests (XEN) HVM2: Writing SMBIOS tables ... (XEN) HVM2: Loading ROMBIOS ... (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM2: Creating MP tables ... (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... (XEN) HVM2: Loading PCI Option ROM ... (XEN) HVM2: - Manufacturer: http://etherboot.org (XEN) HVM2: - Product name: gPXE (XEN) HVM2: Loading ACPI ... (XEN) HVM2: - Lo data: 000ea020-000ea04f (XEN) HVM2: - Hi data: fc003000-fc01261f (XEN) HVM2: vm86 TSS at fc012800 (XEN) HVM2: BIOS map: (XEN) HVM2: c0000-cf7ff: VGA BIOS (XEN) HVM2: cf800-dbfff: Etherboot ROM (XEN) HVM2: eb000-eb175: SMBIOS tables (XEN) HVM2: f0000-fffff: Main BIOS (XEN) HVM2: Invoking ROMBIOS ... (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 Hope the test results helped. I can start win xp home hvm dom U successfully if i remove pci in domU config and set gfx-passthru=0, basically starting with emulated vga bios instead of passing through pci-e graphics. -- Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Company Website: http://www.asiasoft.sg/ Mobile: +65-9648-9798 MSN: teoenming@hotmail.com Alma Maters: Singapore Polytechnic, National University of Singapore> Teo En Ming (Zhang Enming) wrote: > >> Hi, >> >> How about the patch for loading vga bios from .bin file and the 1:1 >> bar mapping in version 2 release? >> > Let''s make the basic patches better and acceptable first. I haven''t rebased > the hacks patches on version 2 patches. Currently pls use the hack patches > with version 1 patches. > > Regards, > Weidong > > >> Thanks for the version 2. >> >> Regards, >> >> Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) >> BEng(Hons)(Mechanical Engineering) >> Technical Support Engineer >> Information Technology Department >> Asiasoft Online Pte Ltd >> Tampines Central 1 #04-01 Tampines Plaza >> Singapore 529541 >> Republic of Singapore >> Mobile: +65-9648-9798 >> MSN: teoenming@hotmail.com >> -----Original Message----- >> From: xen-devel-bounces@lists.xensource.com >> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, >> Weidong Sent: Tuesday, September 01, 2009 2:01 PM >> To: ''xen-devel@lists.xensource.com'' >> Cc: Lin, Ben Y; ''bengheng@eecs.umich.edu''; Kay,Allen M; >> ''Keir.Fraser@eu.citrix.com''; ''Jean Guyader'' >> Subject: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d >> >> This patch supports basic gfx passthrough on QEMU: >> - disable emulated VGA adpater if there is passthroughed gfx >> - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 >> - register/unregister legacy VGA I/O ports and MMIOs for >> passthroughed gfx >> >> Signed-off-by: Ben Lin<ben.y.lin@intel.com> >> Signed-off-by: Weidong Han<weidong.han@intel.com> >> No virus found in this incoming message. >> Checked by AVG - www.avg.com >> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: >> 08/31/09 17:52:00 >> >> No virus found in this outgoing message. >> Checked by AVG - www.avg.com >> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: >> 08/31/09 17:52:00 >> > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 > 17:52:00 > > No virus found in this outgoing message. > Checked by AVG - www.avg.com > Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 > 17:52:00 > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mr. Teo En Ming (Zhang Enming)
2009-Sep-01 19:32 UTC
Re: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Basically I booted up with Intel IGD as the primary video adapter. Dom 0 has IGD while I want to pass through nVidia Geforce 8400 GS PCI-e x16 to my Win XP Home HVM dom U. VGA passthrough still doesn''t work on my Intel DQ45CB. Here is the hexdump of my nVidia Geforce 8400 GS VGA BIOS: 0000000: 55aa 7aeb 4b37 3430 30e9 4c19 77cc 5649 U.z.K7400.L.w.VI 0000010: 4445 4f20 0d00 0000 f001 3a1d 0000 4942 DEO ......:...IB 0000020: 4d20 5647 4120 436f 6d70 6174 6962 6c65 M VGA Compatible 0000030: 0100 0000 c000 16bc 3130 2f31 332f 3038 ........10/13/08 0000040: 0000 0000 0000 0000 0010 0000 0000 0000 ................ 0000050: e9f6 3400 0000 0000 c3e3 ff7f 1810 0000 ..4............. 0000060: ffff ff7f 0000 0080 2200 a5f1 e9e9 a4e9 ........"....... 0000070: f0a4 504d 4944 6c00 6f00 0000 00a0 00b0 ..PMIDl.o....... 0000080: 00b8 00c0 0033 6224 4f05 0200 7c00 0000 .....3b$O...|... 0000090: ffff ffff ffff ffff ffff ffff ffff ffff ................ 00000a0: ffff ffff ffff ffff ffff ffff ffff ffff ................ 00000b0: ffff ffff ffff ffff ffff ffff ffff ffff ................ 00000c0: ffff ffff ffff ffff ffff ffff ffff ffff ................ 00000d0: ffff ffff ffff ffff ffff ffff ffff ffff ................ 00000e0: ffff ffff ffff ffff 4857 4541 4765 466f ........HWEAGeFo 00000f0: 7263 6520 3834 3030 2047 5320 5647 4120 rce 8400 GS VGA 0000100: 4249 4f53 0d0a 0000 0000 0000 0000 0000 BIOS............ 0000110: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0000120: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0000130: 0000 0000 0000 0000 0000 0000 0056 6572 .............Ver 0000140: 7369 6f6e 2036 322e 3938 2e33 432e 3030 sion 62.98.3C.00 0000150: 2e30 3020 0d0a 0043 6f70 7972 6967 6874 .00 ...Copyright 0000160: 2028 4329 2031 3939 362d 3230 3038 204e (C) 1996-2008 N 0000170: 5649 4449 4120 436f 7270 2e0d 0a00 0000 VIDIA Corp...... 0000180: ffff 0000 0000 ffff 4249 4f53 2d50 2f4e ........BIOS-P/N 0000190: 404e 3432 3332 0000 0000 0000 0000 0000 @N4232.......... 00001a0: 0000 0000 0000 0000 0000 0043 6869 7020 ...........Chip 00001b0: 5265 7620 2020 0000 0000 0000 0000 00ba Rev .......... 00001c0: 9198 9691 9a9a 8d96 9198 dfad 9a93 9a9e ................ 00001d0: 8c9a dfd2 dfb1 908b dfb9 908d dfaf 8d90 ................ 00001e0: 9b8a 9c8b 9690 91df aa8c 9af2 f5ff 0000 ................ 00001f0: 5043 4952 de10 e406 0000 1800 0000 0003 PCIR............ 0000200: 7a00 0100 0080 0000 5059 4824 ffb8 4249 z.......PYH$..BI 0000210: 5400 0001 0c06 1245 3201 0400 9402 4202 T......E2.....B. 0000220: 1c00 9802 4301 0e00 b402 4401 0400 c202 ....C.....D..... -- Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Company Website: http://www.asiasoft.sg/ Mobile: +65-9648-9798 MSN: teoenming@hotmail.com Alma Maters: Singapore Polytechnic, National University of Singapore On 09/02/2009 03:24 AM, Mr. Teo En Ming (Zhang Enming) wrote:> Dear Weidong, > > I checked out xen 3.5-unstable changeset 20145. > > I applied *xen-gfx-passthrough.patch > <http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bin> > to changeset 20145. > > **There were some errors with* > ** > /Reversed/ (or previously applied) /patch detected/! Assume -R > <http://www.google.com.sg/url?sa=t&source=web&ct=res&cd=2&url=http%3A%2F%2Fubuntuforums.org%2Fshowthread.php%3Ft%3D555032&ei=kHCdSvGwH5ze6APtzem4AQ&rct=j&q=reversed+patch+detected&usg=AFQjCNHs2YXFZTPfMG-VGfXZgmuhqM5xGw> > > So I think the maintainers of xen-unstable had applied some of the > patches from ***xen-gfx-passthrough.patch > <http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bin> > *you posted to the tree. > > Then I applied the rest of the patches: > > *qemu-gfx-passthrough.patch > <http://lists.xensource.com/archives/html/xen-devel/2009-08/bintJIxIJU9it.bin> > **xen-load-vbios-file.patch > <http://lists.xensource.com/archives/html/xen-devel/2009-08/binBhcfOvfwKC.bin> > **xen-vBAR-pBAR.patch > <http://lists.xensource.com/archives/html/xen-devel/2009-08/bins09ti77jB2.bin> > **qemu-change-for-vBAR-pBAR.patch > <http://lists.xensource.com/archives/html/xen-devel/2009-08/bin5Tp1Qi5LaR.bin> > **qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch > <http://lists.xensource.com/archives/html/xen-devel/2009-08/bingGoDCQZtlM.bin>* > > to changeset 20145 without problems. > > Here are the test results. Note that all of the test results are based > on starting Windows XP Home HVM domU while in X server on dom0. > > If I try to start domU in text mode on dom0 (without X server), then > the screen output will be garbaged and I won''t be able to type > anything at all in dom0 text mode. > > Test results with pvops dom 0 kernel 2.6.30-rc3 > ============================> > A. 1 VCPU > =====> > Tried starting win xp home domu with vcpu=1. DomU crashed and exited, > leaving only dom0. > > (XEN) HVM1: HVM Loader > (XEN) HVM1: Detected Xen v3.5-unstable > (XEN) HVM1: CPU speed is 2800 MHz > (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 > (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 > (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 > (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 > (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 > (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 > (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 > (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 > (XEN) HVM1: pci dev 01:2 INTD->IRQ5 > (XEN) HVM1: pci dev 01:3 INTA->IRQ10 > (XEN) HVM1: pci dev 02:0 INTA->IRQ11 > (XEN) HVM1: pci dev 03:0 INTA->IRQ5 > (XEN) HVM1: Make vBAR = pBAR of assigned gfx > (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 > (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 > (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 > (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 > (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 > (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 > (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 > (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 > (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 > (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 > (XEN) HVM1: Multiprocessor initialisation: > (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs > [3/8] ... done. > (XEN) HVM1: Testing HVM environment: > (XEN) HVM1: - REP INSB across page boundaries ... passed > (XEN) HVM1: - GS base MSRs and SWAPGS ... passed > (XEN) HVM1: Passed 2 of 2 tests > (XEN) HVM1: Writing SMBIOS tables ... > (XEN) HVM1: Loading ROMBIOS ... > (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: > (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done > (XEN) HVM1: Creating MP tables ... > (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... > (XEN) HVM1: Loading PCI Option ROM ... > (XEN) HVM1: - Manufacturer: http://etherboot.org > (XEN) HVM1: - Product name: gPXE > (XEN) HVM1: Loading ACPI ... > (XEN) HVM1: - Lo data: 000ea020-000ea04f > (XEN) HVM1: - Hi data: fc003000-fc01261f > (XEN) HVM1: vm86 TSS at fc012800 > (XEN) HVM1: BIOS map: > (XEN) HVM1: c0000-cf7ff: VGA BIOS > (XEN) HVM1: cf800-dbfff: Etherboot ROM > (XEN) HVM1: eb000-eb14e: SMBIOS tables > (XEN) HVM1: f0000-fffff: Main BIOS > (XEN) HVM1: Invoking ROMBIOS ... > (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ > (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! > (XEN) realmode.c:115:d1 Failed to emulate insn. > (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 > 00 00 00 00 00 > (XEN) domain_crash called from realmode.c:166 > (XEN) Domain 1 (vcpu#0) crashed on cpu#1: > (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- > (XEN) CPU: 1 > (XEN) RIP: c000:[<000000000000b4b4>] > (XEN) RFLAGS: 0000000000000082 CONTEXT: hvm guest > (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: > 0000000000010593 > (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: > 000000000000966a > (XEN) rbp: 000000000000a1a4 rsp: 0000000000009662 r8: > 0000000000000000 > (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: > 0000000000000000 > (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: > 0000000000000000 > (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: > 0000000000000000 > (XEN) cr3: 0000000000800000 cr2: 0000000000000000 > (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 > (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 > (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 > > B. 2 VCPU > =====> > I switched to vcpu=2 for win xp home hvm domU. Now domU does not > crash. xm list shows domU running. But vncviewer pops up a QEMU > monitor. Looks like win xp home hvm domU did not start. All I get is a > QEMU monitor. > > (XEN) HVM2: HVM Loader > (XEN) HVM2: Detected Xen v3.5-unstable > (XEN) HVM2: CPU speed is 2800 MHz > (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 > (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 > (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 > (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 > (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 > (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 > (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 > (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 > (XEN) HVM2: pci dev 01:2 INTD->IRQ5 > (XEN) HVM2: pci dev 01:3 INTA->IRQ10 > (XEN) HVM2: pci dev 02:0 INTA->IRQ11 > (XEN) HVM2: pci dev 03:0 INTA->IRQ5 > (XEN) HVM2: Make vBAR = pBAR of assigned gfx > (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 > (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 > (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 > (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 > (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 > (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 > (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 > (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 > (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 > (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 > (XEN) HVM2: Multiprocessor initialisation: > (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs > [3/8] ... done. > (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs > [3/8] ... done. > (XEN) HVM2: Testing HVM environment: > (XEN) HVM2: - REP INSB across page boundaries ... passed > (XEN) HVM2: - GS base MSRs and SWAPGS ... passed > (XEN) HVM2: Passed 2 of 2 tests > (XEN) HVM2: Writing SMBIOS tables ... > (XEN) HVM2: Loading ROMBIOS ... > (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: > (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done > (XEN) HVM2: Creating MP tables ... > (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... > (XEN) HVM2: Loading PCI Option ROM ... > (XEN) HVM2: - Manufacturer: http://etherboot.org > (XEN) HVM2: - Product name: gPXE > (XEN) HVM2: Loading ACPI ... > (XEN) HVM2: - Lo data: 000ea020-000ea04f > (XEN) HVM2: - Hi data: fc003000-fc01261f > (XEN) HVM2: vm86 TSS at fc012800 > (XEN) HVM2: BIOS map: > (XEN) HVM2: c0000-cf7ff: VGA BIOS > (XEN) HVM2: cf800-dbfff: Etherboot ROM > (XEN) HVM2: eb000-eb175: SMBIOS tables > (XEN) HVM2: f0000-fffff: Main BIOS > (XEN) HVM2: Invoking ROMBIOS ... > (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ > > The same thing happens when testing under pvops dom 0 kernel 2.6.31-rc6. > > Test results with pvops dom 0 kernel 2.6.31-rc6 > ============================> > A. 1 VCPU > =====> > (XEN) HVM1: HVM Loader > (XEN) HVM1: Detected Xen v3.5-unstable > (XEN) HVM1: CPU speed is 2800 MHz > (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 > (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 > (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 > (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 > (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 > (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 > (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 > (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 > (XEN) HVM1: pci dev 01:2 INTD->IRQ5 > (XEN) HVM1: pci dev 01:3 INTA->IRQ10 > (XEN) HVM1: pci dev 02:0 INTA->IRQ11 > (XEN) HVM1: pci dev 03:0 INTA->IRQ5 > (XEN) HVM1: Make vBAR = pBAR of assigned gfx > (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 > (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 > (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 > (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 > (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 > (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 > (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 > (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 > (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 > (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 > (XEN) HVM1: Multiprocessor initialisation: > (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs > [3/8] ... done. > (XEN) HVM1: Testing HVM environment: > (XEN) HVM1: - REP INSB across page boundaries ... passed > (XEN) HVM1: - GS base MSRs and SWAPGS ... passed > (XEN) HVM1: Passed 2 of 2 tests > (XEN) HVM1: Writing SMBIOS tables ... > (XEN) HVM1: Loading ROMBIOS ... > (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: > (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done > (XEN) HVM1: Creating MP tables ... > (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... > (XEN) HVM1: Loading PCI Option ROM ... > (XEN) HVM1: - Manufacturer: http://etherboot.org > (XEN) HVM1: - Product name: gPXE > (XEN) HVM1: Loading ACPI ... > (XEN) HVM1: - Lo data: 000ea020-000ea04f > (XEN) HVM1: - Hi data: fc003000-fc01261f > (XEN) HVM1: vm86 TSS at fc012800 > (XEN) HVM1: BIOS map: > (XEN) HVM1: c0000-cf7ff: VGA BIOS > (XEN) HVM1: cf800-dbfff: Etherboot ROM > (XEN) HVM1: eb000-eb14e: SMBIOS tables > (XEN) HVM1: f0000-fffff: Main BIOS > (XEN) HVM1: Invoking ROMBIOS ... > (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ > (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! > (XEN) realmode.c:115:d1 Failed to emulate insn. > (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 > 00 00 00 00 00 > (XEN) domain_crash called from realmode.c:166 > (XEN) Domain 1 (vcpu#0) crashed on cpu#1: > (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- > (XEN) CPU: 1 > (XEN) RIP: c000:[<000000000000b4b4>] > (XEN) RFLAGS: 0000000000000086 CONTEXT: hvm guest > (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: > 0000000000021f0f > (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: > 000000000000966a > (XEN) rbp: 000000000000d49c rsp: 0000000000009662 r8: > 0000000000000000 > (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: > 0000000000000000 > (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: > 0000000000000000 > (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: > 0000000000000000 > (XEN) cr3: 0000000000800000 cr2: 0000000000000000 > (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 > (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 > (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 > > B. 2 VCPU > =====> > (XEN) HVM2: HVM Loader > (XEN) HVM2: Detected Xen v3.5-unstable > (XEN) HVM2: CPU speed is 2800 MHz > (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 > (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 > (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 > (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 > (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 > (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 > (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 > (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 > (XEN) HVM2: pci dev 01:2 INTD->IRQ5 > (XEN) HVM2: pci dev 01:3 INTA->IRQ10 > (XEN) HVM2: pci dev 02:0 INTA->IRQ11 > (XEN) HVM2: pci dev 03:0 INTA->IRQ5 > (XEN) HVM2: Make vBAR = pBAR of assigned gfx > (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 > (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 > (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 > (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 > (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 > (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 > (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 > (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 > (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 > (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 > (XEN) HVM2: Multiprocessor initialisation: > (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs > [3/8] ... done. > (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs > [3/8] ... done. > (XEN) HVM2: Testing HVM environment: > (XEN) HVM2: - REP INSB across page boundaries ... passed > (XEN) HVM2: - GS base MSRs and SWAPGS ... passed > (XEN) HVM2: Passed 2 of 2 tests > (XEN) HVM2: Writing SMBIOS tables ... > (XEN) HVM2: Loading ROMBIOS ... > (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: > (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done > (XEN) HVM2: Creating MP tables ... > (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... > (XEN) HVM2: Loading PCI Option ROM ... > (XEN) HVM2: - Manufacturer: http://etherboot.org > (XEN) HVM2: - Product name: gPXE > (XEN) HVM2: Loading ACPI ... > (XEN) HVM2: - Lo data: 000ea020-000ea04f > (XEN) HVM2: - Hi data: fc003000-fc01261f > (XEN) HVM2: vm86 TSS at fc012800 > (XEN) HVM2: BIOS map: > (XEN) HVM2: c0000-cf7ff: VGA BIOS > (XEN) HVM2: cf800-dbfff: Etherboot ROM > (XEN) HVM2: eb000-eb175: SMBIOS tables > (XEN) HVM2: f0000-fffff: Main BIOS > (XEN) HVM2: Invoking ROMBIOS ... > (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ > (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 > (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 > > Hope the test results helped. > > I can start win xp home hvm dom U successfully if i remove pci in domU > config and set gfx-passthru=0, basically starting with emulated vga > bios instead of passing through pci-e graphics. > -- > Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) > Technical Support Engineer > Information Technology Department > Asiasoft Online Pte Ltd > Tampines Central 1 #04-01 Tampines Plaza > Singapore 529541 > Republic of Singapore > Company Website:http://www.asiasoft.sg/ > Mobile: +65-9648-9798 > MSN:teoenming@hotmail.com > Alma Maters: Singapore Polytechnic, National University of Singapore >> Teo En Ming (Zhang Enming) wrote: >> >>> Hi, >>> >>> How about the patch for loading vga bios from .bin file and the 1:1 >>> bar mapping in version 2 release? >>> >> Let''s make the basic patches better and acceptable first. I haven''t rebased >> the hacks patches on version 2 patches. Currently pls use the hack patches >> with version 1 patches. >> >> Regards, >> Weidong >> >> >>> Thanks for the version 2. >>> >>> Regards, >>> >>> Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) >>> BEng(Hons)(Mechanical Engineering) >>> Technical Support Engineer >>> Information Technology Department >>> Asiasoft Online Pte Ltd >>> Tampines Central 1 #04-01 Tampines Plaza >>> Singapore 529541 >>> Republic of Singapore >>> Mobile: +65-9648-9798 >>> MSN:teoenming@hotmail.com >>> -----Original Message----- >>> From:xen-devel-bounces@lists.xensource.com >>> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, >>> Weidong Sent: Tuesday, September 01, 2009 2:01 PM >>> To: ''xen-devel@lists.xensource.com'' >>> Cc: Lin, Ben Y; ''bengheng@eecs.umich.edu''; Kay,Allen M; >>> ''Keir.Fraser@eu.citrix.com''; ''Jean Guyader'' >>> Subject: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d >>> >>> This patch supports basic gfx passthrough on QEMU: >>> - disable emulated VGA adpater if there is passthroughed gfx >>> - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 >>> - register/unregister legacy VGA I/O ports and MMIOs for >>> passthroughed gfx >>> >>> Signed-off-by: Ben Lin<ben.y.lin@intel.com> >>> Signed-off-by: Weidong Han<weidong.han@intel.com> >>> No virus found in this incoming message. >>> Checked by AVG -www.avg.com >>> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: >>> 08/31/09 17:52:00 >>> >>> No virus found in this outgoing message. >>> Checked by AVG -www.avg.com >>> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: >>> 08/31/09 17:52:00 >>> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel >> >> No virus found in this incoming message. >> Checked by AVG -www.avg.com >> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 >> 17:52:00 >> >> No virus found in this outgoing message. >> Checked by AVG -www.avg.com >> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 >> 17:52:00 >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mr. Teo En Ming (Zhang Enming)
2009-Sep-01 19:37 UTC
Re: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Here is my roms.h content: unsigned vgabios_pt[] = { 0xeb7aaa55, 0x3034374b, 0x194ce930, 0x4956cc77, 0x204f4544, 0x0000000d, 0x1d3a01f0, 0x42490000, 0x4756204d, 0x6f432041, 0x7461706d, 0x656c6269, 0x00000001, 0xbc1600c0, 0x312f3031, 0x38302f33, 0x00000000, 0x00000000, 0x00001000, 0x00000000, 0x0034f6e9, 0x00000000, 0x7fffe3c3, 0x00001018, 0x7fffffff, 0x80000000, 0xf1a50022, 0xe9a4e9e9, 0x4d50a4f0, 0x006c4449, 0x0000006f, 0xb000a000, 0xc000b800, 0x24623300, 0x0002054f, 0x0000007c, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x41455748, 0x6f466547, 0x20656372, 0x30303438, 0x20534720, 0x20414756, 0x534f4942, 0x00000a0d, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, Hence my nVidia Geforce 8400 GS VGA BIOS has been successfully dumped into roms.h. -- Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Company Website: http://www.asiasoft.sg/ Mobile: +65-9648-9798 MSN: teoenming@hotmail.com Alma Maters: Singapore Polytechnic, National University of Singapore On 09/02/2009 03:32 AM, Mr. Teo En Ming (Zhang Enming) wrote:> Basically I booted up with Intel IGD as the primary video adapter. Dom > 0 has IGD while I want to pass through nVidia Geforce 8400 GS PCI-e > x16 to my Win XP Home HVM dom U. VGA passthrough still doesn''t work on > my Intel DQ45CB. > > Here is the hexdump of my nVidia Geforce 8400 GS VGA BIOS: > 0000000: 55aa 7aeb 4b37 3430 30e9 4c19 77cc 5649 U.z.K7400.L.w.VI > 0000010: 4445 4f20 0d00 0000 f001 3a1d 0000 4942 DEO ......:...IB > 0000020: 4d20 5647 4120 436f 6d70 6174 6962 6c65 M VGA Compatible > 0000030: 0100 0000 c000 16bc 3130 2f31 332f 3038 ........10/13/08 > 0000040: 0000 0000 0000 0000 0010 0000 0000 0000 ................ > 0000050: e9f6 3400 0000 0000 c3e3 ff7f 1810 0000 ..4............. > 0000060: ffff ff7f 0000 0080 2200 a5f1 e9e9 a4e9 ........"....... > 0000070: f0a4 504d 4944 6c00 6f00 0000 00a0 00b0 ..PMIDl.o....... > 0000080: 00b8 00c0 0033 6224 4f05 0200 7c00 0000 .....3b$O...|... > 0000090: ffff ffff ffff ffff ffff ffff ffff ffff ................ > 00000a0: ffff ffff ffff ffff ffff ffff ffff ffff ................ > 00000b0: ffff ffff ffff ffff ffff ffff ffff ffff ................ > 00000c0: ffff ffff ffff ffff ffff ffff ffff ffff ................ > 00000d0: ffff ffff ffff ffff ffff ffff ffff ffff ................ > 00000e0: ffff ffff ffff ffff 4857 4541 4765 466f ........HWEAGeFo > 00000f0: 7263 6520 3834 3030 2047 5320 5647 4120 rce 8400 GS VGA > 0000100: 4249 4f53 0d0a 0000 0000 0000 0000 0000 BIOS............ > 0000110: 0000 0000 0000 0000 0000 0000 0000 0000 ................ > 0000120: 0000 0000 0000 0000 0000 0000 0000 0000 ................ > 0000130: 0000 0000 0000 0000 0000 0000 0056 6572 .............Ver > 0000140: 7369 6f6e 2036 322e 3938 2e33 432e 3030 sion 62.98.3C.00 > 0000150: 2e30 3020 0d0a 0043 6f70 7972 6967 6874 .00 ...Copyright > 0000160: 2028 4329 2031 3939 362d 3230 3038 204e (C) 1996-2008 N > 0000170: 5649 4449 4120 436f 7270 2e0d 0a00 0000 VIDIA Corp...... > 0000180: ffff 0000 0000 ffff 4249 4f53 2d50 2f4e ........BIOS-P/N > 0000190: 404e 3432 3332 0000 0000 0000 0000 0000 @N4232.......... > 00001a0: 0000 0000 0000 0000 0000 0043 6869 7020 ...........Chip > 00001b0: 5265 7620 2020 0000 0000 0000 0000 00ba Rev .......... > 00001c0: 9198 9691 9a9a 8d96 9198 dfad 9a93 9a9e ................ > 00001d0: 8c9a dfd2 dfb1 908b dfb9 908d dfaf 8d90 ................ > 00001e0: 9b8a 9c8b 9690 91df aa8c 9af2 f5ff 0000 ................ > 00001f0: 5043 4952 de10 e406 0000 1800 0000 0003 PCIR............ > 0000200: 7a00 0100 0080 0000 5059 4824 ffb8 4249 z.......PYH$..BI > 0000210: 5400 0001 0c06 1245 3201 0400 9402 4202 T......E2.....B. > 0000220: 1c00 9802 4301 0e00 b402 4401 0400 c202 ....C.....D..... > > -- > Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) > Technical Support Engineer > Information Technology Department > Asiasoft Online Pte Ltd > Tampines Central 1 #04-01 Tampines Plaza > Singapore 529541 > Republic of Singapore > Company Website:http://www.asiasoft.sg/ > Mobile: +65-9648-9798 > MSN:teoenming@hotmail.com > Alma Maters: Singapore Polytechnic, National University of Singapore > > > On 09/02/2009 03:24 AM, Mr. Teo En Ming (Zhang Enming) wrote: >> Dear Weidong, >> >> I checked out xen 3.5-unstable changeset 20145. >> >> I applied *xen-gfx-passthrough.patch >> <http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bin> >> to changeset 20145. >> >> **There were some errors with* >> ** >> /Reversed/ (or previously applied) /patch detected/! Assume -R >> <http://www.google.com.sg/url?sa=t&source=web&ct=res&cd=2&url=http%3A%2F%2Fubuntuforums.org%2Fshowthread.php%3Ft%3D555032&ei=kHCdSvGwH5ze6APtzem4AQ&rct=j&q=reversed+patch+detected&usg=AFQjCNHs2YXFZTPfMG-VGfXZgmuhqM5xGw> >> >> So I think the maintainers of xen-unstable had applied some of the >> patches from ***xen-gfx-passthrough.patch >> <http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bin> >> *you posted to the tree. >> >> Then I applied the rest of the patches: >> >> *qemu-gfx-passthrough.patch >> <http://lists.xensource.com/archives/html/xen-devel/2009-08/bintJIxIJU9it.bin> >> **xen-load-vbios-file.patch >> <http://lists.xensource.com/archives/html/xen-devel/2009-08/binBhcfOvfwKC.bin> >> **xen-vBAR-pBAR.patch >> <http://lists.xensource.com/archives/html/xen-devel/2009-08/bins09ti77jB2.bin> >> **qemu-change-for-vBAR-pBAR.patch >> <http://lists.xensource.com/archives/html/xen-devel/2009-08/bin5Tp1Qi5LaR.bin> >> **qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch >> <http://lists.xensource.com/archives/html/xen-devel/2009-08/bingGoDCQZtlM.bin>* >> >> to changeset 20145 without problems. >> >> Here are the test results. Note that all of the test results are >> based on starting Windows XP Home HVM domU while in X server on dom0. >> >> If I try to start domU in text mode on dom0 (without X server), then >> the screen output will be garbaged and I won''t be able to type >> anything at all in dom0 text mode. >> >> Test results with pvops dom 0 kernel 2.6.30-rc3 >> ============================>> >> A. 1 VCPU >> =====>> >> Tried starting win xp home domu with vcpu=1. DomU crashed and exited, >> leaving only dom0. >> >> (XEN) HVM1: HVM Loader >> (XEN) HVM1: Detected Xen v3.5-unstable >> (XEN) HVM1: CPU speed is 2800 MHz >> (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 >> (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 >> (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 >> (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 >> (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 >> (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 >> (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 >> (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 >> (XEN) HVM1: pci dev 01:2 INTD->IRQ5 >> (XEN) HVM1: pci dev 01:3 INTA->IRQ10 >> (XEN) HVM1: pci dev 02:0 INTA->IRQ11 >> (XEN) HVM1: pci dev 03:0 INTA->IRQ5 >> (XEN) HVM1: Make vBAR = pBAR of assigned gfx >> (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 >> (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 >> (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 >> (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 >> (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 >> (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 >> (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 >> (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 >> (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 >> (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 >> (XEN) HVM1: Multiprocessor initialisation: >> (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs >> [3/8] ... done. >> (XEN) HVM1: Testing HVM environment: >> (XEN) HVM1: - REP INSB across page boundaries ... passed >> (XEN) HVM1: - GS base MSRs and SWAPGS ... passed >> (XEN) HVM1: Passed 2 of 2 tests >> (XEN) HVM1: Writing SMBIOS tables ... >> (XEN) HVM1: Loading ROMBIOS ... >> (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: >> (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done >> (XEN) HVM1: Creating MP tables ... >> (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... >> (XEN) HVM1: Loading PCI Option ROM ... >> (XEN) HVM1: - Manufacturer: http://etherboot.org >> (XEN) HVM1: - Product name: gPXE >> (XEN) HVM1: Loading ACPI ... >> (XEN) HVM1: - Lo data: 000ea020-000ea04f >> (XEN) HVM1: - Hi data: fc003000-fc01261f >> (XEN) HVM1: vm86 TSS at fc012800 >> (XEN) HVM1: BIOS map: >> (XEN) HVM1: c0000-cf7ff: VGA BIOS >> (XEN) HVM1: cf800-dbfff: Etherboot ROM >> (XEN) HVM1: eb000-eb14e: SMBIOS tables >> (XEN) HVM1: f0000-fffff: Main BIOS >> (XEN) HVM1: Invoking ROMBIOS ... >> (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ >> (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! >> (XEN) realmode.c:115:d1 Failed to emulate insn. >> (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: >> 00 00 00 00 00 00 >> (XEN) domain_crash called from realmode.c:166 >> (XEN) Domain 1 (vcpu#0) crashed on cpu#1: >> (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- >> (XEN) CPU: 1 >> (XEN) RIP: c000:[<000000000000b4b4>] >> (XEN) RFLAGS: 0000000000000082 CONTEXT: hvm guest >> (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: >> 0000000000010593 >> (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: >> 000000000000966a >> (XEN) rbp: 000000000000a1a4 rsp: 0000000000009662 r8: >> 0000000000000000 >> (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: >> 0000000000000000 >> (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: >> 0000000000000000 >> (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: >> 0000000000000000 >> (XEN) cr3: 0000000000800000 cr2: 0000000000000000 >> (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 >> (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 >> (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 >> >> B. 2 VCPU >> =====>> >> I switched to vcpu=2 for win xp home hvm domU. Now domU does not >> crash. xm list shows domU running. But vncviewer pops up a QEMU >> monitor. Looks like win xp home hvm domU did not start. All I get is >> a QEMU monitor. >> >> (XEN) HVM2: HVM Loader >> (XEN) HVM2: Detected Xen v3.5-unstable >> (XEN) HVM2: CPU speed is 2800 MHz >> (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 >> (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 >> (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 >> (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 >> (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 >> (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 >> (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 >> (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 >> (XEN) HVM2: pci dev 01:2 INTD->IRQ5 >> (XEN) HVM2: pci dev 01:3 INTA->IRQ10 >> (XEN) HVM2: pci dev 02:0 INTA->IRQ11 >> (XEN) HVM2: pci dev 03:0 INTA->IRQ5 >> (XEN) HVM2: Make vBAR = pBAR of assigned gfx >> (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 >> (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 >> (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 >> (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 >> (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 >> (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 >> (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 >> (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 >> (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 >> (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 >> (XEN) HVM2: Multiprocessor initialisation: >> (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs >> [3/8] ... done. >> (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs >> [3/8] ... done. >> (XEN) HVM2: Testing HVM environment: >> (XEN) HVM2: - REP INSB across page boundaries ... passed >> (XEN) HVM2: - GS base MSRs and SWAPGS ... passed >> (XEN) HVM2: Passed 2 of 2 tests >> (XEN) HVM2: Writing SMBIOS tables ... >> (XEN) HVM2: Loading ROMBIOS ... >> (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: >> (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done >> (XEN) HVM2: Creating MP tables ... >> (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... >> (XEN) HVM2: Loading PCI Option ROM ... >> (XEN) HVM2: - Manufacturer: http://etherboot.org >> (XEN) HVM2: - Product name: gPXE >> (XEN) HVM2: Loading ACPI ... >> (XEN) HVM2: - Lo data: 000ea020-000ea04f >> (XEN) HVM2: - Hi data: fc003000-fc01261f >> (XEN) HVM2: vm86 TSS at fc012800 >> (XEN) HVM2: BIOS map: >> (XEN) HVM2: c0000-cf7ff: VGA BIOS >> (XEN) HVM2: cf800-dbfff: Etherboot ROM >> (XEN) HVM2: eb000-eb175: SMBIOS tables >> (XEN) HVM2: f0000-fffff: Main BIOS >> (XEN) HVM2: Invoking ROMBIOS ... >> (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ >> >> The same thing happens when testing under pvops dom 0 kernel 2.6.31-rc6. >> >> Test results with pvops dom 0 kernel 2.6.31-rc6 >> ============================>> >> A. 1 VCPU >> =====>> >> (XEN) HVM1: HVM Loader >> (XEN) HVM1: Detected Xen v3.5-unstable >> (XEN) HVM1: CPU speed is 2800 MHz >> (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 >> (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 >> (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 >> (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 >> (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 >> (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 >> (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 >> (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 >> (XEN) HVM1: pci dev 01:2 INTD->IRQ5 >> (XEN) HVM1: pci dev 01:3 INTA->IRQ10 >> (XEN) HVM1: pci dev 02:0 INTA->IRQ11 >> (XEN) HVM1: pci dev 03:0 INTA->IRQ5 >> (XEN) HVM1: Make vBAR = pBAR of assigned gfx >> (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 >> (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 >> (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 >> (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 >> (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 >> (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 >> (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 >> (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 >> (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 >> (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 >> (XEN) HVM1: Multiprocessor initialisation: >> (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs >> [3/8] ... done. >> (XEN) HVM1: Testing HVM environment: >> (XEN) HVM1: - REP INSB across page boundaries ... passed >> (XEN) HVM1: - GS base MSRs and SWAPGS ... passed >> (XEN) HVM1: Passed 2 of 2 tests >> (XEN) HVM1: Writing SMBIOS tables ... >> (XEN) HVM1: Loading ROMBIOS ... >> (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: >> (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done >> (XEN) HVM1: Creating MP tables ... >> (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... >> (XEN) HVM1: Loading PCI Option ROM ... >> (XEN) HVM1: - Manufacturer: http://etherboot.org >> (XEN) HVM1: - Product name: gPXE >> (XEN) HVM1: Loading ACPI ... >> (XEN) HVM1: - Lo data: 000ea020-000ea04f >> (XEN) HVM1: - Hi data: fc003000-fc01261f >> (XEN) HVM1: vm86 TSS at fc012800 >> (XEN) HVM1: BIOS map: >> (XEN) HVM1: c0000-cf7ff: VGA BIOS >> (XEN) HVM1: cf800-dbfff: Etherboot ROM >> (XEN) HVM1: eb000-eb14e: SMBIOS tables >> (XEN) HVM1: f0000-fffff: Main BIOS >> (XEN) HVM1: Invoking ROMBIOS ... >> (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ >> (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! >> (XEN) realmode.c:115:d1 Failed to emulate insn. >> (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: >> 00 00 00 00 00 00 >> (XEN) domain_crash called from realmode.c:166 >> (XEN) Domain 1 (vcpu#0) crashed on cpu#1: >> (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- >> (XEN) CPU: 1 >> (XEN) RIP: c000:[<000000000000b4b4>] >> (XEN) RFLAGS: 0000000000000086 CONTEXT: hvm guest >> (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: >> 0000000000021f0f >> (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: >> 000000000000966a >> (XEN) rbp: 000000000000d49c rsp: 0000000000009662 r8: >> 0000000000000000 >> (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: >> 0000000000000000 >> (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: >> 0000000000000000 >> (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: >> 0000000000000000 >> (XEN) cr3: 0000000000800000 cr2: 0000000000000000 >> (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 >> (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 >> (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 >> >> B. 2 VCPU >> =====>> >> (XEN) HVM2: HVM Loader >> (XEN) HVM2: Detected Xen v3.5-unstable >> (XEN) HVM2: CPU speed is 2800 MHz >> (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 >> (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 >> (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 >> (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 >> (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 >> (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 >> (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 >> (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 >> (XEN) HVM2: pci dev 01:2 INTD->IRQ5 >> (XEN) HVM2: pci dev 01:3 INTA->IRQ10 >> (XEN) HVM2: pci dev 02:0 INTA->IRQ11 >> (XEN) HVM2: pci dev 03:0 INTA->IRQ5 >> (XEN) HVM2: Make vBAR = pBAR of assigned gfx >> (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 >> (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 >> (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 >> (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 >> (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 >> (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 >> (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 >> (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 >> (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 >> (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 >> (XEN) HVM2: Multiprocessor initialisation: >> (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs >> [3/8] ... done. >> (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs >> [3/8] ... done. >> (XEN) HVM2: Testing HVM environment: >> (XEN) HVM2: - REP INSB across page boundaries ... passed >> (XEN) HVM2: - GS base MSRs and SWAPGS ... passed >> (XEN) HVM2: Passed 2 of 2 tests >> (XEN) HVM2: Writing SMBIOS tables ... >> (XEN) HVM2: Loading ROMBIOS ... >> (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: >> (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done >> (XEN) HVM2: Creating MP tables ... >> (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... >> (XEN) HVM2: Loading PCI Option ROM ... >> (XEN) HVM2: - Manufacturer: http://etherboot.org >> (XEN) HVM2: - Product name: gPXE >> (XEN) HVM2: Loading ACPI ... >> (XEN) HVM2: - Lo data: 000ea020-000ea04f >> (XEN) HVM2: - Hi data: fc003000-fc01261f >> (XEN) HVM2: vm86 TSS at fc012800 >> (XEN) HVM2: BIOS map: >> (XEN) HVM2: c0000-cf7ff: VGA BIOS >> (XEN) HVM2: cf800-dbfff: Etherboot ROM >> (XEN) HVM2: eb000-eb175: SMBIOS tables >> (XEN) HVM2: f0000-fffff: Main BIOS >> (XEN) HVM2: Invoking ROMBIOS ... >> (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ >> (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 >> (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 >> >> Hope the test results helped. >> >> I can start win xp home hvm dom U successfully if i remove pci in >> domU config and set gfx-passthru=0, basically starting with emulated >> vga bios instead of passing through pci-e graphics. >> -- >> Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) >> Technical Support Engineer >> Information Technology Department >> Asiasoft Online Pte Ltd >> Tampines Central 1 #04-01 Tampines Plaza >> Singapore 529541 >> Republic of Singapore >> Company Website:http://www.asiasoft.sg/ >> Mobile: +65-9648-9798 >> MSN:teoenming@hotmail.com >> Alma Maters: Singapore Polytechnic, National University of Singapore >>> Teo En Ming (Zhang Enming) wrote: >>> >>>> Hi, >>>> >>>> How about the patch for loading vga bios from .bin file and the 1:1 >>>> bar mapping in version 2 release? >>>> >>> Let''s make the basic patches better and acceptable first. I haven''t rebased >>> the hacks patches on version 2 patches. Currently pls use the hack patches >>> with version 1 patches. >>> >>> Regards, >>> Weidong >>> >>> >>>> Thanks for the version 2. >>>> >>>> Regards, >>>> >>>> Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) >>>> BEng(Hons)(Mechanical Engineering) >>>> Technical Support Engineer >>>> Information Technology Department >>>> Asiasoft Online Pte Ltd >>>> Tampines Central 1 #04-01 Tampines Plaza >>>> Singapore 529541 >>>> Republic of Singapore >>>> Mobile: +65-9648-9798 >>>> MSN:teoenming@hotmail.com >>>> -----Original Message----- >>>> From:xen-devel-bounces@lists.xensource.com >>>> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, >>>> Weidong Sent: Tuesday, September 01, 2009 2:01 PM >>>> To: ''xen-devel@lists.xensource.com'' >>>> Cc: Lin, Ben Y; ''bengheng@eecs.umich.edu''; Kay,Allen M; >>>> ''Keir.Fraser@eu.citrix.com''; ''Jean Guyader'' >>>> Subject: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d >>>> >>>> This patch supports basic gfx passthrough on QEMU: >>>> - disable emulated VGA adpater if there is passthroughed gfx >>>> - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 >>>> - register/unregister legacy VGA I/O ports and MMIOs for >>>> passthroughed gfx >>>> >>>> Signed-off-by: Ben Lin<ben.y.lin@intel.com> >>>> Signed-off-by: Weidong Han<weidong.han@intel.com> >>>> No virus found in this incoming message. >>>> Checked by AVG -www.avg.com >>>> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: >>>> 08/31/09 17:52:00 >>>> >>>> No virus found in this outgoing message. >>>> Checked by AVG -www.avg.com >>>> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: >>>> 08/31/09 17:52:00 >>>> >>> _______________________________________________ >>> Xen-devel mailing list >>> Xen-devel@lists.xensource.com >>> http://lists.xensource.com/xen-devel >>> >>> No virus found in this incoming message. >>> Checked by AVG -www.avg.com >>> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 >>> 17:52:00 >>> >>> No virus found in this outgoing message. >>> Checked by AVG -www.avg.com >>> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 >>> 17:52:00 >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel >> > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Han, Weidong
2009-Sep-01 22:49 UTC
RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
xen-gfx-passthrough.patch was checked into xne-unstable as changeset 20144,so you cannot apply it on 20145. For your secondary gfx passthrough case, pls use the version 1 patches. Christian Tramnitz said he succeeded to passthrough secondary gfx with my patches. Regards, Weidong ________________________________ From: Mr. Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net] Sent: 2009年9月2日 3:24 To: Han, Weidong Cc: xen-devel@lists.xensource.com; Lin, Ben Y; Kay, Allen M; Keir.Fraser@eu.citrix.com; 'Jean Guyader'; bengheng@eecs.umich.edu Subject: Re: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Dear Weidong, I checked out xen 3.5-unstable changeset 20145. I applied xen-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bin> to changeset 20145. There were some errors with Reversed (or previously applied) patch detected! Assume -R<http://www.google.com.sg/url?sa=t&source=web&ct=res&cd=2&url=http%3A%2F%2Fubuntuforums.org%2Fshowthread.php%3Ft%3D555032&ei=kHCdSvGwH5ze6APtzem4AQ&rct=j&q=reversed+patch+detected&usg=AFQjCNHs2YXFZTPfMG-VGfXZgmuhqM5xGw> So I think the maintainers of xen-unstable had applied some of the patches from xen-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bin> you posted to the tree. Then I applied the rest of the patches: qemu-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bintJIxIJU9it.bin> xen-load-vbios-file.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/binBhcfOvfwKC.bin> xen-vBAR-pBAR.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bins09ti77jB2.bin> qemu-change-for-vBAR-pBAR.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bin5Tp1Qi5LaR.bin> qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bingGoDCQZtlM.bin> to changeset 20145 without problems. Here are the test results. Note that all of the test results are based on starting Windows XP Home HVM domU while in X server on dom0. If I try to start domU in text mode on dom0 (without X server), then the screen output will be garbaged and I won't be able to type anything at all in dom0 text mode. Test results with pvops dom 0 kernel 2.6.30-rc3 ============================ A. 1 VCPU ===== Tried starting win xp home domu with vcpu=1. DomU crashed and exited, leaving only dom0. (XEN) HVM1: HVM Loader (XEN) HVM1: Detected Xen v3.5-unstable (XEN) HVM1: CPU speed is 2800 MHz (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 (XEN) HVM1: pci dev 01:2 INTD->IRQ5 (XEN) HVM1: pci dev 01:3 INTA->IRQ10 (XEN) HVM1: pci dev 02:0 INTA->IRQ11 (XEN) HVM1: pci dev 03:0 INTA->IRQ5 (XEN) HVM1: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM1: Multiprocessor initialisation: (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment: (XEN) HVM1: - REP INSB across page boundaries ... passed (XEN) HVM1: - GS base MSRs and SWAPGS ... passed (XEN) HVM1: Passed 2 of 2 tests (XEN) HVM1: Writing SMBIOS tables ... (XEN) HVM1: Loading ROMBIOS ... (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM1: Creating MP tables ... (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... (XEN) HVM1: Loading PCI Option ROM ... (XEN) HVM1: - Manufacturer: http://etherboot.org (XEN) HVM1: - Product name: gPXE (XEN) HVM1: Loading ACPI ... (XEN) HVM1: - Lo data: 000ea020-000ea04f (XEN) HVM1: - Hi data: fc003000-fc01261f (XEN) HVM1: vm86 TSS at fc012800 (XEN) HVM1: BIOS map: (XEN) HVM1: c0000-cf7ff: VGA BIOS (XEN) HVM1: cf800-dbfff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS (XEN) HVM1: Invoking ROMBIOS ... (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! (XEN) realmode.c:115:d1 Failed to emulate insn. (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 00 00 00 00 00 (XEN) domain_crash called from realmode.c:166 (XEN) Domain 1 (vcpu#0) crashed on cpu#1: (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: c000:[<000000000000b4b4>] (XEN) RFLAGS: 0000000000000082 CONTEXT: hvm guest (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: 0000000000010593 (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: 000000000000966a (XEN) rbp: 000000000000a1a4 rsp: 0000000000009662 r8: 0000000000000000 (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000 (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: 0000000000000000 (XEN) cr3: 0000000000800000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 B. 2 VCPU ===== I switched to vcpu=2 for win xp home hvm domU. Now domU does not crash. xm list shows domU running. But vncviewer pops up a QEMU monitor. Looks like win xp home hvm domU did not start. All I get is a QEMU monitor. (XEN) HVM2: HVM Loader (XEN) HVM2: Detected Xen v3.5-unstable (XEN) HVM2: CPU speed is 2800 MHz (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 (XEN) HVM2: pci dev 01:2 INTD->IRQ5 (XEN) HVM2: pci dev 01:3 INTA->IRQ10 (XEN) HVM2: pci dev 02:0 INTA->IRQ11 (XEN) HVM2: pci dev 03:0 INTA->IRQ5 (XEN) HVM2: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM2: Multiprocessor initialisation: (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: Testing HVM environment: (XEN) HVM2: - REP INSB across page boundaries ... passed (XEN) HVM2: - GS base MSRs and SWAPGS ... passed (XEN) HVM2: Passed 2 of 2 tests (XEN) HVM2: Writing SMBIOS tables ... (XEN) HVM2: Loading ROMBIOS ... (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM2: Creating MP tables ... (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... (XEN) HVM2: Loading PCI Option ROM ... (XEN) HVM2: - Manufacturer: http://etherboot.org (XEN) HVM2: - Product name: gPXE (XEN) HVM2: Loading ACPI ... (XEN) HVM2: - Lo data: 000ea020-000ea04f (XEN) HVM2: - Hi data: fc003000-fc01261f (XEN) HVM2: vm86 TSS at fc012800 (XEN) HVM2: BIOS map: (XEN) HVM2: c0000-cf7ff: VGA BIOS (XEN) HVM2: cf800-dbfff: Etherboot ROM (XEN) HVM2: eb000-eb175: SMBIOS tables (XEN) HVM2: f0000-fffff: Main BIOS (XEN) HVM2: Invoking ROMBIOS ... (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ The same thing happens when testing under pvops dom 0 kernel 2.6.31-rc6. Test results with pvops dom 0 kernel 2.6.31-rc6 ============================ A. 1 VCPU ===== (XEN) HVM1: HVM Loader (XEN) HVM1: Detected Xen v3.5-unstable (XEN) HVM1: CPU speed is 2800 MHz (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 (XEN) HVM1: pci dev 01:2 INTD->IRQ5 (XEN) HVM1: pci dev 01:3 INTA->IRQ10 (XEN) HVM1: pci dev 02:0 INTA->IRQ11 (XEN) HVM1: pci dev 03:0 INTA->IRQ5 (XEN) HVM1: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM1: Multiprocessor initialisation: (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment: (XEN) HVM1: - REP INSB across page boundaries ... passed (XEN) HVM1: - GS base MSRs and SWAPGS ... passed (XEN) HVM1: Passed 2 of 2 tests (XEN) HVM1: Writing SMBIOS tables ... (XEN) HVM1: Loading ROMBIOS ... (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM1: Creating MP tables ... (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... (XEN) HVM1: Loading PCI Option ROM ... (XEN) HVM1: - Manufacturer: http://etherboot.org (XEN) HVM1: - Product name: gPXE (XEN) HVM1: Loading ACPI ... (XEN) HVM1: - Lo data: 000ea020-000ea04f (XEN) HVM1: - Hi data: fc003000-fc01261f (XEN) HVM1: vm86 TSS at fc012800 (XEN) HVM1: BIOS map: (XEN) HVM1: c0000-cf7ff: VGA BIOS (XEN) HVM1: cf800-dbfff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS (XEN) HVM1: Invoking ROMBIOS ... (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! (XEN) realmode.c:115:d1 Failed to emulate insn. (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 00 00 00 00 00 (XEN) domain_crash called from realmode.c:166 (XEN) Domain 1 (vcpu#0) crashed on cpu#1: (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: c000:[<000000000000b4b4>] (XEN) RFLAGS: 0000000000000086 CONTEXT: hvm guest (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: 0000000000021f0f (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: 000000000000966a (XEN) rbp: 000000000000d49c rsp: 0000000000009662 r8: 0000000000000000 (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000 (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: 0000000000000000 (XEN) cr3: 0000000000800000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 B. 2 VCPU ===== (XEN) HVM2: HVM Loader (XEN) HVM2: Detected Xen v3.5-unstable (XEN) HVM2: CPU speed is 2800 MHz (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 (XEN) HVM2: pci dev 01:2 INTD->IRQ5 (XEN) HVM2: pci dev 01:3 INTA->IRQ10 (XEN) HVM2: pci dev 02:0 INTA->IRQ11 (XEN) HVM2: pci dev 03:0 INTA->IRQ5 (XEN) HVM2: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM2: Multiprocessor initialisation: (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: Testing HVM environment: (XEN) HVM2: - REP INSB across page boundaries ... passed (XEN) HVM2: - GS base MSRs and SWAPGS ... passed (XEN) HVM2: Passed 2 of 2 tests (XEN) HVM2: Writing SMBIOS tables ... (XEN) HVM2: Loading ROMBIOS ... (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM2: Creating MP tables ... (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... (XEN) HVM2: Loading PCI Option ROM ... (XEN) HVM2: - Manufacturer: http://etherboot.org (XEN) HVM2: - Product name: gPXE (XEN) HVM2: Loading ACPI ... (XEN) HVM2: - Lo data: 000ea020-000ea04f (XEN) HVM2: - Hi data: fc003000-fc01261f (XEN) HVM2: vm86 TSS at fc012800 (XEN) HVM2: BIOS map: (XEN) HVM2: c0000-cf7ff: VGA BIOS (XEN) HVM2: cf800-dbfff: Etherboot ROM (XEN) HVM2: eb000-eb175: SMBIOS tables (XEN) HVM2: f0000-fffff: Main BIOS (XEN) HVM2: Invoking ROMBIOS ... (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 Hope the test results helped. I can start win xp home hvm dom U successfully if i remove pci in domU config and set gfx-passthru=0, basically starting with emulated vga bios instead of passing through pci-e graphics. -- Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Company Website: http://www.asiasoft.sg/ Mobile: +65-9648-9798 MSN: teoenming@hotmail.com<mailto:teoenming@hotmail.com> Alma Maters: Singapore Polytechnic, National University of Singapore Teo En Ming (Zhang Enming) wrote: Hi, How about the patch for loading vga bios from .bin file and the 1:1 bar mapping in version 2 release? Let's make the basic patches better and acceptable first. I haven't rebased the hacks patches on version 2 patches. Currently pls use the hack patches with version 1 patches. Regards, Weidong Thanks for the version 2. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com<mailto:teoenming@hotmail.com> -----Original Message----- From: xen-devel-bounces@lists.xensource.com<mailto:xen-devel-bounces@lists.xensource.com> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, Weidong Sent: Tuesday, September 01, 2009 2:01 PM To: 'xen-devel@lists.xensource.com<mailto:xen-devel@lists.xensource.com>' Cc: Lin, Ben Y; 'bengheng@eecs.umich.edu<mailto:bengheng@eecs.umich.edu>'; Kay,Allen M; 'Keir.Fraser@eu.citrix.com<mailto:Keir.Fraser@eu.citrix.com>'; 'Jean Guyader' Subject: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d This patch supports basic gfx passthrough on QEMU: - disable emulated VGA adpater if there is passthroughed gfx - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 - register/unregister legacy VGA I/O ports and MMIOs for passthroughed gfx Signed-off-by: Ben Lin <ben.y.lin@intel.com><mailto:ben.y.lin@intel.com> Signed-off-by: Weidong Han <weidong.han@intel.com><mailto:weidong.han@intel.com> No virus found in this incoming message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com<mailto:Xen-devel@lists.xensource.com> http://lists.xensource.com/xen-devel No virus found in this incoming message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Teo En Ming (Zhang Enming)
2009-Sep-02 03:29 UTC
RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Hi Weidong, Even though I tried to apply xen-gfx-passthrough.patch to xen 3.5-unstable changeset 20145, it asked “Apply anyway?” and I chose no. For assume -R, I also chose no. Some files have been patched, while most files are not patched with xen-gfx-passthrough.patch. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com _____ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists. xensource.com] On Behalf Of Han, Weidong Sent: Wednesday, September 02, 2009 6:49 AM To: ''enming.teo@asiasoftsea.net'' Cc: ''xen-devel@lists.xensource.com''; Lin,Ben Y; Kay, Allen M; ''Jean Guyader''; ''Keir.Fraser@eu.citrix.com''; ''bengheng@eecs.umich.edu'' Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d xen-gfx-passthrough.patch was checked into xne-unstable as changeset 20144,so you cannot apply it on 20145. For your secondary gfx passthrough case, pls use the version 1 patches. Christian Tramnitz said he succeeded to passthrough secondary gfx with my patches. Regards, Weidong _____ From: Mr. Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net] Sent: 2009年9月2日 3:24 To: Han, Weidong Cc: xen-devel@lists.xensource.com; Lin, Ben Y; Kay, Allen M; Keir.Fraser@eu. citrix.com; ''Jean Guyader''; bengheng@eecs.umich.edu Subject: Re: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Dear Weidong, I checked out xen 3.5-unstable changeset 20145. I applied <http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bi n> xen-gfx-passthrough.patch to changeset 20145. There were some errors with <http://www.google.com.sg/url?sa=t&source=web&ct=res&cd=2&url=http%3A%2F%2Fu buntuforums.org%2Fshowthread.php%3Ft%3D555032&ei=kHCdSvGwH5ze6APtzem4AQ&rctj&q=reversed+patch+detected&usg=AFQjCNHs2YXFZTPfMG-VGfXZgmuhqM5xGw> Reversed (or previously applied) patch detected! Assume -R So I think the maintainers of xen-unstable had applied some of the patches from <http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bi n> xen-gfx-passthrough.patch you posted to the tree. Then I applied the rest of the patches: <http://lists.xensource.com/archives/html/xen-devel/2009-08/bintJIxIJU9it.bi n> qemu-gfx-passthrough.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/binBhcfOvfwKC.bi n> xen-load-vbios-file.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/bins09ti77jB2.bi n> xen-vBAR-pBAR.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/bin5Tp1Qi5LaR.bi n> qemu-change-for-vBAR-pBAR.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/bingGoDCQZtlM.bi n> qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch to changeset 20145 without problems. Here are the test results. Note that all of the test results are based on starting Windows XP Home HVM domU while in X server on dom0. If I try to start domU in text mode on dom0 (without X server), then the screen output will be garbaged and I won''t be able to type anything at all in dom0 text mode. Test results with pvops dom 0 kernel 2.6.30-rc3 ============================ A. 1 VCPU ===== Tried starting win xp home domu with vcpu=1. DomU crashed and exited, leaving only dom0. (XEN) HVM1: HVM Loader (XEN) HVM1: Detected Xen v3.5-unstable (XEN) HVM1: CPU speed is 2800 MHz (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 (XEN) HVM1: pci dev 01:2 INTD->IRQ5 (XEN) HVM1: pci dev 01:3 INTA->IRQ10 (XEN) HVM1: pci dev 02:0 INTA->IRQ11 (XEN) HVM1: pci dev 03:0 INTA->IRQ5 (XEN) HVM1: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM1: Multiprocessor initialisation: (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment: (XEN) HVM1: - REP INSB across page boundaries ... passed (XEN) HVM1: - GS base MSRs and SWAPGS ... passed (XEN) HVM1: Passed 2 of 2 tests (XEN) HVM1: Writing SMBIOS tables ... (XEN) HVM1: Loading ROMBIOS ... (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM1: Creating MP tables ... (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... (XEN) HVM1: Loading PCI Option ROM ... (XEN) HVM1: - Manufacturer: http://etherboot.org (XEN) HVM1: - Product name: gPXE (XEN) HVM1: Loading ACPI ... (XEN) HVM1: - Lo data: 000ea020-000ea04f (XEN) HVM1: - Hi data: fc003000-fc01261f (XEN) HVM1: vm86 TSS at fc012800 (XEN) HVM1: BIOS map: (XEN) HVM1: c0000-cf7ff: VGA BIOS (XEN) HVM1: cf800-dbfff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS (XEN) HVM1: Invoking ROMBIOS ... (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! (XEN) realmode.c:115:d1 Failed to emulate insn. (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 00 00 00 00 00 (XEN) domain_crash called from realmode.c:166 (XEN) Domain 1 (vcpu#0) crashed on cpu#1: (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: c000:[<000000000000b4b4>] (XEN) RFLAGS: 0000000000000082 CONTEXT: hvm guest (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: 0000000000010593 (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: 000000000000966a (XEN) rbp: 000000000000a1a4 rsp: 0000000000009662 r8: 0000000000000000 (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000 (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: 0000000000000000 (XEN) cr3: 0000000000800000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 B. 2 VCPU ===== I switched to vcpu=2 for win xp home hvm domU. Now domU does not crash. xm list shows domU running. But vncviewer pops up a QEMU monitor. Looks like win xp home hvm domU did not start. All I get is a QEMU monitor. (XEN) HVM2: HVM Loader (XEN) HVM2: Detected Xen v3.5-unstable (XEN) HVM2: CPU speed is 2800 MHz (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 (XEN) HVM2: pci dev 01:2 INTD->IRQ5 (XEN) HVM2: pci dev 01:3 INTA->IRQ10 (XEN) HVM2: pci dev 02:0 INTA->IRQ11 (XEN) HVM2: pci dev 03:0 INTA->IRQ5 (XEN) HVM2: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM2: Multiprocessor initialisation: (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: Testing HVM environment: (XEN) HVM2: - REP INSB across page boundaries ... passed (XEN) HVM2: - GS base MSRs and SWAPGS ... passed (XEN) HVM2: Passed 2 of 2 tests (XEN) HVM2: Writing SMBIOS tables ... (XEN) HVM2: Loading ROMBIOS ... (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM2: Creating MP tables ... (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... (XEN) HVM2: Loading PCI Option ROM ... (XEN) HVM2: - Manufacturer: http://etherboot.org (XEN) HVM2: - Product name: gPXE (XEN) HVM2: Loading ACPI ... (XEN) HVM2: - Lo data: 000ea020-000ea04f (XEN) HVM2: - Hi data: fc003000-fc01261f (XEN) HVM2: vm86 TSS at fc012800 (XEN) HVM2: BIOS map: (XEN) HVM2: c0000-cf7ff: VGA BIOS (XEN) HVM2: cf800-dbfff: Etherboot ROM (XEN) HVM2: eb000-eb175: SMBIOS tables (XEN) HVM2: f0000-fffff: Main BIOS (XEN) HVM2: Invoking ROMBIOS ... (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ The same thing happens when testing under pvops dom 0 kernel 2.6.31-rc6. Test results with pvops dom 0 kernel 2.6.31-rc6 ============================ A. 1 VCPU ===== (XEN) HVM1: HVM Loader (XEN) HVM1: Detected Xen v3.5-unstable (XEN) HVM1: CPU speed is 2800 MHz (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 (XEN) HVM1: pci dev 01:2 INTD->IRQ5 (XEN) HVM1: pci dev 01:3 INTA->IRQ10 (XEN) HVM1: pci dev 02:0 INTA->IRQ11 (XEN) HVM1: pci dev 03:0 INTA->IRQ5 (XEN) HVM1: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM1: Multiprocessor initialisation: (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment: (XEN) HVM1: - REP INSB across page boundaries ... passed (XEN) HVM1: - GS base MSRs and SWAPGS ... passed (XEN) HVM1: Passed 2 of 2 tests (XEN) HVM1: Writing SMBIOS tables ... (XEN) HVM1: Loading ROMBIOS ... (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM1: Creating MP tables ... (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... (XEN) HVM1: Loading PCI Option ROM ... (XEN) HVM1: - Manufacturer: http://etherboot.org (XEN) HVM1: - Product name: gPXE (XEN) HVM1: Loading ACPI ... (XEN) HVM1: - Lo data: 000ea020-000ea04f (XEN) HVM1: - Hi data: fc003000-fc01261f (XEN) HVM1: vm86 TSS at fc012800 (XEN) HVM1: BIOS map: (XEN) HVM1: c0000-cf7ff: VGA BIOS (XEN) HVM1: cf800-dbfff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS (XEN) HVM1: Invoking ROMBIOS ... (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! (XEN) realmode.c:115:d1 Failed to emulate insn. (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 00 00 00 00 00 (XEN) domain_crash called from realmode.c:166 (XEN) Domain 1 (vcpu#0) crashed on cpu#1: (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: c000:[<000000000000b4b4>] (XEN) RFLAGS: 0000000000000086 CONTEXT: hvm guest (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: 0000000000021f0f (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: 000000000000966a (XEN) rbp: 000000000000d49c rsp: 0000000000009662 r8: 0000000000000000 (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000 (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: 0000000000000000 (XEN) cr3: 0000000000800000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 B. 2 VCPU ===== (XEN) HVM2: HVM Loader (XEN) HVM2: Detected Xen v3.5-unstable (XEN) HVM2: CPU speed is 2800 MHz (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 (XEN) HVM2: pci dev 01:2 INTD->IRQ5 (XEN) HVM2: pci dev 01:3 INTA->IRQ10 (XEN) HVM2: pci dev 02:0 INTA->IRQ11 (XEN) HVM2: pci dev 03:0 INTA->IRQ5 (XEN) HVM2: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM2: Multiprocessor initialisation: (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: Testing HVM environment: (XEN) HVM2: - REP INSB across page boundaries ... passed (XEN) HVM2: - GS base MSRs and SWAPGS ... passed (XEN) HVM2: Passed 2 of 2 tests (XEN) HVM2: Writing SMBIOS tables ... (XEN) HVM2: Loading ROMBIOS ... (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM2: Creating MP tables ... (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... (XEN) HVM2: Loading PCI Option ROM ... (XEN) HVM2: - Manufacturer: http://etherboot.org (XEN) HVM2: - Product name: gPXE (XEN) HVM2: Loading ACPI ... (XEN) HVM2: - Lo data: 000ea020-000ea04f (XEN) HVM2: - Hi data: fc003000-fc01261f (XEN) HVM2: vm86 TSS at fc012800 (XEN) HVM2: BIOS map: (XEN) HVM2: c0000-cf7ff: VGA BIOS (XEN) HVM2: cf800-dbfff: Etherboot ROM (XEN) HVM2: eb000-eb175: SMBIOS tables (XEN) HVM2: f0000-fffff: Main BIOS (XEN) HVM2: Invoking ROMBIOS ... (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 Hope the test results helped. I can start win xp home hvm dom U successfully if i remove pci in domU config and set gfx-passthru=0, basically starting with emulated vga bios instead of passing through pci-e graphics. -- Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Company Website: http://www.asiasoft.sg/ Mobile: +65-9648-9798 MSN: teoenming@hotmail.com Alma Maters: Singapore Polytechnic, National University of Singapore Teo En Ming (Zhang Enming) wrote: Hi, How about the patch for loading vga bios from .bin file and the 1:1 bar mapping in version 2 release? Let''s make the basic patches better and acceptable first. I haven''t rebased the hacks patches on version 2 patches. Currently pls use the hack patches with version 1 patches. Regards, Weidong Thanks for the version 2. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com -----Original Message----- From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, Weidong Sent: Tuesday, September 01, 2009 2:01 PM To: ''xen-devel@lists.xensource.com'' Cc: Lin, Ben Y; ''bengheng@eecs.umich.edu''; Kay,Allen M; ''Keir.Fraser@eu.citrix.com''; ''Jean Guyader'' Subject: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d This patch supports basic gfx passthrough on QEMU: - disable emulated VGA adpater if there is passthroughed gfx - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 - register/unregister legacy VGA I/O ports and MMIOs for passthroughed gfx Signed-off-by: Ben Lin <mailto:ben.y.lin@intel.com> <ben.y.lin@intel.com> Signed-off-by: Weidong Han <mailto:weidong.han@intel.com> <weidong.han@intel.com> No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Han, Weidong
2009-Sep-02 03:37 UTC
RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
make sure your xen version is older than 20144, such as 20143. Otherwise it conflicts when you apply my posted patches. Pls post your steps to build your environment with my patches. I suspect you may make some mistakes on xen build. Regards, Weidong ________________________________ From: Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net] Sent: 2009年9月2日 11:29 To: Han, Weidong Cc: xen-devel@lists.xensource.com; Lin, Ben Y; Kay, Allen M; 'Jean Guyader'; Keir.Fraser@eu.citrix.com; bengheng@eecs.umich.edu Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Hi Weidong, Even though I tried to apply xen-gfx-passthrough.patch to xen 3.5-unstable changeset 20145, it asked “Apply anyway?” and I chose no. For assume –R, I also chose no. Some files have been patched, while most files are not patched with xen-gfx-passthrough.patch. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com ________________________________ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, Weidong Sent: Wednesday, September 02, 2009 6:49 AM To: 'enming.teo@asiasoftsea.net' Cc: 'xen-devel@lists.xensource.com'; Lin,Ben Y; Kay, Allen M; 'Jean Guyader'; 'Keir.Fraser@eu.citrix.com'; 'bengheng@eecs.umich.edu' Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d xen-gfx-passthrough.patch was checked into xne-unstable as changeset 20144,so you cannot apply it on 20145. For your secondary gfx passthrough case, pls use the version 1 patches. Christian Tramnitz said he succeeded to passthrough secondary gfx with my patches. Regards, Weidong ________________________________ From: Mr. Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net] Sent: 2009年9月2日 3:24 To: Han, Weidong Cc: xen-devel@lists.xensource.com; Lin, Ben Y; Kay, Allen M; Keir.Fraser@eu.citrix.com; 'Jean Guyader'; bengheng@eecs.umich.edu Subject: Re: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Dear Weidong, I checked out xen 3.5-unstable changeset 20145. I applied xen-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bin> to changeset 20145. There were some errors with Reversed (or previously applied) patch detected! Assume -R<http://www.google.com.sg/url?sa=t&source=web&ct=res&cd=2&url=http%3A%2F%2Fubuntuforums.org%2Fshowthread.php%3Ft%3D555032&ei=kHCdSvGwH5ze6APtzem4AQ&rct=j&q=reversed+patch+detected&usg=AFQjCNHs2YXFZTPfMG-VGfXZgmuhqM5xGw> So I think the maintainers of xen-unstable had applied some of the patches from xen-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bin> you posted to the tree. Then I applied the rest of the patches: qemu-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bintJIxIJU9it.bin> xen-load-vbios-file.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/binBhcfOvfwKC.bin> xen-vBAR-pBAR.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bins09ti77jB2.bin> qemu-change-for-vBAR-pBAR.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bin5Tp1Qi5LaR.bin> qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bingGoDCQZtlM.bin> to changeset 20145 without problems. Here are the test results. Note that all of the test results are based on starting Windows XP Home HVM domU while in X server on dom0. If I try to start domU in text mode on dom0 (without X server), then the screen output will be garbaged and I won't be able to type anything at all in dom0 text mode. Test results with pvops dom 0 kernel 2.6.30-rc3 ============================ A. 1 VCPU ===== Tried starting win xp home domu with vcpu=1. DomU crashed and exited, leaving only dom0. (XEN) HVM1: HVM Loader (XEN) HVM1: Detected Xen v3.5-unstable (XEN) HVM1: CPU speed is 2800 MHz (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 (XEN) HVM1: pci dev 01:2 INTD->IRQ5 (XEN) HVM1: pci dev 01:3 INTA->IRQ10 (XEN) HVM1: pci dev 02:0 INTA->IRQ11 (XEN) HVM1: pci dev 03:0 INTA->IRQ5 (XEN) HVM1: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM1: Multiprocessor initialisation: (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment: (XEN) HVM1: - REP INSB across page boundaries ... passed (XEN) HVM1: - GS base MSRs and SWAPGS ... passed (XEN) HVM1: Passed 2 of 2 tests (XEN) HVM1: Writing SMBIOS tables ... (XEN) HVM1: Loading ROMBIOS ... (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM1: Creating MP tables ... (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... (XEN) HVM1: Loading PCI Option ROM ... (XEN) HVM1: - Manufacturer: http://etherboot.org (XEN) HVM1: - Product name: gPXE (XEN) HVM1: Loading ACPI ... (XEN) HVM1: - Lo data: 000ea020-000ea04f (XEN) HVM1: - Hi data: fc003000-fc01261f (XEN) HVM1: vm86 TSS at fc012800 (XEN) HVM1: BIOS map: (XEN) HVM1: c0000-cf7ff: VGA BIOS (XEN) HVM1: cf800-dbfff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS (XEN) HVM1: Invoking ROMBIOS ... (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! (XEN) realmode.c:115:d1 Failed to emulate insn. (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 00 00 00 00 00 (XEN) domain_crash called from realmode.c:166 (XEN) Domain 1 (vcpu#0) crashed on cpu#1: (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: c000:[<000000000000b4b4>] (XEN) RFLAGS: 0000000000000082 CONTEXT: hvm guest (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: 0000000000010593 (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: 000000000000966a (XEN) rbp: 000000000000a1a4 rsp: 0000000000009662 r8: 0000000000000000 (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000 (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: 0000000000000000 (XEN) cr3: 0000000000800000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 B. 2 VCPU ===== I switched to vcpu=2 for win xp home hvm domU. Now domU does not crash. xm list shows domU running. But vncviewer pops up a QEMU monitor. Looks like win xp home hvm domU did not start. All I get is a QEMU monitor. (XEN) HVM2: HVM Loader (XEN) HVM2: Detected Xen v3.5-unstable (XEN) HVM2: CPU speed is 2800 MHz (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 (XEN) HVM2: pci dev 01:2 INTD->IRQ5 (XEN) HVM2: pci dev 01:3 INTA->IRQ10 (XEN) HVM2: pci dev 02:0 INTA->IRQ11 (XEN) HVM2: pci dev 03:0 INTA->IRQ5 (XEN) HVM2: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM2: Multiprocessor initialisation: (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: Testing HVM environment: (XEN) HVM2: - REP INSB across page boundaries ... passed (XEN) HVM2: - GS base MSRs and SWAPGS ... passed (XEN) HVM2: Passed 2 of 2 tests (XEN) HVM2: Writing SMBIOS tables ... (XEN) HVM2: Loading ROMBIOS ... (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM2: Creating MP tables ... (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... (XEN) HVM2: Loading PCI Option ROM ... (XEN) HVM2: - Manufacturer: http://etherboot.org (XEN) HVM2: - Product name: gPXE (XEN) HVM2: Loading ACPI ... (XEN) HVM2: - Lo data: 000ea020-000ea04f (XEN) HVM2: - Hi data: fc003000-fc01261f (XEN) HVM2: vm86 TSS at fc012800 (XEN) HVM2: BIOS map: (XEN) HVM2: c0000-cf7ff: VGA BIOS (XEN) HVM2: cf800-dbfff: Etherboot ROM (XEN) HVM2: eb000-eb175: SMBIOS tables (XEN) HVM2: f0000-fffff: Main BIOS (XEN) HVM2: Invoking ROMBIOS ... (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ The same thing happens when testing under pvops dom 0 kernel 2.6.31-rc6. Test results with pvops dom 0 kernel 2.6.31-rc6 ============================ A. 1 VCPU ===== (XEN) HVM1: HVM Loader (XEN) HVM1: Detected Xen v3.5-unstable (XEN) HVM1: CPU speed is 2800 MHz (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 (XEN) HVM1: pci dev 01:2 INTD->IRQ5 (XEN) HVM1: pci dev 01:3 INTA->IRQ10 (XEN) HVM1: pci dev 02:0 INTA->IRQ11 (XEN) HVM1: pci dev 03:0 INTA->IRQ5 (XEN) HVM1: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM1: Multiprocessor initialisation: (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment: (XEN) HVM1: - REP INSB across page boundaries ... passed (XEN) HVM1: - GS base MSRs and SWAPGS ... passed (XEN) HVM1: Passed 2 of 2 tests (XEN) HVM1: Writing SMBIOS tables ... (XEN) HVM1: Loading ROMBIOS ... (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM1: Creating MP tables ... (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... (XEN) HVM1: Loading PCI Option ROM ... (XEN) HVM1: - Manufacturer: http://etherboot.org (XEN) HVM1: - Product name: gPXE (XEN) HVM1: Loading ACPI ... (XEN) HVM1: - Lo data: 000ea020-000ea04f (XEN) HVM1: - Hi data: fc003000-fc01261f (XEN) HVM1: vm86 TSS at fc012800 (XEN) HVM1: BIOS map: (XEN) HVM1: c0000-cf7ff: VGA BIOS (XEN) HVM1: cf800-dbfff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS (XEN) HVM1: Invoking ROMBIOS ... (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! (XEN) realmode.c:115:d1 Failed to emulate insn. (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 00 00 00 00 00 (XEN) domain_crash called from realmode.c:166 (XEN) Domain 1 (vcpu#0) crashed on cpu#1: (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: c000:[<000000000000b4b4>] (XEN) RFLAGS: 0000000000000086 CONTEXT: hvm guest (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: 0000000000021f0f (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: 000000000000966a (XEN) rbp: 000000000000d49c rsp: 0000000000009662 r8: 0000000000000000 (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000 (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: 0000000000000000 (XEN) cr3: 0000000000800000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 B. 2 VCPU ===== (XEN) HVM2: HVM Loader (XEN) HVM2: Detected Xen v3.5-unstable (XEN) HVM2: CPU speed is 2800 MHz (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 (XEN) HVM2: pci dev 01:2 INTD->IRQ5 (XEN) HVM2: pci dev 01:3 INTA->IRQ10 (XEN) HVM2: pci dev 02:0 INTA->IRQ11 (XEN) HVM2: pci dev 03:0 INTA->IRQ5 (XEN) HVM2: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM2: Multiprocessor initialisation: (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: Testing HVM environment: (XEN) HVM2: - REP INSB across page boundaries ... passed (XEN) HVM2: - GS base MSRs and SWAPGS ... passed (XEN) HVM2: Passed 2 of 2 tests (XEN) HVM2: Writing SMBIOS tables ... (XEN) HVM2: Loading ROMBIOS ... (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM2: Creating MP tables ... (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... (XEN) HVM2: Loading PCI Option ROM ... (XEN) HVM2: - Manufacturer: http://etherboot.org (XEN) HVM2: - Product name: gPXE (XEN) HVM2: Loading ACPI ... (XEN) HVM2: - Lo data: 000ea020-000ea04f (XEN) HVM2: - Hi data: fc003000-fc01261f (XEN) HVM2: vm86 TSS at fc012800 (XEN) HVM2: BIOS map: (XEN) HVM2: c0000-cf7ff: VGA BIOS (XEN) HVM2: cf800-dbfff: Etherboot ROM (XEN) HVM2: eb000-eb175: SMBIOS tables (XEN) HVM2: f0000-fffff: Main BIOS (XEN) HVM2: Invoking ROMBIOS ... (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 Hope the test results helped. I can start win xp home hvm dom U successfully if i remove pci in domU config and set gfx-passthru=0, basically starting with emulated vga bios instead of passing through pci-e graphics. -- Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Company Website: http://www.asiasoft.sg/ Mobile: +65-9648-9798 MSN: teoenming@hotmail.com<mailto:teoenming@hotmail.com> Alma Maters: Singapore Polytechnic, National University of Singapore Teo En Ming (Zhang Enming) wrote: Hi, How about the patch for loading vga bios from .bin file and the 1:1 bar mapping in version 2 release? Let's make the basic patches better and acceptable first. I haven't rebased the hacks patches on version 2 patches. Currently pls use the hack patches with version 1 patches. Regards, Weidong Thanks for the version 2. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com<mailto:teoenming@hotmail.com> -----Original Message----- From: xen-devel-bounces@lists.xensource.com<mailto:xen-devel-bounces@lists.xensource.com> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, Weidong Sent: Tuesday, September 01, 2009 2:01 PM To: 'xen-devel@lists.xensource.com<mailto:xen-devel@lists.xensource.com>' Cc: Lin, Ben Y; 'bengheng@eecs.umich.edu<mailto:bengheng@eecs.umich.edu>'; Kay,Allen M; 'Keir.Fraser@eu.citrix.com<mailto:Keir.Fraser@eu.citrix.com>'; 'Jean Guyader' Subject: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d This patch supports basic gfx passthrough on QEMU: - disable emulated VGA adpater if there is passthroughed gfx - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 - register/unregister legacy VGA I/O ports and MMIOs for passthroughed gfx Signed-off-by: Ben Lin <ben.y.lin@intel.com><mailto:ben.y.lin@intel.com> Signed-off-by: Weidong Han <weidong.han@intel.com><mailto:weidong.han@intel.com> No virus found in this incoming message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com<mailto:Xen-devel@lists.xensource.com> http://lists.xensource.com/xen-devel No virus found in this incoming message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Teo En Ming (Zhang Enming)
2009-Sep-02 03:52 UTC
RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Hi, If I checked out 20145 or later, then I need to SKIP xen-gfx-passthrough.patch but apply all the rest of the patches? If I cannot do this, how I can check out earlier changesets? Is it hg checkout something something? My patching procedures are: # cd xen-unstable.hg # patch -p1 < xen-gfx-passthrough.patch # cd tools/ioemu-remote # patch -p1 < <http://lists.xensource.com/archives/html/xen-devel/2009-08/bintJIxIJU9it.bi n> qemu-gfx-passthrough.patch # cd ../.. # patch -p1 < <http://lists.xensource.com/archives/html/xen-devel/2009-08/binBhcfOvfwKC.bi n> xen-load-vbios-file.patch # patch -p1 < <http://lists.xensource.com/archives/html/xen-devel/2009-08/bins09ti77jB2.bi n> xen-vBAR-pBAR.patch # cd tools/ioemu-remote # patch -p1 < <http://lists.xensource.com/archives/html/xen-devel/2009-08/bin5Tp1Qi5LaR.bi n> qemu-change-for-vBAR-pBAR.patch # patch -p1 < <http://lists.xensource.com/archives/html/xen-devel/2009-08/bingGoDCQZtlM.bi n> qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch # cd ../.. # make clean copy vgabios-pt.bin to tools/firmware/vgabios # make xen # make install-xen # make tools # make install-tools # reboot Thank you. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com _____ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists. xensource.com] On Behalf Of Han, Weidong Sent: Wednesday, September 02, 2009 11:38 AM To: ''enming.teo@asiasoftsea.net'' Cc: ''xen-devel@lists.xensource.com''; Lin,Ben Y; Kay, Allen M; Guyader''; ''Jean; ''Keir.Fraser@eu.citrix.com''; ''bengheng@eecs.umich.edu'' Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d make sure your xen version is older than 20144, such as 20143. Otherwise it conflicts when you apply my posted patches. Pls post your steps to build your environment with my patches. I suspect you may make some mistakes on xen build. Regards, Weidong _____ From: Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net] Sent: 2009年9月2日 11:29 To: Han, Weidong Cc: xen-devel@lists.xensource.com; Lin, Ben Y; Kay, Allen M; ''Jean Guyader''; Keir.Fraser@eu.citrix.com; bengheng@eecs.umich.edu Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Hi Weidong, Even though I tried to apply xen-gfx-passthrough.patch to xen 3.5-unstable changeset 20145, it asked “Apply anyway?” and I chose no. For assume -R, I also chose no. Some files have been patched, while most files are not patched with xen-gfx-passthrough.patch. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com _____ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists. xensource.com] On Behalf Of Han, Weidong Sent: Wednesday, September 02, 2009 6:49 AM To: ''enming.teo@asiasoftsea.net'' Cc: ''xen-devel@lists.xensource.com''; Lin,Ben Y; Kay, Allen M; ''Jean Guyader''; ''Keir.Fraser@eu.citrix.com''; ''bengheng@eecs.umich.edu'' Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d xen-gfx-passthrough.patch was checked into xne-unstable as changeset 20144,so you cannot apply it on 20145. For your secondary gfx passthrough case, pls use the version 1 patches. Christian Tramnitz said he succeeded to passthrough secondary gfx with my patches. Regards, Weidong _____ From: Mr. Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net] Sent: 2009年9月2日 3:24 To: Han, Weidong Cc: xen-devel@lists.xensource.com; Lin, Ben Y; Kay, Allen M; Keir.Fraser@eu. citrix.com; ''Jean Guyader''; bengheng@eecs.umich.edu Subject: Re: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Dear Weidong, I checked out xen 3.5-unstable changeset 20145. I applied <http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bi n> xen-gfx-passthrough.patch to changeset 20145. There were some errors with <http://www.google.com.sg/url?sa=t&source=web&ct=res&cd=2&url=http%3A%2F%2Fu buntuforums.org%2Fshowthread.php%3Ft%3D555032&ei=kHCdSvGwH5ze6APtzem4AQ&rctj&q=reversed+patch+detected&usg=AFQjCNHs2YXFZTPfMG-VGfXZgmuhqM5xGw> Reversed (or previously applied) patch detected! Assume -R So I think the maintainers of xen-unstable had applied some of the patches from <http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bi n> xen-gfx-passthrough.patch you posted to the tree. Then I applied the rest of the patches: <http://lists.xensource.com/archives/html/xen-devel/2009-08/bintJIxIJU9it.bi n> qemu-gfx-passthrough.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/binBhcfOvfwKC.bi n> xen-load-vbios-file.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/bins09ti77jB2.bi n> xen-vBAR-pBAR.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/bin5Tp1Qi5LaR.bi n> qemu-change-for-vBAR-pBAR.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/bingGoDCQZtlM.bi n> qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch to changeset 20145 without problems. Here are the test results. Note that all of the test results are based on starting Windows XP Home HVM domU while in X server on dom0. If I try to start domU in text mode on dom0 (without X server), then the screen output will be garbaged and I won''t be able to type anything at all in dom0 text mode. Test results with pvops dom 0 kernel 2.6.30-rc3 ============================ A. 1 VCPU ===== Tried starting win xp home domu with vcpu=1. DomU crashed and exited, leaving only dom0. (XEN) HVM1: HVM Loader (XEN) HVM1: Detected Xen v3.5-unstable (XEN) HVM1: CPU speed is 2800 MHz (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 (XEN) HVM1: pci dev 01:2 INTD->IRQ5 (XEN) HVM1: pci dev 01:3 INTA->IRQ10 (XEN) HVM1: pci dev 02:0 INTA->IRQ11 (XEN) HVM1: pci dev 03:0 INTA->IRQ5 (XEN) HVM1: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM1: Multiprocessor initialisation: (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment: (XEN) HVM1: - REP INSB across page boundaries ... passed (XEN) HVM1: - GS base MSRs and SWAPGS ... passed (XEN) HVM1: Passed 2 of 2 tests (XEN) HVM1: Writing SMBIOS tables ... (XEN) HVM1: Loading ROMBIOS ... (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM1: Creating MP tables ... (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... (XEN) HVM1: Loading PCI Option ROM ... (XEN) HVM1: - Manufacturer: http://etherboot.org (XEN) HVM1: - Product name: gPXE (XEN) HVM1: Loading ACPI ... (XEN) HVM1: - Lo data: 000ea020-000ea04f (XEN) HVM1: - Hi data: fc003000-fc01261f (XEN) HVM1: vm86 TSS at fc012800 (XEN) HVM1: BIOS map: (XEN) HVM1: c0000-cf7ff: VGA BIOS (XEN) HVM1: cf800-dbfff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS (XEN) HVM1: Invoking ROMBIOS ... (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! (XEN) realmode.c:115:d1 Failed to emulate insn. (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 00 00 00 00 00 (XEN) domain_crash called from realmode.c:166 (XEN) Domain 1 (vcpu#0) crashed on cpu#1: (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: c000:[<000000000000b4b4>] (XEN) RFLAGS: 0000000000000082 CONTEXT: hvm guest (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: 0000000000010593 (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: 000000000000966a (XEN) rbp: 000000000000a1a4 rsp: 0000000000009662 r8: 0000000000000000 (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000 (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: 0000000000000000 (XEN) cr3: 0000000000800000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 B. 2 VCPU ===== I switched to vcpu=2 for win xp home hvm domU. Now domU does not crash. xm list shows domU running. But vncviewer pops up a QEMU monitor. Looks like win xp home hvm domU did not start. All I get is a QEMU monitor. (XEN) HVM2: HVM Loader (XEN) HVM2: Detected Xen v3.5-unstable (XEN) HVM2: CPU speed is 2800 MHz (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 (XEN) HVM2: pci dev 01:2 INTD->IRQ5 (XEN) HVM2: pci dev 01:3 INTA->IRQ10 (XEN) HVM2: pci dev 02:0 INTA->IRQ11 (XEN) HVM2: pci dev 03:0 INTA->IRQ5 (XEN) HVM2: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM2: Multiprocessor initialisation: (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: Testing HVM environment: (XEN) HVM2: - REP INSB across page boundaries ... passed (XEN) HVM2: - GS base MSRs and SWAPGS ... passed (XEN) HVM2: Passed 2 of 2 tests (XEN) HVM2: Writing SMBIOS tables ... (XEN) HVM2: Loading ROMBIOS ... (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM2: Creating MP tables ... (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... (XEN) HVM2: Loading PCI Option ROM ... (XEN) HVM2: - Manufacturer: http://etherboot.org (XEN) HVM2: - Product name: gPXE (XEN) HVM2: Loading ACPI ... (XEN) HVM2: - Lo data: 000ea020-000ea04f (XEN) HVM2: - Hi data: fc003000-fc01261f (XEN) HVM2: vm86 TSS at fc012800 (XEN) HVM2: BIOS map: (XEN) HVM2: c0000-cf7ff: VGA BIOS (XEN) HVM2: cf800-dbfff: Etherboot ROM (XEN) HVM2: eb000-eb175: SMBIOS tables (XEN) HVM2: f0000-fffff: Main BIOS (XEN) HVM2: Invoking ROMBIOS ... (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ The same thing happens when testing under pvops dom 0 kernel 2.6.31-rc6. Test results with pvops dom 0 kernel 2.6.31-rc6 ============================ A. 1 VCPU ===== (XEN) HVM1: HVM Loader (XEN) HVM1: Detected Xen v3.5-unstable (XEN) HVM1: CPU speed is 2800 MHz (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 (XEN) HVM1: pci dev 01:2 INTD->IRQ5 (XEN) HVM1: pci dev 01:3 INTA->IRQ10 (XEN) HVM1: pci dev 02:0 INTA->IRQ11 (XEN) HVM1: pci dev 03:0 INTA->IRQ5 (XEN) HVM1: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM1: Multiprocessor initialisation: (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment: (XEN) HVM1: - REP INSB across page boundaries ... passed (XEN) HVM1: - GS base MSRs and SWAPGS ... passed (XEN) HVM1: Passed 2 of 2 tests (XEN) HVM1: Writing SMBIOS tables ... (XEN) HVM1: Loading ROMBIOS ... (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM1: Creating MP tables ... (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... (XEN) HVM1: Loading PCI Option ROM ... (XEN) HVM1: - Manufacturer: http://etherboot.org (XEN) HVM1: - Product name: gPXE (XEN) HVM1: Loading ACPI ... (XEN) HVM1: - Lo data: 000ea020-000ea04f (XEN) HVM1: - Hi data: fc003000-fc01261f (XEN) HVM1: vm86 TSS at fc012800 (XEN) HVM1: BIOS map: (XEN) HVM1: c0000-cf7ff: VGA BIOS (XEN) HVM1: cf800-dbfff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS (XEN) HVM1: Invoking ROMBIOS ... (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! (XEN) realmode.c:115:d1 Failed to emulate insn. (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 00 00 00 00 00 (XEN) domain_crash called from realmode.c:166 (XEN) Domain 1 (vcpu#0) crashed on cpu#1: (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: c000:[<000000000000b4b4>] (XEN) RFLAGS: 0000000000000086 CONTEXT: hvm guest (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: 0000000000021f0f (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: 000000000000966a (XEN) rbp: 000000000000d49c rsp: 0000000000009662 r8: 0000000000000000 (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000 (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: 0000000000000000 (XEN) cr3: 0000000000800000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 B. 2 VCPU ===== (XEN) HVM2: HVM Loader (XEN) HVM2: Detected Xen v3.5-unstable (XEN) HVM2: CPU speed is 2800 MHz (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 (XEN) HVM2: pci dev 01:2 INTD->IRQ5 (XEN) HVM2: pci dev 01:3 INTA->IRQ10 (XEN) HVM2: pci dev 02:0 INTA->IRQ11 (XEN) HVM2: pci dev 03:0 INTA->IRQ5 (XEN) HVM2: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM2: Multiprocessor initialisation: (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: Testing HVM environment: (XEN) HVM2: - REP INSB across page boundaries ... passed (XEN) HVM2: - GS base MSRs and SWAPGS ... passed (XEN) HVM2: Passed 2 of 2 tests (XEN) HVM2: Writing SMBIOS tables ... (XEN) HVM2: Loading ROMBIOS ... (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM2: Creating MP tables ... (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... (XEN) HVM2: Loading PCI Option ROM ... (XEN) HVM2: - Manufacturer: http://etherboot.org (XEN) HVM2: - Product name: gPXE (XEN) HVM2: Loading ACPI ... (XEN) HVM2: - Lo data: 000ea020-000ea04f (XEN) HVM2: - Hi data: fc003000-fc01261f (XEN) HVM2: vm86 TSS at fc012800 (XEN) HVM2: BIOS map: (XEN) HVM2: c0000-cf7ff: VGA BIOS (XEN) HVM2: cf800-dbfff: Etherboot ROM (XEN) HVM2: eb000-eb175: SMBIOS tables (XEN) HVM2: f0000-fffff: Main BIOS (XEN) HVM2: Invoking ROMBIOS ... (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 Hope the test results helped. I can start win xp home hvm dom U successfully if i remove pci in domU config and set gfx-passthru=0, basically starting with emulated vga bios instead of passing through pci-e graphics. -- Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Company Website: http://www.asiasoft.sg/ Mobile: +65-9648-9798 MSN: teoenming@hotmail.com Alma Maters: Singapore Polytechnic, National University of Singapore Teo En Ming (Zhang Enming) wrote: Hi, How about the patch for loading vga bios from .bin file and the 1:1 bar mapping in version 2 release? Let''s make the basic patches better and acceptable first. I haven''t rebased the hacks patches on version 2 patches. Currently pls use the hack patches with version 1 patches. Regards, Weidong Thanks for the version 2. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com -----Original Message----- From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, Weidong Sent: Tuesday, September 01, 2009 2:01 PM To: ''xen-devel@lists.xensource.com'' Cc: Lin, Ben Y; ''bengheng@eecs.umich.edu''; Kay,Allen M; ''Keir.Fraser@eu.citrix.com''; ''Jean Guyader'' Subject: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d This patch supports basic gfx passthrough on QEMU: - disable emulated VGA adpater if there is passthroughed gfx - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 - register/unregister legacy VGA I/O ports and MMIOs for passthroughed gfx Signed-off-by: Ben Lin <mailto:ben.y.lin@intel.com> <ben.y.lin@intel.com> Signed-off-by: Weidong Han <mailto:weidong.han@intel.com> <weidong.han@intel.com> No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Teo En Ming (Zhang Enming)
2009-Sep-02 05:01 UTC
RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Hi, I have read the man page for hg. To check out changeset 20143, just run # hg checkout 20143 Reference: http://bitbucket.org/sjl/hg-crew-sjl/src/f40273b0ad7b/README Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com _____ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists. xensource.com] On Behalf Of Teo En Ming (Zhang Enming) Sent: Wednesday, September 02, 2009 11:53 AM To: weidong.han@intel.com Cc: xen-devel@lists.xensource.com; ''Lin, Ben Y''; ''Kay,Allen M''; ''Guyader''''; ''Jean; Keir.Fraser@eu.citrix.com; bengheng@eecs.umich.edu Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Hi, If I checked out 20145 or later, then I need to SKIP xen-gfx-passthrough.patch but apply all the rest of the patches? If I cannot do this, how I can check out earlier changesets? Is it hg checkout something something? My patching procedures are: # cd xen-unstable.hg # patch -p1 < xen-gfx-passthrough.patch # cd tools/ioemu-remote # patch -p1 < <http://lists.xensource.com/archives/html/xen-devel/2009-08/bintJIxIJU9it.bi n> qemu-gfx-passthrough.patch # cd ../.. # patch -p1 < <http://lists.xensource.com/archives/html/xen-devel/2009-08/binBhcfOvfwKC.bi n> xen-load-vbios-file.patch # patch -p1 < <http://lists.xensource.com/archives/html/xen-devel/2009-08/bins09ti77jB2.bi n> xen-vBAR-pBAR.patch # cd tools/ioemu-remote # patch -p1 < <http://lists.xensource.com/archives/html/xen-devel/2009-08/bin5Tp1Qi5LaR.bi n> qemu-change-for-vBAR-pBAR.patch # patch -p1 < <http://lists.xensource.com/archives/html/xen-devel/2009-08/bingGoDCQZtlM.bi n> qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch # cd ../.. # make clean copy vgabios-pt.bin to tools/firmware/vgabios # make xen # make install-xen # make tools # make install-tools # reboot Thank you. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com _____ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists. xensource.com] On Behalf Of Han, Weidong Sent: Wednesday, September 02, 2009 11:38 AM To: ''enming.teo@asiasoftsea.net'' Cc: ''xen-devel@lists.xensource.com''; Lin,Ben Y; Kay, Allen M; Guyader''; ''Jean; ''Keir.Fraser@eu.citrix.com''; ''bengheng@eecs.umich.edu'' Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d make sure your xen version is older than 20144, such as 20143. Otherwise it conflicts when you apply my posted patches. Pls post your steps to build your environment with my patches. I suspect you may make some mistakes on xen build. Regards, Weidong _____ From: Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net] Sent: 2009年9月2日 11:29 To: Han, Weidong Cc: xen-devel@lists.xensource.com; Lin, Ben Y; Kay, Allen M; ''Jean Guyader''; Keir.Fraser@eu.citrix.com; bengheng@eecs.umich.edu Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Hi Weidong, Even though I tried to apply xen-gfx-passthrough.patch to xen 3.5-unstable changeset 20145, it asked “Apply anyway?” and I chose no. For assume -R, I also chose no. Some files have been patched, while most files are not patched with xen-gfx-passthrough.patch. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com _____ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists. xensource.com] On Behalf Of Han, Weidong Sent: Wednesday, September 02, 2009 6:49 AM To: ''enming.teo@asiasoftsea.net'' Cc: ''xen-devel@lists.xensource.com''; Lin,Ben Y; Kay, Allen M; ''Jean Guyader''; ''Keir.Fraser@eu.citrix.com''; ''bengheng@eecs.umich.edu'' Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d xen-gfx-passthrough.patch was checked into xne-unstable as changeset 20144,so you cannot apply it on 20145. For your secondary gfx passthrough case, pls use the version 1 patches. Christian Tramnitz said he succeeded to passthrough secondary gfx with my patches. Regards, Weidong _____ From: Mr. Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net] Sent: 2009年9月2日 3:24 To: Han, Weidong Cc: xen-devel@lists.xensource.com; Lin, Ben Y; Kay, Allen M; Keir.Fraser@eu. citrix.com; ''Jean Guyader''; bengheng@eecs.umich.edu Subject: Re: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Dear Weidong, I checked out xen 3.5-unstable changeset 20145. I applied <http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bi n> xen-gfx-passthrough.patch to changeset 20145. There were some errors with <http://www.google.com.sg/url?sa=t&source=web&ct=res&cd=2&url=http%3A%2F%2Fu buntuforums.org%2Fshowthread.php%3Ft%3D555032&ei=kHCdSvGwH5ze6APtzem4AQ&rctj&q=reversed+patch+detected&usg=AFQjCNHs2YXFZTPfMG-VGfXZgmuhqM5xGw> Reversed (or previously applied) patch detected! Assume -R So I think the maintainers of xen-unstable had applied some of the patches from <http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bi n> xen-gfx-passthrough.patch you posted to the tree. Then I applied the rest of the patches: <http://lists.xensource.com/archives/html/xen-devel/2009-08/bintJIxIJU9it.bi n> qemu-gfx-passthrough.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/binBhcfOvfwKC.bi n> xen-load-vbios-file.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/bins09ti77jB2.bi n> xen-vBAR-pBAR.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/bin5Tp1Qi5LaR.bi n> qemu-change-for-vBAR-pBAR.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/bingGoDCQZtlM.bi n> qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch to changeset 20145 without problems. Here are the test results. Note that all of the test results are based on starting Windows XP Home HVM domU while in X server on dom0. If I try to start domU in text mode on dom0 (without X server), then the screen output will be garbaged and I won''t be able to type anything at all in dom0 text mode. Test results with pvops dom 0 kernel 2.6.30-rc3 ============================ A. 1 VCPU ===== Tried starting win xp home domu with vcpu=1. DomU crashed and exited, leaving only dom0. (XEN) HVM1: HVM Loader (XEN) HVM1: Detected Xen v3.5-unstable (XEN) HVM1: CPU speed is 2800 MHz (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 (XEN) HVM1: pci dev 01:2 INTD->IRQ5 (XEN) HVM1: pci dev 01:3 INTA->IRQ10 (XEN) HVM1: pci dev 02:0 INTA->IRQ11 (XEN) HVM1: pci dev 03:0 INTA->IRQ5 (XEN) HVM1: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM1: Multiprocessor initialisation: (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment: (XEN) HVM1: - REP INSB across page boundaries ... passed (XEN) HVM1: - GS base MSRs and SWAPGS ... passed (XEN) HVM1: Passed 2 of 2 tests (XEN) HVM1: Writing SMBIOS tables ... (XEN) HVM1: Loading ROMBIOS ... (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM1: Creating MP tables ... (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... (XEN) HVM1: Loading PCI Option ROM ... (XEN) HVM1: - Manufacturer: http://etherboot.org (XEN) HVM1: - Product name: gPXE (XEN) HVM1: Loading ACPI ... (XEN) HVM1: - Lo data: 000ea020-000ea04f (XEN) HVM1: - Hi data: fc003000-fc01261f (XEN) HVM1: vm86 TSS at fc012800 (XEN) HVM1: BIOS map: (XEN) HVM1: c0000-cf7ff: VGA BIOS (XEN) HVM1: cf800-dbfff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS (XEN) HVM1: Invoking ROMBIOS ... (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! (XEN) realmode.c:115:d1 Failed to emulate insn. (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 00 00 00 00 00 (XEN) domain_crash called from realmode.c:166 (XEN) Domain 1 (vcpu#0) crashed on cpu#1: (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: c000:[<000000000000b4b4>] (XEN) RFLAGS: 0000000000000082 CONTEXT: hvm guest (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: 0000000000010593 (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: 000000000000966a (XEN) rbp: 000000000000a1a4 rsp: 0000000000009662 r8: 0000000000000000 (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000 (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: 0000000000000000 (XEN) cr3: 0000000000800000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 B. 2 VCPU ===== I switched to vcpu=2 for win xp home hvm domU. Now domU does not crash. xm list shows domU running. But vncviewer pops up a QEMU monitor. Looks like win xp home hvm domU did not start. All I get is a QEMU monitor. (XEN) HVM2: HVM Loader (XEN) HVM2: Detected Xen v3.5-unstable (XEN) HVM2: CPU speed is 2800 MHz (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 (XEN) HVM2: pci dev 01:2 INTD->IRQ5 (XEN) HVM2: pci dev 01:3 INTA->IRQ10 (XEN) HVM2: pci dev 02:0 INTA->IRQ11 (XEN) HVM2: pci dev 03:0 INTA->IRQ5 (XEN) HVM2: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM2: Multiprocessor initialisation: (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: Testing HVM environment: (XEN) HVM2: - REP INSB across page boundaries ... passed (XEN) HVM2: - GS base MSRs and SWAPGS ... passed (XEN) HVM2: Passed 2 of 2 tests (XEN) HVM2: Writing SMBIOS tables ... (XEN) HVM2: Loading ROMBIOS ... (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM2: Creating MP tables ... (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... (XEN) HVM2: Loading PCI Option ROM ... (XEN) HVM2: - Manufacturer: http://etherboot.org (XEN) HVM2: - Product name: gPXE (XEN) HVM2: Loading ACPI ... (XEN) HVM2: - Lo data: 000ea020-000ea04f (XEN) HVM2: - Hi data: fc003000-fc01261f (XEN) HVM2: vm86 TSS at fc012800 (XEN) HVM2: BIOS map: (XEN) HVM2: c0000-cf7ff: VGA BIOS (XEN) HVM2: cf800-dbfff: Etherboot ROM (XEN) HVM2: eb000-eb175: SMBIOS tables (XEN) HVM2: f0000-fffff: Main BIOS (XEN) HVM2: Invoking ROMBIOS ... (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ The same thing happens when testing under pvops dom 0 kernel 2.6.31-rc6. Test results with pvops dom 0 kernel 2.6.31-rc6 ============================ A. 1 VCPU ===== (XEN) HVM1: HVM Loader (XEN) HVM1: Detected Xen v3.5-unstable (XEN) HVM1: CPU speed is 2800 MHz (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 (XEN) HVM1: pci dev 01:2 INTD->IRQ5 (XEN) HVM1: pci dev 01:3 INTA->IRQ10 (XEN) HVM1: pci dev 02:0 INTA->IRQ11 (XEN) HVM1: pci dev 03:0 INTA->IRQ5 (XEN) HVM1: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM1: Multiprocessor initialisation: (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment: (XEN) HVM1: - REP INSB across page boundaries ... passed (XEN) HVM1: - GS base MSRs and SWAPGS ... passed (XEN) HVM1: Passed 2 of 2 tests (XEN) HVM1: Writing SMBIOS tables ... (XEN) HVM1: Loading ROMBIOS ... (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM1: Creating MP tables ... (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... (XEN) HVM1: Loading PCI Option ROM ... (XEN) HVM1: - Manufacturer: http://etherboot.org (XEN) HVM1: - Product name: gPXE (XEN) HVM1: Loading ACPI ... (XEN) HVM1: - Lo data: 000ea020-000ea04f (XEN) HVM1: - Hi data: fc003000-fc01261f (XEN) HVM1: vm86 TSS at fc012800 (XEN) HVM1: BIOS map: (XEN) HVM1: c0000-cf7ff: VGA BIOS (XEN) HVM1: cf800-dbfff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS (XEN) HVM1: Invoking ROMBIOS ... (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! (XEN) realmode.c:115:d1 Failed to emulate insn. (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 00 00 00 00 00 (XEN) domain_crash called from realmode.c:166 (XEN) Domain 1 (vcpu#0) crashed on cpu#1: (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: c000:[<000000000000b4b4>] (XEN) RFLAGS: 0000000000000086 CONTEXT: hvm guest (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: 0000000000021f0f (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: 000000000000966a (XEN) rbp: 000000000000d49c rsp: 0000000000009662 r8: 0000000000000000 (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000 (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: 0000000000000000 (XEN) cr3: 0000000000800000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 B. 2 VCPU ===== (XEN) HVM2: HVM Loader (XEN) HVM2: Detected Xen v3.5-unstable (XEN) HVM2: CPU speed is 2800 MHz (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 (XEN) HVM2: pci dev 01:2 INTD->IRQ5 (XEN) HVM2: pci dev 01:3 INTA->IRQ10 (XEN) HVM2: pci dev 02:0 INTA->IRQ11 (XEN) HVM2: pci dev 03:0 INTA->IRQ5 (XEN) HVM2: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM2: Multiprocessor initialisation: (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: Testing HVM environment: (XEN) HVM2: - REP INSB across page boundaries ... passed (XEN) HVM2: - GS base MSRs and SWAPGS ... passed (XEN) HVM2: Passed 2 of 2 tests (XEN) HVM2: Writing SMBIOS tables ... (XEN) HVM2: Loading ROMBIOS ... (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM2: Creating MP tables ... (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... (XEN) HVM2: Loading PCI Option ROM ... (XEN) HVM2: - Manufacturer: http://etherboot.org (XEN) HVM2: - Product name: gPXE (XEN) HVM2: Loading ACPI ... (XEN) HVM2: - Lo data: 000ea020-000ea04f (XEN) HVM2: - Hi data: fc003000-fc01261f (XEN) HVM2: vm86 TSS at fc012800 (XEN) HVM2: BIOS map: (XEN) HVM2: c0000-cf7ff: VGA BIOS (XEN) HVM2: cf800-dbfff: Etherboot ROM (XEN) HVM2: eb000-eb175: SMBIOS tables (XEN) HVM2: f0000-fffff: Main BIOS (XEN) HVM2: Invoking ROMBIOS ... (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 Hope the test results helped. I can start win xp home hvm dom U successfully if i remove pci in domU config and set gfx-passthru=0, basically starting with emulated vga bios instead of passing through pci-e graphics. -- Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Company Website: http://www.asiasoft.sg/ Mobile: +65-9648-9798 MSN: teoenming@hotmail.com Alma Maters: Singapore Polytechnic, National University of Singapore Teo En Ming (Zhang Enming) wrote: Hi, How about the patch for loading vga bios from .bin file and the 1:1 bar mapping in version 2 release? Let''s make the basic patches better and acceptable first. I haven''t rebased the hacks patches on version 2 patches. Currently pls use the hack patches with version 1 patches. Regards, Weidong Thanks for the version 2. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com -----Original Message----- From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, Weidong Sent: Tuesday, September 01, 2009 2:01 PM To: ''xen-devel@lists.xensource.com'' Cc: Lin, Ben Y; ''bengheng@eecs.umich.edu''; Kay,Allen M; ''Keir.Fraser@eu.citrix.com''; ''Jean Guyader'' Subject: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d This patch supports basic gfx passthrough on QEMU: - disable emulated VGA adpater if there is passthroughed gfx - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 - register/unregister legacy VGA I/O ports and MMIOs for passthroughed gfx Signed-off-by: Ben Lin <mailto:ben.y.lin@intel.com> <ben.y.lin@intel.com> Signed-off-by: Weidong Han <mailto:weidong.han@intel.com> <weidong.han@intel.com> No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 09/01/09 20:03:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Han, Weidong
2009-Sep-02 05:37 UTC
RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Yes. so you can use old xen version. BTW, our patches only changes tools and qemu code, doesn't change xen hypervisor code, so you just need to 'make tools' and 'make install-tools'. Regards, Weidong ________________________________ From: Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net] Sent: 2009年9月2日 13:02 To: enming.teo@asiasoftsea.net; Han, Weidong Cc: xen-devel@lists.xensource.com; Lin, Ben Y; Kay, Allen M; 'Guyader''; 'Jean; Keir.Fraser@eu.citrix.com; bengheng@eecs.umich.edu Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Hi, I have read the man page for hg. To check out changeset 20143, just run # hg checkout 20143 Reference: http://bitbucket.org/sjl/hg-crew-sjl/src/f40273b0ad7b/README Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com ________________________________ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Teo En Ming (Zhang Enming) Sent: Wednesday, September 02, 2009 11:53 AM To: weidong.han@intel.com Cc: xen-devel@lists.xensource.com; 'Lin, Ben Y'; 'Kay,Allen M'; 'Guyader''; 'Jean; Keir.Fraser@eu.citrix.com; bengheng@eecs.umich.edu Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Hi, If I checked out 20145 or later, then I need to SKIP xen-gfx-passthrough.patch but apply all the rest of the patches? If I cannot do this, how I can check out earlier changesets? Is it hg checkout something something? My patching procedures are: # cd xen-unstable.hg # patch –p1 < xen-gfx-passthrough.patch # cd tools/ioemu-remote # patch -p1 < qemu-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bintJIxIJU9it.bin> # cd ../.. # patch -p1 < xen-load-vbios-file.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/binBhcfOvfwKC.bin> # patch -p1 < xen-vBAR-pBAR.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bins09ti77jB2.bin> # cd tools/ioemu-remote # patch -p1 < qemu-change-for-vBAR-pBAR.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bin5Tp1Qi5LaR.bin> # patch -p1 < qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bingGoDCQZtlM.bin> # cd ../.. # make clean copy vgabios-pt.bin to tools/firmware/vgabios # make xen # make install-xen # make tools # make install-tools # reboot Thank you. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com ________________________________ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, Weidong Sent: Wednesday, September 02, 2009 11:38 AM To: 'enming.teo@asiasoftsea.net' Cc: 'xen-devel@lists.xensource.com'; Lin,Ben Y; Kay, Allen M; Guyader'; 'Jean; 'Keir.Fraser@eu.citrix.com'; 'bengheng@eecs.umich.edu' Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d make sure your xen version is older than 20144, such as 20143. Otherwise it conflicts when you apply my posted patches. Pls post your steps to build your environment with my patches. I suspect you may make some mistakes on xen build. Regards, Weidong ________________________________ From: Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net] Sent: 2009年9月2日 11:29 To: Han, Weidong Cc: xen-devel@lists.xensource.com; Lin, Ben Y; Kay, Allen M; 'Jean Guyader'; Keir.Fraser@eu.citrix.com; bengheng@eecs.umich.edu Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Hi Weidong, Even though I tried to apply xen-gfx-passthrough.patch to xen 3.5-unstable changeset 20145, it asked “Apply anyway?” and I chose no. For assume –R, I also chose no. Some files have been patched, while most files are not patched with xen-gfx-passthrough.patch. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com ________________________________ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, Weidong Sent: Wednesday, September 02, 2009 6:49 AM To: 'enming.teo@asiasoftsea.net' Cc: 'xen-devel@lists.xensource.com'; Lin,Ben Y; Kay, Allen M; 'Jean Guyader'; 'Keir.Fraser@eu.citrix.com'; 'bengheng@eecs.umich.edu' Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d xen-gfx-passthrough.patch was checked into xne-unstable as changeset 20144,so you cannot apply it on 20145. For your secondary gfx passthrough case, pls use the version 1 patches. Christian Tramnitz said he succeeded to passthrough secondary gfx with my patches. Regards, Weidong ________________________________ From: Mr. Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net] Sent: 2009年9月2日 3:24 To: Han, Weidong Cc: xen-devel@lists.xensource.com; Lin, Ben Y; Kay, Allen M; Keir.Fraser@eu.citrix.com; 'Jean Guyader'; bengheng@eecs.umich.edu Subject: Re: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Dear Weidong, I checked out xen 3.5-unstable changeset 20145. I applied xen-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bin> to changeset 20145. There were some errors with Reversed (or previously applied) patch detected! Assume -R<http://www.google.com.sg/url?sa=t&source=web&ct=res&cd=2&url=http%3A%2F%2Fubuntuforums.org%2Fshowthread.php%3Ft%3D555032&ei=kHCdSvGwH5ze6APtzem4AQ&rct=j&q=reversed+patch+detected&usg=AFQjCNHs2YXFZTPfMG-VGfXZgmuhqM5xGw> So I think the maintainers of xen-unstable had applied some of the patches from xen-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bin> you posted to the tree. Then I applied the rest of the patches: qemu-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bintJIxIJU9it.bin> xen-load-vbios-file.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/binBhcfOvfwKC.bin> xen-vBAR-pBAR.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bins09ti77jB2.bin> qemu-change-for-vBAR-pBAR.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bin5Tp1Qi5LaR.bin> qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bingGoDCQZtlM.bin> to changeset 20145 without problems. Here are the test results. Note that all of the test results are based on starting Windows XP Home HVM domU while in X server on dom0. If I try to start domU in text mode on dom0 (without X server), then the screen output will be garbaged and I won't be able to type anything at all in dom0 text mode. Test results with pvops dom 0 kernel 2.6.30-rc3 ============================ A. 1 VCPU ===== Tried starting win xp home domu with vcpu=1. DomU crashed and exited, leaving only dom0. (XEN) HVM1: HVM Loader (XEN) HVM1: Detected Xen v3.5-unstable (XEN) HVM1: CPU speed is 2800 MHz (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 (XEN) HVM1: pci dev 01:2 INTD->IRQ5 (XEN) HVM1: pci dev 01:3 INTA->IRQ10 (XEN) HVM1: pci dev 02:0 INTA->IRQ11 (XEN) HVM1: pci dev 03:0 INTA->IRQ5 (XEN) HVM1: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM1: Multiprocessor initialisation: (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment: (XEN) HVM1: - REP INSB across page boundaries ... passed (XEN) HVM1: - GS base MSRs and SWAPGS ... passed (XEN) HVM1: Passed 2 of 2 tests (XEN) HVM1: Writing SMBIOS tables ... (XEN) HVM1: Loading ROMBIOS ... (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM1: Creating MP tables ... (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... (XEN) HVM1: Loading PCI Option ROM ... (XEN) HVM1: - Manufacturer: http://etherboot.org (XEN) HVM1: - Product name: gPXE (XEN) HVM1: Loading ACPI ... (XEN) HVM1: - Lo data: 000ea020-000ea04f (XEN) HVM1: - Hi data: fc003000-fc01261f (XEN) HVM1: vm86 TSS at fc012800 (XEN) HVM1: BIOS map: (XEN) HVM1: c0000-cf7ff: VGA BIOS (XEN) HVM1: cf800-dbfff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS (XEN) HVM1: Invoking ROMBIOS ... (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! (XEN) realmode.c:115:d1 Failed to emulate insn. (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 00 00 00 00 00 (XEN) domain_crash called from realmode.c:166 (XEN) Domain 1 (vcpu#0) crashed on cpu#1: (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: c000:[<000000000000b4b4>] (XEN) RFLAGS: 0000000000000082 CONTEXT: hvm guest (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: 0000000000010593 (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: 000000000000966a (XEN) rbp: 000000000000a1a4 rsp: 0000000000009662 r8: 0000000000000000 (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000 (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: 0000000000000000 (XEN) cr3: 0000000000800000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 B. 2 VCPU ===== I switched to vcpu=2 for win xp home hvm domU. Now domU does not crash. xm list shows domU running. But vncviewer pops up a QEMU monitor. Looks like win xp home hvm domU did not start. All I get is a QEMU monitor. (XEN) HVM2: HVM Loader (XEN) HVM2: Detected Xen v3.5-unstable (XEN) HVM2: CPU speed is 2800 MHz (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 (XEN) HVM2: pci dev 01:2 INTD->IRQ5 (XEN) HVM2: pci dev 01:3 INTA->IRQ10 (XEN) HVM2: pci dev 02:0 INTA->IRQ11 (XEN) HVM2: pci dev 03:0 INTA->IRQ5 (XEN) HVM2: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM2: Multiprocessor initialisation: (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: Testing HVM environment: (XEN) HVM2: - REP INSB across page boundaries ... passed (XEN) HVM2: - GS base MSRs and SWAPGS ... passed (XEN) HVM2: Passed 2 of 2 tests (XEN) HVM2: Writing SMBIOS tables ... (XEN) HVM2: Loading ROMBIOS ... (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM2: Creating MP tables ... (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... (XEN) HVM2: Loading PCI Option ROM ... (XEN) HVM2: - Manufacturer: http://etherboot.org (XEN) HVM2: - Product name: gPXE (XEN) HVM2: Loading ACPI ... (XEN) HVM2: - Lo data: 000ea020-000ea04f (XEN) HVM2: - Hi data: fc003000-fc01261f (XEN) HVM2: vm86 TSS at fc012800 (XEN) HVM2: BIOS map: (XEN) HVM2: c0000-cf7ff: VGA BIOS (XEN) HVM2: cf800-dbfff: Etherboot ROM (XEN) HVM2: eb000-eb175: SMBIOS tables (XEN) HVM2: f0000-fffff: Main BIOS (XEN) HVM2: Invoking ROMBIOS ... (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ The same thing happens when testing under pvops dom 0 kernel 2.6.31-rc6. Test results with pvops dom 0 kernel 2.6.31-rc6 ============================ A. 1 VCPU ===== (XEN) HVM1: HVM Loader (XEN) HVM1: Detected Xen v3.5-unstable (XEN) HVM1: CPU speed is 2800 MHz (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 (XEN) HVM1: pci dev 01:2 INTD->IRQ5 (XEN) HVM1: pci dev 01:3 INTA->IRQ10 (XEN) HVM1: pci dev 02:0 INTA->IRQ11 (XEN) HVM1: pci dev 03:0 INTA->IRQ5 (XEN) HVM1: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM1: Multiprocessor initialisation: (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment: (XEN) HVM1: - REP INSB across page boundaries ... passed (XEN) HVM1: - GS base MSRs and SWAPGS ... passed (XEN) HVM1: Passed 2 of 2 tests (XEN) HVM1: Writing SMBIOS tables ... (XEN) HVM1: Loading ROMBIOS ... (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM1: Creating MP tables ... (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... (XEN) HVM1: Loading PCI Option ROM ... (XEN) HVM1: - Manufacturer: http://etherboot.org (XEN) HVM1: - Product name: gPXE (XEN) HVM1: Loading ACPI ... (XEN) HVM1: - Lo data: 000ea020-000ea04f (XEN) HVM1: - Hi data: fc003000-fc01261f (XEN) HVM1: vm86 TSS at fc012800 (XEN) HVM1: BIOS map: (XEN) HVM1: c0000-cf7ff: VGA BIOS (XEN) HVM1: cf800-dbfff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS (XEN) HVM1: Invoking ROMBIOS ... (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! (XEN) realmode.c:115:d1 Failed to emulate insn. (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 00 00 00 00 00 (XEN) domain_crash called from realmode.c:166 (XEN) Domain 1 (vcpu#0) crashed on cpu#1: (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: c000:[<000000000000b4b4>] (XEN) RFLAGS: 0000000000000086 CONTEXT: hvm guest (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: 0000000000021f0f (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: 000000000000966a (XEN) rbp: 000000000000d49c rsp: 0000000000009662 r8: 0000000000000000 (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000 (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: 0000000000000000 (XEN) cr3: 0000000000800000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 B. 2 VCPU ===== (XEN) HVM2: HVM Loader (XEN) HVM2: Detected Xen v3.5-unstable (XEN) HVM2: CPU speed is 2800 MHz (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 (XEN) HVM2: pci dev 01:2 INTD->IRQ5 (XEN) HVM2: pci dev 01:3 INTA->IRQ10 (XEN) HVM2: pci dev 02:0 INTA->IRQ11 (XEN) HVM2: pci dev 03:0 INTA->IRQ5 (XEN) HVM2: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM2: Multiprocessor initialisation: (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: Testing HVM environment: (XEN) HVM2: - REP INSB across page boundaries ... passed (XEN) HVM2: - GS base MSRs and SWAPGS ... passed (XEN) HVM2: Passed 2 of 2 tests (XEN) HVM2: Writing SMBIOS tables ... (XEN) HVM2: Loading ROMBIOS ... (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM2: Creating MP tables ... (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... (XEN) HVM2: Loading PCI Option ROM ... (XEN) HVM2: - Manufacturer: http://etherboot.org (XEN) HVM2: - Product name: gPXE (XEN) HVM2: Loading ACPI ... (XEN) HVM2: - Lo data: 000ea020-000ea04f (XEN) HVM2: - Hi data: fc003000-fc01261f (XEN) HVM2: vm86 TSS at fc012800 (XEN) HVM2: BIOS map: (XEN) HVM2: c0000-cf7ff: VGA BIOS (XEN) HVM2: cf800-dbfff: Etherboot ROM (XEN) HVM2: eb000-eb175: SMBIOS tables (XEN) HVM2: f0000-fffff: Main BIOS (XEN) HVM2: Invoking ROMBIOS ... (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 Hope the test results helped. I can start win xp home hvm dom U successfully if i remove pci in domU config and set gfx-passthru=0, basically starting with emulated vga bios instead of passing through pci-e graphics. -- Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Company Website: http://www.asiasoft.sg/ Mobile: +65-9648-9798 MSN: teoenming@hotmail.com<mailto:teoenming@hotmail.com> Alma Maters: Singapore Polytechnic, National University of Singapore Teo En Ming (Zhang Enming) wrote: Hi, How about the patch for loading vga bios from .bin file and the 1:1 bar mapping in version 2 release? Let's make the basic patches better and acceptable first. I haven't rebased the hacks patches on version 2 patches. Currently pls use the hack patches with version 1 patches. Regards, Weidong Thanks for the version 2. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com<mailto:teoenming@hotmail.com> -----Original Message----- From: xen-devel-bounces@lists.xensource.com<mailto:xen-devel-bounces@lists.xensource.com> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, Weidong Sent: Tuesday, September 01, 2009 2:01 PM To: 'xen-devel@lists.xensource.com<mailto:xen-devel@lists.xensource.com>' Cc: Lin, Ben Y; 'bengheng@eecs.umich.edu<mailto:bengheng@eecs.umich.edu>'; Kay,Allen M; 'Keir.Fraser@eu.citrix.com<mailto:Keir.Fraser@eu.citrix.com>'; 'Jean Guyader' Subject: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d This patch supports basic gfx passthrough on QEMU: - disable emulated VGA adpater if there is passthroughed gfx - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 - register/unregister legacy VGA I/O ports and MMIOs for passthroughed gfx Signed-off-by: Ben Lin <ben.y.lin@intel.com><mailto:ben.y.lin@intel.com> Signed-off-by: Weidong Han <weidong.han@intel.com><mailto:weidong.han@intel.com> No virus found in this incoming message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com<mailto:Xen-devel@lists.xensource.com> http://lists.xensource.com/xen-devel No virus found in this incoming message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com<http://www.avg.com> Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 09/01/09 20:03:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Teo En Ming (Zhang Enming)
2009-Sep-02 13:35 UTC
RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Hi I have checked out xen 3.5-unstable changeset 20143 and applied all the vga passthrough patches. But nVidia Geforce 8400 gs pci-e x16 passthrough to win xp home hvm domU on my Intel dq45cb still doesn’t work. I am shown the qemu monitor. I can only switch between the qemu monitor and the parallel0 console. I can’t see win xp home hvm domU booting. Anybody has success with vga passthrough to win xp hvm? Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com _____ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists. xensource.com] On Behalf Of Han, Weidong Sent: Wednesday, September 02, 2009 1:38 PM To: ''enming.teo@asiasoftsea.net'' Cc: ''xen-devel@lists.xensource.com''; Lin,Ben Y; Kay, Allen M; ''Guyader''''; ''''Jean''; ''Keir.Fraser@eu.citrix.com''; ''bengheng@eecs.umich.edu'' Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Yes. so you can use old xen version. BTW, our patches only changes tools and qemu code, doesn''t change xen hypervisor code, so you just need to ''make tools'' and ''make install-tools''. Regards, Weidong _____ From: Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net] Sent: 2009年9月2日 13:02 To: enming.teo@asiasoftsea.net; Han, Weidong Cc: xen-devel@lists.xensource.com; Lin, Ben Y; Kay, Allen M; ''Guyader''''; ''Jean; Keir.Fraser@eu.citrix.com; bengheng@eecs.umich.edu Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Hi, I have read the man page for hg. To check out changeset 20143, just run # hg checkout 20143 Reference: http://bitbucket.org/sjl/hg-crew-sjl/src/f40273b0ad7b/README Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com _____ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists. xensource.com] On Behalf Of Teo En Ming (Zhang Enming) Sent: Wednesday, September 02, 2009 11:53 AM To: weidong.han@intel.com Cc: xen-devel@lists.xensource.com; ''Lin, Ben Y''; ''Kay,Allen M''; ''Guyader''''; ''Jean; Keir.Fraser@eu.citrix.com; bengheng@eecs.umich.edu Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Hi, If I checked out 20145 or later, then I need to SKIP xen-gfx-passthrough.patch but apply all the rest of the patches? If I cannot do this, how I can check out earlier changesets? Is it hg checkout something something? My patching procedures are: # cd xen-unstable.hg # patch -p1 < xen-gfx-passthrough.patch # cd tools/ioemu-remote # patch -p1 < <http://lists.xensource.com/archives/html/xen-devel/2009-08/bintJIxIJU9it.bi n> qemu-gfx-passthrough.patch # cd ../.. # patch -p1 < <http://lists.xensource.com/archives/html/xen-devel/2009-08/binBhcfOvfwKC.bi n> xen-load-vbios-file.patch # patch -p1 < <http://lists.xensource.com/archives/html/xen-devel/2009-08/bins09ti77jB2.bi n> xen-vBAR-pBAR.patch # cd tools/ioemu-remote # patch -p1 < <http://lists.xensource.com/archives/html/xen-devel/2009-08/bin5Tp1Qi5LaR.bi n> qemu-change-for-vBAR-pBAR.patch # patch -p1 < <http://lists.xensource.com/archives/html/xen-devel/2009-08/bingGoDCQZtlM.bi n> qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch # cd ../.. # make clean copy vgabios-pt.bin to tools/firmware/vgabios # make xen # make install-xen # make tools # make install-tools # reboot Thank you. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com _____ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists. xensource.com] On Behalf Of Han, Weidong Sent: Wednesday, September 02, 2009 11:38 AM To: ''enming.teo@asiasoftsea.net'' Cc: ''xen-devel@lists.xensource.com''; Lin,Ben Y; Kay, Allen M; Guyader''; ''Jean; ''Keir.Fraser@eu.citrix.com''; ''bengheng@eecs.umich.edu'' Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d make sure your xen version is older than 20144, such as 20143. Otherwise it conflicts when you apply my posted patches. Pls post your steps to build your environment with my patches. I suspect you may make some mistakes on xen build. Regards, Weidong _____ From: Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net] Sent: 2009年9月2日 11:29 To: Han, Weidong Cc: xen-devel@lists.xensource.com; Lin, Ben Y; Kay, Allen M; ''Jean Guyader''; Keir.Fraser@eu.citrix.com; bengheng@eecs.umich.edu Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Hi Weidong, Even though I tried to apply xen-gfx-passthrough.patch to xen 3.5-unstable changeset 20145, it asked “Apply anyway?” and I chose no. For assume -R, I also chose no. Some files have been patched, while most files are not patched with xen-gfx-passthrough.patch. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com _____ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists. xensource.com] On Behalf Of Han, Weidong Sent: Wednesday, September 02, 2009 6:49 AM To: ''enming.teo@asiasoftsea.net'' Cc: ''xen-devel@lists.xensource.com''; Lin,Ben Y; Kay, Allen M; ''Jean Guyader''; ''Keir.Fraser@eu.citrix.com''; ''bengheng@eecs.umich.edu'' Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d xen-gfx-passthrough.patch was checked into xne-unstable as changeset 20144,so you cannot apply it on 20145. For your secondary gfx passthrough case, pls use the version 1 patches. Christian Tramnitz said he succeeded to passthrough secondary gfx with my patches. Regards, Weidong _____ From: Mr. Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net] Sent: 2009年9月2日 3:24 To: Han, Weidong Cc: xen-devel@lists.xensource.com; Lin, Ben Y; Kay, Allen M; Keir.Fraser@eu. citrix.com; ''Jean Guyader''; bengheng@eecs.umich.edu Subject: Re: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Dear Weidong, I checked out xen 3.5-unstable changeset 20145. I applied <http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bi n> xen-gfx-passthrough.patch to changeset 20145. There were some errors with <http://www.google.com.sg/url?sa=t&source=web&ct=res&cd=2&url=http%3A%2F%2Fu buntuforums.org%2Fshowthread.php%3Ft%3D555032&ei=kHCdSvGwH5ze6APtzem4AQ&rctj&q=reversed+patch+detected&usg=AFQjCNHs2YXFZTPfMG-VGfXZgmuhqM5xGw> Reversed (or previously applied) patch detected! Assume -R So I think the maintainers of xen-unstable had applied some of the patches from <http://lists.xensource.com/archives/html/xen-devel/2009-08/binAd5XKpOakg.bi n> xen-gfx-passthrough.patch you posted to the tree. Then I applied the rest of the patches: <http://lists.xensource.com/archives/html/xen-devel/2009-08/bintJIxIJU9it.bi n> qemu-gfx-passthrough.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/binBhcfOvfwKC.bi n> xen-load-vbios-file.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/bins09ti77jB2.bi n> xen-vBAR-pBAR.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/bin5Tp1Qi5LaR.bi n> qemu-change-for-vBAR-pBAR.patch <http://lists.xensource.com/archives/html/xen-devel/2009-08/bingGoDCQZtlM.bi n> qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch to changeset 20145 without problems. Here are the test results. Note that all of the test results are based on starting Windows XP Home HVM domU while in X server on dom0. If I try to start domU in text mode on dom0 (without X server), then the screen output will be garbaged and I won''t be able to type anything at all in dom0 text mode. Test results with pvops dom 0 kernel 2.6.30-rc3 ============================ A. 1 VCPU ===== Tried starting win xp home domu with vcpu=1. DomU crashed and exited, leaving only dom0. (XEN) HVM1: HVM Loader (XEN) HVM1: Detected Xen v3.5-unstable (XEN) HVM1: CPU speed is 2800 MHz (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 (XEN) HVM1: pci dev 01:2 INTD->IRQ5 (XEN) HVM1: pci dev 01:3 INTA->IRQ10 (XEN) HVM1: pci dev 02:0 INTA->IRQ11 (XEN) HVM1: pci dev 03:0 INTA->IRQ5 (XEN) HVM1: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM1: Multiprocessor initialisation: (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment: (XEN) HVM1: - REP INSB across page boundaries ... passed (XEN) HVM1: - GS base MSRs and SWAPGS ... passed (XEN) HVM1: Passed 2 of 2 tests (XEN) HVM1: Writing SMBIOS tables ... (XEN) HVM1: Loading ROMBIOS ... (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM1: Creating MP tables ... (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... (XEN) HVM1: Loading PCI Option ROM ... (XEN) HVM1: - Manufacturer: http://etherboot.org (XEN) HVM1: - Product name: gPXE (XEN) HVM1: Loading ACPI ... (XEN) HVM1: - Lo data: 000ea020-000ea04f (XEN) HVM1: - Hi data: fc003000-fc01261f (XEN) HVM1: vm86 TSS at fc012800 (XEN) HVM1: BIOS map: (XEN) HVM1: c0000-cf7ff: VGA BIOS (XEN) HVM1: cf800-dbfff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS (XEN) HVM1: Invoking ROMBIOS ... (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! (XEN) realmode.c:115:d1 Failed to emulate insn. (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 00 00 00 00 00 (XEN) domain_crash called from realmode.c:166 (XEN) Domain 1 (vcpu#0) crashed on cpu#1: (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: c000:[<000000000000b4b4>] (XEN) RFLAGS: 0000000000000082 CONTEXT: hvm guest (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: 0000000000010593 (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: 000000000000966a (XEN) rbp: 000000000000a1a4 rsp: 0000000000009662 r8: 0000000000000000 (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000 (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: 0000000000000000 (XEN) cr3: 0000000000800000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 B. 2 VCPU ===== I switched to vcpu=2 for win xp home hvm domU. Now domU does not crash. xm list shows domU running. But vncviewer pops up a QEMU monitor. Looks like win xp home hvm domU did not start. All I get is a QEMU monitor. (XEN) HVM2: HVM Loader (XEN) HVM2: Detected Xen v3.5-unstable (XEN) HVM2: CPU speed is 2800 MHz (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 (XEN) HVM2: pci dev 01:2 INTD->IRQ5 (XEN) HVM2: pci dev 01:3 INTA->IRQ10 (XEN) HVM2: pci dev 02:0 INTA->IRQ11 (XEN) HVM2: pci dev 03:0 INTA->IRQ5 (XEN) HVM2: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM2: Multiprocessor initialisation: (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: Testing HVM environment: (XEN) HVM2: - REP INSB across page boundaries ... passed (XEN) HVM2: - GS base MSRs and SWAPGS ... passed (XEN) HVM2: Passed 2 of 2 tests (XEN) HVM2: Writing SMBIOS tables ... (XEN) HVM2: Loading ROMBIOS ... (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM2: Creating MP tables ... (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... (XEN) HVM2: Loading PCI Option ROM ... (XEN) HVM2: - Manufacturer: http://etherboot.org (XEN) HVM2: - Product name: gPXE (XEN) HVM2: Loading ACPI ... (XEN) HVM2: - Lo data: 000ea020-000ea04f (XEN) HVM2: - Hi data: fc003000-fc01261f (XEN) HVM2: vm86 TSS at fc012800 (XEN) HVM2: BIOS map: (XEN) HVM2: c0000-cf7ff: VGA BIOS (XEN) HVM2: cf800-dbfff: Etherboot ROM (XEN) HVM2: eb000-eb175: SMBIOS tables (XEN) HVM2: f0000-fffff: Main BIOS (XEN) HVM2: Invoking ROMBIOS ... (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ The same thing happens when testing under pvops dom 0 kernel 2.6.31-rc6. Test results with pvops dom 0 kernel 2.6.31-rc6 ============================ A. 1 VCPU ===== (XEN) HVM1: HVM Loader (XEN) HVM1: Detected Xen v3.5-unstable (XEN) HVM1: CPU speed is 2800 MHz (XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10 (XEN) HVM1: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11 (XEN) HVM1: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5 (XEN) HVM1: PCI-ISA link 3 routed to IRQ5 (XEN) HVM1: pci dev 01:2 INTD->IRQ5 (XEN) HVM1: pci dev 01:3 INTA->IRQ10 (XEN) HVM1: pci dev 02:0 INTA->IRQ11 (XEN) HVM1: pci dev 03:0 INTA->IRQ5 (XEN) HVM1: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM1: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM1: Multiprocessor initialisation: (XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment: (XEN) HVM1: - REP INSB across page boundaries ... passed (XEN) HVM1: - GS base MSRs and SWAPGS ... passed (XEN) HVM1: Passed 2 of 2 tests (XEN) HVM1: Writing SMBIOS tables ... (XEN) HVM1: Loading ROMBIOS ... (XEN) HVM1: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM1: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM1: Creating MP tables ... (XEN) HVM1: Loading VGABIOS of passthroughed gfx ... (XEN) HVM1: Loading PCI Option ROM ... (XEN) HVM1: - Manufacturer: http://etherboot.org (XEN) HVM1: - Product name: gPXE (XEN) HVM1: Loading ACPI ... (XEN) HVM1: - Lo data: 000ea020-000ea04f (XEN) HVM1: - Hi data: fc003000-fc01261f (XEN) HVM1: vm86 TSS at fc012800 (XEN) HVM1: BIOS map: (XEN) HVM1: c0000-cf7ff: VGA BIOS (XEN) HVM1: cf800-dbfff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS (XEN) HVM1: Invoking ROMBIOS ... (XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: *** int 15h function AX=5f14, BX=078f not yet supported! (XEN) realmode.c:115:d1 Failed to emulate insn. (XEN) realmode.c:165:d1 Real-mode emulation failed @ b4b4:0000b4b4: 00 00 00 00 00 00 (XEN) domain_crash called from realmode.c:166 (XEN) Domain 1 (vcpu#0) crashed on cpu#1: (XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: c000:[<000000000000b4b4>] (XEN) RFLAGS: 0000000000000086 CONTEXT: hvm guest (XEN) rax: 000000000000b422 rbx: 000000000000b4b4 rcx: 0000000000021f0f (XEN) rdx: 00000000000003d4 rsi: 0000000000009e48 rdi: 000000000000966a (XEN) rbp: 000000000000d49c rsp: 0000000000009662 r8: 0000000000000000 (XEN) r9: 0000000000000000 r10: 0000000000000000 r11: 0000000000000000 (XEN) r12: 0000000000000000 r13: 0000000000000000 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0: 0000000000000010 cr4: 0000000000000000 (XEN) cr3: 0000000000800000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: c000 (XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 1:0.0 (XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 1:0.0 B. 2 VCPU ===== (XEN) HVM2: HVM Loader (XEN) HVM2: Detected Xen v3.5-unstable (XEN) HVM2: CPU speed is 2800 MHz (XEN) irq.c:243: Dom2 PCI link 0 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 0 routed to IRQ5 (XEN) irq.c:243: Dom2 PCI link 1 changed 0 -> 10 (XEN) HVM2: PCI-ISA link 1 routed to IRQ10 (XEN) irq.c:243: Dom2 PCI link 2 changed 0 -> 11 (XEN) HVM2: PCI-ISA link 2 routed to IRQ11 (XEN) irq.c:243: Dom2 PCI link 3 changed 0 -> 5 (XEN) HVM2: PCI-ISA link 3 routed to IRQ5 (XEN) HVM2: pci dev 01:2 INTD->IRQ5 (XEN) HVM2: pci dev 01:3 INTA->IRQ10 (XEN) HVM2: pci dev 02:0 INTA->IRQ11 (XEN) HVM2: pci dev 03:0 INTA->IRQ5 (XEN) HVM2: Make vBAR = pBAR of assigned gfx (XEN) domctl.c:836:d0 memory_map:add: gfn=d2000 mfn=d2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=10000 (XEN) domctl.c:836:d0 memory_map:add: gfn=d0000 mfn=d0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=d000 f_mport=d000 np=80 (XEN) HVM2: pci dev 02:0 bar 14 size 01000000: e0000008 (XEN) HVM2: pci dev 02:0 bar 10 size 00000100: 0000c001 (XEN) HVM2: pci dev 03:0 bar 10 size 00000100: 0000c101 (XEN) HVM2: pci dev 03:0 bar 14 size 00000100: e1000000 (XEN) HVM2: pci dev 01:2 bar 20 size 00000020: 0000c201 (XEN) HVM2: pci dev 01:1 bar 20 size 00000010: 0000c221 (XEN) HVM2: Multiprocessor initialisation: (XEN) HVM2: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM2: Testing HVM environment: (XEN) HVM2: - REP INSB across page boundaries ... passed (XEN) HVM2: - GS base MSRs and SWAPGS ... passed (XEN) HVM2: Passed 2 of 2 tests (XEN) HVM2: Writing SMBIOS tables ... (XEN) HVM2: Loading ROMBIOS ... (XEN) HVM2: 11900 bytes of ROMBIOS high-memory extensions: (XEN) HVM2: Relocating to 0xfc000000-0xfc002e7c ... done (XEN) HVM2: Creating MP tables ... (XEN) HVM2: Loading VGABIOS of passthroughed gfx ... (XEN) HVM2: Loading PCI Option ROM ... (XEN) HVM2: - Manufacturer: http://etherboot.org (XEN) HVM2: - Product name: gPXE (XEN) HVM2: Loading ACPI ... (XEN) HVM2: - Lo data: 000ea020-000ea04f (XEN) HVM2: - Hi data: fc003000-fc01261f (XEN) HVM2: vm86 TSS at fc012800 (XEN) HVM2: BIOS map: (XEN) HVM2: c0000-cf7ff: VGA BIOS (XEN) HVM2: cf800-dbfff: Etherboot ROM (XEN) HVM2: eb000-eb175: SMBIOS tables (XEN) HVM2: f0000-fffff: Main BIOS (XEN) HVM2: Invoking ROMBIOS ... (XEN) HVM2: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 (XEN) mce.c:694:d0 MCE: rdmsr MCG_CAP 0x806 Hope the test results helped. I can start win xp home hvm dom U successfully if i remove pci in domU config and set gfx-passthru=0, basically starting with emulated vga bios instead of passing through pci-e graphics. -- Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Company Website: http://www.asiasoft.sg/ Mobile: +65-9648-9798 MSN: teoenming@hotmail.com Alma Maters: Singapore Polytechnic, National University of Singapore Teo En Ming (Zhang Enming) wrote: Hi, How about the patch for loading vga bios from .bin file and the 1:1 bar mapping in version 2 release? Let''s make the basic patches better and acceptable first. I haven''t rebased the hacks patches on version 2 patches. Currently pls use the hack patches with version 1 patches. Regards, Weidong Thanks for the version 2. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com -----Original Message----- From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, Weidong Sent: Tuesday, September 01, 2009 2:01 PM To: ''xen-devel@lists.xensource.com'' Cc: Lin, Ben Y; ''bengheng@eecs.umich.edu''; Kay,Allen M; ''Keir.Fraser@eu.citrix.com''; ''Jean Guyader'' Subject: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d This patch supports basic gfx passthrough on QEMU: - disable emulated VGA adpater if there is passthroughed gfx - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 - register/unregister legacy VGA I/O ports and MMIOs for passthroughed gfx Signed-off-by: Ben Lin <mailto:ben.y.lin@intel.com> <ben.y.lin@intel.com> Signed-off-by: Weidong Han <mailto:weidong.han@intel.com> <weidong.han@intel.com> No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 08/31/09 17:52:00 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.73/2338 - Release Date: 09/01/09 20:03:00 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.75/2340 - Release Date: 09/01/09 20:03:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2009-Sep-04 17:02 UTC
Re: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Han, Weidong writes ("[Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d"):> This patch supports basic gfx passthrough on QEMU: > - disable emulated VGA adpater if there is passthroughed gfx > - retrieve VGA bios from host 0xC0000, then load it to guest 0xC0000 > - register/unregister legacy VGA I/O ports and MMIOs for passthroughed gfxThanks for this. However: * It breaks the build if passthrough is disabled (eg due to lack of pciutils-dev). * Reindenting all of the code in pc.c which initalises out the various graphics cards is very merge-unfriendly. Is that change needed at all, or could you just disable the various graphics cards on the qemu command line ? * Likewise, in vl.c. Regards, Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Han, Weidong
2009-Sep-06 05:25 UTC
RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Ian Jackson wrote:> Han, Weidong writes ("[Xen-devel] [PATCH 2/2 v2] graphics passthrough > with VT-d"): >> This patch supports basic gfx passthrough on QEMU: >> - disable emulated VGA adpater if there is passthroughed gfx >> - retrieve VGA bios from host 0xC0000, then load it to guest >> 0xC0000 >> - register/unregister legacy VGA I/O ports and MMIOs for >> passthroughed gfx > > Thanks for this. However: > > * It breaks the build if passthrough is disabled (eg due to lack > of pciutils-dev).It won''t break the build when lack of pciutils-dev for me.> > * Reindenting all of the code in pc.c which initalises out the > various graphics cards is very merge-unfriendly. Is that change > needed at all, or could you just disable the various graphics cards > on the qemu command line ? > > * Likewise, in vl.c.Ok. I updated the code to add a new vga type for gfx passthrough. Then it needn''t to add the check before various vga initialization in pc.c and vl.c. Attached the updated patch. Pls review it. Thanks. Regards, Weidong> > Regards, > Ian._______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Han, Weidong
2009-Sep-16 05:23 UTC
RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Ian, Did you have a look at this patch? What's your opinion on it? Thanks. Regards, Weidong -----Original Message----- From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, Weidong Sent: 2009年9月6日 13:25 To: 'Ian Jackson' Cc: 'xen-devel@lists.xensource.com'; Lin, Ben Y; Kay, Allen M; 'Jean Guyader'; 'Keir.Fraser@eu.citrix.com'; 'bengheng@eecs.umich.edu' Subject: RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d Ian Jackson wrote:> Han, Weidong writes ("[Xen-devel] [PATCH 2/2 v2] graphics passthrough > with VT-d"): >> This patch supports basic gfx passthrough on QEMU: >> - disable emulated VGA adpater if there is passthroughed gfx >> - retrieve VGA bios from host 0xC0000, then load it to guest >> 0xC0000 >> - register/unregister legacy VGA I/O ports and MMIOs for >> passthroughed gfx > > Thanks for this. However: > > * It breaks the build if passthrough is disabled (eg due to lack > of pciutils-dev).It won't break the build when lack of pciutils-dev for me.> > * Reindenting all of the code in pc.c which initalises out the > various graphics cards is very merge-unfriendly. Is that change > needed at all, or could you just disable the various graphics cards > on the qemu command line ? > > * Likewise, in vl.c.Ok. I updated the code to add a new vga type for gfx passthrough. Then it needn't to add the check before various vga initialization in pc.c and vl.c. Attached the updated patch. Pls review it. Thanks. Regards, Weidong> > Regards, > Ian._______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2009-Sep-18 15:39 UTC
RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Han, Weidong writes ("RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d"):> Did you have a look at this patch? What''s your opinion on it? Thanks.Thanks, that''s an improvement. The setting of gfx_passthru = 0; in each branch in select_vgahw is a bit intrusive, so I dropped that bit; I think ti''s still correct, although the processing of conflicting command line options may be changed slightly. I hope that''s OK; if not please let me know. Thanks, Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Han, Weidong
2009-Sep-20 12:48 UTC
RE: [Xen-devel] [PATCH 2/2 v2] graphics passthrough with VT-d
Ian Jackson wrote:> Han, Weidong writes ("RE: [Xen-devel] [PATCH 2/2 v2] graphics > passthrough with VT-d"): >> Did you have a look at this patch? What''s your opinion on it? Thanks. > > Thanks, that''s an improvement. > > The setting of gfx_passthru = 0; in each branch in select_vgahw is a > bit intrusive, so I dropped that bit; I think ti''s still correct, > although the processing of conflicting command line options may be > changed slightly. I hope that''s OK; if not please let me know. >It''s ok for me. Setting of gfx_passthru = 0; in each branch in select_vgahw is just for consistent with other emulated vgas. It''s no problem to remove them because the gfx_passthru is initilized to 0. Thanks. Regards, Weidong _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel