[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xen-devel
Subject:    RE: [Xen-devel] graphics passthrough with VT-d
From:       Tim Moore <timothy.moore () expidas ! net>
Date:       2009-08-31 19:35:26
Message-ID: 14D9C9E2ED61ED41BC3B37ACDF4E880002E0C4B8F662 () heavy-vm03 ! heavy ! org ! uk
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Weidong,

Here are my findings so far, it still doesn’t work but I have not experienced \
a crash or Dom0 lockup, and I have switched to 2.6.18-Dom0 which may also help ...

64bit Hypervisor (xen-unstable.hg 31/08/09)
Dom0 - 2.6.18-xen-dom0 (from xenbits)
Patches applied:
./qemu-gfx-passthrough.patch
./qemu-change-for-vBAR-pBAR.patch
./qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch
./xen-vBAR-pBAR.patch
./xen-gfx-passthrough.patch
./xen-load-vbios-file.patch

02:00.0 - Primary GFX (Dom0) Console: NVidia Geforce GTX260
03:00.0 - Secondary GFX (DomU): NVidia Geforce 9500GT

Qemu:
Warning: attempted read from physical address 0xe0000000 in xen platform mmio space
And
pt_pci_write_config: Warning: Guest attempt to set address to unused Base Address \
Register. [00:04.0][Offset:30h][Length:4]

Hope this helps,
Tim

From: Han, Weidong [mailto:weidong.han@intel.com]
Sent: 31 August 2009 09:47
To: 'enming.teo@asiasoftsea.net'; Tim Moore
Cc: 'xen-devel@lists.xensource.com'
Subject: RE: [Xen-devel] graphics passthrough with VT-d

Teo,

I attached some experimental patches for you to try to sthorugh Geforce 8400 GS.

Based on my patches posted last Friday, pls follow below instructions:
1. apply xen-load-vbios-file.patch to xen-unstable.hg
    this patch supports to load vga bios from a file.
2. apply xen-vBAR-pBAR.patch to xen-unstable.hg
    this patch is used to 1:1 map between vBAR and pBAR
3. apply qemu-change-for-vBAR-pBAR.patch to ioemu-remote (qemu tree).
    this patch is used to 1:1 map between vBAR and pBAR on qemu side
4. apply qemu-claim-cycle-for-secondary-gfx-passthrough.patch
    it's needed if you want to assign the secondary gfx to guest.
5. cd xen-unstable.hg
6. make clean
7. copy the vga bios file to xen-unstabl.hg/tools/firmware/vgabios/vgabios-pt.bin
8. make; make install
9. reboot the system. or xend restart. then passthrough gfx to guest ...


Regards,
Weidong


________________________________
From: xen-devel-bounces@lists.xensource.com \
[mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Mr. Teo En Ming (Zhang \
                Enming)
Sent: 2009年8月29日 22:13
To: timothy.moore@expidas.net
Cc: xen-devel@lists.xensource.com
Subject: Re: [Xen-devel] graphics passthrough with VT-d
Hi Timothy,

Yes, I renamed the firmware file of nVidia Geforce 8400 GS to vgabios-pt.bin and \
placed it in the source directory tools/firmware/vgabios.

Weidong had said Intel has the 1:1 mapping patches. Let's hope he will release the \
patch soon to do pBAR:vBAR.



--

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


On 08/29/2009 09:29 PM, Tim Moore wrote:
Teo,
Did you rename your Nvidia BIOS and copy it into the hvmloader source tree as \
required ? It should get compiled into roms.h in the hvmloader folder - I made sure \
it was there as the xen buildroot seems to delete it randomly ... I think we are now \
up against the Base Address Register issue where the Nvidia driver is expecting to \
see the card at the Physical BAR Addresses and in the DomU these are re-mapped to \
different address space ... this is a problem with the Nvidia binary driver and \
therefore a workaround in xen is maybe needed. That said, I'm not sure if the Nvidia \
BIOS likes to be re-executed and may also be an issue ... Tim
From: Mr. Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net]
Sent: 29 August 2009 14:21
To: enming.teo@asiasoftsea.net<mailto:enming.teo@asiasoftsea.net>
Cc: Tim Moore; xen-devel@lists.xensource.com<mailto:xen-devel@lists.xensource.com>
Subject: Re: [Xen-devel] graphics passthrough with VT-d
Dear All,

I have applied the following patches to xen 3.5-unstable

1) intel-gfx-passthru-patch01.patch
2) intel-gfx-passthru-patch02.patch
3) intel-gfx-passthru-patch03.patch
4) enming-patch04.patch

and compiled xen 3.5-unstable successfully (both hypervisor and tools).

i rebooted into this newly compiled Xen hypervisor which supports loading vga bios \
from firmware file of nVidia Geforce 8400 GS PCI Express x16.

After dom0 has booted up, I executed the following script to hide nVidia Geforce 8400 \
GS from dom0.

[enming@fedora11-x86-64-host scripts]$ cat bind-devices-pci-stub.sh
#!/bin/sh
echo "10de 06e4" > /sys/bus/pci/drivers/pci-stub/new_id
echo "0000:01:00.0" > /sys/bus/pci/devices/0000:01:00.0/driver/unbind
echo "0000:01:00.0" > /sys/bus/pci/drivers/pci-stub/bind

I also assigned the nVidia Geforce 8400 GS to my Windows XP Home HVM domU.

pci = [ '01:00.0' ]

I also specified gfx_passthru=2.

Do note that I booted up with onboard Intel GMA4500 as the primary video adapter. \
Hence dom 0 has onboard graphics and Windows XP HVM domU has nvidia graphics.

Then I started Windows XP Home HVM DomU.

Very soon, my Dom 0's display was garbaged and X server on Dom 0 totally froze and \
became unresponsive. I cannot switch to any ttys.

However, I was still able to vnc into my Windows XP Home HVM Dom U. I had earlier \
installed a VNC server into my Windows XP guest. After remoting in to my Windows XP \
DomU through vnc, I found that NVIDIA Geforce 8400 GS cannot be initialized and no \
resources are available for this graphics card.




--

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


On 08/29/2009 08:25 PM, Mr. Teo En Ming (Zhang Enming) wrote:
Hi All,

I have solved the problem encountered below when building tools for xen 3.5-unstable. \
The compile problem exists because I downloaded and compiled the latest version of \
Intel ACPI Component Architecture compiler version 20090730. And I used this latest \
compiler during "make tools" for xen-unstable.

In original xen-unstable source codes cloned from xensoure mercurial repository, the \
header files ssdt_pm.h and ssdt_tpm.h in source directory \
tools/firmware/hvmloader/acpi/ are generated by

/*
 *
 * Intel ACPI Component Architecture
 * ASL Optimizing Compiler version 20061109 [May 18 2007]
 * Copyright (C) 2000 - 2006 Intel Corporation
 * Supports ACPI Specification Revision 3.0a
 *
 * Compilation of "ssdt_pm.asl" - Sun Oct 12 23:57:51 2008
 *
 * C source code output
 *
 */

In original ssdt_pm.h, it has "unsigned char AmlCode_PM[] =".

In original ssdt_tpm.h, it has "unsigned char AmlCode_TPM[] =".

Hence there was no problem with "make tools".

But, I downloaded, compiled and used

/*
 *
 * Intel ACPI Component Architecture
 * ASL Optimizing Compiler version 20090730 [Aug 29 2009]
 * Copyright (C) 2000 - 2009 Intel Corporation
 * Supports ACPI Specification Revision 4.0
 *
 * Compilation of "ssdt_pm.asl" - Sat Aug 29 18:55:40 2009
 *
 * C source code output
 *
 */

So the *new* ssdt_pm.h contains:

/*
 *
 * Intel ACPI Component Architecture
 * ASL Optimizing Compiler version 20090730 [Aug 29 2009]
 * Copyright (C) 2000 - 2009 Intel Corporation
 * Supports ACPI Specification Revision 4.0
 *
 * Compilation of "ssdt_pm.asl" - Sat Aug 29 18:55:40 2009
 *
 * C source code output
 *
 */
unsigned char AmlCode[] =
{
    0x53,0x53,0x44,0x54,0xD6,0x05,0x00,0x00,  /* 00000000    "SSDT...." */
    0x02,0xB9,0x58,0x65,0x6E,0x00,0x00,0x00,  /* 00000008    "..Xen..." */
    0x48,0x56,0x4D,0x00,0x00,0x00,0x00,0x00,  /* 00000010    "HVM....." */
    0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
    0x30,0x07,0x09,0x20,0x10,0x41,0x5B,0x5C,  /* 00000020    "0.. .A[\" */
    0x5F,0x53,0x42,0x5F,0x5B,0x80,0x44,0x42,  /* 00000028    "_SB_[.DB" */
    0x47,0x41,0x01,0x0B,0x40,0xB0,0x01,0x5B,  /* 00000030    \
"GA..@..["<mailto:GA..@..%5B> */  0x81,0x0B,0x44,0x42,0x47,0x41,0x01,0x44,  /* \
00000038    "..DBGA.D" */  0x42,0x47,0x31,0x08,0x5B,0x80,0x44,0x42,  /* 00000040    \
"BG1.[.DB" */  0x47,0x42,0x01,0x0B,0x44,0xB0,0x01,0x5B,  /* 00000048    "GB..D..[" */
    0x81,0x0B,0x44,0x42,0x47,0x42,0x01,0x44,  /* 00000050    "..DBGB.D" */
    0x42,0x47,0x32,0x08,0x5B,0x80,0x44,0x42,  /* 00000058    "BG2.[.DB" */
    0x47,0x43,0x01,0x0B,0x46,0xB0,0x01,0x5B,  /* 00000060    "GC..F..[" */
    0x81,0x0B,0x44,0x42,0x47,0x43,0x01,0x44,  /* 00000068    "..DBGC.D" */
    0x42,0x47,0x33,0x08,0x5B,0x80,0x44,0x42,  /* 00000070    "BG3.[.DB" */
    0x47,0x44,0x01,0x0B,0x48,0xB0,0x01,0x5B,  /* 00000078    "GD..H..[" */
    0x81,0x0B,0x44,0x42,0x47,0x44,0x01,0x44,  /* 00000080    "..DBGD.D" */
    0x42,0x47,0x34,0x08,0x5B,0x80,0x50,0x52,  /* 00000088    "BG4.[.PR" */
    0x54,0x31,0x01,0x0A,0xB2,0x0A,0x02,0x5B,  /* 00000090    "T1.....[" */
    0x81,0x10,0x50,0x52,0x54,0x31,0x01,0x50,  /* 00000098    "..PRT1.P" */
    0x42,0x32,0x5F,0x08,0x50,0x42,0x32,0x41,  /* 000000A0    "B2_.PB2A" */
    0x08,0x5B,0x80,0x50,0x52,0x54,0x32,0x01,  /* 000000A8    ".[.PRT2." */
    0x0A,0x86,0x01,0x5B,0x81,0x0B,0x50,0x52,  /* 000000B0    "...[..PR" */
    0x54,0x32,0x01,0x50,0x38,0x36,0x5F,0x08,  /* 000000B8    "T2.P86_." */
    0x5B,0x80,0x50,0x52,0x54,0x33,0x01,0x0A,  /* 000000C0    "[.PRT3.." */
    0x88,0x01,0x5B,0x81,0x0B,0x50,0x52,0x54,  /* 000000C8    "..[..PRT" */
    0x33,0x01,0x50,0x38,0x38,0x5F,0x08,0x5B,  /* 000000D0    "3.P88_.[" */
    0x01,0x53,0x59,0x4E,0x43,0x01,0x08,0x42,  /* 000000D8    ".SYNC..B" */
    0x55,0x46,0x30,0x11,0x04,0x0B,0x00,0x01,  /* 000000E0    "UF0....." */
    0x08,0x42,0x55,0x46,0x31,0x11,0x03,0x0A,  /* 000000E8    ".BUF1..." */
    0x08,0x8B,0x42,0x55,0x46,0x31,0x00,0x42,  /* 000000F0    "..BUF1.B" */
    0x55,0x46,0x41,0x8B,0x42,0x55,0x46,0x31,  /* 000000F8    "UFA.BUF1" */
    0x0A,0x04,0x42,0x55,0x46,0x42,0x14,0x14,  /* 00000100    "..BUFB.." */

And the *new* ssdt_tpm.h contains:

/*
 *
 * Intel ACPI Component Architecture
 * ASL Optimizing Compiler version 20090730 [Aug 29 2009]
 * Copyright (C) 2000 - 2009 Intel Corporation
 * Supports ACPI Specification Revision 4.0
 *
 * Compilation of "ssdt_tpm.asl" - Sat Aug 29 18:55:40 2009
 *
 * C source code output
 *
 */
unsigned char AmlCode[] =
{
    0x53,0x53,0x44,0x54,0x4C,0x00,0x00,0x00,  /* 00000000    "SSDTL..." */
    0x02,0x2A,0x58,0x65,0x6E,0x00,0x00,0x00,  /* 00000008    ".*Xen..." */
    0x48,0x56,0x4D,0x00,0x00,0x00,0x00,0x00,  /* 00000010    "HVM....." */
    0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
    0x30,0x07,0x09,0x20,0x5B,0x82,0x26,0x54,  /* 00000020    "0.. [.&T" */
    0x50,0x4D,0x5F,0x08,0x5F,0x48,0x49,0x44,  /* 00000028    "PM_._HID" */
    0x0C,0x41,0xD0,0x0C,0x31,0x08,0x5F,0x43,  /* 00000030    ".A..1._C" */
    0x52,0x53,0x11,0x11,0x0A,0x0E,0x86,0x09,  /* 00000038    "RS......" */
    0x00,0x01,0x00,0x00,0xD4,0xFE,0x00,0x50,  /* 00000040    ".......P" */
    0x00,0x00,0x79,0x00,
};

which are both wrong.

In ssdt_pm.h, I have to change "unsigned char AmlCode[]" to "unsigned char \
AmlCode_PM[]".

In ssdt_tpm.h, I have to change "unsigned char AmlCode[]" to "unsigned char \
AmlCode_TPM[]".

Then "make tools" is able to complete successfully.

I have created a patch for anybody who may be using the *latest* version of Intel \
ACPI CA compiler version 20090730 and attached it here.

Patch file filename enming-patch04.patch:

<CODE>

Patch created by Teo En Ming (Zhang Enming) on 29 August 2009 Saturday at 8:00 P.M. \
Singapore Time Email #1: \
enming.teo@asiasoftsea.net<mailto:enming.teo@asiasoftsea.net> Email #2: \
                space.time.universe@gmail.com<mailto:space.time.universe@gmail.com>
MSN: teoenming@hotmail.com<mailto:teoenming@hotmail.com>
Mobile Phone: +65-9648-9798

--- ssdt_pm.h    2009-08-29 19:54:52.653088000 +0800
+++ ssdt_pm.h    2009-08-29 19:56:51.813088550 +0800
@@ -10,7 +10,7 @@
  * C source code output
  *
  */
-unsigned char AmlCode[] =
+unsigned char AmlCode_PM[] =
 {
     0x53,0x53,0x44,0x54,0xD6,0x05,0x00,0x00,  /* 00000000    "SSDT...." */
     0x02,0xB9,0x58,0x65,0x6E,0x00,0x00,0x00,  /* 00000008    "..Xen..." */
--- ssdt_tpm.h    2009-08-29 19:55:44.578738954 +0800
+++ ssdt_tpm.h    2009-08-29 19:57:27.896638884 +0800
@@ -10,7 +10,7 @@
  * C source code output
  *
  */
-unsigned char AmlCode[] =
+unsigned char AmlCode_TPM[] =
 {
     0x53,0x53,0x44,0x54,0x4C,0x00,0x00,0x00,  /* 00000000    "SSDTL..." */
     0x02,0x2A,0x58,0x65,0x6E,0x00,0x00,0x00,  /* 00000008    ".*Xen..." */

</CODE>




--

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


On 08/29/2009 07:03 PM, Mr. Teo En Ming (Zhang Enming) wrote:

Hi,



I cloned http://xenbits.xensource.com/xen-unstable.hg again today. I tried applying \
the three Intel gfx passthrough patches to xen-unstable. When I "make tools", I get \
the same error again:



make[7]: Entering directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader'

make -C acpi all

get-path: will use #!/usr/bin/python2.6 for python programs

make[8]: Entering directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader/acpi'

make iasl

get-path: will use #!/usr/bin/python2.6 for python programs

make[9]: Entering directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader/acpi'

make[9]: `/usr/local/bin/iasl' is up to date.

make[9]: Leaving directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader/acpi'

iasl -tc ssdt_tpm.asl



Intel ACPI Component Architecture

ASL Optimizing Compiler version 20090730 [Aug 29 2009]

Copyright (C) 2000 - 2009 Intel Corporation

Supports ACPI Specification Revision 4.0



ASL Input:  ssdt_tpm.asl - 31 lines, 1111 bytes, 3 keywords

AML Output: SSDT_TPM.aml - 76 bytes, 3 named objects, 0 executable opcodes



Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations

mv ssdt_tpm.hex ssdt_tpm.h

rm -f *.aml

make iasl

get-path: will use #!/usr/bin/python2.6 for python programs

make[9]: Entering directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader/acpi'

make[9]: `/usr/local/bin/iasl' is up to date.

make[9]: Leaving directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader/acpi'

iasl -tc ssdt_pm.asl



Intel ACPI Component Architecture

ASL Optimizing Compiler version 20090730 [Aug 29 2009]

Copyright (C) 2000 - 2009 Intel Corporation

Supports ACPI Specification Revision 4.0



ASL Input:  ssdt_pm.asl - 425 lines, 12754 bytes, 192 keywords

AML Output: SSDT_PM.aml - 1494 bytes, 64 named objects, 128 executable opcodes



Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 31 Optimizations

mv ssdt_pm.hex ssdt_pm.h

rm -f *.aml

gcc   -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m32 -march=i686 -g \
-fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value \
-Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .build.o.d  \
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -mno-tls-direct-seg-refs -Werror \
-fno-stack-protector -fno-builtin -msoft-float -I. -I.. -I../../../../tools/include \
-c -o build.o build.c

In file included from build.c:21:

ssdt_pm.h:13: error: redefinition of ‘AmlCode’

ssdt_tpm.h:13: note: previous definition of ‘AmlCode’ was here

build.c: In function ‘construct_secondary_tables’:

build.c:184: error: ‘AmlCode_PM’ undeclared (first use in this \
function)

build.c:184: error: (Each undeclared identifier is reported only once

build.c:184: error: for each function it appears in.)

build.c:194: error: ‘AmlCode_TPM’ undeclared (first use in this \
function)

make[8]: *** [build.o] Error 1

make[8]: Leaving directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader/acpi'

make[7]: *** [subdir-all-acpi] Error 2

make[7]: Leaving directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader'

make[6]: *** [subdirs-all] Error 2

make[6]: Leaving directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader'

make[5]: *** [subdir-all-hvmloader] Error 2

make[5]: Leaving directory `/usr/src/xen-unstable-new.hg-vgapt/tools/firmware'

make[4]: *** [subdirs-all] Error 2

make[4]: Leaving directory `/usr/src/xen-unstable-new.hg-vgapt/tools/firmware'

make[3]: *** [all] Error 2

make[3]: Leaving directory `/usr/src/xen-unstable-new.hg-vgapt/tools/firmware'

make[2]: *** [subdir-install-firmware] Error 2

make[2]: Leaving directory `/usr/src/xen-unstable-new.hg-vgapt/tools'

make[1]: *** [subdirs-install] Error 2

make[1]: Leaving directory `/usr/src/xen-unstable-new.hg-vgapt/tools'

make: *** [install-tools] Error 2



Any ideas about this Advanced Configuration and Power Interface code?



--

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


On 08/29/2009 02:58 PM, Mr. Teo En Ming (Zhang Enming) wrote:
Hi

Anybody available today? I know it's Saturday. :-)




--

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


On 08/29/2009 11:48 AM, Mr. Teo En Ming (Zhang Enming) wrote:




Dear All,



After applying Intel VGA passthrough patches 1, 2 and 3, I have no problems with \
"make xen", and "make install-xen". However, I have errors with "make tools".



Here is the error output:



msoft-float -I. -I.. -I../../../../tools/include -c -o build.o build.c

build.c: In function ‘construct_secondary_tables’:

build.c:194: error: ‘AmlCode_TPM’ undeclared (first use in this \
function)

build.c:194: error: (Each undeclared identifier is reported only once

build.c:194: error: for each function it appears in.)

make[8]: *** [build.o] Error 1

make[8]: Leaving directory \
`/usr/src/xen-unstable.hg-vgapt/tools/firmware/hvmloader/acpi'

make[7]: *** [subdir-all-acpi] Error 2

make[7]: Leaving directory `/usr/src/xen-unstable.hg-vgapt/tools/firmware/hvmloader'

make[6]: *** [subdirs-all] Error 2

make[6]: Leaving directory `/usr/src/xen-unstable.hg-vgapt/tools/firmware/hvmloader'

make[5]: *** [subdir-all-hvmloader] Error 2

make[5]: Leaving directory `/usr/src/xen-unstable.hg-vgapt/tools/firmware'

make[4]: *** [subdirs-all] Error 2

make[4]: Leaving directory `/usr/src/xen-unstable.hg-vgapt/tools/firmware'

make[3]: *** [all] Error 2

make[3]: Leaving directory `/usr/src/xen-unstable.hg-vgapt/tools/firmware'

make[2]: *** [subdir-install-firmware] Error 2

make[2]: Leaving directory `/usr/src/xen-unstable.hg-vgapt/tools'

make[1]: *** [subdirs-install] Error 2

make[1]: Leaving directory `/usr/src/xen-unstable.hg-vgapt/tools'

make: *** [install-tools] Error 2



There is an undeclared identifier in tools/firmware/hvmloader/acpi/build.c source \
code. Could you guys help me resolve this issue?



I had no problems compiling xen 3.5-unstable before applying the Intel vga \
passthrough patches and before installing the Intel ACPI Component Architecture \
compiler.



I have also attached Intel graphics passthrough patches 1, 2 and 3 for your \
convenience here.



Thank you very much.



Hope I can get this working during the weekends.



--

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


On 08/29/2009 10:17 AM, Mr. Teo En Ming (Zhang Enming) wrote:
Hi Tim,

I thought it should be gfx_passthru=2 in domU config?



--

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>

Alma Maters: Singapore Polytechnic, National University of Singapore


On 08/29/2009 06:42 AM, Tim Moore wrote:
Teo,
I have also performed the same exercise as yourself and I now have successfully \
compiled all 3x patches into Xen, Qemu and the BIOS File Loading in the hvmloader, \
this all compiles find on my system. Suggest you do a "make clean" on the tools and \
start again ! After booting with the patched xen-unstable and adding the \
gfx-passthru=1 parameter to my HVM DomU, as I suspected - it still doesn't work. I \
have both a 9500GT and GTX260(primary) in my Intel DX58SO machine, tried passing \
through either device and my primary display locks up ! (included hiding with \
pci-stub) I verified that the DomU was functional beforehand, as It also booted \
successfully without the gfx-passthru parameter (and a vncviewer/cirrus display) \
Unfortunately, I can't debug further as my Primary display corrupts as soon as the \
DomU starts. I did notice that in "xm debug" the "Loading Gfx BIOS File.." message \
was displayed and the DomU did continue to initialise the BIOS tables and such before \
finally locking. I then (blindly) typed on a corrupt Dom0 console and managed to \
start kdm and login, so the Dom0 was not completely trashed. But then after a few \
minutes, the machine totally froze and had to hit the reset switch. I`m no specialist \
but this looks like the VGA BIOS Re-initialisation is playing havoc with the DomU and \
possibly the Dom0 graphics. I notice that both are also using IRQ11 which could play \
a major part. Furthermore, there was a lot of debug output in the qemu and xend.log \
indicating Base Address Register invalid access and therefore it seems there may be a \
second obstacle. Hope you have a better success than me !
For now, I would try re-compiling a fresh xen-unstable with carefully applied patches \
.. oh! and don't forget to enable the pci-stub driver for Dom0 (it's not selected by \
default) Tim
From: xen-devel-bounces@lists.xensource.com<mailto:xen-devel-bounces@lists.xensource.com> \
[mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Mr. Teo En Ming (Zhang \
                Enming)
Sent: 28 August 2009 21:14
To: enming.teo@asiasoftsea.net<mailto:enming.teo@asiasoftsea.net>
Cc: xen-devel@lists.xensource.com<mailto:xen-devel@lists.xensource.com>; 'Lin, Ben \
Y'; 'Kay, Allen M'; 'Jean Guyader'; \
Keir.Fraser@eu.citrix.com<mailto:Keir.Fraser@eu.citrix.com>; \
weidong.han@intel.com<mailto:weidong.han@intel.com>; \
                bengheng@eecs.umich.edu<mailto:bengheng@eecs.umich.edu>
Subject: Re: [Xen-devel] [PATCH 2/2] graphics passthrough with VT-d

After applying the 1st and 2nd patch to xen-unstable successfully, I examined the \
source codes Makefile and hvmloader.c in tools/firmware/hvmloader, compared them to \
Weidong's 3rd patch and I generated my own 3rd patch. Then I used my own generated \
3rd patch to apply patching for loading vga bios from firmware file.



Here is my own generated 3rd patch instead of using Weidong's 3rd patch:



--- Makefile    2009-08-29 03:24:52.413083774 +0800

+++ Makefile    2009-08-29 03:29:12.763299633 +0800

@@ -50,6 +50,7 @@

 roms.h: ../rombios/BIOS-bochs-latest ../vgabios/VGABIOS-lgpl-latest.bin \

        ../vgabios/VGABIOS-lgpl-latest.cirrus.bin ../etherboot/eb-roms.h

        sh ./mkhex rombios ../rombios/BIOS-bochs-latest > roms.h

+       sh ./mkhex vgabios_pt ../vgabios/vgabios-pt.bin >> roms.h

        sh ./mkhex vgabios_stdvga ../vgabios/VGABIOS-lgpl-latest.bin >> roms.h

        sh ./mkhex vgabios_cirrusvga \

                ../vgabios/VGABIOS-lgpl-latest.cirrus.bin >> roms.h

--- hvmloader.c 2009-08-29 03:26:06.911085797 +0800

+++ hvmloader.c 2009-08-29 03:31:43.172084995 +0800

@@ -688,9 +688,9 @@

         vgabios_sz = round_option_rom(sizeof(vgabios_stdvga));

         break;

     case VGA_pt:

-        printf("Loading VGABIOS of passthroughed gfx ...\n");

-        vgabios_sz =

-            round_option_rom((*(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS+2)) * 512);

+       printf("Loading Gfx Video BIOS from file ...\n");

+       memcpy((void *)VGABIOS_PHYSICAL_ADDRESS, vgabios_pt, sizeof(vgabios_pt));

+       vgabios_sz = round_option_rom(sizeof(vgabios_pt));

         break;

     default:

         printf("No emulated VGA adaptor ...\n");





I can "make xen" successfully but when I proceeded to "make tools", errors were \
encountered.



Please see attached error output. How can I solve this problem?





--

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>

Alma Maters: Singapore Polytechnic, National University of Singapore


On 08/29/2009 12:59 AM, Mr. Teo En Ming (Zhang Enming) wrote:

OK I believe the 3rd patch is not incomplete but there's a white space issue when I \
copied the code from the mailing list into my vi.



See http://www.htdig.org/mail/2000/11/0167.html



When I used the -l flag to patch using the 3rd patch, the number of errors was \
reduced.



[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# patch -l -p1 < \
intel-gfx-passthru-patch-3.patch

patching file tools/firmware/hvmloader/Makefile

patching file tools/firmware/hvmloader/hvmloader.c

Hunk #1 FAILED at 688.

1 out of 1 hunk FAILED -- saving rejects to file \
tools/firmware/hvmloader/hvmloader.c.rej



Now patching tools/firmware/hvmloader/Makefile is successful but patching \
tools/firmware/hvmloader/hvmloader.c still failed.



--

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>

Alma Maters: Singapore Polytechnic, National University of Singapore



On 08/28/2009 11:55 PM, Mr. Teo En Ming (Zhang Enming) wrote:
Dear Weidong,

A big big thanks for the vga passthrough patches for xen 3.5-unstable!!! These are \
eagerly anticipated patches. As I did not study computer science and computer \
architecture, I won't be able to write those patches you guys at Intel wrote.

I applied the following patches \
xen-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/bincPiiAf0QWg.bin> \
and qemu-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/binglLqkeq4Rj.bin> \
to xen 3.5-unstable without issues.

Then I tried to apply the 3rd patch you provided at \
http://lists.xensource.com/archives/html/xen-devel/2009-08/msg01047.html

I saved the following code

<CODE>

diff -r 494be76c1ad9 tools/firmware/hvmloader/Makefile

--- a/tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800

+++ b/tools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800

@@ -50,6 +50,7 @@ roms.h: ../rombios/BIOS-bochs-latest ../

 roms.h: ../rombios/BIOS-bochs-latest ../vgabios/VGABIOS-lgpl-latest.bin \

    ../vgabios/VGABIOS-lgpl-latest.cirrus.bin ../etherboot/eb-roms.h

    sh ./mkhex rombios ../rombios/BIOS-bochs-latest > roms.h

+   sh ./mkhex vgabios_pt ../vgabios/vgabios-pt.bin >> roms.h

    sh ./mkhex vgabios_stdvga ../vgabios/VGABIOS-lgpl-latest.bin >> roms.h

    sh ./mkhex vgabios_cirrusvga \

        ../vgabios/VGABIOS-lgpl-latest.cirrus.bin >> roms.h

diff -r 494be76c1ad9 tools/firmware/hvmloader/hvmloader.c

--- a/tools/firmware/hvmloader/hvmloader.c  Thu Aug 27 16:54:33 2009 +0800

+++ b/tools/firmware/hvmloader/hvmloader.c  Thu Aug 27 17:23:00 2009 +0800

@@ -688,9 +688,9 @@ int main(void)

         vgabios_sz = round_option_rom(sizeof(vgabios_stdvga));

         break;

     case VGA_pt:

-        printf("Loading Gfx Video BIOS from 0xC0000 ...\n");

-        vgabios_sz =

-            round_option_rom((*(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS+2)) * 512);

+         printf("Loading Gfx Video BIOS from file ...\n");

+         memcpy((void *)VGABIOS_PHYSICAL_ADDRESS, vgabios_pt,

sizeof(vgabios_pt));

+         vgabios_sz = round_option_rom(sizeof(vgabios_pt));

         break;

     default:

         printf("No emulated VGA adaptor ...\n");



</CODE>



as intel-gfx-passthru-patch-3.patch and then I tried to apply the patch to xen \
3.5-unstable. I got errors. I think it's because the 3rd patch you provided is \
incomplete.



Here's my patching process:



[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# find . -name vgabios

./tools/firmware/vgabios

./.hg/store/data/tools/firmware/vgabios

[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cp ~enming/vgabios-pt.bin \
tools/firmware/vgabios/

[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# ls tools/firmware/vgabios/

biossums.c  clext.c      Makefile  TODO                 vbe.h            vgabios.h    \
vgatables.h

BUGS        COPYING      Notes     vbe.c                vbetables-gen.c  \
vgabios-pt.bin

ChangeLog   dataseghack  README    vbe_display_api.txt  vgabios.c        vgafonts.h

[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# pwd

/usr/src/xen-unstable.hg-vgapt

[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# wget \
http://lists.xensource.com/archives/html/xen-devel/2009-08/bincPiiAf0QWg.bin

--2009-08-28 23:18:21--  \
http://lists.xensource.com/archives/html/xen-devel/2009-08/bincPiiAf0QWg.bin

Resolving lists.xensource.com... 70.42.241.110

Connecting to lists.xensource.com|70.42.241.110|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 12565 (12K) [application/octet-stream]

Saving to: `bincPiiAf0QWg.bin'



100%[======================================================================>] 12,565  \
30.7K/s   in 0.4s



2009-08-28 23:18:22 (30.7 KB/s) - `bincPiiAf0QWg.bin' saved [12565/12565]



[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# mv bincPiiAf0QWg.bin \
xen-gfx-passthrough.patch

[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# vi xen-gfx-passthrough.patch

[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# patch < xen-gfx-passthrough.patch

can't find file to patch at input line 4

Perhaps you should have used the -p or --strip option?

The text leading up to this was:

--------------------------

> diff -r 5d7e7a250267 tools/firmware/hvmloader/config.h

> --- a/tools/firmware/hvmloader/config.h      Wed Aug 26 18:28:44 2009 +0800

> +++ b/tools/firmware/hvmloader/config.h      Thu Aug 27 16:54:24 2009 +0800

--------------------------

File to patch: ^C

[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# ex xen-gfx-passthrough.patch

[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# patch -p1 < \
xen-gfx-passthrough.patch

patching file tools/firmware/hvmloader/config.h

patching file tools/firmware/hvmloader/hvmloader.c

patching file tools/libxc/ia64/xc_ia64_hvm_build.c

patching file tools/libxc/xc_hvm_build.c

patching file tools/libxc/xc_linux.c

patching file tools/libxc/xenctrl.h

patching file tools/libxc/xenguest.h

patching file tools/python/xen/lowlevel/xc/xc.c

patching file tools/python/xen/xend/XendConfig.py

Hunk #1 succeeded at 174 (offset -1 lines).

patching file tools/python/xen/xend/image.py

Hunk #1 succeeded at 780 (offset -6 lines).

Hunk #3 succeeded at 895 (offset -6 lines).

patching file tools/python/xen/xm/create.py

[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# wget \
http://lists.xensource.com/archives/html/xen-devel/2009-08/binglLqkeq4Rj.bin

--2009-08-28 23:21:35--  \
http://lists.xensource.com/archives/html/xen-devel/2009-08/binglLqkeq4Rj.bin

Resolving lists.xensource.com... 70.42.241.110

Connecting to lists.xensource.com|70.42.241.110|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 9841 (9.6K) [application/octet-stream]

Saving to: `binglLqkeq4Rj.bin'



100%[======================================================================>] 9,841   \
24.3K/s   in 0.4s



2009-08-28 23:21:36 (24.3 KB/s) - `binglLqkeq4Rj.bin' saved [9841/9841]



[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# mv binglLqkeq4Rj.bin \
qemu-gfx-passthrough.patch

[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# vi qemu-gfx-passthrough.patch

[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# find . -name hw

./tools/ioemu-remote/hw

./.hg/store/data/tools/ioemu/hw

[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# mv qemu-gfx-passthrough.patch \
tools/ioemu-remote/

[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cd tools/ioemu-remote/

[root@fedora11-x86-64-host ioemu-remote]# patch -p1 < qemu-

qemu-aio.h                  qemu-img.c                  qemu-sockets.c

qemu-binfmt-conf.sh         qemu-img.texi               qemu-tech.texi

qemu-char.c                 qemu-lock.h                 qemu-timer.h

qemu-char.h                 qemu-log.h                  qemu-tool.c

qemu-common.h               qemu-malloc.c               qemu-xen.h

qemu-doc.texi               qemu-nbd.c

qemu-gfx-passthrough.patch  qemu-nbd.texi

[root@fedora11-x86-64-host ioemu-remote]# patch -p1 < qemu-gfx-passthrough.patch

patching file hw/pass-through.c

patching file hw/pass-through.h

patching file hw/pc.c

patching file vl.c

[root@fedora11-x86-64-host ioemu-remote]# cd ..

[root@fedora11-x86-64-host tools]# cd ..

[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# vi \
intel-gfx-passthru-patch-3.patch

[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# patch -p1 < \
intel-gfx-passthru-patch-3.patch

patching file tools/firmware/hvmloader/Makefile

Hunk #1 FAILED at 50.

1 out of 1 hunk FAILED -- saving rejects to file \
tools/firmware/hvmloader/Makefile.rej

patching file tools/firmware/hvmloader/hvmloader.c

patch: **** malformed patch at line 24: sizeof(vgabios_pt));



[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# vi \
intel-gfx-passthru-patch-3.patch



For everybody's convenience, I have attached intel-gfx-passthru-patch-3.patch and the \
firmware for my nVidia GeForce 8400 GS PCI Express x16 graphics card in this email.



Please help me complete intel-gfx-passthru-patch-3.patch as I really need it.



Thank you very much!!!



--

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>

Alma Maters: Singapore Polytechnic, National University of Singapore

This patch supports basic gfx passthrough on QEMU:

  - disable emulated VGA adpater if there is passthroughed gfx

  - 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.69/2328 - Release Date: 08/27/09

18:02: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.71/2330 - Release Date: 08/27/09

18:02:00






________________________________


















_______________________________________________

Xen-devel mailing list

Xen-devel@lists.xensource.com<mailto:Xen-devel@lists.xensource.com>

http://lists.xensource.com/xen-devel










________________________________


















_______________________________________________

Xen-devel mailing list

Xen-devel@lists.xensource.com<mailto:Xen-devel@lists.xensource.com>

http://lists.xensource.com/xen-devel
















________________________________












_______________________________________________

Xen-devel mailing list

Xen-devel@lists.xensource.com<mailto:Xen-devel@lists.xensource.com>

http://lists.xensource.com/xen-devel


[Attachment #5 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-2022-jp">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
	{font-family:"\@SimSun";
	panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	color:black;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
pre
	{mso-style-priority:99;
	mso-style-link:"HTML Preformatted Char";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";
	color:black;}
tt
	{mso-style-priority:99;
	font-family:"Courier New";}
span.HTMLPreformattedChar
	{mso-style-name:"HTML Preformatted Char";
	mso-style-priority:99;
	mso-style-link:"HTML Preformatted";
	font-family:Consolas;
	color:black;}
span.EmailStyle20
	{mso-style-type:personal;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
span.EmailStyle21
	{mso-style-type:personal;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
span.EmailStyle23
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=white lang=EN-GB link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi Weidong,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Here are my findings so far, it still doesn’t work but I have
not experienced a crash or Dom0 lockup, and I have switched to 2.6.18-Dom0
which may also help ...<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>64bit Hypervisor (xen-unstable.hg 31/08/09) <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Dom0 &#8211; 2.6.18-xen-dom0 (from xenbits)<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Patches applied:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>./qemu-gfx-passthrough.patch<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>./qemu-change-for-vBAR-pBAR.patch<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>./qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch<o:p></o:p></span></p>


<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>./xen-vBAR-pBAR.patch<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>./xen-gfx-passthrough.patch<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>./xen-load-vbios-file.patch<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>02:00.0 - Primary GFX (Dom0) Console: NVidia Geforce GTX260 \
<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>03:00.0 - Secondary GFX (DomU): NVidia Geforce \
9500GT<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Qemu:<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:windowtext'>Warning: attempted read from
physical address 0xe0000000 in xen platform mmio space<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>And<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:windowtext'>pt_pci_write_config: Warning: Guest
attempt to set address to unused Base Address Register.
[00:04.0][Offset:30h][Length:4]<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hope this helps,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Tim<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'>From:</span></b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>
Han, Weidong [mailto:weidong.han@intel.com] <br>
<b>Sent:</b> 31 August 2009 09:47<br>
<b>To:</b> 'enming.teo@asiasoftsea.net'; Tim Moore<br>
<b>Cc:</b> 'xen-devel@lists.xensource.com'<br>
<b>Subject:</b> RE: [Xen-devel] graphics passthrough with VT-d<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span \
style='font-size:10.0pt;color:blue'>Teo,</span><o:p></o:p></p>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

<p class=MsoNormal><span style='font-size:10.0pt;color:blue'>I attached some
experimental patches for you to try to sthorugh Geforce 8400 \
GS.</span><o:p></o:p></p>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

<p class=MsoNormal><span style='font-size:10.0pt;color:blue'>Based on my
patches posted last Friday, pls follow below instructions:</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:10.0pt;color:blue'>1. apply
xen-load-vbios-file.patch to xen-unstable.hg</span><o:p></o:p></p>

<p class=MsoNormal>&nbsp;&nbsp;&nbsp; <span style='font-size:10.0pt;color:blue'>this
patch supports to load vga bios from a file.</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:10.0pt;color:blue'>2. apply
xen-vBAR-pBAR.patch to xen-unstable.hg</span><o:p></o:p></p>

<p class=MsoNormal>&nbsp;&nbsp;&nbsp; <span style='font-size:10.0pt;color:blue'>this
patch is used to 1:1 map between vBAR and pBAR</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:10.0pt;color:blue'>3. apply
qemu-change-for-vBAR-pBAR.patch to ioemu-remote (qemu tree).</span><o:p></o:p></p>

<p class=MsoNormal>&nbsp;&nbsp;&nbsp; <span style='font-size:10.0pt;color:blue'>this
patch is used to 1:1 map between vBAR and pBAR on qemu side</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:10.0pt;color:blue'>4. apply
qemu-claim-cycle-for-secondary-gfx-passthrough.patch</span><o:p></o:p></p>

<p class=MsoNormal>&nbsp;&nbsp;&nbsp; <span style='font-size:10.0pt;color:blue'>it's
needed if you want to assign the secondary gfx to guest.</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:10.0pt;color:blue'>5. cd
xen-unstable.hg</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:10.0pt;color:blue'>6. make \
clean</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:10.0pt;color:blue'>7. copy the vga
bios file to xen-unstabl.hg/tools/firmware/vgabios/vgabios-pt.bin</span><o:p></o:p></p>


<p class=MsoNormal><span style='font-size:10.0pt;color:blue'>8. make; make
install</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:10.0pt;color:blue'>9. reboot the
system. or xend restart. then passthrough gfx to guest ...</span><o:p></o:p></p>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

<p class=MsoNormal><span \
style='font-size:10.0pt;color:blue'>Regards,</span><o:p></o:p></p>

<p class=MsoNormal><span \
style='font-size:10.0pt;color:blue'>Weidong</span><o:p></o:p></p>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<div class=MsoNormal align=center style='text-align:center'><span lang=EN-US>

<hr size=2 width="100%" align=center>

</span></div>

<p class=MsoNormal style='margin-bottom:12.0pt'><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com]
<b>On Behalf Of </b>Mr. Teo En Ming (Zhang Enming)<br>
<b>Sent:</b> 2009</span><span lang=ZH-CN style='font-size:10.0pt;font-family:
"SimSun","serif"'>年</span><span lang=EN-US \
style='font-size:10.0pt;font-family: "Tahoma","sans-serif"'>8</span><span lang=ZH-CN \
style='font-size:10.0pt; font-family:"SimSun","serif"'>月</span><span \
lang=EN-US style='font-size:10.0pt; font-family:"Tahoma","sans-serif"'>29</span><span \
lang=ZH-CN style='font-size: \
10.0pt;font-family:"SimSun","serif"'>日</span><span lang=EN-US \
style='font-size: 10.0pt;font-family:"Tahoma","sans-serif"'> 22:13<br>
<b>To:</b> timothy.moore@expidas.net<br>
<b>Cc:</b> xen-devel@lists.xensource.com<br>
<b>Subject:</b> Re: [Xen-devel] graphics passthrough with VT-d</span><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal>Hi Timothy,<br>
<br>
Yes, I renamed the firmware file of nVidia Geforce 8400 GS to vgabios-pt.bin
and placed it in the source directory tools/firmware/vgabios.<br>
<br>
Weidong had said Intel has the 1:1 mapping patches. Let's hope he will release
the patch soon to do pBAR:vBAR.<br>
<br>
<br>
<o:p></o:p></p>

<pre>-- <o:p></o:p></pre><pre>Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics \
Engineering) BEng(Hons)(Mechanical Engineering) <o:p></o:p></pre><pre>Technical \
Support Engineer <o:p></o:p></pre><pre>Information Technology \
Department<o:p></o:p></pre><pre>Asiasoft Online Pte Ltd<o:p></o:p></pre><pre>Tampines \
Central 1 #04-01 Tampines Plaza <o:p></o:p></pre><pre>Singapore \
529541<o:p></o:p></pre><pre>Republic of Singapore<o:p></o:p></pre><pre>Company \
Website: <a href="http://www.asiasoft.sg/">http://www.asiasoft.sg/</a><o:p></o:p></pre><pre>Mobile: \
+65-9648-9798<o:p></o:p></pre><pre>MSN: <a \
href="mailto:teoenming@hotmail.com">teoenming@hotmail.com</a><o:p></o:p></pre><pre>Alma \
Maters: Singapore Polytechnic, National University of Singapore<o:p></o:p></pre>

<p class=MsoNormal><br>
<br>
On 08/29/2009 09:29 PM, Tim Moore wrote: <o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Teo,</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Did you rename your Nvidia BIOS and copy it into the hvmloader
source tree as required ?</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>It should get compiled into roms.h in the hvmloader folder - I
made sure it was there as the xen buildroot seems to delete it randomly \
...</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I think we are now up against the Base Address Register issue
where the Nvidia driver is expecting to see the card at the Physical BAR
Addresses and in the DomU these are re-mapped to different address space ...
this is a problem with the Nvidia binary driver and therefore a workaround in
xen is maybe needed.</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>That said, I'm not sure if the Nvidia BIOS likes to be
re-executed and may also be an issue ...</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Tim</span><o:p></o:p></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'>From:</span></b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>
Mr. Teo En Ming (Zhang Enming) [<a \
href="mailto:enming.teo@asiasoftsea.net">mailto:enming.teo@asiasoftsea.net</a>] <br>
<b>Sent:</b> 29 August 2009 14:21<br>
<b>To:</b> <a href="mailto:enming.teo@asiasoftsea.net">enming.teo@asiasoftsea.net</a><br>
 <b>Cc:</b> Tim Moore; <a \
href="mailto:xen-devel@lists.xensource.com">xen-devel@lists.xensource.com</a><br> \
<b>Subject:</b> Re: [Xen-devel] graphics passthrough with VT-d</span><o:p></o:p></p>

</div>

</div>

<p class=MsoNormal>Dear All,<br>
<br>
I have applied the following patches to xen 3.5-unstable<br>
<br>
1) intel-gfx-passthru-patch01.patch<br>
2) intel-gfx-passthru-patch02.patch<br>
3) intel-gfx-passthru-patch03.patch<br>
4) enming-patch04.patch<br>
<br>
and compiled xen 3.5-unstable successfully (both hypervisor and tools).<br>
<br>
i rebooted into this newly compiled Xen hypervisor which supports loading vga
bios from firmware file of nVidia Geforce 8400 GS PCI Express x16.<br>
<br>
After dom0 has booted up, I executed the following script to hide nVidia
Geforce 8400 GS from dom0.<br>
<br>
[enming@fedora11-x86-64-host scripts]$ cat bind-devices-pci-stub.sh <br>
#!/bin/sh<br>
echo &quot;10de 06e4&quot; &gt; /sys/bus/pci/drivers/pci-stub/new_id<br>
echo &quot;0000:01:00.0&quot; &gt;
/sys/bus/pci/devices/0000:01:00.0/driver/unbind<br>
echo &quot;0000:01:00.0&quot; &gt; /sys/bus/pci/drivers/pci-stub/bind<br>
<br>
I also assigned the nVidia Geforce 8400 GS to my Windows XP Home HVM domU.<br>
<br>
pci = [ '01:00.0' ]<br>
<br>
I also specified gfx_passthru=2.<br>
<br>
Do note that I booted up with onboard Intel GMA4500 as the primary video
adapter. Hence dom 0 has onboard graphics and Windows XP HVM domU has nvidia
graphics.<br>
<br>
Then I started Windows XP Home HVM DomU.<br>
<br>
Very soon, my Dom 0's display was garbaged and X server on Dom 0 totally froze
and became unresponsive. I cannot switch to any ttys.<br>
<br>
However, I was still able to vnc into my Windows XP Home HVM Dom U. I had
earlier installed a VNC server into my Windows XP guest. After remoting in to
my Windows XP DomU through vnc, I found that NVIDIA Geforce 8400 GS cannot be
initialized and no resources are available for this graphics card.<br>
<br>
<br>
<br>
<o:p></o:p></p>

<pre>-- <o:p></o:p></pre><pre>Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics \
Engineering) BEng(Hons)(Mechanical Engineering) <o:p></o:p></pre><pre>Technical \
Support Engineer <o:p></o:p></pre><pre>Information Technology \
Department<o:p></o:p></pre><pre>Asiasoft Online Pte Ltd<o:p></o:p></pre><pre>Tampines \
Central 1 #04-01 Tampines Plaza <o:p></o:p></pre><pre>Singapore \
529541<o:p></o:p></pre><pre>Republic of Singapore<o:p></o:p></pre><pre>Company \
Website: <a href="http://www.asiasoft.sg/">http://www.asiasoft.sg/</a><o:p></o:p></pre><pre>Mobile: \
+65-9648-9798<o:p></o:p></pre><pre>MSN: <a \
href="mailto:teoenming@hotmail.com">teoenming@hotmail.com</a><o:p></o:p></pre><pre>Alma \
Maters: Singapore Polytechnic, National University of Singapore<o:p></o:p></pre>

<p class=MsoNormal><br>
<br>
On 08/29/2009 08:25 PM, Mr. Teo En Ming (Zhang Enming) wrote: <o:p></o:p></p>

<p class=MsoNormal>Hi All,<br>
<br>
I have solved the problem encountered below when building tools for xen
3.5-unstable. The compile problem exists because I downloaded and compiled the
latest version of Intel ACPI Component Architecture compiler version 20090730.
And I used this latest compiler during &quot;make tools&quot; for xen-unstable.<br>
<br>
In original xen-unstable source codes cloned from xensoure mercurial
repository, the header files ssdt_pm.h and ssdt_tpm.h in source directory
tools/firmware/hvmloader/acpi/ are generated by<br>
<br>
/*<br>
&nbsp;*<br>
&nbsp;* Intel ACPI Component Architecture<br>
&nbsp;* ASL Optimizing Compiler version 20061109 [May 18 2007]<br>
&nbsp;* Copyright (C) 2000 - 2006 Intel Corporation<br>
&nbsp;* Supports ACPI Specification Revision 3.0a<br>
&nbsp;*<br>
&nbsp;* Compilation of &quot;ssdt_pm.asl&quot; - Sun Oct 12 23:57:51 2008<br>
&nbsp;*<br>
&nbsp;* C source code output<br>
&nbsp;*<br>
&nbsp;*/<br>
<br>
In original ssdt_pm.h, it has &quot;unsigned char AmlCode_PM[] =&quot;.<br>
<br>
In original ssdt_tpm.h, it has &quot;unsigned char AmlCode_TPM[] =&quot;.<br>
<br>
Hence there was no problem with &quot;make tools&quot;.<br>
<br>
But, I downloaded, compiled and used<br>
<br>
/*<br>
&nbsp;*<br>
&nbsp;* Intel ACPI Component Architecture<br>
&nbsp;* ASL Optimizing Compiler version 20090730 [Aug 29 2009]<br>
&nbsp;* Copyright (C) 2000 - 2009 Intel Corporation<br>
&nbsp;* Supports ACPI Specification Revision 4.0<br>
&nbsp;*<br>
&nbsp;* Compilation of &quot;ssdt_pm.asl&quot; - Sat Aug 29 18:55:40 2009<br>
&nbsp;*<br>
&nbsp;* C source code output<br>
&nbsp;*<br>
&nbsp;*/<br>
<br>
So the *new* ssdt_pm.h contains:<br>
<br>
/*<br>
&nbsp;*<br>
&nbsp;* Intel ACPI Component Architecture<br>
&nbsp;* ASL Optimizing Compiler version 20090730 [Aug 29 2009]<br>
&nbsp;* Copyright (C) 2000 - 2009 Intel Corporation<br>
&nbsp;* Supports ACPI Specification Revision 4.0<br>
&nbsp;*<br>
&nbsp;* Compilation of &quot;ssdt_pm.asl&quot; - Sat Aug 29 18:55:40 2009<br>
&nbsp;*<br>
&nbsp;* C source code output<br>
&nbsp;*<br>
&nbsp;*/<br>
unsigned char AmlCode[] =<br>
{<br>
&nbsp;&nbsp;&nbsp; 0x53,0x53,0x44,0x54,0xD6,0x05,0x00,0x00,&nbsp; /*
00000000&nbsp;&nbsp;&nbsp; &quot;SSDT....&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x02,0xB9,0x58,0x65,0x6E,0x00,0x00,0x00,&nbsp; /*
00000008&nbsp;&nbsp;&nbsp; &quot;..Xen...&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x48,0x56,0x4D,0x00,0x00,0x00,0x00,0x00,&nbsp; /*
00000010&nbsp;&nbsp;&nbsp; &quot;HVM.....&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,&nbsp; /*
00000018&nbsp;&nbsp;&nbsp; &quot;....INTL&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x30,0x07,0x09,0x20,0x10,0x41,0x5B,0x5C,&nbsp; /*
00000020&nbsp;&nbsp;&nbsp; &quot;0.. .A[\&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x5F,0x53,0x42,0x5F,0x5B,0x80,0x44,0x42,&nbsp; /*
00000028&nbsp;&nbsp;&nbsp; &quot;_SB_[.DB&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x47,0x41,0x01,0x0B,0x40,0xB0,0x01,0x5B,&nbsp; /*
00000030&nbsp;&nbsp;&nbsp; <a href="mailto:GA..@..%5B">&quot;GA..@..[&quot;</a>
*/<br>
&nbsp;&nbsp;&nbsp; 0x81,0x0B,0x44,0x42,0x47,0x41,0x01,0x44,&nbsp; /*
00000038&nbsp;&nbsp;&nbsp; &quot;..DBGA.D&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x42,0x47,0x31,0x08,0x5B,0x80,0x44,0x42,&nbsp; /*
00000040&nbsp;&nbsp;&nbsp; &quot;BG1.[.DB&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x47,0x42,0x01,0x0B,0x44,0xB0,0x01,0x5B,&nbsp; /*
00000048&nbsp;&nbsp;&nbsp; &quot;GB..D..[&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x81,0x0B,0x44,0x42,0x47,0x42,0x01,0x44,&nbsp; /*
00000050&nbsp;&nbsp;&nbsp; &quot;..DBGB.D&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x42,0x47,0x32,0x08,0x5B,0x80,0x44,0x42,&nbsp; /*
00000058&nbsp;&nbsp;&nbsp; &quot;BG2.[.DB&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x47,0x43,0x01,0x0B,0x46,0xB0,0x01,0x5B,&nbsp; /*
00000060&nbsp;&nbsp;&nbsp; &quot;GC..F..[&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x81,0x0B,0x44,0x42,0x47,0x43,0x01,0x44,&nbsp; /*
00000068&nbsp;&nbsp;&nbsp; &quot;..DBGC.D&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x42,0x47,0x33,0x08,0x5B,0x80,0x44,0x42,&nbsp; /*
00000070&nbsp;&nbsp;&nbsp; &quot;BG3.[.DB&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x47,0x44,0x01,0x0B,0x48,0xB0,0x01,0x5B,&nbsp; /*
00000078&nbsp;&nbsp;&nbsp; &quot;GD..H..[&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x81,0x0B,0x44,0x42,0x47,0x44,0x01,0x44,&nbsp; /*
00000080&nbsp;&nbsp;&nbsp; &quot;..DBGD.D&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x42,0x47,0x34,0x08,0x5B,0x80,0x50,0x52,&nbsp; /*
00000088&nbsp;&nbsp;&nbsp; &quot;BG4.[.PR&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x54,0x31,0x01,0x0A,0xB2,0x0A,0x02,0x5B,&nbsp; /*
00000090&nbsp;&nbsp;&nbsp; &quot;T1.....[&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x81,0x10,0x50,0x52,0x54,0x31,0x01,0x50,&nbsp; /*
00000098&nbsp;&nbsp;&nbsp; &quot;..PRT1.P&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x42,0x32,0x5F,0x08,0x50,0x42,0x32,0x41,&nbsp; /*
000000A0&nbsp;&nbsp;&nbsp; &quot;B2_.PB2A&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x08,0x5B,0x80,0x50,0x52,0x54,0x32,0x01,&nbsp; /*
000000A8&nbsp;&nbsp;&nbsp; &quot;.[.PRT2.&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x0A,0x86,0x01,0x5B,0x81,0x0B,0x50,0x52,&nbsp; /*
000000B0&nbsp;&nbsp;&nbsp; &quot;...[..PR&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x54,0x32,0x01,0x50,0x38,0x36,0x5F,0x08,&nbsp; /*
000000B8&nbsp;&nbsp;&nbsp; &quot;T2.P86_.&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x5B,0x80,0x50,0x52,0x54,0x33,0x01,0x0A,&nbsp; /*
000000C0&nbsp;&nbsp;&nbsp; &quot;[.PRT3..&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x88,0x01,0x5B,0x81,0x0B,0x50,0x52,0x54,&nbsp; /*
000000C8&nbsp;&nbsp;&nbsp; &quot;..[..PRT&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x33,0x01,0x50,0x38,0x38,0x5F,0x08,0x5B,&nbsp; /*
000000D0&nbsp;&nbsp;&nbsp; &quot;3.P88_.[&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x01,0x53,0x59,0x4E,0x43,0x01,0x08,0x42,&nbsp; /*
000000D8&nbsp;&nbsp;&nbsp; &quot;.SYNC..B&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x55,0x46,0x30,0x11,0x04,0x0B,0x00,0x01,&nbsp; /*
000000E0&nbsp;&nbsp;&nbsp; &quot;UF0.....&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x08,0x42,0x55,0x46,0x31,0x11,0x03,0x0A,&nbsp; /*
000000E8&nbsp;&nbsp;&nbsp; &quot;.BUF1...&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x08,0x8B,0x42,0x55,0x46,0x31,0x00,0x42,&nbsp; /*
000000F0&nbsp;&nbsp;&nbsp; &quot;..BUF1.B&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x55,0x46,0x41,0x8B,0x42,0x55,0x46,0x31,&nbsp; /*
000000F8&nbsp;&nbsp;&nbsp; &quot;UFA.BUF1&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x0A,0x04,0x42,0x55,0x46,0x42,0x14,0x14,&nbsp; /*
00000100&nbsp;&nbsp;&nbsp; &quot;..BUFB..&quot; */<br>
<br>
And the *new* ssdt_tpm.h contains:<br>
<br>
/*<br>
&nbsp;*<br>
&nbsp;* Intel ACPI Component Architecture<br>
&nbsp;* ASL Optimizing Compiler version 20090730 [Aug 29 2009]<br>
&nbsp;* Copyright (C) 2000 - 2009 Intel Corporation<br>
&nbsp;* Supports ACPI Specification Revision 4.0<br>
&nbsp;*<br>
&nbsp;* Compilation of &quot;ssdt_tpm.asl&quot; - Sat Aug 29 18:55:40 2009<br>
&nbsp;*<br>
&nbsp;* C source code output<br>
&nbsp;*<br>
&nbsp;*/<br>
unsigned char AmlCode[] =<br>
{<br>
&nbsp;&nbsp;&nbsp; 0x53,0x53,0x44,0x54,0x4C,0x00,0x00,0x00,&nbsp; /*
00000000&nbsp;&nbsp;&nbsp; &quot;SSDTL...&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x02,0x2A,0x58,0x65,0x6E,0x00,0x00,0x00,&nbsp; /*
00000008&nbsp;&nbsp;&nbsp; &quot;.*Xen...&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x48,0x56,0x4D,0x00,0x00,0x00,0x00,0x00,&nbsp; /*
00000010&nbsp;&nbsp;&nbsp; &quot;HVM.....&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,&nbsp; /*
00000018&nbsp;&nbsp;&nbsp; &quot;....INTL&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x30,0x07,0x09,0x20,0x5B,0x82,0x26,0x54,&nbsp; /*
00000020&nbsp;&nbsp;&nbsp; &quot;0.. [.&amp;T&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x50,0x4D,0x5F,0x08,0x5F,0x48,0x49,0x44,&nbsp; /*
00000028&nbsp;&nbsp;&nbsp; &quot;PM_._HID&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x0C,0x41,0xD0,0x0C,0x31,0x08,0x5F,0x43,&nbsp; /*
00000030&nbsp;&nbsp;&nbsp; &quot;.A..1._C&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x52,0x53,0x11,0x11,0x0A,0x0E,0x86,0x09,&nbsp; /*
00000038&nbsp;&nbsp;&nbsp; &quot;RS......&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x00,0x01,0x00,0x00,0xD4,0xFE,0x00,0x50,&nbsp; /*
00000040&nbsp;&nbsp;&nbsp; &quot;.......P&quot; */<br>
&nbsp;&nbsp;&nbsp; 0x00,0x00,0x79,0x00,<br>
};<br>
<br>
which are both wrong.<br>
<br>
In ssdt_pm.h, I have to change &quot;unsigned char AmlCode[]&quot; to
&quot;unsigned char AmlCode_PM[]&quot;.<br>
<br>
In ssdt_tpm.h, I have to change &quot;unsigned char AmlCode[]&quot; to
&quot;unsigned char AmlCode_TPM[]&quot;.<br>
<br>
Then &quot;make tools&quot; is able to complete successfully.<br>
<br>
I have created a patch for anybody who may be using the *latest* version of
Intel ACPI CA compiler version 20090730 and attached it here.<br>
<br>
Patch file filename enming-patch04.patch:<br>
<br>
&lt;CODE&gt;<br>
<br>
Patch created by Teo En Ming (Zhang Enming) on 29 August 2009 Saturday at 8:00
P.M. Singapore Time <br>
Email #1: <a href="mailto:enming.teo@asiasoftsea.net">enming.teo@asiasoftsea.net</a><br>
 Email #2: <a href="mailto:space.time.universe@gmail.com">space.time.universe@gmail.com</a><br>
                
MSN: <a href="mailto:teoenming@hotmail.com">teoenming@hotmail.com</a><br>
Mobile Phone: +65-9648-9798<br>
<br>
--- ssdt_pm.h&nbsp;&nbsp;&nbsp; 2009-08-29 19:54:52.653088000 +0800<br>
+++ ssdt_pm.h&nbsp;&nbsp;&nbsp; 2009-08-29 19:56:51.813088550 +0800<br>
@@ -10,7 +10,7 @@<br>
&nbsp; * C source code output<br>
&nbsp; *<br>
&nbsp; */<br>
-unsigned char AmlCode[] =<br>
+unsigned char AmlCode_PM[] =<br>
&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp; 0x53,0x53,0x44,0x54,0xD6,0x05,0x00,0x00,&nbsp; /*
00000000&nbsp;&nbsp;&nbsp; &quot;SSDT....&quot; */<br>
&nbsp;&nbsp;&nbsp;&nbsp; 0x02,0xB9,0x58,0x65,0x6E,0x00,0x00,0x00,&nbsp; /*
00000008&nbsp;&nbsp;&nbsp; &quot;..Xen...&quot; */<br>
--- ssdt_tpm.h&nbsp;&nbsp;&nbsp; 2009-08-29 19:55:44.578738954 +0800<br>
+++ ssdt_tpm.h&nbsp;&nbsp;&nbsp; 2009-08-29 19:57:27.896638884 +0800<br>
@@ -10,7 +10,7 @@<br>
&nbsp; * C source code output<br>
&nbsp; *<br>
&nbsp; */<br>
-unsigned char AmlCode[] =<br>
+unsigned char AmlCode_TPM[] =<br>
&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp; 0x53,0x53,0x44,0x54,0x4C,0x00,0x00,0x00,&nbsp; /*
00000000&nbsp;&nbsp;&nbsp; &quot;SSDTL...&quot; */<br>
&nbsp;&nbsp;&nbsp;&nbsp; 0x02,0x2A,0x58,0x65,0x6E,0x00,0x00,0x00,&nbsp; /*
00000008&nbsp;&nbsp;&nbsp; &quot;.*Xen...&quot; */<br>
<br>
&lt;/CODE&gt;<br>
<br>
<br>
<br>
<o:p></o:p></p>

<pre>-- <o:p></o:p></pre><pre>Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics \
Engineering) BEng(Hons)(Mechanical Engineering) <o:p></o:p></pre><pre>Technical \
Support Engineer <o:p></o:p></pre><pre>Information Technology \
Department<o:p></o:p></pre><pre>Asiasoft Online Pte Ltd<o:p></o:p></pre><pre>Tampines \
Central 1 #04-01 Tampines Plaza <o:p></o:p></pre><pre>Singapore \
529541<o:p></o:p></pre><pre>Republic of Singapore<o:p></o:p></pre><pre>Company \
Website: <a href="http://www.asiasoft.sg/">http://www.asiasoft.sg/</a><o:p></o:p></pre><pre>Mobile: \
+65-9648-9798<o:p></o:p></pre><pre>MSN: <a \
href="mailto:teoenming@hotmail.com">teoenming@hotmail.com</a><o:p></o:p></pre><pre>Alma \
Maters: Singapore Polytechnic, National University of Singapore<o:p></o:p></pre>

<p class=MsoNormal><br>
<br>
On 08/29/2009 07:03 PM, Mr. Teo En Ming (Zhang Enming) wrote: <o:p></o:p></p>

<pre>Hi,<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>I cloned <a
href="http://xenbits.xensource.com/xen-unstable.hg">http://xenbits.xensource.com/xen-unstable.hg</a> \
again today. I tried applying the three Intel gfx passthrough patches to \
xen-unstable. When I &quot;make tools&quot;, I get the same error \
again:<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>make[7]: Entering directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader'<o:p></o:p></pre><pre>make \
-C acpi all<o:p></o:p></pre><pre>get-path: will use #!/usr/bin/python2.6 for python \
programs<o:p></o:p></pre><pre>make[8]: Entering directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader/acpi'<o:p></o:p></pre><pre>make \
iasl<o:p></o:p></pre><pre>get-path: will use #!/usr/bin/python2.6 for python \
programs<o:p></o:p></pre><pre>make[9]: Entering directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader/acpi'<o:p></o:p></pre><pre>make[9]: \
`/usr/local/bin/iasl' is up to date.<o:p></o:p></pre><pre>make[9]: Leaving directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader/acpi'<o:p></o:p></pre><pre>iasl \
-tc ssdt_tpm.asl<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Intel ACPI \
Component Architecture<o:p></o:p></pre><pre>ASL Optimizing Compiler version 20090730 \
[Aug 29 2009]<o:p></o:p></pre><pre>Copyright (C) 2000 - 2009 Intel \
Corporation<o:p></o:p></pre><pre>Supports ACPI Specification Revision \
4.0<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>ASL Input:&nbsp; ssdt_tpm.asl - \
31 lines, 1111 bytes, 3 keywords<o:p></o:p></pre><pre>AML Output: SSDT_TPM.aml - 76 \
bytes, 3 named objects, 0 executable \
opcodes<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Compilation complete. 0 \
Errors, 0 Warnings, 0 Remarks, 0 Optimizations<o:p></o:p></pre><pre>mv ssdt_tpm.hex \
ssdt_tpm.h<o:p></o:p></pre><pre>rm -f *.aml<o:p></o:p></pre><pre>make \
iasl<o:p></o:p></pre><pre>get-path: will use #!/usr/bin/python2.6 for python \
programs<o:p></o:p></pre><pre>make[9]: Entering directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader/acpi'<o:p></o:p></pre><pre>make[9]: \
`/usr/local/bin/iasl' is up to date.<o:p></o:p></pre><pre>make[9]: Leaving directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader/acpi'<o:p></o:p></pre><pre>iasl \
-tc ssdt_pm.asl<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Intel ACPI Component \
Architecture<o:p></o:p></pre><pre>ASL Optimizing Compiler version 20090730 [Aug 29 \
2009]<o:p></o:p></pre><pre>Copyright (C) 2000 - 2009 Intel \
Corporation<o:p></o:p></pre><pre>Supports ACPI Specification Revision \
4.0<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>ASL Input:&nbsp; ssdt_pm.asl - \
425 lines, 12754 bytes, 192 keywords<o:p></o:p></pre><pre>AML Output: SSDT_PM.aml - \
1494 bytes, 64 named objects, 128 executable \
opcodes<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Compilation complete. 0 \
Errors, 0 Warnings, 0 Remarks, 31 Optimizations<o:p></o:p></pre><pre>mv ssdt_pm.hex \
ssdt_pm.h<o:p></o:p></pre><pre>rm -f *.aml<o:p></o:p></pre><pre>gcc&nbsp;&nbsp; -O1 \
-fno-omit-frame-pointer -fno-optimize-sibling-calls -m32 -march=i686 -g \
-fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value \
-Wdeclaration-after-statement&nbsp; -D__XEN_TOOLS__ -MMD -MF .build.o.d&nbsp; \
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -mno-tls-direct-seg-refs -Werror \
-fno-stack-protector -fno-builtin -msoft-float -I. -I.. -I../../../../tools/include \
-c -o build.o build.c<o:p></o:p></pre><pre>In file included from \
build.c:21:<o:p></o:p></pre><pre>ssdt_pm.h:13: error: redefinition of \
‘AmlCode’<o:p></o:p></pre><pre>ssdt_tpm.h:13: note: previous definition \
of ‘AmlCode’ was here<o:p></o:p></pre><pre>build.c: In function \
‘construct_secondary_tables’:<o:p></o:p></pre><pre>build.c:184: error: \
‘AmlCode_PM’ undeclared (first use in this \
function)<o:p></o:p></pre><pre>build.c:184: error: (Each undeclared identifier is \
reported only once<o:p></o:p></pre><pre>build.c:184: error: for each function it \
appears in.)<o:p></o:p></pre><pre>build.c:194: error: ‘AmlCode_TPM’ \
undeclared (first use in this function)<o:p></o:p></pre><pre>make[8]: *** [build.o] \
Error 1<o:p></o:p></pre><pre>make[8]: Leaving directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader/acpi'<o:p></o:p></pre><pre>make[7]: \
*** [subdir-all-acpi] Error 2<o:p></o:p></pre><pre>make[7]: Leaving directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader'<o:p></o:p></pre><pre>make[6]: \
*** [subdirs-all] Error 2<o:p></o:p></pre><pre>make[6]: Leaving directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware/hvmloader'<o:p></o:p></pre><pre>make[5]: \
*** [subdir-all-hvmloader] Error 2<o:p></o:p></pre><pre>make[5]: Leaving directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware'<o:p></o:p></pre><pre>make[4]: *** \
[subdirs-all] Error 2<o:p></o:p></pre><pre>make[4]: Leaving directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware'<o:p></o:p></pre><pre>make[3]: *** \
[all] Error 2<o:p></o:p></pre><pre>make[3]: Leaving directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools/firmware'<o:p></o:p></pre><pre>make[2]: *** \
[subdir-install-firmware] Error 2<o:p></o:p></pre><pre>make[2]: Leaving directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools'<o:p></o:p></pre><pre>make[1]: *** \
[subdirs-install] Error 2<o:p></o:p></pre><pre>make[1]: Leaving directory \
`/usr/src/xen-unstable-new.hg-vgapt/tools'<o:p></o:p></pre><pre>make: *** \
[install-tools] Error 2<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Any ideas \
about this Advanced Configuration and Power Interface \
code?<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>-- <o:p></o:p></pre><pre>Mr. \
Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical \
Engineering) <o:p></o:p></pre><pre>Technical Support Engineer \
<o:p></o:p></pre><pre>Information Technology Department<o:p></o:p></pre><pre>Asiasoft \
Online Pte Ltd<o:p></o:p></pre><pre>Tampines Central 1 #04-01 Tampines Plaza \
<o:p></o:p></pre><pre>Singapore 529541<o:p></o:p></pre><pre>Republic of \
Singapore<o:p></o:p></pre><pre>Company Website: <a \
href="http://www.asiasoft.sg/">http://www.asiasoft.sg/</a><o:p></o:p></pre><pre>Mobile: \
+65-9648-9798<o:p></o:p></pre><pre>MSN: <a \
href="mailto:teoenming@hotmail.com">teoenming@hotmail.com</a><o:p></o:p></pre><pre>Alma \
Maters: Singapore Polytechnic, National University of Singapore<o:p></o:p></pre>

<p class=MsoNormal><br>
<br>
On 08/29/2009 02:58 PM, Mr. Teo En Ming (Zhang Enming) wrote: <o:p></o:p></p>

<p class=MsoNormal>Hi<br>
<br>
Anybody available today? I know it's Saturday. :-)<br>
<br>
<br>
<br>
<o:p></o:p></p>

<pre>-- <o:p></o:p></pre><pre>Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics \
Engineering) BEng(Hons)(Mechanical Engineering) <o:p></o:p></pre><pre>Technical \
Support Engineer <o:p></o:p></pre><pre>Information Technology \
Department<o:p></o:p></pre><pre>Asiasoft Online Pte Ltd<o:p></o:p></pre><pre>Tampines \
Central 1 #04-01 Tampines Plaza <o:p></o:p></pre><pre>Singapore \
529541<o:p></o:p></pre><pre>Republic of Singapore<o:p></o:p></pre><pre>Company \
Website: <a href="http://www.asiasoft.sg/">http://www.asiasoft.sg/</a><o:p></o:p></pre><pre>Mobile: \
+65-9648-9798<o:p></o:p></pre><pre>MSN: <a \
href="mailto:teoenming@hotmail.com">teoenming@hotmail.com</a><o:p></o:p></pre><pre>Alma \
Maters: Singapore Polytechnic, National University of Singapore<o:p></o:p></pre>

<p class=MsoNormal><br>
<br>
On 08/29/2009 11:48 AM, Mr. Teo En Ming (Zhang Enming) wrote: <o:p></o:p></p>

<p class=MsoNormal><br>
<br>
<br>
<o:p></o:p></p>

<pre>Dear All,<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>After applying Intel \
VGA passthrough patches 1, 2 and 3, I have no problems with &quot;make xen&quot;, and \
&quot;make install-xen&quot;. However, I have errors with &quot;make \
tools&quot;.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Here is the error \
output:<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>msoft-float -I. -I.. \
-I../../../../tools/include -c -o build.o build.c<o:p></o:p></pre><pre>build.c: In \
function ‘construct_secondary_tables’:<o:p></o:p></pre><pre>build.c:194: \
error: ‘AmlCode_TPM’ undeclared (first use in this \
function)<o:p></o:p></pre><pre>build.c:194: error: (Each undeclared identifier is \
reported only once<o:p></o:p></pre><pre>build.c:194: error: for each function it \
appears in.)<o:p></o:p></pre><pre>make[8]: *** [build.o] Error \
1<o:p></o:p></pre><pre>make[8]: Leaving directory \
`/usr/src/xen-unstable.hg-vgapt/tools/firmware/hvmloader/acpi'<o:p></o:p></pre><pre>make[7]: \
*** [subdir-all-acpi] Error 2<o:p></o:p></pre><pre>make[7]: Leaving directory \
`/usr/src/xen-unstable.hg-vgapt/tools/firmware/hvmloader'<o:p></o:p></pre><pre>make[6]: \
*** [subdirs-all] Error 2<o:p></o:p></pre><pre>make[6]: Leaving directory \
`/usr/src/xen-unstable.hg-vgapt/tools/firmware/hvmloader'<o:p></o:p></pre><pre>make[5]: \
*** [subdir-all-hvmloader] Error 2<o:p></o:p></pre><pre>make[5]: Leaving directory \
`/usr/src/xen-unstable.hg-vgapt/tools/firmware'<o:p></o:p></pre><pre>make[4]: *** \
[subdirs-all] Error 2<o:p></o:p></pre><pre>make[4]: Leaving directory \
`/usr/src/xen-unstable.hg-vgapt/tools/firmware'<o:p></o:p></pre><pre>make[3]: *** \
[all] Error 2<o:p></o:p></pre><pre>make[3]: Leaving directory \
`/usr/src/xen-unstable.hg-vgapt/tools/firmware'<o:p></o:p></pre><pre>make[2]: *** \
[subdir-install-firmware] Error 2<o:p></o:p></pre><pre>make[2]: Leaving directory \
`/usr/src/xen-unstable.hg-vgapt/tools'<o:p></o:p></pre><pre>make[1]: *** \
[subdirs-install] Error 2<o:p></o:p></pre><pre>make[1]: Leaving directory \
`/usr/src/xen-unstable.hg-vgapt/tools'<o:p></o:p></pre><pre>make: *** [install-tools] \
Error 2<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>There is an undeclared \
identifier in tools/firmware/hvmloader/acpi/build.c source code. Could you guys help \
me resolve this issue?<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>I had no \
problems compiling xen 3.5-unstable before applying the Intel vga passthrough patches \
and before installing the Intel ACPI Component Architecture \
compiler.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>I have also attached Intel \
graphics passthrough patches 1, 2 and 3 for your convenience \
here.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Thank you very \
much.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Hope I can get this working \
during the weekends.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>-- \
<o:p></o:p></pre><pre>Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) \
BEng(Hons)(Mechanical Engineering) <o:p></o:p></pre><pre>Technical Support Engineer \
<o:p></o:p></pre><pre>Information Technology Department<o:p></o:p></pre><pre>Asiasoft \
Online Pte Ltd<o:p></o:p></pre><pre>Tampines Central 1 #04-01 Tampines Plaza \
<o:p></o:p></pre><pre>Singapore 529541<o:p></o:p></pre><pre>Republic of \
Singapore<o:p></o:p></pre><pre>Company Website: <a \
href="http://www.asiasoft.sg/">http://www.asiasoft.sg/</a><o:p></o:p></pre><pre>Mobile: \
+65-9648-9798<o:p></o:p></pre><pre>MSN: <a \
href="mailto:teoenming@hotmail.com">teoenming@hotmail.com</a><o:p></o:p></pre><pre>Alma \
Maters: Singapore Polytechnic, National University of Singapore<o:p></o:p></pre>

<p class=MsoNormal><br>
<br>
On 08/29/2009 10:17 AM, Mr. Teo En Ming (Zhang Enming) wrote: <o:p></o:p></p>

<p class=MsoNormal>Hi Tim,<br>
<br>
I thought it should be gfx_passthru=2 in domU config?<br>
<br>
<br>
<o:p></o:p></p>

<pre>-- <o:p></o:p></pre><pre>Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics \
Engineering) BEng(Hons)(Mechanical Engineering) <o:p></o:p></pre><pre>Technical \
Support Engineer <o:p></o:p></pre><pre>Information Technology \
Department<o:p></o:p></pre><pre>Asiasoft Online Pte Ltd<o:p></o:p></pre><pre>Tampines \
Central 1 #04-01 Tampines Plaza <o:p></o:p></pre><pre>Singapore \
529541<o:p></o:p></pre><pre>Republic of Singapore<o:p></o:p></pre><pre>Mobile: \
+65-9648-9798<o:p></o:p></pre><pre>MSN: <a \
href="mailto:teoenming@hotmail.com">teoenming@hotmail.com</a><o:p></o:p></pre><pre>Alma \
Maters: Singapore Polytechnic, National University of Singapore<o:p></o:p></pre>

<p class=MsoNormal><br>
<br>
On 08/29/2009 06:42 AM, Tim Moore wrote: <o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Teo,</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I have also performed the same exercise as yourself and I now
have successfully compiled all 3x patches into Xen, Qemu and the BIOS File
Loading in the hvmloader, this all compiles find on my system. Suggest you do a
&quot;make clean&quot; on the tools and start again !</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>After booting with the patched xen-unstable and adding the
gfx-passthru=1 parameter to my HVM DomU, as I suspected - it still doesn't \
work.</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I have both a 9500GT and GTX260(primary) in my Intel DX58SO
machine, tried passing through either device and my primary display locks up !
(included hiding with pci-stub)</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I verified that the DomU was functional beforehand, as It also
booted successfully without the gfx-passthru parameter (and a vncviewer/cirrus
display)</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Unfortunately, I can't debug further as my Primary display
corrupts as soon as the DomU starts. I did notice that in &quot;xm debug&quot;
the &quot;Loading Gfx BIOS File..&quot; message was displayed and the DomU did
continue to initialise the BIOS tables and such before finally locking. I then
(blindly) typed on a corrupt Dom0 console and managed to start kdm and login,
so the Dom0 was not completely trashed. But then after a few minutes, the
machine totally froze and had to hit the reset switch.</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I`m no specialist but this looks like the VGA BIOS
Re-initialisation is playing havoc with the DomU and possibly the Dom0
graphics. I notice that both are also using IRQ11 which could play a major
part. Furthermore, there was a lot of debug output in the qemu and xend.log
indicating Base Address Register invalid access and therefore it seems there
may be a second obstacle.</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hope you have a better success than me !</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>For now, I would try re-compiling a fresh xen-unstable with
carefully applied patches .. oh! and don't forget to enable the pci-stub driver
for Dom0 (it's not selected by default)</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Tim</span><o:p></o:p></p>

<div>

<div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'>From:</span></b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> <a
href="mailto:xen-devel-bounces@lists.xensource.com">xen-devel-bounces@lists.xensource.com</a>
 [<a href="mailto:xen-devel-bounces@lists.xensource.com">mailto:xen-devel-bounces@lists.xensource.com</a>]
 <b>On Behalf Of </b>Mr. Teo En Ming (Zhang Enming)<br>
<b>Sent:</b> 28 August 2009 21:14<br>
<b>To:</b> <a href="mailto:enming.teo@asiasoftsea.net">enming.teo@asiasoftsea.net</a><br>
 <b>Cc:</b> <a href="mailto:xen-devel@lists.xensource.com">xen-devel@lists.xensource.com</a>;
 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; <a
href="mailto:Keir.Fraser@eu.citrix.com">Keir.Fraser@eu.citrix.com</a>; <a
href="mailto:weidong.han@intel.com">weidong.han@intel.com</a>; <a
href="mailto:bengheng@eecs.umich.edu">bengheng@eecs.umich.edu</a><br>
<b>Subject:</b> Re: [Xen-devel] [PATCH 2/2] graphics passthrough with \
VT-d</span><o:p></o:p></p>

</div>

</div>

<pre>After applying the 1st and 2nd patch to xen-unstable successfully, I examined \
the source codes Makefile and hvmloader.c in tools/firmware/hvmloader, compared them \
to Weidong's 3rd patch and I generated my own 3rd patch. Then I used my own generated \
3rd patch to apply patching for loading vga bios from firmware \
file.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Here is my own generated 3rd \
patch instead of using Weidong's 3rd \
patch:<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>--- \
Makefile&nbsp;&nbsp;&nbsp; 2009-08-29 03:24:52.413083774 \
+0800<o:p></o:p></pre><pre>+++ Makefile&nbsp;&nbsp;&nbsp; 2009-08-29 \
03:29:12.763299633 +0800<o:p></o:p></pre><pre>@@ -50,6 +50,7 @@<o:p></o:p></pre><pre> \
roms.h: ../rombios/BIOS-bochs-latest ../vgabios/VGABIOS-lgpl-latest.bin \
\<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
../vgabios/VGABIOS-lgpl-latest.cirrus.bin \
../etherboot/eb-roms.h<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
sh ./mkhex rombios ../rombios/BIOS-bochs-latest &gt; \
roms.h<o:p></o:p></pre><pre>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sh ./mkhex \
vgabios_pt ../vgabios/vgabios-pt.bin &gt;&gt; \
roms.h<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sh ./mkhex \
vgabios_stdvga ../vgabios/VGABIOS-lgpl-latest.bin &gt;&gt; \
roms.h<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sh ./mkhex \
vgabios_cirrusvga \<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
../vgabios/VGABIOS-lgpl-latest.cirrus.bin &gt;&gt; roms.h<o:p></o:p></pre><pre>--- \
hvmloader.c 2009-08-29 03:26:06.911085797 +0800<o:p></o:p></pre><pre>+++ hvmloader.c \
2009-08-29 03:31:43.172084995 +0800<o:p></o:p></pre><pre>@@ -688,9 +688,9 \
@@<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vgabios_sz = \
round_option_rom(sizeof(vgabios_stdvga));<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
break;<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp; case \
VGA_pt:<o:p></o:p></pre><pre>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
printf(&quot;Loading VGABIOS of passthroughed gfx \
...\n&quot;);<o:p></o:p></pre><pre>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
vgabios_sz =<o:p></o:p></pre><pre>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
round_option_rom((*(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS+2)) * \
512);<o:p></o:p></pre><pre>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf(&quot;Loading \
Gfx Video BIOS from file \
...\n&quot;);<o:p></o:p></pre><pre>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; memcpy((void \
*)VGABIOS_PHYSICAL_ADDRESS, vgabios_pt, \
sizeof(vgabios_pt));<o:p></o:p></pre><pre>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
vgabios_sz = round_option_rom(sizeof(vgabios_pt));<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
break;<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp; \
default:<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
printf(&quot;No emulated VGA adaptor \
...\n&quot;);<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>I \
can &quot;make xen&quot; successfully but when I proceeded to &quot;make tools&quot;, \
errors were encountered.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Please see \
attached error output. How can I solve this \
problem?<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>-- \
<o:p></o:p></pre><pre>Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) \
BEng(Hons)(Mechanical Engineering) <o:p></o:p></pre><pre>Technical Support Engineer \
<o:p></o:p></pre><pre>Information Technology Department<o:p></o:p></pre><pre>Asiasoft \
Online Pte Ltd<o:p></o:p></pre><pre>Tampines Central 1 #04-01 Tampines Plaza \
<o:p></o:p></pre><pre>Singapore 529541<o:p></o:p></pre><pre>Republic of \
Singapore<o:p></o:p></pre><pre>Mobile: +65-9648-9798<o:p></o:p></pre><pre>MSN: <a \
href="mailto:teoenming@hotmail.com">teoenming@hotmail.com</a><o:p></o:p></pre><pre>Alma \
Maters: Singapore Polytechnic, National University of Singapore<o:p></o:p></pre>

<p class=MsoNormal><br>
<br>
On 08/29/2009 12:59 AM, Mr. Teo En Ming (Zhang Enming) wrote: <o:p></o:p></p>

<pre>OK I believe the 3rd patch is not incomplete but there's a white space issue \
when I copied the code from the mailing list into my \
vi.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>See <a \
href="http://www.htdig.org/mail/2000/11/0167.html">http://www.htdig.org/mail/2000/11/0167.html</a><o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>When \
I used the -l flag to patch using the 3rd patch, the number of errors was \
reduced.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>[root@fedora11-x86-64-host \
xen-unstable.hg-vgapt]# patch -l -p1 &lt; intel-gfx-passthru-patch-3.patch \
<o:p></o:p></pre><pre>patching file \
tools/firmware/hvmloader/Makefile<o:p></o:p></pre><pre>patching file \
tools/firmware/hvmloader/hvmloader.c<o:p></o:p></pre><pre>Hunk #1 FAILED at \
688.<o:p></o:p></pre><pre>1 out of 1 hunk FAILED -- saving rejects to file \
tools/firmware/hvmloader/hvmloader.c.rej<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Now \
patching tools/firmware/hvmloader/Makefile is successful but patching \
tools/firmware/hvmloader/hvmloader.c still \
failed.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>-- <o:p></o:p></pre><pre>Mr. \
Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical \
Engineering) <o:p></o:p></pre><pre>Technical Support Engineer \
<o:p></o:p></pre><pre>Information Technology Department<o:p></o:p></pre><pre>Asiasoft \
Online Pte Ltd<o:p></o:p></pre><pre>Tampines Central 1 #04-01 Tampines Plaza \
<o:p></o:p></pre><pre>Singapore 529541<o:p></o:p></pre><pre>Republic of \
Singapore<o:p></o:p></pre><pre>Mobile: +65-9648-9798<o:p></o:p></pre><pre>MSN: <a \
href="mailto:teoenming@hotmail.com">teoenming@hotmail.com</a><o:p></o:p></pre><pre>Alma \
Maters: Singapore Polytechnic, National University of Singapore<o:p></o:p></pre>

<p class=MsoNormal><br>
<br>
<br>
On 08/28/2009 11:55 PM, Mr. Teo En Ming (Zhang Enming) wrote: <o:p></o:p></p>

<p class=MsoNormal>Dear Weidong,<br>
<br>
A big big thanks for the vga passthrough patches for xen 3.5-unstable!!! These
are eagerly anticipated patches. As I did not study computer science and
computer architecture, I won't be able to write those patches you guys at Intel
wrote.<br>
<br>
I applied the following patches <strong><a
href="http://lists.xensource.com/archives/html/xen-devel/2009-08/bincPiiAf0QWg.bin"><tt><span
 style='font-size:10.0pt'>xen-gfx-passthrough.patch</span></tt></a> and <a
href="http://lists.xensource.com/archives/html/xen-devel/2009-08/binglLqkeq4Rj.bin"><tt><span
 style='font-size:10.0pt'>qemu-gfx-passthrough.patch</span></tt></a> to xen
3.5-unstable without issues.</strong><br>
<br>
Then I tried to apply the 3rd patch you provided at <a
href="http://lists.xensource.com/archives/html/xen-devel/2009-08/msg01047.html">http://lists.xensource.com/archives/html/xen-devel/2009-08/msg01047.html</a><br>
 <br>
I saved the following code<br>
<br>
&lt;CODE&gt;<o:p></o:p></p>

<pre>diff -r 494be76c1ad9 tools/firmware/hvmloader/Makefile<o:p></o:p></pre><pre>--- \
a/tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 \
+0800<o:p></o:p></pre><pre>+++ b/tools/firmware/hvmloader/Makefile Thu Aug 27 \
17:22:01 2009 +0800<o:p></o:p></pre><pre>@@ -50,6 +50,7 @@ roms.h: \
../rombios/BIOS-bochs-latest ../<o:p></o:p></pre><pre> roms.h: \
../rombios/BIOS-bochs-latest ../vgabios/VGABIOS-lgpl-latest.bin \
\<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp; ../vgabios/VGABIOS-lgpl-latest.cirrus.bin \
../etherboot/eb-roms.h<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp; sh ./mkhex rombios \
../rombios/BIOS-bochs-latest &gt; roms.h<o:p></o:p></pre><pre>+&nbsp;&nbsp; sh \
./mkhex vgabios_pt ../vgabios/vgabios-pt.bin &gt;&gt; \
roms.h<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp; sh ./mkhex vgabios_stdvga \
../vgabios/VGABIOS-lgpl-latest.bin &gt;&gt; \
roms.h<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp; sh ./mkhex vgabios_cirrusvga \
\<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
../vgabios/VGABIOS-lgpl-latest.cirrus.bin &gt;&gt; roms.h<o:p></o:p></pre><pre>diff \
-r 494be76c1ad9 tools/firmware/hvmloader/hvmloader.c<o:p></o:p></pre><pre>--- \
a/tools/firmware/hvmloader/hvmloader.c&nbsp; Thu Aug 27 16:54:33 2009 \
+0800<o:p></o:p></pre><pre>+++ b/tools/firmware/hvmloader/hvmloader.c&nbsp; Thu Aug \
27 17:23:00 2009 +0800<o:p></o:p></pre><pre>@@ -688,9 +688,9 @@ int \
main(void)<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
vgabios_sz = round_option_rom(sizeof(vgabios_stdvga));<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
break;<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp; case \
VGA_pt:<o:p></o:p></pre><pre>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
printf(&quot;Loading Gfx Video BIOS from 0xC0000 \
...\n&quot;);<o:p></o:p></pre><pre>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
vgabios_sz =<o:p></o:p></pre><pre>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
round_option_rom((*(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS+2)) * \
512);<o:p></o:p></pre><pre>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
printf(&quot;Loading Gfx Video BIOS from file \
...\n&quot;);<o:p></o:p></pre><pre>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
memcpy((void *)VGABIOS_PHYSICAL_ADDRESS, vgabios_pt, \
<o:p></o:p></pre><pre>sizeof(vgabios_pt));<o:p></o:p></pre><pre>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
vgabios_sz = round_option_rom(sizeof(vgabios_pt));<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
break;<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp; \
default:<o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
printf(&quot;No emulated VGA adaptor ...\n&quot;);<o:p></o:p></pre><pre>&nbsp; \
<o:p></o:p></pre><pre>&lt;/CODE&gt;<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>as \
intel-gfx-passthru-patch-3.patch and then I tried to apply the patch to xen \
3.5-unstable. I got errors. I think it's because the 3rd patch you provided is \
incomplete.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Here's my patching \
process:<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>[root@fedora11-x86-64-host \
xen-unstable.hg-vgapt]# find . -name \
vgabios<o:p></o:p></pre><pre>./tools/firmware/vgabios<o:p></o:p></pre><pre>./.hg/store/data/tools/firmware/vgabios<o:p></o:p></pre><pre>[root@fedora11-x86-64-host \
xen-unstable.hg-vgapt]# cp ~enming/vgabios-pt.bin \
tools/firmware/vgabios/<o:p></o:p></pre><pre>[root@fedora11-x86-64-host \
xen-unstable.hg-vgapt]# ls \
tools/firmware/vgabios/<o:p></o:p></pre><pre>biossums.c&nbsp; \
clext.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Makefile&nbsp; \
TODO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
vbe.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
vgabios.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
vgatables.h<o:p></o:p></pre><pre>BUGS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
COPYING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Notes&nbsp;&nbsp;&nbsp;&nbsp; \
vbe.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
vbetables-gen.c&nbsp; vgabios-pt.bin<o:p></o:p></pre><pre>ChangeLog&nbsp;&nbsp; \
dataseghack&nbsp; README&nbsp;&nbsp;&nbsp; vbe_display_api.txt&nbsp; \
vgabios.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
vgafonts.h<o:p></o:p></pre><pre>[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# \
pwd<o:p></o:p></pre><pre>/usr/src/xen-unstable.hg-vgapt<o:p></o:p></pre><pre>[root@fedora11-x86-64-host \
xen-unstable.hg-vgapt]# wget <a \
href="http://lists.xensource.com/archives/html/xen-devel/2009-08/bincPiiAf0QWg.bin">ht \
tp://lists.xensource.com/archives/html/xen-devel/2009-08/bincPiiAf0QWg.bin</a><o:p></o:p></pre><pre>--2009-08-28 \
23:18:21-- &nbsp;<a href="http://lists.xensource.com/archives/html/xen-devel/2009-08/b \
incPiiAf0QWg.bin">http://lists.xensource.com/archives/html/xen-devel/2009-08/bincPiiAf0QWg.bin</a><o:p></o:p></pre><pre>Resolving \
lists.xensource.com... 70.42.241.110<o:p></o:p></pre><pre>Connecting to \
lists.xensource.com|70.42.241.110|:80... connected.<o:p></o:p></pre><pre>HTTP request \
sent, awaiting response... 200 OK<o:p></o:p></pre><pre>Length: 12565 (12K) \
[application/octet-stream]<o:p></o:p></pre><pre>Saving to: \
`bincPiiAf0QWg.bin'<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>100%[======================================================================&gt;] \
12,565&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 30.7K/s&nbsp;&nbsp; in 0.4s&nbsp;&nbsp;&nbsp; \
<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>2009-08-28 23:18:22 (30.7 KB/s) - \
`bincPiiAf0QWg.bin' saved \
[12565/12565]<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>[root@fedora11-x86-64-host \
xen-unstable.hg-vgapt]# mv bincPiiAf0QWg.bin \
xen-gfx-passthrough.patch<o:p></o:p></pre><pre>[root@fedora11-x86-64-host \
xen-unstable.hg-vgapt]# vi xen-gfx-passthrough.patch \
<o:p></o:p></pre><pre>[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# patch &lt; \
xen-gfx-passthrough.patch <o:p></o:p></pre><pre>can't find file to patch at input \
line 4<o:p></o:p></pre><pre>Perhaps you should have used the -p or --strip \
option?<o:p></o:p></pre><pre>The text leading up to this \
was:<o:p></o:p></pre><pre>--------------------------<o:p></o:p></pre><pre>|diff -r \
5d7e7a250267 tools/firmware/hvmloader/config.h<o:p></o:p></pre><pre>|--- \
a/tools/firmware/hvmloader/config.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Wed Aug 26 18:28:44 \
2009 +0800<o:p></o:p></pre><pre>|+++ \
b/tools/firmware/hvmloader/config.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thu Aug 27 16:54:24 \
2009 +0800<o:p></o:p></pre><pre>--------------------------<o:p></o:p></pre><pre>File \
to patch: ^C<o:p></o:p></pre><pre>[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# \
ex xen-gfx-passthrough.patch <o:p></o:p></pre><pre>[root@fedora11-x86-64-host \
xen-unstable.hg-vgapt]# patch -p1 &lt; xen-gfx-passthrough.patch \
<o:p></o:p></pre><pre>patching file \
tools/firmware/hvmloader/config.h<o:p></o:p></pre><pre>patching file \
tools/firmware/hvmloader/hvmloader.c<o:p></o:p></pre><pre>patching file \
tools/libxc/ia64/xc_ia64_hvm_build.c<o:p></o:p></pre><pre>patching file \
tools/libxc/xc_hvm_build.c<o:p></o:p></pre><pre>patching file \
tools/libxc/xc_linux.c<o:p></o:p></pre><pre>patching file \
tools/libxc/xenctrl.h<o:p></o:p></pre><pre>patching file \
tools/libxc/xenguest.h<o:p></o:p></pre><pre>patching file \
tools/python/xen/lowlevel/xc/xc.c<o:p></o:p></pre><pre>patching file \
tools/python/xen/xend/XendConfig.py<o:p></o:p></pre><pre>Hunk #1 succeeded at 174 \
(offset -1 lines).<o:p></o:p></pre><pre>patching file \
tools/python/xen/xend/image.py<o:p></o:p></pre><pre>Hunk #1 succeeded at 780 (offset \
-6 lines).<o:p></o:p></pre><pre>Hunk #3 succeeded at 895 (offset -6 \
lines).<o:p></o:p></pre><pre>patching file \
tools/python/xen/xm/create.py<o:p></o:p></pre><pre>[root@fedora11-x86-64-host \
xen-unstable.hg-vgapt]# wget <a \
href="http://lists.xensource.com/archives/html/xen-devel/2009-08/binglLqkeq4Rj.bin">ht \
tp://lists.xensource.com/archives/html/xen-devel/2009-08/binglLqkeq4Rj.bin</a><o:p></o:p></pre><pre>--2009-08-28 \
23:21:35-- &nbsp;<a href="http://lists.xensource.com/archives/html/xen-devel/2009-08/b \
inglLqkeq4Rj.bin">http://lists.xensource.com/archives/html/xen-devel/2009-08/binglLqkeq4Rj.bin</a><o:p></o:p></pre><pre>Resolving \
lists.xensource.com... 70.42.241.110<o:p></o:p></pre><pre>Connecting to \
lists.xensource.com|70.42.241.110|:80... connected.<o:p></o:p></pre><pre>HTTP request \
sent, awaiting response... 200 OK<o:p></o:p></pre><pre>Length: 9841 (9.6K) \
[application/octet-stream]<o:p></o:p></pre><pre>Saving to: \
`binglLqkeq4Rj.bin'<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>100%[======================================================================&gt;] \
9,841&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24.3K/s&nbsp;&nbsp; in \
0.4s&nbsp;&nbsp;&nbsp; <o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>2009-08-28 \
23:21:36 (24.3 KB/s) - `binglLqkeq4Rj.bin' saved \
[9841/9841]<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>[root@fedora11-x86-64-host \
xen-unstable.hg-vgapt]# mv binglLqkeq4Rj.bin \
qemu-gfx-passthrough.patch<o:p></o:p></pre><pre>[root@fedora11-x86-64-host \
xen-unstable.hg-vgapt]# vi qemu-gfx-passthrough.patch \
<o:p></o:p></pre><pre>[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# find . -name \
hw<o:p></o:p></pre><pre>./tools/ioemu-remote/hw<o:p></o:p></pre><pre>./.hg/store/data/tools/ioemu/hw<o:p></o:p></pre><pre>[root@fedora11-x86-64-host \
xen-unstable.hg-vgapt]# mv qemu-gfx-passthrough.patch \
tools/ioemu-remote/<o:p></o:p></pre><pre>[root@fedora11-x86-64-host \
xen-unstable.hg-vgapt]# cd \
tools/ioemu-remote/<o:p></o:p></pre><pre>[root@fedora11-x86-64-host ioemu-remote]# \
patch -p1 &lt; qemu-<o:p></o:p></pre><pre>qemu-aio.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;qemu-img.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qemu-sockets.c<o:p></o:p></pre><pre>qemu-binfmt-conf.sh&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qemu-img.texi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qemu-tech.texi<o:p></o:p></pre><pre>qemu-char.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qemu-lock.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qemu-timer.h<o:p></o:p></pre><pre>qemu-char.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qemu-log.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qemu-tool.c<o:p></o:p></pre><pre>qemu-common.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qemu-malloc.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qemu-xen.h<o:p></o:p></pre><pre>qemu-doc.texi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qemu-nbd.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
<o:p></o:p></pre><pre>qemu-gfx-passthrough.patch&nbsp; \
qemu-nbd.texi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
<o:p></o:p></pre><pre>[root@fedora11-x86-64-host ioemu-remote]# patch -p1 &lt; \
qemu-gfx-passthrough.patch <o:p></o:p></pre><pre>patching file \
hw/pass-through.c<o:p></o:p></pre><pre>patching file \
hw/pass-through.h<o:p></o:p></pre><pre>patching file \
hw/pc.c<o:p></o:p></pre><pre>patching file \
vl.c<o:p></o:p></pre><pre>[root@fedora11-x86-64-host ioemu-remote]# cd \
..<o:p></o:p></pre><pre>[root@fedora11-x86-64-host tools]# cd \
..<o:p></o:p></pre><pre>[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# vi \
intel-gfx-passthru-patch-3.patch<o:p></o:p></pre><pre>[root@fedora11-x86-64-host \
xen-unstable.hg-vgapt]# patch -p1 &lt; intel-gfx-passthru-patch-3.patch \
<o:p></o:p></pre><pre>patching file \
tools/firmware/hvmloader/Makefile<o:p></o:p></pre><pre>Hunk #1 FAILED at \
50.<o:p></o:p></pre><pre>1 out of 1 hunk FAILED -- saving rejects to file \
tools/firmware/hvmloader/Makefile.rej<o:p></o:p></pre><pre>patching file \
tools/firmware/hvmloader/hvmloader.c<o:p></o:p></pre><pre>patch: **** malformed patch \
at line 24: sizeof(vgabios_pt));<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>[root@fedora11-x86-64-host \
xen-unstable.hg-vgapt]# vi intel-gfx-passthru-patch-3.patch \
<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>For everybody's convenience, I have \
attached intel-gfx-passthru-patch-3.patch and the firmware for my nVidia GeForce 8400 \
GS PCI Express x16 graphics card in this \
email.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Please help me complete \
intel-gfx-passthru-patch-3.patch as I really need \
it.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Thank you very \
much!!!<o:p></o:p></pre><pre>&nbsp; <o:p></o:p></pre><pre>-- \
<o:p></o:p></pre><pre>Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) \
BEng(Hons)(Mechanical Engineering) <o:p></o:p></pre><pre>Technical Support Engineer \
<o:p></o:p></pre><pre>Information Technology Department<o:p></o:p></pre><pre>Asiasoft \
Online Pte Ltd<o:p></o:p></pre><pre>Tampines Central 1 #04-01 Tampines Plaza \
<o:p></o:p></pre><pre>Singapore 529541<o:p></o:p></pre><pre>Republic of \
Singapore<o:p></o:p></pre><pre>Mobile: +65-9648-9798<o:p></o:p></pre><pre>MSN: <a \
href="mailto:teoenming@hotmail.com">teoenming@hotmail.com</a><o:p></o:p></pre><pre>Alma \
Maters: Singapore Polytechnic, National University of Singapore<o:p></o:p></pre>

<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>This patch supports \
basic gfx passthrough on QEMU:<o:p></o:p></pre><pre>&nbsp; - disable emulated VGA \
adpater if there is passthroughed gfx<o:p></o:p></pre><pre>&nbsp; - \
register/unregister legacy VGA I/O ports and MMIOs for passthroughed \
gfx<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Signed-off-by: Ben Lin <a \
href="mailto:ben.y.lin@intel.com">&lt;ben.y.lin@intel.com&gt;</a><o:p></o:p></pre><pre>Signed-off-by: \
Weidong Han <a href="mailto:weidong.han@intel.com">&lt;weidong.han@intel.com&gt;</a><o:p></o:p></pre><pre>No \
virus found in this incoming message.<o:p></o:p></pre><pre>Checked by AVG - <a \
href="http://www.avg.com">www.avg.com</a> <o:p></o:p></pre><pre>Version: 8.5.409 / \
Virus Database: 270.13.69/2328 - Release Date: \
08/27/09<o:p></o:p></pre><pre>18:02:00<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>No \
virus found in this outgoing message.<o:p></o:p></pre><pre>Checked by AVG - <a \
href="http://www.avg.com">www.avg.com</a> <o:p></o:p></pre><pre>Version: 8.5.409 / \
Virus Database: 270.13.71/2330 - Release Date: \
08/27/09<o:p></o:p></pre><pre>18:02:00<o:p></o:p></pre><pre>&nbsp; \
<o:p></o:p></pre><pre style='text-align:center'>

<hr size=4 width="90%" align=center>

</pre><pre style='text-align:center'><o:p>&nbsp;</o:p></pre><pre
style='text-align:center'><o:p>&nbsp;</o:p></pre><pre \
style='text-align:center'>&nbsp;&nbsp;&nbsp; <o:p></o:p></pre><pre \
style='text-align:center'>&nbsp;<o:p></o:p></pre><pre \
style='text-align:center'>&nbsp;<o:p></o:p></pre><pre \
style='text-align:center'>&nbsp;&nbsp;&nbsp; \
<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>_______________________________________________<o:p></o:p></pre><pre>Xen-devel \
mailing list<o:p></o:p></pre><pre><a \
href="mailto:Xen-devel@lists.xensource.com">Xen-devel@lists.xensource.com</a><o:p></o:p></pre><pre><a
 href="http://lists.xensource.com/xen-devel">http://lists.xensource.com/xen-devel</a><o:p></o:p></pre><pre>&nbsp; \
<o:p></o:p></pre></blockquote>

<p class=MsoNormal><br>
<br>
<br>
<br>
<o:p></o:p></p>

<pre style='text-align:center'>

<hr size=4 width="90%" align=center>

</pre><pre style='text-align:center'><o:p>&nbsp;</o:p></pre><pre
style='text-align:center'><o:p>&nbsp;</o:p></pre><pre \
style='text-align:center'>&nbsp; <o:p></o:p></pre><pre \
style='text-align:center'>&nbsp;<o:p></o:p></pre><pre \
style='text-align:center'>&nbsp;<o:p></o:p></pre><pre \
style='text-align:center'>&nbsp; \
<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>_______________________________________________<o:p></o:p></pre><pre>Xen-devel \
mailing list<o:p></o:p></pre><pre><a \
href="mailto:Xen-devel@lists.xensource.com">Xen-devel@lists.xensource.com</a><o:p></o:p></pre><pre><a
 href="http://lists.xensource.com/xen-devel">http://lists.xensource.com/xen-devel</a><o:p></o:p></pre><pre>&nbsp; \
<o:p></o:p></pre>

<p class=MsoNormal><br>
<br>
<br>
<br>
<br>
<o:p></o:p></p>

<pre>&nbsp;<o:p></o:p></pre>

<p class=MsoNormal><br>
<br>
<br>
<o:p></o:p></p>

<pre style='text-align:center'>

<hr size=4 width="90%" align=center>

</pre><pre style='text-align:center'><o:p>&nbsp;</o:p></pre><pre
style='text-align:center'><o:p>&nbsp;</o:p></pre><pre \
style='text-align:center'>&nbsp; \
<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>_______________________________________________<o:p></o:p></pre><pre>Xen-devel \
mailing list<o:p></o:p></pre><pre><a \
href="mailto:Xen-devel@lists.xensource.com">Xen-devel@lists.xensource.com</a><o:p></o:p></pre><pre><a
 href="http://lists.xensource.com/xen-devel">http://lists.xensource.com/xen-devel</a><o:p></o:p></pre><pre>&nbsp; \
<o:p></o:p></pre>

<p class=MsoNormal style='margin-bottom:12.0pt'><span \
style='font-family:"SimSun","serif"'><o:p>&nbsp;</o:p></span></p>

</div>

</body>

</html>


["qemu-dm-WinXP.log" (application/octet-stream)]
["xend.log" (application/octet-stream)]
["xm_dmesg.log" (application/octet-stream)]
["xend.log" (application/octet-stream)]
["lspci_primary.log" (application/octet-stream)]
["lspci_secondary.log" (application/octet-stream)]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic