graphics passthrough with VT-d
Subsystems (2)
PATCH 2/2 graphics passthrough with VT-d
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
No virus found in this incoming message.
Checked by AVG - 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
Version: 8.5.409 / Virus Database: 270.13.71/2330 - Release Date: 08/27/09 18:02:00
Quoted 1 line
From
fb818f1060e57dac6793187a70a79801a7c17e50Mon Sep 17 00:00:00 2001
From: Weidong Han <[email protected]>
Date: Thu, 27 Aug 2009 16:51:01 +0800
Subject: [PATCH] qemu gfx passthrough support
support basic gfx passthrough:
- disable emulated VGA adpater if there is passthroughed gfx
- register/unregister legacy VGA I/O ports and MMIOs for passthroughed gfx
--- hw/pass-through.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++ hw/pass-through.h | 6 +++++ hw/pc.c | 51 ++++++++++++++++++++++++------------------ vl.c | 32 +++++++++++++++++++++++--- 4 files changed, 126 insertions(+), 26 deletions(-)
hw/pass-through.c +63 -0
@@ -93,6 +93,8 @@#include <unistd.h> #include <sys/ioctl.h> +extern int gfx_passthru; +struct php_dev {struct pt_dev *pt_dev;uint8_t valid;
@@ -1781,12 +1783,57 @@ static int pt_dev_is_virtfn(struct pci_dev *dev)return rc; } +/* +* register VGA resources for the domain with assigned gfx +*/ +static int register_vga_regions (struct pt_dev *real_device) +{ +int ret =0 ; + + ret |=xc_domain_ioport_mapping (xc_handle, domid,0x3B0 , +0x3B0 ,0xC ,DPCI_ADD_MAPPING ); + + ret |=xc_domain_ioport_mapping (xc_handle, domid,0x3C0 , +0x3C0 ,0x20 ,DPCI_ADD_MAPPING ); + + ret |=xc_domain_memory_mapping (xc_handle, domid, +0xa0000 >>XC_PAGE_SHIFT , +0xa0000 >>XC_PAGE_SHIFT , +0x20 , +DPCI_ADD_MAPPING ); + +return ret; +} + +/* +* unregister VGA resources for the domain with assigned gfx +*/ +static int unregister_vga_regions (struct pt_dev *real_device) +{ +int ret =0 ; + + ret |=xc_domain_ioport_mapping (xc_handle, domid,0x3B0 , +0x3B0 ,0xC ,DPCI_REMOVE_MAPPING ); + + ret |=xc_domain_ioport_mapping (xc_handle, domid,0x3C0 , +0x3C0 ,0x20 ,DPCI_REMOVE_MAPPING ); + + ret |=xc_domain_memory_mapping (xc_handle, domid, +0xa0000 >>XC_PAGE_SHIFT , +0xa0000 >>XC_PAGE_SHIFT , +0x20 , +DPCI_REMOVE_MAPPING ); + +return ret; +} +static int pt_register_regions (struct pt_dev *assigned_device) {int i =0 ;uint32_t bar_data =0 ;struct pci_dev *pci_dev = assigned_device->pci_dev;PCIDevice *d = &assigned_device->dev; +int ret;/* Register PIO/MMIO BARs */ for ( i =0 ; i <PCI_BAR_ENTRIES ; i++ )
@@ -1842,6 +1889,16 @@ static int pt_register_regions(struct pt_dev *assigned_device) (uint32_t)(pci_dev->rom_size), (uint32_t)(pci_dev->rom_base_addr)); } +if ( gfx_passthru && (pci_dev->device_class ==0x0300 ) ) + { + ret =register_vga_regions (assigned_device); +if ( ret !=0 ) + { +PT_LOG ("VGA region mapping failed\n" ); +return ret; + } + } +return 0 ; }
@@ -1891,6 +1948,12 @@ static void pt_unregister_regions(struct pt_dev *assigned_device) } +if ( gfx_passthru && (assigned_device->pci_dev->device_class ==0x0300 ) ) + { + ret =unregister_vga_regions (assigned_device); +if ( ret !=0 ) +PT_LOG ("VGA region unmapping failed\n" ); + } }static uint8_t find_cap_offset (struct pci_dev *pci_dev,uint8_t cap)
hw/pass-through.h +6 -0
@@ -142,6 +142,12 @@ enum { GRP_TYPE_EMU, /* emul reg group */ }; +enum { +GFX_NO_PASSTHRU =0 ,/* No gfx pass-through */ +GFX_IGD_PASSTHRU ,/* IGD pass-through */ +GFX_DISCRETE_PASSTHRU ,/* Discrete gfx pass-through */ +}; +#define PT_GET_EMUL_SIZE (flag, r_size) do { \ if (flag == PT_BAR_FLAG_MEM) {\ r_size = (((r_size) + XC_PAGE_SIZE - 1) & ~(XC_PAGE_SIZE - 1)); \
hw/pc.c +29 -22
71 lines not on this page · raw message
vl.c +28 -4
@@ -48,6 +48,7 @@#include <stdlib.h> #include "qemu-xen.h" +#include "hw/pass-through.h" #include <unistd.h> #include <fcntl.h>
@@ -213,6 +214,7 @@ static int rtc_date_offset = -1; /* -1 means no change */int cirrus_vga_enabled =1 ;int std_vga_enabled =0 ;int vmsvga_enabled =0 ; +int gfx_passthru =0 ;#ifdef TARGET_SPARC int graphic_width =1024 ;int graphic_height =768 ;
@@ -4269,6 +4271,7 @@ enum {/* Xen tree: */ QEMU_OPTION_disable_opengl, QEMU_OPTION_direct_pci, + QEMU_OPTION_gfx_passthru, QEMU_OPTION_pci_emulation, QEMU_OPTION_vncunused, QEMU_OPTION_videoram,
@@ -4447,6 +4450,7 @@ static const QEMUOption qemu_options[] = {#endif { "acpi", 0, QEMU_OPTION_acpi }, /* deprecated, for xend compatibility */ { "direct_pci", HAS_ARG, QEMU_OPTION_direct_pci }, + { "gfx_passthru", HAS_ARG, QEMU_OPTION_gfx_passthru}, { "pciemulation", HAS_ARG, QEMU_OPTION_pci_emulation }, { "vncunused", 0, QEMU_OPTION_vncunused }, { "vcpus", HAS_ARG, QEMU_OPTION_vcpus },
@@ -5484,6 +5488,22 @@ int main(int argc, char **argv, char **envp)case QEMU_OPTION_runas: run_as = optarg;break ; +case QEMU_OPTION_gfx_passthru: + gfx_passthru =atoi (optarg); +switch (gfx_passthru) { +case GFX_NO_PASSTHRU : +break ; +case GFX_IGD_PASSTHRU : +fprintf (logfile,"IGD graphics card assignment\n" ); +break ; +case GFX_DISCRETE_PASSTHRU : +fprintf (logfile,"Discrete graphics card assignment\n" ); +break ; +default : +fprintf (stderr,"unsupported gfx_passthru option: %d\n" , + gfx_passthru); + } +break ; } } }
@@ -5897,13 +5917,17 @@ int main(int argc, char **argv, char **envp)exit (1 );xenstore_write_vncport (vnc_display_port); } + +if (gfx_passthru ==GFX_NO_PASSTHRU ) + {#if defined(CONFIG_SDL ) -if (sdl || !vnc_display) -sdl_display_init (ds, full_screen, no_frame, opengl_enabled); +if (sdl || !vnc_display) +sdl_display_init (ds, full_screen, no_frame, opengl_enabled);#elif defined(CONFIG_COCOA ) -if (sdl || !vnc_display) -cocoa_display_init (ds, full_screen); +if (sdl || !vnc_display) +cocoa_display_init (ds, full_screen);#endif + } } }dpy_resize (ds);
Signature · 1 line
1.6.0.4
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
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>
tools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800 renamed from tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800 +1 -0
@@ -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
tools/firmware/hvmloader/hvmloader.c Thu Aug 27 17:23:00 2009 +0800 renamed from tools/firmware/hvmloader/hvmloader.c Thu Aug 27 16:54:33 2009 +0800 +2 -3
@@ -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!!!
Signature · 10 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 16 lines
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 gfxSigned-off-by Ben Lin<[email protected]>Signed-off-by Weidong Han<[email protected]>No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.69/2328 - Release Date: 08/27/09 18:02:00No virus found in this outgoing message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.71/2330 - Release Date: 08/27/09 18:02:00
Quoted 7 lines
------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list [email protected]
http://lists.xensource.com/xen-devel
tools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800 renamed from tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800 +1 -0
@@ -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
tools/firmware/hvmloader/hvmloader.c Thu Aug 27 17:23:00 2009 +0800 renamed from tools/firmware/hvmloader/hvmloader.c Thu Aug 27 16:54:33 2009 +0800 +2 -3
@@ -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");_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
The vga bios file for my nvidia geforce 8400 gs was extracted using nvflash.exe executed from a USB floppy drive. I couldn't run NiBiTor as I don't have a running native Windows operating system.
Signature · 10 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 138 lines · Mr. Teo En Ming (Zhang Enming)
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 -r494be76c1ad9tools/firmware/hvmloader/Makefiletools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800 renamed from tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800 +1
-0@@ -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.hdiff -r
494be76c1ad9tools/firmware/hvmloader/hvmloader.ctools/firmware/hvmloader/hvmloader.c Thu Aug 27 17:23:00 2009 +0800 renamed from tools/firmware/hvmloader/hvmloader.c Thu Aug 27 16:54:33 2009 +0800 +3
-3@@ -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.bintools/firmware/vgabios/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# lstools/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]# wgethttp://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 filetools/firmware/hvmloader/config.h
patching filetools/firmware/hvmloader/hvmloader.c
patching filetools/libxc/ia64/xc_ia64_hvm_build.c
patching filetools/libxc/xc_hvm_build.c
patching filetools/libxc/xc_linux.c
patching filetools/libxc/xenctrl.h
patching filetools/libxc/xenguest.h
patching filetools/python/xen/lowlevel/xc/xc.c
patching filetools/python/xen/xend/XendConfig.py
Hunk #1 succeeded at 174 (offset -1 lines).
patching filetools/python/xen/xend/image.py
Hunk #1 succeeded at 780 (offset -6 lines).
Hunk #3 succeeded at 895 (offset -6 lines).
patching filetools/python/xen/xm/create.py
[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# wgethttp://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.patchtools/ioemu-remote/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cdtools/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 filehw/pass-through.h
patching filehw/pc.c
patching filevl.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 filetools/firmware/hvmloader/Makefile
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/Makefile.rejpatching filetools/firmware/hvmloader/hvmloader.c
patch: **** malformed patch at line 24:sizeof(vgabios_pt));
Quoted 50 lines
[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!!!
Signature · 10 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 16 lines
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 gfxSigned-off-by Ben Lin<[email protected]>Signed-off-by Weidong Han<[email protected]>No virus found in this incoming message.
Checked by AVG -www.avg.com
Version: 8.5.409 / Virus Database: 270.13.69/2328 - Release Date: 08/27/09 18:02:00No virus found in this outgoing message.
Checked by AVG -www.avg.com
Version: 8.5.409 / Virus Database: 270.13.71/2330 - Release Date: 08/27/09 18:02:00Quoted 7 lines
------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Teo,
It looks like the patches that Wiedong has supplied already copy the VGA bios from the card and re-execute it within the DomU, therefore there should be no need to load it from a file.
I think you will have trouble for 2 reasons:
1) Bios re-execution, these Nvidia cards do not like having the BIOS re-executed (from memcpy or file)
2) the Base Address Registers (BARs) will require 1:1 mappings to the real addresses, which these patches dont cater for
If you want to make it work, you will need a card that works without the 1:1 mapping and is more friendly to virtualisation.
ie:
http://www.nvidia.com/object/sli_multi_os.html
(as Andrew Lyon describes)
Dual Quadro FX 5800, 4800, and 3800 professional graphics boards
Tm
From: [email protected] [mailto:[email protected]] On Behalf Of Mr. Teo En Ming (Zhang Enming)
Sent: 28 August 2009 16:55
To: [email protected]
Cc: [email protected]; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected]; [email protected]
Subject: Re: [Xen-devel] [PATCH 2/2] graphics passthrough with VT-d
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: [email protected]<mailto:[email protected]>
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
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
[email protected]<mailto:[email protected]>
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 1 line
If you want to make it work, you will need a card that works without the 1:1 mapping and is more friendly to virtualisation.
Or to do your own board initialisation code for a cheap board - there is sufficient code in the Linux nvidia fb driver and/or the Nouveau codebase for that for a fair number of boards.
Thanks for the steer Alan, it would be ok for limited support and testing but I don't think it would be supportable to maintain Xen specific board initialisation code especially when the DomU is HVM running Windows OS .. you would want to use the Nvidia shipped drivers..
-----Original Message-----
From: Alan Cox [mailto:[email protected]]
Sent: 28 August 2009 17:20
To: Tim Moore
Cc: '[email protected]'; [email protected]
Subject: Re: [Xen-devel] [PATCH(es)] graphics passthrough with VT-d
Quoted 1 line
If you want to make it work, you will need a card that works without the 1:1 mapping and is more friendly to virtualisation.
Or to do your own board initialisation code for a cheap board - there is sufficient code in the Linux nvidia fb driver and/or the Nouveau codebase for that for a fair number of boards.
Dear Tim,
I am using onboard Intel GMA 4500 for my Dom 0 and nVidia Geforce 8400 GS for passthrough to Windows XP HVM domU.
I believe the VGA BIOS in the physical memory region 0xC0000 to 0xC7FFF is the vga bios of onboard Intel graphics, and not my Geforce 8400 GS. Hence I would need to extract out the firmware file for my Geforce 8400 GS card.
As for nvidia professional graphics cards, they are too expensive for me for home use.
Signature · 10 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 167 lines · Tim Moore
Teo,
It looks like the patches that Wiedong has supplied already copy the VGA bios from the card and re-execute it within the DomU, therefore there should be no need to load it from a file.
I think you will have trouble for 2 reasons:
1) Bios re-execution, these Nvidia cards do not like having the BIOS re-executed (from memcpy or file)
2) the Base Address Registers (BARs) will require 1:1 mappings to the real addresses, which these patches dont cater for
If you want to make it work, you will need a card that works without the 1:1 mapping and is more friendly to virtualisation.
ie:
http://www.nvidia.com/object/sli_multi_os.html
(as Andrew Lyon describes)
Dual Quadro FX 5800, 4800, and 3800 professional graphics boards
Tm
*From:* [email protected] [mailto:[email protected]] *On Behalf Of *Mr. Teo En Ming (Zhang Enming) *Sent:* 28 August 2009 16:55
*To:* [email protected]
*Cc:* [email protected]; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected]; [email protected] *Subject:* Re: [Xen-devel] [PATCH 2/2] graphics passthrough with VT-dDear 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
494be76c1ad9tools/firmware/hvmloader/Makefiletools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800 renamed from tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800 +1
-0@@ -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.hdiff -r
494be76c1ad9tools/firmware/hvmloader/hvmloader.ctools/firmware/hvmloader/hvmloader.c Thu Aug 27 17:23:00 2009 +0800 renamed from tools/firmware/hvmloader/hvmloader.c Thu Aug 27 16:54:33 2009 +0800 +3
-3@@ -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.bintools/firmware/vgabios/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# lstools/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]# wgethttp://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 filetools/firmware/hvmloader/config.h
patching filetools/firmware/hvmloader/hvmloader.c
patching filetools/libxc/ia64/xc_ia64_hvm_build.c
patching filetools/libxc/xc_hvm_build.c
patching filetools/libxc/xc_linux.c
patching filetools/libxc/xenctrl.h
patching filetools/libxc/xenguest.h
patching filetools/python/xen/lowlevel/xc/xc.c
patching filetools/python/xen/xend/XendConfig.py
Hunk #1 succeeded at 174 (offset -1 lines).
patching filetools/python/xen/xend/image.py
Hunk #1 succeeded at 780 (offset -6 lines).
Hunk #3 succeeded at 895 (offset -6 lines).
patching filetools/python/xen/xm/create.py
[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# wgethttp://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.patchtools/ioemu-remote/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cdtools/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 filehw/pass-through.h
patching filehw/pc.c
patching filevl.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 filetools/firmware/hvmloader/Makefile
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/Makefile.rejpatching filetools/firmware/hvmloader/hvmloader.c
patch: **** malformed patch at line 24:sizeof(vgabios_pt));
Quoted 77 lines
[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!!!
Signature · 68 lines
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:[email protected] <mailto:[email protected]> 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<[email protected]> <mailto:[email protected]> Signed-off-by: Weidong Han<[email protected]> <mailto:[email protected]> 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 [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel ------------------------------------------------------------------------ _______________________________________________ Xen-devel mailing list [email protected] http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
I believe Weidong mentioned he will release 1:1 mapping patches in a future date. Let's hope he will release it tomorrow. :-)
Signature · 10 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 275 lines · Mr. Teo En Ming (Zhang Enming)
Dear Tim,
I am using onboard Intel GMA 4500 for my Dom 0 and nVidia Geforce 8400 GS for passthrough to Windows XP HVM domU.
I believe the VGA BIOS in the physical memory region
0xC0000to0xC7FFFis the vga bios of onboard Intel graphics, and not my Geforce 8400 GS. Hence I would need to extract out the firmware file for my Geforce 8400 GS card.As for nvidia professional graphics cards, they are too expensive for me for home use.
Signature · 10 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 167 lines · Tim Moore
Teo,
It looks like the patches that Wiedong has supplied already copy the VGA bios from the card and re-execute it within the DomU, therefore there should be no need to load it from a file.
I think you will have trouble for 2 reasons:
1) Bios re-execution, these Nvidia cards do not like having the BIOS re-executed (from memcpy or file)
2) the Base Address Registers (BARs) will require 1:1 mappings to the real addresses, which these patches dont cater for
If you want to make it work, you will need a card that works without the 1:1 mapping and is more friendly to virtualisation.
ie:
http://www.nvidia.com/object/sli_multi_os.html
(as Andrew Lyon describes)
Dual Quadro FX 5800, 4800, and 3800 professional graphics boards
Tm
*From:* [email protected] [mailto:[email protected]] *On Behalf Of *Mr. Teo En Ming (Zhang Enming) *Sent:* 28 August 2009 16:55
*To:* [email protected]
*Cc:* [email protected]; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected]; [email protected] *Subject:* Re: [Xen-devel] [PATCH 2/2] graphics passthrough with VT-dDear 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
494be76c1ad9tools/firmware/hvmloader/Makefiletools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800 renamed from tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800 +1
-0@@ -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.hdiff -r
494be76c1ad9tools/firmware/hvmloader/hvmloader.ctools/firmware/hvmloader/hvmloader.c Thu Aug 27 17:23:00 2009 +0800 renamed from tools/firmware/hvmloader/hvmloader.c Thu Aug 27 16:54:33 2009 +0800 +3
-3@@ -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.bintools/firmware/vgabios/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# lstools/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]# wgethttp://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 filetools/firmware/hvmloader/config.h
patching filetools/firmware/hvmloader/hvmloader.c
patching filetools/libxc/ia64/xc_ia64_hvm_build.c
patching filetools/libxc/xc_hvm_build.c
patching filetools/libxc/xc_linux.c
patching filetools/libxc/xenctrl.h
patching filetools/libxc/xenguest.h
patching filetools/python/xen/lowlevel/xc/xc.c
patching filetools/python/xen/xend/XendConfig.py
Hunk #1 succeeded at 174 (offset -1 lines).
patching filetools/python/xen/xend/image.py
Hunk #1 succeeded at 780 (offset -6 lines).
Hunk #3 succeeded at 895 (offset -6 lines).
patching filetools/python/xen/xm/create.py
[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# wgethttp://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.patchtools/ioemu-remote/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cdtools/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 filehw/pass-through.h
patching filehw/pc.c
patching filevl.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 filetools/firmware/hvmloader/Makefile
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/Makefile.rejpatching filetools/firmware/hvmloader/hvmloader.c
patch: **** malformed patch at line 24:sizeof(vgabios_pt));Quoted 77 lines
[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!!!
Signature · 68 lines
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:[email protected] <mailto:[email protected]> 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<[email protected]> <mailto:[email protected]> Signed-off-by: Weidong Han<[email protected]> <mailto:[email protected]> 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 [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel ------------------------------------------------------------------------ _______________________________________________ Xen-devel mailing list [email protected] http://lists.xensource.com/xen-devel------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 2 lines
I believe the VGA BIOS in the physical memory region
0xC0000to0xC7FFFis the vga bios of onboard Intel graphics, and not my Geforce 8400 GS.
If that was your boot video device. To extract the video BIOS for the Nvidia you either need to map it and read it out or boot with the Nvidia as the boot video device to acquire it and then switch back. That ought to work.
Alan
Dear Alan,
When I extracted the vga bios for my nvidia geforce 8400 gs, i went into BIOS to set PEG as the primary video adapter. Then I booted using nvidia gfx and extracted the vga bios using nvflash.exe.
I believe it is possible to use a hex editor to examine the vga firmware file to see if it's the vga bios for nvidia.
Signature · 10 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 10 lines · Alan Cox
Quoted 3 lines
I believe the VGA BIOS in the physical memory region
0xC0000to0xC7FFFis the vga bios of onboard Intel graphics, and not my Geforce 8400 GS.If that was your boot video device. To extract the video BIOS for the Nvidia you either need to map it and read it out or boot with the Nvidia as the boot video device to acquire it and then switch back. That ought to work.
Alan
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.
Signature · 10 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 138 lines · Mr. Teo En Ming (Zhang Enming)
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 -r494be76c1ad9tools/firmware/hvmloader/Makefiletools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800 renamed from tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800 +1
-0@@ -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.hdiff -r
494be76c1ad9tools/firmware/hvmloader/hvmloader.ctools/firmware/hvmloader/hvmloader.c Thu Aug 27 17:23:00 2009 +0800 renamed from tools/firmware/hvmloader/hvmloader.c Thu Aug 27 16:54:33 2009 +0800 +3
-3@@ -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.bintools/firmware/vgabios/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# lstools/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]# wgethttp://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 filetools/firmware/hvmloader/config.h
patching filetools/firmware/hvmloader/hvmloader.c
patching filetools/libxc/ia64/xc_ia64_hvm_build.c
patching filetools/libxc/xc_hvm_build.c
patching filetools/libxc/xc_linux.c
patching filetools/libxc/xenctrl.h
patching filetools/libxc/xenguest.h
patching filetools/python/xen/lowlevel/xc/xc.c
patching filetools/python/xen/xend/XendConfig.py
Hunk #1 succeeded at 174 (offset -1 lines).
patching filetools/python/xen/xend/image.py
Hunk #1 succeeded at 780 (offset -6 lines).
Hunk #3 succeeded at 895 (offset -6 lines).
patching filetools/python/xen/xm/create.py
[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# wgethttp://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.patchtools/ioemu-remote/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cdtools/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 filehw/pass-through.h
patching filehw/pc.c
patching filevl.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 filetools/firmware/hvmloader/Makefile
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/Makefile.rejpatching filetools/firmware/hvmloader/hvmloader.c
patch: **** malformed patch at line 24:sizeof(vgabios_pt));
Quoted 50 lines
[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!!!
Signature · 10 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 16 lines
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 gfxSigned-off-by Ben Lin<[email protected]>Signed-off-by Weidong Han<[email protected]>No virus found in this incoming message.
Checked by AVG -www.avg.com
Version: 8.5.409 / Virus Database: 270.13.69/2328 - Release Date: 08/27/09 18:02:00No virus found in this outgoing message.
Checked by AVG -www.avg.com
Version: 8.5.409 / Virus Database: 270.13.71/2330 - Release Date: 08/27/09 18:02:00Quoted 7 lines
------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
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:29:12.763299633 +0800 renamed from Makefile 2009-08-29 03:24:52.413083774 +0800 +1 -0
@@ -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:31:43.172084995 +0800 renamed from hvmloader.c 2009-08-29 03:26:06.911085797 +0800 +3 -3
@@ -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?
Signature · 10 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 6 lines · Mr. Teo En Ming (Zhang Enming)
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.
Seehttp://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.
Quoted 213 lines
[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 filetools/firmware/hvmloader/hvmloader.c
Hunk #1 FAILED at 688.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/hvmloader.c.rejNow patching
tools/firmware/hvmloader/Makefileis successful but patchingtools/firmware/hvmloader/hvmloader.cstill failed.Signature · 10 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 188 lines · Mr. Teo En Ming (Zhang Enming)
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 -r494be76c1ad9tools/firmware/hvmloader/Makefiletools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800 renamed from tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800 +1
-0@@ -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.hdiff -r
494be76c1ad9tools/firmware/hvmloader/hvmloader.ctools/firmware/hvmloader/hvmloader.c Thu Aug 27 17:23:00 2009 +0800 renamed from tools/firmware/hvmloader/hvmloader.c Thu Aug 27 16:54:33 2009 +0800 +3
-3@@ -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.bintools/firmware/vgabios/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# lstools/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]# wgethttp://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 filetools/firmware/hvmloader/config.h
patching filetools/firmware/hvmloader/hvmloader.c
patching filetools/libxc/ia64/xc_ia64_hvm_build.c
patching filetools/libxc/xc_hvm_build.c
patching filetools/libxc/xc_linux.c
patching filetools/libxc/xenctrl.h
patching filetools/libxc/xenguest.h
patching filetools/python/xen/lowlevel/xc/xc.c
patching filetools/python/xen/xend/XendConfig.py
Hunk #1 succeeded at 174 (offset -1 lines).
patching filetools/python/xen/xend/image.py
Hunk #1 succeeded at 780 (offset -6 lines).
Hunk #3 succeeded at 895 (offset -6 lines).
patching filetools/python/xen/xm/create.py
[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# wgethttp://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.patchtools/ioemu-remote/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cdtools/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 filehw/pass-through.h
patching filehw/pc.c
patching filevl.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 filetools/firmware/hvmloader/Makefile
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/Makefile.rejpatching filetools/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!!!
Signature · 10 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 16 lines
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 gfxSigned-off-by Ben Lin<[email protected]>Signed-off-by Weidong Han<[email protected]>No virus found in this incoming message.
Checked by AVG -www.avg.com
Version: 8.5.409 / Virus Database: 270.13.69/2328 - Release Date: 08/27/09 18:02:00No virus found in this outgoing message.
Checked by AVG -www.avg.com
Version: 8.5.409 / Virus Database: 270.13.71/2330 - Release Date: 08/27/09 18:02:00Quoted 7 lines
------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~
rm -rf *.ilg *.log *.ind *.toc *.bak core
rm -rf ps pdf html
rm -rf api
rm -rf man5
rm -rf man1
make[1]: Leaving directory `/usr/src/xen-unstable.hg-vgapt/docs' [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]# cp ~enming/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]# cp ~enming/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-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]# ls
buildconfigs Config.mk dist extras Makefile stubdom unmodified_drivers xen-gfx-passthrough.patch config COPYING docs install.sh README tools xen
[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cd tools/firmware/hvmloader/ [root@fedora11-x86-64-host hvmloader]# cp Makefile Makefile.new
[root@fedora11-x86-64-host hvmloader]# vi Makefile.new
[root@fedora11-x86-64-host hvmloader]# cp hvmloader.c hvmloader.c.new [root@fedora11-x86-64-host hvmloader]# vi hvmloader.c.new
[root@fedora11-x86-64-host hvmloader]# man diff
[root@fedora11-x86-64-host hvmloader]# diff -u Makefile Makefile.new > intel-gfx-passthru-patch-3.patch [root@fedora11-x86-64-host hvmloader]# vi intel-gfx-passthru-patch-3.patch [root@fedora11-x86-64-host hvmloader]# diff -u hvmloader.c hvmloader.c.new >> intel-gfx-passthru-patch-3.patch [root@fedora11-x86-64-host hvmloader]# vi intel-gfx-passthru-patch-3.patch [root@fedora11-x86-64-host hvmloader]# vi ~enming/intel-gfx-passthru-patch-3.patch [root@fedora11-x86-64-host hvmloader]# rm ~enming/intel-gfx-passthru-patch-3.patch
rm: remove regular file `/home/enming/intel-gfx-passthru-patch-3.patch'? y [root@fedora11-x86-64-host hvmloader]# vi intel-gfx-passthru-patch-3.patch [root@fedora11-x86-64-host hvmloader]# patch < intel-gfx-passthru-patch-3.patch
patching file Makefile
patching file hvmloader.c
[root@fedora11-x86-64-host hvmloader]# vi Makefile
[root@fedora11-x86-64-host hvmloader]# vi hvmloader.c
[root@fedora11-x86-64-host hvmloader]# cd ..
You have new mail in /var/spool/mail/root
[root@fedora11-x86-64-host firmware]# cd ..
[root@fedora11-x86-64-host tools]# cd ..
make iasl
make[9]: Entering directory `/usr/src/xen-unstable.hg-vgapt/tools/firmware/hvmloader/acpi'
ACPI ASL compiler (iasl) is needed
Download and install Intel ACPI CA from
http://acpica.org/downloads/
make[9]: *** [iasl] Error 1
make[9]: Leaving directory `/usr/src/xen-unstable.hg-vgapt/tools/firmware/hvmloader/acpi' make[8]: *** [dsdt.c] Error 2
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
acpica-unix-20090730/executer/exsystem.c acpica-unix-20090730/executer/exutils.c acpica-unix-20090730/generate/ acpica-unix-20090730/generate/lint/ acpica-unix-20090730/generate/lint/files.lnt acpica-unix-20090730/generate/lint/lint.bat acpica-unix-20090730/generate/lint/lset.bat acpica-unix-20090730/generate/lint/options.lnt acpica-unix-20090730/generate/lint/readme.txt acpica-unix-20090730/generate/lint/std16.lnt acpica-unix-20090730/generate/lint/std32.lnt acpica-unix-20090730/generate/lint/std64.lnt acpica-unix-20090730/hardware/ acpica-unix-20090730/hardware/hwacpi.c acpica-unix-20090730/hardware/hwgpe.c acpica-unix-20090730/hardware/hwregs.c acpica-unix-20090730/hardware/hwsleep.c acpica-unix-20090730/hardware/hwtimer.c acpica-unix-20090730/hardware/hwvalid.c acpica-unix-20090730/hardware/hwxface.c acpica-unix-20090730/include/ acpica-unix-20090730/include/acapps.h acpica-unix-20090730/include/accommon.h acpica-unix-20090730/include/acconfig.h acpica-unix-20090730/include/acdebug.h acpica-unix-20090730/include/acdisasm.h acpica-unix-20090730/include/acdispat.h acpica-unix-20090730/include/acevents.h acpica-unix-20090730/include/acexcep.h acpica-unix-20090730/include/acglobal.h acpica-unix-20090730/include/achware.h acpica-unix-20090730/include/acinterp.h acpica-unix-20090730/include/aclocal.h acpica-unix-20090730/include/acmacros.h acpica-unix-20090730/include/acnames.h acpica-unix-20090730/include/acnamesp.h acpica-unix-20090730/include/acobject.h acpica-unix-20090730/include/acopcode.h acpica-unix-20090730/include/acoutput.h acpica-unix-20090730/include/acparser.h acpica-unix-20090730/include/acpi.h acpica-unix-20090730/include/acpiosxf.h acpica-unix-20090730/include/acpixf.h acpica-unix-20090730/include/acpredef.h acpica-unix-20090730/include/acresrc.h acpica-unix-20090730/include/acrestyp.h acpica-unix-20090730/include/acstruct.h acpica-unix-20090730/include/actables.h acpica-unix-20090730/include/actbl.h acpica-unix-20090730/include/actbl1.h acpica-unix-20090730/include/actbl2.h acpica-unix-20090730/include/actypes.h acpica-unix-20090730/include/acutils.h acpica-unix-20090730/include/amlcode.h acpica-unix-20090730/include/amlresrc.h acpica-unix-20090730/include/platform/ acpica-unix-20090730/include/platform/accygwin.h acpica-unix-20090730/include/platform/acefi.h acpica-unix-20090730/include/platform/acenv.h acpica-unix-20090730/include/platform/acfreebsd.h acpica-unix-20090730/include/platform/acgcc.h acpica-unix-20090730/include/platform/acintel.h acpica-unix-20090730/include/platform/aclinux.h acpica-unix-20090730/include/platform/acmsvc.h acpica-unix-20090730/include/platform/acnetbsd.h acpica-unix-20090730/include/platform/acos2.h acpica-unix-20090730/include/platform/acwin.h acpica-unix-20090730/include/platform/acwin64.h acpica-unix-20090730/namespace/ acpica-unix-20090730/namespace/nsaccess.c acpica-unix-20090730/namespace/nsalloc.c acpica-unix-20090730/namespace/nsdump.c acpica-unix-20090730/namespace/nsdumpdv.c acpica-unix-20090730/namespace/nseval.c acpica-unix-20090730/namespace/nsinit.c acpica-unix-20090730/namespace/nsload.c acpica-unix-20090730/namespace/nsnames.c acpica-unix-20090730/namespace/nsobject.c acpica-unix-20090730/namespace/nsparse.c acpica-unix-20090730/namespace/nspredef.c acpica-unix-20090730/namespace/nsrepair.c acpica-unix-20090730/namespace/nssearch.c acpica-unix-20090730/namespace/nsutils.c acpica-unix-20090730/namespace/nswalk.c acpica-unix-20090730/namespace/nsxfeval.c acpica-unix-20090730/namespace/nsxfname.c acpica-unix-20090730/namespace/nsxfobj.c acpica-unix-20090730/osunixxf.c acpica-unix-20090730/os_specific/ acpica-unix-20090730/os_specific/service_layers/ acpica-unix-20090730/os_specific/service_layers/osunixdir.c acpica-unix-20090730/os_specific/service_layers/osunixxf.c acpica-unix-20090730/os_specific/service_layers/oswindir.c acpica-unix-20090730/os_specific/service_layers/oswintbl.c acpica-unix-20090730/os_specific/service_layers/oswinxf.c acpica-unix-20090730/parser/ acpica-unix-20090730/parser/psargs.c acpica-unix-20090730/parser/psloop.c acpica-unix-20090730/parser/psopcode.c acpica-unix-20090730/parser/psparse.c acpica-unix-20090730/parser/psscope.c acpica-unix-20090730/parser/pstree.c acpica-unix-20090730/parser/psutils.c acpica-unix-20090730/parser/pswalk.c acpica-unix-20090730/parser/psxface.c acpica-unix-20090730/README acpica-unix-20090730/resources/ acpica-unix-20090730/resources/rsaddr.c acpica-unix-20090730/resources/rscalc.c acpica-unix-20090730/resources/rscreate.c acpica-unix-20090730/resources/rsdump.c acpica-unix-20090730/resources/rsinfo.c acpica-unix-20090730/resources/rsio.c acpica-unix-20090730/resources/rsirq.c acpica-unix-20090730/resources/rslist.c acpica-unix-20090730/resources/rsmemory.c acpica-unix-20090730/resources/rsmisc.c acpica-unix-20090730/resources/rsutils.c acpica-unix-20090730/resources/rsxface.c acpica-unix-20090730/tables/ acpica-unix-20090730/tables/tbfadt.c acpica-unix-20090730/tables/tbfind.c acpica-unix-20090730/tables/tbinstal.c acpica-unix-20090730/tables/tbutils.c acpica-unix-20090730/tables/tbxface.c acpica-unix-20090730/tables/tbxfroot.c acpica-unix-20090730/tools/ acpica-unix-20090730/tools/acpiexec/ acpica-unix-20090730/tools/acpiexec/aecommon.h acpica-unix-20090730/tools/acpiexec/aeexec.c acpica-unix-20090730/tools/acpiexec/aehandlers.c acpica-unix-20090730/tools/acpiexec/aemain.c acpica-unix-20090730/tools/acpiexec/aetables.c acpica-unix-20090730/tools/acpiexec/Makefile acpica-unix-20090730/tools/acpiexec/osunixdir.c acpica-unix-20090730/tools/acpisrc/ acpica-unix-20090730/tools/acpisrc/acpisrc.h acpica-unix-20090730/tools/acpisrc/ascase.c acpica-unix-20090730/tools/acpisrc/asconvrt.c acpica-unix-20090730/tools/acpisrc/asfile.c acpica-unix-20090730/tools/acpisrc/asmain.c acpica-unix-20090730/tools/acpisrc/asremove.c acpica-unix-20090730/tools/acpisrc/astable.c acpica-unix-20090730/tools/acpisrc/asutils.c acpica-unix-20090730/tools/acpisrc/Makefile acpica-unix-20090730/tools/acpisrc/osunixdir.c acpica-unix-20090730/tools/acpixtract/ acpica-unix-20090730/tools/acpixtract/acpixtract.c acpica-unix-20090730/tools/acpixtract/Makefile acpica-unix-20090730/tools/examples/ acpica-unix-20090730/tools/examples/examples.c acpica-unix-20090730/utilities/ acpica-unix-20090730/utilities/utalloc.c acpica-unix-20090730/utilities/utcache.c acpica-unix-20090730/utilities/utclib.c acpica-unix-20090730/utilities/utcopy.c acpica-unix-20090730/utilities/utdebug.c acpica-unix-20090730/utilities/utdelete.c acpica-unix-20090730/utilities/uteval.c acpica-unix-20090730/utilities/utglobal.c acpica-unix-20090730/utilities/utids.c acpica-unix-20090730/utilities/utinit.c acpica-unix-20090730/utilities/utlock.c acpica-unix-20090730/utilities/utmath.c acpica-unix-20090730/utilities/utmisc.c acpica-unix-20090730/utilities/utmutex.c acpica-unix-20090730/utilities/utobject.c acpica-unix-20090730/utilities/utresrc.c acpica-unix-20090730/utilities/utstate.c acpica-unix-20090730/utilities/uttrack.c acpica-unix-20090730/utilities/utxface.c [root@fedora11-x86-64-host src]# cd acpica-unix-20090730 [root@fedora11-x86-64-host acpica-unix-20090730]# cd compiler/ [root@fedora11-x86-64-host compiler]# make
bison -v -d -y -pAslCompiler aslcompiler.y
cp y.tab.c aslcompilerparse.c
cp y.tab.h aslcompiler.y.h
cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslcompilerparse.o aslcompilerparse.c
flex -i -PAslCompiler -oaslcompilerlex.c aslcompiler.l
cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslcompilerlex.o aslcompilerlex.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslanalyze.o aslanalyze.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslcodegen.o aslcodegen.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslcompile.o aslcompile.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslerror.o aslerror.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslfiles.o aslfiles.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o asllength.o asllength.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o asllisting.o asllisting.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslload.o aslload.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o asllookup.o asllookup.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslmain.o aslmain.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslmap.o aslmap.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslopcodes.o aslopcodes.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o asloperands.o asloperands.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslresource.o aslresource.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslrestype1.o aslrestype1.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslrestype2.o aslrestype2.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslstartup.o aslstartup.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o asltree.o asltree.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslutils.o aslutils.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o asltransform.o asltransform.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslfold.o aslfold.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslstubs.o aslstubs.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o aslopt.o aslopt.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../common/getopt.o ../common/getopt.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../utilities/utalloc.o ../utilities/utalloc.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../utilities/utcache.o ../utilities/utcache.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../utilities/utcopy.o ../utilities/utcopy.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../utilities/utdebug.o ../utilities/utdebug.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../utilities/utdelete.o ../utilities/utdelete.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../utilities/utglobal.o ../utilities/utglobal.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../utilities/utinit.o ../utilities/utinit.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../utilities/utlock.o ../utilities/utlock.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../utilities/utobject.o ../utilities/utobject.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../utilities/utmisc.o ../utilities/utmisc.c
../utilities/utmisc.c: In function ‘AcpiUtIsAmlTable’:../utilities/utmisc.c:269: warning: dereferencing type-punned pointer will break strict-aliasing rules ../utilities/utmisc.c:270: warning: dereferencing type-punned pointer will break strict-aliasing rules ../utilities/utmisc.c:271: warning: dereferencing type-punned pointer will break strict-aliasing rules
cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../utilities/utmath.o ../utilities/utmath.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../utilities/utmutex.o ../utilities/utmutex.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../utilities/utresrc.o ../utilities/utresrc.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../utilities/utstate.o ../utilities/utstate.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../utilities/utxface.o ../utilities/utxface.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../namespace/nsaccess.o ../namespace/nsaccess.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../namespace/nsalloc.o ../namespace/nsalloc.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../namespace/nsdump.o ../namespace/nsdump.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../namespace/nsnames.o ../namespace/nsnames.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../namespace/nsobject.o ../namespace/nsobject.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../namespace/nsparse.o ../namespace/nsparse.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../namespace/nssearch.o ../namespace/nssearch.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../namespace/nsutils.o ../namespace/nsutils.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../namespace/nswalk.o ../namespace/nswalk.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../namespace/nsxfobj.o ../namespace/nsxfobj.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../parser/psargs.o ../parser/psargs.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../parser/psloop.o ../parser/psloop.c ../parser/psloop.c: In function ‘AcpiPsGetArguments’: ../parser/psloop.c:624: warning: format ‘%.4X’ expects type ‘unsigned int’, but argument 5 has type ‘long unsigned int’ cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../parser/psopcode.o ../parser/psopcode.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../parser/psparse.o ../parser/psparse.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../parser/psscope.o ../parser/psscope.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../parser/pstree.o ../parser/pstree.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../parser/psutils.o ../parser/psutils.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../parser/pswalk.o ../parser/pswalk.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../dispatcher/dswscope.o ../dispatcher/dswscope.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../dispatcher/dswstate.o ../dispatcher/dswstate.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../dispatcher/dsfield.o ../dispatcher/dsfield.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../dispatcher/dsobject.o ../dispatcher/dsobject.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../dispatcher/dsopcode.o ../dispatcher/dsopcode.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../dispatcher/dsutils.o ../dispatcher/dsutils.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../dispatcher/dswexec.o ../dispatcher/dswexec.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../dispatcher/dswload.o ../dispatcher/dswload.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exconvrt.o ../executer/exconvrt.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/excreate.o ../executer/excreate.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exdump.o ../executer/exdump.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exmisc.o ../executer/exmisc.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exmutex.o ../executer/exmutex.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exnames.o ../executer/exnames.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exoparg1.o ../executer/exoparg1.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exoparg2.o ../executer/exoparg2.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exoparg3.o ../executer/exoparg3.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exoparg6.o ../executer/exoparg6.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exprep.o ../executer/exprep.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exregion.o ../executer/exregion.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exresnte.o ../executer/exresnte.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exresolv.o ../executer/exresolv.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exresop.o ../executer/exresop.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exstore.o ../executer/exstore.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exstoren.o ../executer/exstoren.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exstorob.o ../executer/exstorob.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exsystem.o ../executer/exsystem.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../executer/exutils.o ../executer/exutils.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../common/adfile.o ../common/adfile.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../common/adisasm.o ../common/adisasm.c
../common/adisasm.c: In function ‘AdCreateTableHeader’:../common/adisasm.c:753: warning: dereferencing type-punned pointer will break strict-aliasing rules ../common/adisasm.c: In function ‘AdGetLocalTables’:../common/adisasm.c:1082: warning: dereferencing type-punned pointer will break strict-aliasing rules ../common/adisasm.c:1095: warning: dereferencing type-punned pointer will break strict-aliasing rules ../common/adisasm.c:1116: warning: dereferencing type-punned pointer will break strict-aliasing rules ../common/adisasm.c:1130: warning: dereferencing type-punned pointer will break strict-aliasing rules
cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../common/adwalk.o ../common/adwalk.c../common/adwalk.c: In function ‘AcpiDmLoadDescendingOp’:../common/adwalk.c:691: warning: dereferencing type-punned pointer will break strict-aliasing rules
cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../common/dmrestag.o ../common/dmrestag.c../common/dmrestag.c: In function ‘AcpiDmUpdateResourceName’:../common/dmrestag.c:732: warning: dereferencing type-punned pointer will break strict-aliasing rules
cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../common/dmtable.o ../common/dmtable.c../common/dmtable.c: In function ‘AcpiDmDumpDataTable’:../common/dmtable.c:383: warning: dereferencing type-punned pointer will break strict-aliasing rules ../common/dmtable.c:388: warning: dereferencing type-punned pointer will break strict-aliasing rules
cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../common/dmtbinfo.o ../common/dmtbinfo.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../common/dmtbdump.o ../common/dmtbdump.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../debugger/dbfileio.o ../debugger/dbfileio.c
../debugger/dbfileio.c: In function ‘AcpiDbReadTable’:../debugger/dbfileio.c:351: warning: dereferencing type-punned pointer will break strict-aliasing rules ../debugger/dbfileio.c:352: warning: dereferencing type-punned pointer will break strict-aliasing rules
cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../disassembler/dmbuffer.o ../disassembler/dmbuffer.c
cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../disassembler/dmnames.o ../disassembler/dmnames.c../disassembler/dmnames.c: In function ‘AcpiDmDumpName’:../disassembler/dmnames.c:162: warning: dereferencing type-punned pointer will break strict-aliasing rules
cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../disassembler/dmopcode.o ../disassembler/dmopcode.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../disassembler/dmobject.o ../disassembler/dmobject.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../disassembler/dmresrc.o ../disassembler/dmresrc.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../disassembler/dmresrcl.o ../disassembler/dmresrcl.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../disassembler/dmresrcs.o ../disassembler/dmresrcs.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../disassembler/dmutils.o ../disassembler/dmutils.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../disassembler/dmwalk.o ../disassembler/dmwalk.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../tables/tbfadt.o ../tables/tbfadt.c cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../tables/tbinstal.o ../tables/tbinstal.c
../tables/tbinstal.c: In function ‘AcpiTbStoreTable’:../tables/tbinstal.c:448: warning: dereferencing type-punned pointer will break strict-aliasing rules
cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../tables/tbutils.o ../tables/tbutils.c../tables/tbutils.c: In function ‘AcpiTbPrintTableHeader’:../tables/tbutils.c:282: warning: dereferencing type-punned pointer will break strict-aliasing rules../tables/tbutils.c:290: warning: dereferencing type-punned pointer will break strict-aliasing rules../tables/tbutils.c: In function ‘AcpiTbInstallTable’:../tables/tbutils.c:445: warning: dereferencing type-punned pointer will break strict-aliasing rules../tables/tbutils.c:447: warning: dereferencing type-punned pointer will break strict-aliasing rules../tables/tbutils.c:485: warning: dereferencing type-punned pointer will break strict-aliasing rules
cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../tables/tbxface.o ../tables/tbxface.c
cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -c -o ../osunixxf.o ../osunixxf.c
cc aslcompilerparse.o aslcompilerlex.o aslanalyze.o aslcodegen.o aslcompile.o aslerror.o aslfiles.o asllength.o asllisting.o aslload.o asllookup.o aslmain.o aslmap.o aslopcodes.o asloperands.o aslresource.o aslrestype1.o aslrestype2.o aslstartup.o asltree.o aslutils.o asltransform.o aslfold.o aslstubs.o aslopt.o ../common/getopt.o ../utilities/utalloc.o ../utilities/utcache.o ../utilities/utcopy.o ../utilities/utdebug.o ../utilities/utdelete.o ../utilities/utglobal.o ../utilities/utinit.o ../utilities/utlock.o ../utilities/utobject.o ../utilities/utmisc.o ../utilities/utmath.o ../utilities/utmutex.o ../utilities/utresrc.o ../utilities/utstate.o ../utilities/utxface.o ../namespace/nsaccess.o ../namespace/nsalloc.o ../namespace/nsdump.o ../namespace/nsnames.o ../namespace/nsobject.o ../namespace/nsparse.o ../namespace/nssearch.o ../namespace/nsutils.o ../namespace/nswalk.o ../namespace/nsxfobj.o ../parser/psargs.o ../parser/psloop.o ../parser/psopcode.o ../parser/psparse.o ../parser/psscope.o ../parser/pstree.o ../parser/psutils.o ../parser/pswalk.o ../dispatcher/dswscope.o ../dispatcher/dswstate.o ../dispatcher/dsfield.o ../dispatcher/dsobject.o ../dispatcher/dsopcode.o ../dispatcher/dsutils.o ../dispatcher/dswexec.o ../dispatcher/dswload.o ../executer/exconvrt.o ../executer/excreate.o ../executer/exdump.o ../executer/exmisc.o ../executer/exmutex.o ../executer/exnames.o ../executer/exoparg1.o ../executer/exoparg2.o ../executer/exoparg3.o ../executer/exoparg6.o ../executer/exprep.o ../executer/exregion.o ../executer/exresnte.o ../executer/exresolv.o ../executer/exresop.o ../executer/exstore.o ../executer/exstoren.o ../executer/exstorob.o ../executer/exsystem.o ../executer/exutils.o ../common/adfile.o ../common/adisasm.o ../common/adwalk.o ../common/dmrestag.o ../common/dmtable.o ../common/dmtbinfo.o ../common/dmtbdump.o ../debugger/dbfileio.o ../disassembler/dmbuffer.o ../disassembler/dmnames.o ../disassembler/dmopcode.o ../disassembler/dmobject.o ../disassembler/dmresrc.o ../disassembler/dmresrcl.o ../disassembler/dmresrcs.o ../disassembler/dmutils.o ../disassembler/dmwalk.o ../tables/tbfadt.o ../tables/tbinstal.o ../tables/tbutils.o ../tables/tbxface.o ../osunixxf.o \
-lpthread -lrt -o iasl
You have new mail in /var/spool/mail/root
[root@fedora11-x86-64-host compiler]# make install
make: *** No rule to make target `install'. Stop.
[root@fedora11-x86-64-host compiler]# make help
make: *** No rule to make target `help'. Stop.
[root@fedora11-x86-64-host compiler]# vi Makefile
[root@fedora11-x86-64-host compiler]# cd ..
[root@fedora11-x86-64-host acpica-unix-20090730]# ls
changes.txt debugger events hardware os_specific parser tables common disassembler executer include osunixxf.c README tools compiler dispatcher generate namespace osunixxf.o resources utilities [root@fedora11-x86-64-host acpica-unix-20090730]# vi README [root@fedora11-x86-64-host acpica-unix-20090730]# cd compiler/ [root@fedora11-x86-64-host compiler]# ls aslanalyze.c aslcompilerlex.o aslfiles.o aslload.o asloperands.c aslrestype2.o asltypes.h aslanalyze.o aslcompilerparse.c aslfold.c asllookup.c asloperands.o aslstartup.c aslutils.c aslcodegen.c aslcompilerparse.o aslfold.o asllookup.o aslopt.c aslstartup.o aslutils.o aslcodegen.o aslcompiler.y aslglobal.h aslmain.c aslopt.o aslstubs.c iasl aslcompile.c aslcompiler.y.h asllength.c aslmain.o aslresource.c aslstubs.o Makefile aslcompile.o asldefine.h asllength.o aslmap.c aslresource.o asltransform.c readme.txt aslcompiler.h aslerror.c asllisting.c aslmap.o aslrestype1.c asltransform.o y.output aslcompiler.l aslerror.o asllisting.o aslopcodes.c aslrestype1.o asltree.c y.tab.c aslcompilerlex.c aslfiles.c aslload.c aslopcodes.o aslrestype2.c asltree.o y.tab.h
[root@fedora11-x86-64-host compiler]# file iasl
iasl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped [root@fedora11-x86-64-host compiler]# echo $PATH /usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin [root@fedora11-x86-64-host compiler]# cp iasl /usr/local/bin/
make -C acpi all
make[8]: Entering directory `/usr/src/xen-unstable.hg-vgapt/tools/firmware/hvmloader/acpi' make iasl
make[9]: Entering directory /usr/src/xen-unstable.hg-vgapt/tools/firmware/hvmloader/acpi' make[9]: /usr/local/bin/iasl' is up to date.
make[9]: Leaving directory `/usr/src/xen-unstable.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
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.cbuild.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
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
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: [email protected] [mailto:[email protected]] On Behalf Of Mr. Teo En Ming (Zhang Enming)
Sent: 28 August 2009 21:14
To: [email protected]
Cc: [email protected]; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected]; [email protected]; [email protected]
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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
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
[email protected]<mailto:[email protected]>
http://lists.xensource.com/xen-devel
________________________________
_______________________________________________
Xen-devel mailing list
[email protected]<mailto:[email protected]>
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hi Tim,
I thought it should be gfx_passthru=2 in domU config?
Signature · 10 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 249 lines · Tim Moore
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:* [email protected] [mailto:[email protected]] *On Behalf Of *Mr. Teo En Ming (Zhang Enming) *Sent:* 28 August 2009 21:14
*To:* [email protected]
*Cc:* [email protected]; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected]; [email protected]; [email protected] *Subject:* Re: [Xen-devel] [PATCH 2/2] graphics passthrough with VT-dAfter applying the 1st and 2nd patch to xen-unstable successfully, I examined the source codes
Makefileandhvmloader.cintools/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:29:12.763299633 +0800 renamed from Makefile 2009-08-29 03:24:52.413083774 +0800 +1
-0@@ -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.hhvmloader.c 2009-08-29 03:31:43.172084995 +0800 renamed from hvmloader.c 2009-08-29 03:26:06.911085797 +0800 +3
-3@@ -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?
Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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.
Seehttp://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 filetools/firmware/hvmloader/hvmloader.c
Hunk #1 FAILED at 688.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/hvmloader.c.rejNow patching
tools/firmware/hvmloader/Makefileis successful but patchingtools/firmware/hvmloader/hvmloader.cstill failed.Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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
494be76c1ad9tools/firmware/hvmloader/Makefiletools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800 renamed from tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800 +1
-0@@ -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.hdiff -r
494be76c1ad9tools/firmware/hvmloader/hvmloader.ctools/firmware/hvmloader/hvmloader.c Thu Aug 27 17:23:00 2009 +0800 renamed from tools/firmware/hvmloader/hvmloader.c Thu Aug 27 16:54:33 2009 +0800 +3
-3@@ -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.bintools/firmware/vgabios/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# lstools/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]# wgethttp://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 filetools/firmware/hvmloader/config.h
patching filetools/firmware/hvmloader/hvmloader.c
patching filetools/libxc/ia64/xc_ia64_hvm_build.c
patching filetools/libxc/xc_hvm_build.c
patching filetools/libxc/xc_linux.c
patching filetools/libxc/xenctrl.h
patching filetools/libxc/xenguest.h
patching filetools/python/xen/lowlevel/xc/xc.c
patching filetools/python/xen/xend/XendConfig.py
Hunk #1 succeeded at 174 (offset -1 lines).
patching filetools/python/xen/xend/image.py
Hunk #1 succeeded at 780 (offset -6 lines).
Hunk #3 succeeded at 895 (offset -6 lines).
patching filetools/python/xen/xm/create.py
[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# wgethttp://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.patchtools/ioemu-remote/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cdtools/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 filehw/pass-through.h
patching filehw/pc.c
patching filevl.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 filetools/firmware/hvmloader/Makefile
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/Makefile.rejpatching filetools/firmware/hvmloader/hvmloader.c
patch: **** malformed patch at line 24:sizeof(vgabios_pt));
Quoted 86 lines
[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!!!
Signature · 71 lines
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:[email protected] <mailto:[email protected]> 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<[email protected]> <mailto:[email protected]> Signed-off-by: Weidong Han<[email protected]> <mailto:[email protected]> 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 [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel ------------------------------------------------------------------------ _______________________________________________ Xen-devel mailing list [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
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.
Signature · 11 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 360 lines · Mr. Teo En Ming (Zhang Enming)
Hi Tim,
I thought it should be gfx_passthru=2 in domU config?
Signature · 10 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 249 lines · Tim Moore
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:* [email protected] [mailto:[email protected]] *On Behalf Of *Mr. Teo En Ming (Zhang Enming) *Sent:* 28 August 2009 21:14
*To:* [email protected]
*Cc:* [email protected]; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected]; [email protected]; [email protected] *Subject:* Re: [Xen-devel] [PATCH 2/2] graphics passthrough with VT-dAfter applying the 1st and 2nd patch to xen-unstable successfully, I examined the source codes
Makefileandhvmloader.cintools/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:29:12.763299633 +0800 renamed from Makefile 2009-08-29 03:24:52.413083774 +0800 +1
-0@@ -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.hhvmloader.c 2009-08-29 03:31:43.172084995 +0800 renamed from hvmloader.c 2009-08-29 03:26:06.911085797 +0800 +3
-3@@ -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?
Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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.
Seehttp://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 filetools/firmware/hvmloader/hvmloader.c
Hunk #1 FAILED at 688.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/hvmloader.c.rejNow patching
tools/firmware/hvmloader/Makefileis successful but patchingtools/firmware/hvmloader/hvmloader.cstill failed.Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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
494be76c1ad9tools/firmware/hvmloader/Makefiletools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800 renamed from tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800 +1
-0@@ -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.hdiff -r
494be76c1ad9tools/firmware/hvmloader/hvmloader.ctools/firmware/hvmloader/hvmloader.c Thu Aug 27 17:23:00 2009 +0800 renamed from tools/firmware/hvmloader/hvmloader.c Thu Aug 27 16:54:33 2009 +0800 +3
-3@@ -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.bintools/firmware/vgabios/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# lstools/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]# wgethttp://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 filetools/firmware/hvmloader/config.h
patching filetools/firmware/hvmloader/hvmloader.c
patching filetools/libxc/ia64/xc_ia64_hvm_build.c
patching filetools/libxc/xc_hvm_build.c
patching filetools/libxc/xc_linux.c
patching filetools/libxc/xenctrl.h
patching filetools/libxc/xenguest.h
patching filetools/python/xen/lowlevel/xc/xc.c
patching filetools/python/xen/xend/XendConfig.py
Hunk #1 succeeded at 174 (offset -1 lines).
patching filetools/python/xen/xend/image.py
Hunk #1 succeeded at 780 (offset -6 lines).
Hunk #3 succeeded at 895 (offset -6 lines).
patching filetools/python/xen/xm/create.py
[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# wgethttp://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.patchtools/ioemu-remote/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cdtools/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 filehw/pass-through.h
patching filehw/pc.c
patching filevl.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 filetools/firmware/hvmloader/Makefile
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/Makefile.rejpatching filetools/firmware/hvmloader/hvmloader.c
patch: **** malformed patch at line 24:sizeof(vgabios_pt));Quoted 86 lines
[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!!!
Signature · 71 lines
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:[email protected] <mailto:[email protected]> 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<[email protected]> <mailto:[email protected]> Signed-off-by: Weidong Han<[email protected]> <mailto:[email protected]> 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 [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel ------------------------------------------------------------------------ _______________________________________________ Xen-devel mailing list [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
tools/firmware/hvmloader/config.h +1 -1
@@ -15,7 +15,7 @@#define PCI_ISA_IRQ_MASK 0x0c20U/* ISA IRQs 5,10,11 are PCI connected */ /* MMIO hole: Hardcoded defaults, which can be dynamically expanded. */ -#define PCI_MEM_START 0xf0000000 +#define PCI_MEM_START 0xe0000000#define PCI_MEM_END 0xfc000000extern unsigned long pci_mem_start, pci_mem_end;
tools/firmware/hvmloader/hvmloader.c +9 -2
@@ -113,7 +113,7 @@ unsigned long pci_mem_start = PCI_MEM_STunsigned long pci_mem_start =PCI_MEM_START ;unsigned long pci_mem_end =PCI_MEM_END ; -static enum { VGA_none, VGA_std, VGA_cirrus } virtual_vga = VGA_none; +static enum { VGA_none, VGA_std, VGA_cirrus, VGA_pt } virtual_vga = VGA_none;static void init_hypercalls (void ) {
@@ -212,8 +212,10 @@ static void pci_setup(void)case 0x0300 :if ( (vendor_id ==0x1234 ) && (device_id ==0x1111 ) ) virtual_vga = VGA_std; -if ( (vendor_id ==0x1013 ) && (device_id ==0xb8 ) ) +else if ( (vendor_id ==0x1013 ) && (device_id ==0xb8 ) ) virtual_vga = VGA_cirrus; +else + virtual_vga = VGA_pt;break ;case 0x0680 :/* PIIX4 ACPI PM. Special device with special PCI config space. */
@@ -684,6 +686,11 @@ int main(void)memcpy ((void *)VGABIOS_PHYSICAL_ADDRESS , vgabios_stdvga,sizeof (vgabios_stdvga)); 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 );break ;default :printf ("No emulated VGA adaptor ...\n" );
tools/libxc/ia64/xc_ia64_hvm_build.c +3 -1
@@ -1109,7 +1109,9 @@ int xc_hvm_build_target_mem(int xc_handluint32_t domid, int memsize, int target, - const char *image_name) + const char *image_name, + int gfx_passthru) + { /* XXX:PoD isn't supported yet */ return xc_hvm_build(xc_handle, domid, target, image_name);
tools/libxc/xc_hvm_build.c +68 -1
87 lines not on this page · raw message
tools/libxc/xc_linux.c +50 -0
56 lines not on this page · raw message
tools/libxc/xenctrl.h +2 -0
@@ -1285,4 +1285,6 @@ int xc_tmem_restore(int xc_handle, int dint xc_tmem_restore (int xc_handle,int dom,int fd);int xc_tmem_restore_extra (int xc_handle,int dom,int fd); +int xc_get_vgabios (unsigned char *bios,int len); +#endif /* XENCTRL_H */
tools/libxc/xenguest.h +2 -1
@@ -135,7 +135,8 @@ int xc_hvm_build_target_mem(int xc_handluint32_t domid, int memsize, int target, - const char *image_name); + const char *image_name, + int gfx_passthru); int xc_hvm_build_mem(int xc_handle, uint32_t domid,
tools/python/xen/lowlevel/xc/xc.c +5 -5
@@ -894,21 +894,21 @@ static PyObject *pyxc_hvm_build(XcObjectint i;#endif char *image; -int memsize, target=-1 , vcpus =1 , acpi =0 , apic =1 ; +int memsize, target=-1 , vcpus =1 , acpi =0 , apic =1 , gfx_passthru =0 ;static char *kwd_list[] = {"domid" ,"memsize" ,"image" ,"target" ,"vcpus" ,"acpi" , -"apic" ,NULL }; -if ( !PyArg_ParseTupleAndKeywords (args, kwds,"iis|iiii" , kwd_list, +"apic" ,"gfx_passthru" ,NULL }; +if ( !PyArg_ParseTupleAndKeywords (args, kwds,"iis|iiiii" , kwd_list, &dom, &memsize, &image, &target, &vcpus, - &acpi, &apic) ) + &acpi, &apic, &gfx_passthru) )return NULL ;if ( target ==-1 ) target = memsize;if (xc_hvm_build_target_mem (self->xc_handle, dom, memsize, - target, image) !=0 ) + target, image, gfx_passthru) !=0 )return pyxc_error_to_exception ();#if !defined(__ia64__)
tools/python/xen/xend/XendConfig.py +1 -0
@@ -175,6 +175,7 @@ XENAPI_PLATFORM_CFG_TYPES = { 'pci_msitranslate': int, 'pci_power_mgmt': int, 'xen_platform_pci': int, + "gfx_passthru": int, } # Xen API console 'other_config' keys.
tools/python/xen/xend/image.py +5 -3
@@ -786,7 +786,7 @@ class HVMImageHandler(ImageHandler): self.apic = int(vmConfig['platform'].get('apic', 0)) self.acpi = int(vmConfig['platform'].get('acpi', 0)) self.guest_os_type = vmConfig['platform'].get('guest_os_type') - + self.gfx_passthru = int(vmConfig['platform'].get('gfx_passthru', 0)) # Return a list of cmd line args to the device models based on the # xm config file
@@ -807,7 +807,7 @@ class HVMImageHandler(ImageHandler): dmargs = [ 'boot', 'fda', 'fdb', 'soundhw', 'localtime', 'serial', 'stdvga', 'isa', - 'acpi', 'usb', 'usbdevice' ] + 'acpi', 'usb', 'usbdevice', 'gfx_passthru' ] for a in dmargs: v = vmConfig['platform'].get(a)
@@ -901,6 +901,7 @@ class HVMImageHandler(ImageHandler): log.debug("vcpus = %d", self.vm.getVCpuCount()) log.debug("acpi = %d", self.acpi) log.debug("apic = %d", self.apic) + log.debug("gfx_passthru = %d", self.gfx_passthru) rc = xc.hvm_build(domid = self.vm.getDomid(), image = self.loader,
@@ -908,7 +909,8 @@ class HVMImageHandler(ImageHandler): target = mem_mb, vcpus = self.vm.getVCpuCount(), acpi = self.acpi, - apic = self.apic) + apic = self.apic, + gfx_passthru = self.gfx_passthru) rc['notes'] = { 'SUSPEND_CANCEL': 1 } rc['store_mfn'] = xc.hvm_get_param(self.vm.getDomid(),
tools/python/xen/xm/create.py +6 -1
@@ -546,6 +546,10 @@ gopts.var('sdl', val='', gopts.var('sdl', val='', fn=set_value, default=None, use="""Should the device model use SDL?""") + +gopts.var('gfx_passthru', val='', + fn=set_value, default=None, + use="""Passthrough graphics card?""") gopts.var('opengl', val='', fn=set_value, default=None,
@@ -957,7 +961,8 @@ def configure_hvm(config_image, vals): 'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci', 'hpet', 'guest_os_type', 'hap', 'opengl', 'cpuid', 'cpuid_check', 'viridian', 'xen_extended_power_mgmt', 'pci_msitranslate', - 'vpt_align', 'pci_power_mgmt', 'xen_platform_pci' ] + 'vpt_align', 'pci_power_mgmt', 'xen_platform_pci', + 'gfx_passthru' ] for a in args: if a in vals.__dict__ and vals.__dict__[a] is not None:
Quoted 1 line
From
fb818f1060e57dac6793187a70a79801a7c17e50Mon Sep 17 00:00:00 2001
From: Weidong Han <[email protected]>
Date: Thu, 27 Aug 2009 16:51:01 +0800
Subject: [PATCH] qemu gfx passthrough support
support basic gfx passthrough:
- disable emulated VGA adpater if there is passthroughed gfx
- register/unregister legacy VGA I/O ports and MMIOs for passthroughed gfx
--- hw/pass-through.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++ hw/pass-through.h | 6 +++++ hw/pc.c | 51 ++++++++++++++++++++++++------------------ vl.c | 32 +++++++++++++++++++++++--- 4 files changed, 126 insertions(+), 26 deletions(-)
hw/pass-through.c +63 -0
93 lines not on this page · raw message
hw/pass-through.h +6 -0
@@ -142,6 +142,12 @@ enum { GRP_TYPE_EMU, /* emul reg group */ }; +enum { +GFX_NO_PASSTHRU =0 ,/* No gfx pass-through */ +GFX_IGD_PASSTHRU ,/* IGD pass-through */ +GFX_DISCRETE_PASSTHRU ,/* Discrete gfx pass-through */ +}; +#define PT_GET_EMUL_SIZE (flag, r_size) do { \ if (flag == PT_BAR_FLAG_MEM) {\ r_size = (((r_size) + XC_PAGE_SIZE - 1) & ~(XC_PAGE_SIZE - 1)); \
hw/pc.c +29 -22
71 lines not on this page · raw message
vl.c +28 -4
@@ -48,6 +48,7 @@#include <stdlib.h> #include "qemu-xen.h" +#include "hw/pass-through.h" #include <unistd.h> #include <fcntl.h>
@@ -213,6 +214,7 @@ static int rtc_date_offset = -1; /* -1 means no change */int cirrus_vga_enabled =1 ;int std_vga_enabled =0 ;int vmsvga_enabled =0 ; +int gfx_passthru =0 ;#ifdef TARGET_SPARC int graphic_width =1024 ;int graphic_height =768 ;
@@ -4269,6 +4271,7 @@ enum {/* Xen tree: */ QEMU_OPTION_disable_opengl, QEMU_OPTION_direct_pci, + QEMU_OPTION_gfx_passthru, QEMU_OPTION_pci_emulation, QEMU_OPTION_vncunused, QEMU_OPTION_videoram,
@@ -4447,6 +4450,7 @@ static const QEMUOption qemu_options[] = {#endif { "acpi", 0, QEMU_OPTION_acpi }, /* deprecated, for xend compatibility */ { "direct_pci", HAS_ARG, QEMU_OPTION_direct_pci }, + { "gfx_passthru", HAS_ARG, QEMU_OPTION_gfx_passthru}, { "pciemulation", HAS_ARG, QEMU_OPTION_pci_emulation }, { "vncunused", 0, QEMU_OPTION_vncunused }, { "vcpus", HAS_ARG, QEMU_OPTION_vcpus },
@@ -5484,6 +5488,22 @@ int main(int argc, char **argv, char **envp)case QEMU_OPTION_runas: run_as = optarg;break ; +case QEMU_OPTION_gfx_passthru: + gfx_passthru =atoi (optarg); +switch (gfx_passthru) { +case GFX_NO_PASSTHRU : +break ; +case GFX_IGD_PASSTHRU : +fprintf (logfile,"IGD graphics card assignment\n" ); +break ; +case GFX_DISCRETE_PASSTHRU : +fprintf (logfile,"Discrete graphics card assignment\n" ); +break ; +default : +fprintf (stderr,"unsupported gfx_passthru option: %d\n" , + gfx_passthru); + } +break ; } } }
@@ -5897,13 +5917,17 @@ int main(int argc, char **argv, char **envp)exit (1 );xenstore_write_vncport (vnc_display_port); } + +if (gfx_passthru ==GFX_NO_PASSTHRU ) + {#if defined(CONFIG_SDL ) -if (sdl || !vnc_display) -sdl_display_init (ds, full_screen, no_frame, opengl_enabled); +if (sdl || !vnc_display) +sdl_display_init (ds, full_screen, no_frame, opengl_enabled);#elif defined(CONFIG_COCOA ) -if (sdl || !vnc_display) -cocoa_display_init (ds, full_screen); +if (sdl || !vnc_display) +cocoa_display_init (ds, full_screen);#endif + } } }dpy_resize (ds);
Signature · 1 line
1.6.0.4
Manually generated by Teo En Ming (Zhang Enming) on 29 August 2009 Saturday at 11:10 A.M. Singapore Time Email #1: [email protected]
Email #2: [email protected]
MSN: [email protected]
Makefile +1 -0
@@ -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 +4 -4
@@ -688,10 +688,10 @@ 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 ); -break ; +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" );break ;
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hi
Anybody available today? I know it's Saturday. :-)
Signature · 11 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 32 lines · Mr. Teo En Ming (Zhang Enming)
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.cbuild.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 2There is an undeclared identifier in
tools/firmware/hvmloader/acpi/build.csource code. Could you guys help me resolve this issue?
Quoted 385 lines
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.
Signature · 11 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 360 lines · Mr. Teo En Ming (Zhang Enming)
Hi Tim,
I thought it should be gfx_passthru=2 in domU config?
Signature · 10 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 249 lines · Tim Moore
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:* [email protected] [mailto:[email protected]] *On Behalf Of *Mr. Teo En Ming (Zhang Enming) *Sent:* 28 August 2009 21:14
*To:* [email protected]
*Cc:* [email protected]; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected]; [email protected]; [email protected] *Subject:* Re: [Xen-devel] [PATCH 2/2] graphics passthrough with VT-dAfter applying the 1st and 2nd patch to xen-unstable successfully, I examined the source codes
Makefileandhvmloader.cintools/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:29:12.763299633 +0800 renamed from Makefile 2009-08-29 03:24:52.413083774 +0800 +1
-0@@ -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.hhvmloader.c 2009-08-29 03:31:43.172084995 +0800 renamed from hvmloader.c 2009-08-29 03:26:06.911085797 +0800 +3
-3@@ -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?
Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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.
Seehttp://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 filetools/firmware/hvmloader/hvmloader.c
Hunk #1 FAILED at 688.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/hvmloader.c.rejNow patching
tools/firmware/hvmloader/Makefileis successful but patchingtools/firmware/hvmloader/hvmloader.cstill failed.Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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
494be76c1ad9tools/firmware/hvmloader/Makefiletools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800 renamed from tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800 +1
-0@@ -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.hdiff -r
494be76c1ad9tools/firmware/hvmloader/hvmloader.ctools/firmware/hvmloader/hvmloader.c Thu Aug 27 17:23:00 2009 +0800 renamed from tools/firmware/hvmloader/hvmloader.c Thu Aug 27 16:54:33 2009 +0800 +3
-3@@ -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.bintools/firmware/vgabios/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# lstools/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]# wgethttp://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 filetools/firmware/hvmloader/config.h
patching filetools/firmware/hvmloader/hvmloader.c
patching filetools/libxc/ia64/xc_ia64_hvm_build.c
patching filetools/libxc/xc_hvm_build.c
patching filetools/libxc/xc_linux.c
patching filetools/libxc/xenctrl.h
patching filetools/libxc/xenguest.h
patching filetools/python/xen/lowlevel/xc/xc.c
patching filetools/python/xen/xend/XendConfig.py
Hunk #1 succeeded at 174 (offset -1 lines).
patching filetools/python/xen/xend/image.py
Hunk #1 succeeded at 780 (offset -6 lines).
Hunk #3 succeeded at 895 (offset -6 lines).
patching filetools/python/xen/xm/create.py
[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# wgethttp://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.patchtools/ioemu-remote/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cdtools/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 filehw/pass-through.h
patching filehw/pc.c
patching filevl.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 filetools/firmware/hvmloader/Makefile
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/Makefile.rejpatching filetools/firmware/hvmloader/hvmloader.c
patch: **** malformed patch at line 24:sizeof(vgabios_pt));Quoted 86 lines
[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!!!
Signature · 71 lines
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:[email protected] <mailto:[email protected]> 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<[email protected]> <mailto:[email protected]> Signed-off-by: Weidong Han<[email protected]> <mailto:[email protected]> 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 [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel ------------------------------------------------------------------------ _______________________________________________ Xen-devel mailing list [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
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 herebuild.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?
Signature · 11 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 437 lines · Mr. Teo En Ming (Zhang Enming)
Hi
Anybody available today? I know it's Saturday. :-)
Signature · 11 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 417 lines · Mr. Teo En Ming (Zhang Enming)
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.cbuild.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 2There is an undeclared identifier in
tools/firmware/hvmloader/acpi/build.csource 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.
Signature · 11 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 360 lines · Mr. Teo En Ming (Zhang Enming)
Hi Tim,
I thought it should be gfx_passthru=2 in domU config?
Signature · 10 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 249 lines · Tim Moore
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:* [email protected] [mailto:[email protected]] *On Behalf Of *Mr. Teo En Ming (Zhang Enming) *Sent:* 28 August 2009 21:14
*To:* [email protected]
*Cc:* [email protected]; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected]; [email protected]; [email protected] *Subject:* Re: [Xen-devel] [PATCH 2/2] graphics passthrough with VT-dAfter applying the 1st and 2nd patch to xen-unstable successfully, I examined the source codes
Makefileandhvmloader.cintools/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:29:12.763299633 +0800 renamed from Makefile 2009-08-29 03:24:52.413083774 +0800 +1
-0@@ -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.hhvmloader.c 2009-08-29 03:31:43.172084995 +0800 renamed from hvmloader.c 2009-08-29 03:26:06.911085797 +0800 +3
-3@@ -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?
Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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.
Seehttp://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 filetools/firmware/hvmloader/hvmloader.c
Hunk #1 FAILED at 688.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/hvmloader.c.rejNow patching
tools/firmware/hvmloader/Makefileis successful but patchingtools/firmware/hvmloader/hvmloader.cstill failed.Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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
494be76c1ad9tools/firmware/hvmloader/Makefiletools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800 renamed from tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800 +1
-0@@ -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.hdiff -r
494be76c1ad9tools/firmware/hvmloader/hvmloader.ctools/firmware/hvmloader/hvmloader.c Thu Aug 27 17:23:00 2009 +0800 renamed from tools/firmware/hvmloader/hvmloader.c Thu Aug 27 16:54:33 2009 +0800 +3
-3@@ -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.bintools/firmware/vgabios/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# lstools/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]# wgethttp://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 filetools/firmware/hvmloader/config.h
patching filetools/firmware/hvmloader/hvmloader.c
patching filetools/libxc/ia64/xc_ia64_hvm_build.c
patching filetools/libxc/xc_hvm_build.c
patching filetools/libxc/xc_linux.c
patching filetools/libxc/xenctrl.h
patching filetools/libxc/xenguest.h
patching filetools/python/xen/lowlevel/xc/xc.c
patching filetools/python/xen/xend/XendConfig.py
Hunk #1 succeeded at 174 (offset -1 lines).
patching filetools/python/xen/xend/image.py
Hunk #1 succeeded at 780 (offset -6 lines).
Hunk #3 succeeded at 895 (offset -6 lines).
patching filetools/python/xen/xm/create.py
[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# wgethttp://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.patchtools/ioemu-remote/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cdtools/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 filehw/pass-through.h
patching filehw/pc.c
patching filevl.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 filetools/firmware/hvmloader/Makefile
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/Makefile.rejpatching filetools/firmware/hvmloader/hvmloader.c
patch: **** malformed patch at line 24:sizeof(vgabios_pt));Quoted 86 lines
[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!!!
Signature · 71 lines
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:[email protected] <mailto:[email protected]> 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<[email protected]> <mailto:[email protected]> Signed-off-by: Weidong Han<[email protected]> <mailto:[email protected]> 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 [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel ------------------------------------------------------------------------ _______________________________________________ Xen-devel mailing list [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
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..@..[" */
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: [email protected]
Email #2: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798
ssdt_pm.h 2009-08-29 19:56:51.813088550 +0800 renamed from ssdt_pm.h 2009-08-29 19:54:52.653088000 +0800 +1 -1
@@ -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:57:27.896638884 +0800 renamed from ssdt_tpm.h 2009-08-29 19:55:44.578738954 +0800 +1 -1
@@ -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>
Signature · 11 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 71 lines · Mr. Teo En Ming (Zhang Enming)
Hi,
I clonedhttp://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.aslIntel ACPI Component Architecture
ASL Optimizing Compiler version 20090730 [Aug 29 2009] Copyright (C) 2000 - 2009 Intel Corporation Supports ACPI Specification Revision 4.0ASL Input: ssdt_tpm.asl - 31 lines, 1111 bytes, 3 keywords AML Output: SSDT_TPM.aml - 76 bytes, 3 named objects, 0 executable opcodesCompilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations
mv ssdt_tpm.hexssdt_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.aslIntel ACPI Component Architecture
ASL Optimizing Compiler version 20090730 [Aug 29 2009] Copyright (C) 2000 - 2009 Intel Corporation Supports ACPI Specification Revision 4.0ASL Input: ssdt_pm.asl - 425 lines, 12754 bytes, 192 keywords AML Output: SSDT_PM.aml - 1494 bytes, 64 named objects, 128 executable opcodesCompilation complete. 0 Errors, 0 Warnings, 0 Remarks, 31 Optimizations
mv ssdt_pm.hexssdt_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.obuild.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 herebuild.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
Quoted 456 lines
Any ideas about this Advanced Configuration and Power Interface code?
Signature · 11 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 437 lines · Mr. Teo En Ming (Zhang Enming)
Hi
Anybody available today? I know it's Saturday. :-)
Signature · 11 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 417 lines · Mr. Teo En Ming (Zhang Enming)
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.cbuild.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 2There is an undeclared identifier in
tools/firmware/hvmloader/acpi/build.csource 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.
Signature · 11 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 360 lines · Mr. Teo En Ming (Zhang Enming)
Hi Tim,
I thought it should be gfx_passthru=2 in domU config?
Signature · 10 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 249 lines · Tim Moore
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:* [email protected] [mailto:[email protected]] *On Behalf Of *Mr. Teo En Ming (Zhang Enming) *Sent:* 28 August 2009 21:14
*To:* [email protected]
*Cc:* [email protected]; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected]; [email protected]; [email protected] *Subject:* Re: [Xen-devel] [PATCH 2/2] graphics passthrough with VT-dAfter applying the 1st and 2nd patch to xen-unstable successfully, I examined the source codes
Makefileandhvmloader.cintools/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:29:12.763299633 +0800 renamed from Makefile 2009-08-29 03:24:52.413083774 +0800 +1
-0@@ -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.hhvmloader.c 2009-08-29 03:31:43.172084995 +0800 renamed from hvmloader.c 2009-08-29 03:26:06.911085797 +0800 +3
-3@@ -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?
Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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.
Seehttp://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 filetools/firmware/hvmloader/hvmloader.c
Hunk #1 FAILED at 688.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/hvmloader.c.rejNow patching
tools/firmware/hvmloader/Makefileis successful but patchingtools/firmware/hvmloader/hvmloader.cstill failed.Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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
494be76c1ad9tools/firmware/hvmloader/Makefiletools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800 renamed from tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800 +1
-0@@ -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.hdiff -r
494be76c1ad9tools/firmware/hvmloader/hvmloader.ctools/firmware/hvmloader/hvmloader.c Thu Aug 27 17:23:00 2009 +0800 renamed from tools/firmware/hvmloader/hvmloader.c Thu Aug 27 16:54:33 2009 +0800 +3
-3@@ -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.bintools/firmware/vgabios/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# lstools/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]# wgethttp://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 filetools/firmware/hvmloader/config.h
patching filetools/firmware/hvmloader/hvmloader.c
patching filetools/libxc/ia64/xc_ia64_hvm_build.c
patching filetools/libxc/xc_hvm_build.c
patching filetools/libxc/xc_linux.c
patching filetools/libxc/xenctrl.h
patching filetools/libxc/xenguest.h
patching filetools/python/xen/lowlevel/xc/xc.c
patching filetools/python/xen/xend/XendConfig.py
Hunk #1 succeeded at 174 (offset -1 lines).
patching filetools/python/xen/xend/image.py
Hunk #1 succeeded at 780 (offset -6 lines).
Hunk #3 succeeded at 895 (offset -6 lines).
patching filetools/python/xen/xm/create.py
[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# wgethttp://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.patchtools/ioemu-remote/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cdtools/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 filehw/pass-through.h
patching filehw/pc.c
patching filevl.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 filetools/firmware/hvmloader/Makefile
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/Makefile.rejpatching filetools/firmware/hvmloader/hvmloader.c
patch: **** malformed patch at line 24:sizeof(vgabios_pt));Quoted 86 lines
[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!!!
Signature · 71 lines
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:[email protected] <mailto:[email protected]> 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<[email protected]> <mailto:[email protected]> Signed-off-by: Weidong Han<[email protected]> <mailto:[email protected]> 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 [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel ------------------------------------------------------------------------ _______________________________________________ Xen-devel mailing list [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Patch created by Teo En Ming (Zhang Enming) on 29 August 2009 Saturday at 8:00 P.M. Singapore Time Email #1: [email protected]
Email #2: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798
ssdt_pm.h +1 -1
@@ -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 +1 -1
@@ -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..." */
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Mr. Teo En Ming (Zhang Enming)
AppliedDear 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.
Signature · 11 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 162 lines · Mr. Teo En Ming (Zhang Enming)
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.handssdt_tpm.hin source directorytools/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.hcontains:/*
*
* 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..@..[" */ 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.hcontains:/*
*
* 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: [email protected]
Email #2: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798ssdt_pm.h 2009-08-29 19:56:51.813088550 +0800 renamed from ssdt_pm.h 2009-08-29 19:54:52.653088000 +0800 +1
-1@@ -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:57:27.896638884 +0800 renamed from ssdt_tpm.h 2009-08-29 19:55:44.578738954 +0800 +1
-1@@ -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..." */
Quoted 549 lines
0x02,0x2A,0x58,0x65,0x6E,0x00,0x00,0x00, /* 00000008".*Xen..." */
</CODE>
Signature · 11 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 527 lines · Mr. Teo En Ming (Zhang Enming)
Hi,
I clonedhttp://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.aslIntel ACPI Component Architecture
ASL Optimizing Compiler version 20090730 [Aug 29 2009] Copyright (C) 2000 - 2009 Intel Corporation Supports ACPI Specification Revision 4.0ASL Input: ssdt_tpm.asl - 31 lines, 1111 bytes, 3 keywords AML Output: SSDT_TPM.aml - 76 bytes, 3 named objects, 0 executable opcodesCompilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations
mv ssdt_tpm.hexssdt_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.aslIntel ACPI Component Architecture
ASL Optimizing Compiler version 20090730 [Aug 29 2009] Copyright (C) 2000 - 2009 Intel Corporation Supports ACPI Specification Revision 4.0ASL Input: ssdt_pm.asl - 425 lines, 12754 bytes, 192 keywords AML Output: SSDT_PM.aml - 1494 bytes, 64 named objects, 128 executable opcodesCompilation complete. 0 Errors, 0 Warnings, 0 Remarks, 31 Optimizations
mv ssdt_pm.hexssdt_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.obuild.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 herebuild.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 2Any ideas about this Advanced Configuration and Power Interface code?
Signature · 11 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 437 lines · Mr. Teo En Ming (Zhang Enming)
Hi
Anybody available today? I know it's Saturday. :-)
Signature · 11 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 417 lines · Mr. Teo En Ming (Zhang Enming)
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.cbuild.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 2There is an undeclared identifier in
tools/firmware/hvmloader/acpi/build.csource 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.
Signature · 11 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 360 lines · Mr. Teo En Ming (Zhang Enming)
Hi Tim,
I thought it should be gfx_passthru=2 in domU config?
Signature · 10 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 249 lines · Tim Moore
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:* [email protected] [mailto:[email protected]] *On Behalf Of *Mr. Teo En Ming (Zhang Enming) *Sent:* 28 August 2009 21:14
*To:* [email protected]
*Cc:* [email protected]; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected]; [email protected]; [email protected] *Subject:* Re: [Xen-devel] [PATCH 2/2] graphics passthrough with VT-dAfter applying the 1st and 2nd patch to xen-unstable successfully, I examined the source codes
Makefileandhvmloader.cintools/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:29:12.763299633 +0800 renamed from Makefile 2009-08-29 03:24:52.413083774 +0800 +1
-0@@ -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.hhvmloader.c 2009-08-29 03:31:43.172084995 +0800 renamed from hvmloader.c 2009-08-29 03:26:06.911085797 +0800 +3
-3@@ -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?
Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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.
Seehttp://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 filetools/firmware/hvmloader/hvmloader.c
Hunk #1 FAILED at 688.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/hvmloader.c.rejNow patching
tools/firmware/hvmloader/Makefileis successful but patchingtools/firmware/hvmloader/hvmloader.cstill failed.Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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
494be76c1ad9tools/firmware/hvmloader/Makefiletools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800 renamed from tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800 +1
-0@@ -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.hdiff -r
494be76c1ad9tools/firmware/hvmloader/hvmloader.ctools/firmware/hvmloader/hvmloader.c Thu Aug 27 17:23:00 2009 +0800 renamed from tools/firmware/hvmloader/hvmloader.c Thu Aug 27 16:54:33 2009 +0800 +3
-3@@ -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.bintools/firmware/vgabios/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# lstools/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]# wgethttp://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 filetools/firmware/hvmloader/config.h
patching filetools/firmware/hvmloader/hvmloader.c
patching filetools/libxc/ia64/xc_ia64_hvm_build.c
patching filetools/libxc/xc_hvm_build.c
patching filetools/libxc/xc_linux.c
patching filetools/libxc/xenctrl.h
patching filetools/libxc/xenguest.h
patching filetools/python/xen/lowlevel/xc/xc.c
patching filetools/python/xen/xend/XendConfig.py
Hunk #1 succeeded at 174 (offset -1 lines).
patching filetools/python/xen/xend/image.py
Hunk #1 succeeded at 780 (offset -6 lines).
Hunk #3 succeeded at 895 (offset -6 lines).
patching filetools/python/xen/xm/create.py
[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# wgethttp://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.patchtools/ioemu-remote/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cdtools/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 filehw/pass-through.h
patching filehw/pc.c
patching filevl.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 filetools/firmware/hvmloader/Makefile
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/Makefile.rejpatching filetools/firmware/hvmloader/hvmloader.c
patch: **** malformed patch at line 24:sizeof(vgabios_pt));Quoted 86 lines
[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!!!
Signature · 71 lines
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:[email protected] <mailto:[email protected]> 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<[email protected]> <mailto:[email protected]> Signed-off-by: Weidong Han<[email protected]> <mailto:[email protected]> 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 [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel ------------------------------------------------------------------------ _______________________________________________ Xen-devel mailing list [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Tim Moore
AppliedTeo,
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:[email protected]]
Sent: 29 August 2009 14:21
To: [email protected]
Cc: Tim Moore; [email protected]
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
Email #2: [email protected]<mailto:[email protected]>
MSN: [email protected]<mailto:[email protected]>
Mobile Phone: +65-9648-9798
ssdt_pm.h 2009-08-29 19:56:51.813088550 +0800 renamed from ssdt_pm.h 2009-08-29 19:54:52.653088000 +0800 +1 -1
@@ -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:57:27.896638884 +0800 renamed from ssdt_tpm.h 2009-08-29 19:55:44.578738954 +0800 +1 -1
@@ -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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Mr. Teo En Ming (Zhang Enming)
Sent: 28 August 2009 21:14
To: [email protected]<mailto:[email protected]>
Cc: [email protected]<mailto:[email protected]>; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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
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
[email protected]<mailto:[email protected]>
http://lists.xensource.com/xen-devel
________________________________
_______________________________________________
Xen-devel mailing list
[email protected]<mailto:[email protected]>
http://lists.xensource.com/xen-devel
________________________________
_______________________________________________
Xen-devel mailing list
[email protected]<mailto:[email protected]>
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
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.
Signature · 11 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 696 lines · Tim Moore
Teo,
Did you rename your Nvidia BIOS and copy it into the hvmloader source tree as required ?
It should get compiled into
roms.hin 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:[email protected]] *Sent:* 29 August 2009 14:21
*To:* [email protected]
*Cc:* Tim Moore; [email protected]
*Subject:* Re: [Xen-devel] graphics passthrough with VT-dDear 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.patchand 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_idecho "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/bindI 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.
Signature · 11 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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.handssdt_tpm.hin source directorytools/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.hcontains:/*
*
* 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.hcontains:/*
*
* 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: [email protected] <mailto:[email protected]>
Email #2: [email protected] <mailto:[email protected]>
MSN: [email protected] <mailto:[email protected]>
Mobile Phone: +65-9648-9798ssdt_pm.h 2009-08-29 19:56:51.813088550 +0800 renamed from ssdt_pm.h 2009-08-29 19:54:52.653088000 +0800 +1
-1@@ -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:57:27.896638884 +0800 renamed from ssdt_tpm.h 2009-08-29 19:55:44.578738954 +0800 +1
-1@@ -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>
Signature · 11 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 08/29/2009 07:03 PM, Mr. Teo En Ming (Zhang Enming) wrote:
Hi,
I clonedhttp://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.aslIntel ACPI Component Architecture
ASL Optimizing Compiler version 20090730 [Aug 29 2009] Copyright (C) 2000 - 2009 Intel Corporation Supports ACPI Specification Revision 4.0ASL Input: ssdt_tpm.asl - 31 lines, 1111 bytes, 3 keywords AML Output: SSDT_TPM.aml - 76 bytes, 3 named objects, 0 executable opcodesCompilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations
mv ssdt_tpm.hexssdt_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.aslIntel ACPI Component Architecture
ASL Optimizing Compiler version 20090730 [Aug 29 2009] Copyright (C) 2000 - 2009 Intel Corporation Supports ACPI Specification Revision 4.0ASL Input: ssdt_pm.asl - 425 lines, 12754 bytes, 192 keywords AML Output: SSDT_PM.aml - 1494 bytes, 64 named objects, 128 executable opcodesCompilation complete. 0 Errors, 0 Warnings, 0 Remarks, 31 Optimizations
mv ssdt_pm.hexssdt_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.obuild.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 herebuild.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 2Any ideas about this Advanced Configuration and Power Interface code?
Signature · 11 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 08/29/2009 02:58 PM, Mr. Teo En Ming (Zhang Enming) wrote:
Hi
Anybody available today? I know it's Saturday. :-)
Signature · 11 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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.cbuild.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 2There is an undeclared identifier in
tools/firmware/hvmloader/acpi/build.csource 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.
Signature · 11 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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?
Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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:* [email protected] <mailto:[email protected]> [mailto:[email protected]] *On Behalf Of *Mr. Teo En Ming (Zhang Enming)
*Sent:* 28 August 2009 21:14
*To:* [email protected] <mailto:[email protected]>
*Cc:* [email protected] <mailto:[email protected]>; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected] <mailto:[email protected]>; [email protected] <mailto:[email protected]>; [email protected] <mailto:[email protected]> *Subject:* Re: [Xen-devel] [PATCH 2/2] graphics passthrough with VT-dAfter applying the 1st and 2nd patch to xen-unstable successfully, I examined the source codes
Makefileandhvmloader.cintools/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:29:12.763299633 +0800 renamed from Makefile 2009-08-29 03:24:52.413083774 +0800 +1
-0@@ -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.hhvmloader.c 2009-08-29 03:31:43.172084995 +0800 renamed from hvmloader.c 2009-08-29 03:26:06.911085797 +0800 +3
-3@@ -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?
Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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.
Seehttp://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 filetools/firmware/hvmloader/hvmloader.c
Hunk #1 FAILED at 688.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/hvmloader.c.rejNow patching
tools/firmware/hvmloader/Makefileis successful but patchingtools/firmware/hvmloader/hvmloader.cstill failed.Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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
494be76c1ad9tools/firmware/hvmloader/Makefiletools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800 renamed from tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800 +1
-0@@ -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.hdiff -r
494be76c1ad9tools/firmware/hvmloader/hvmloader.ctools/firmware/hvmloader/hvmloader.c Thu Aug 27 17:23:00 2009 +0800 renamed from tools/firmware/hvmloader/hvmloader.c Thu Aug 27 16:54:33 2009 +0800 +3
-3@@ -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.bintools/firmware/vgabios/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# lstools/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]# wgethttp://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 filetools/firmware/hvmloader/config.h
patching filetools/firmware/hvmloader/hvmloader.c
patching filetools/libxc/ia64/xc_ia64_hvm_build.c
patching filetools/libxc/xc_hvm_build.c
patching filetools/libxc/xc_linux.c
patching filetools/libxc/xenctrl.h
patching filetools/libxc/xenguest.h
patching filetools/python/xen/lowlevel/xc/xc.c
patching filetools/python/xen/xend/XendConfig.py
Hunk #1 succeeded at 174 (offset -1 lines).
patching filetools/python/xen/xend/image.py
Hunk #1 succeeded at 780 (offset -6 lines).
Hunk #3 succeeded at 895 (offset -6 lines).
patching filetools/python/xen/xm/create.py
[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# wgethttp://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.patchtools/ioemu-remote/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cdtools/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 filehw/pass-through.h
patching filehw/pc.c
patching filevl.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 filetools/firmware/hvmloader/Makefile
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/Makefile.rejpatching filetools/firmware/hvmloader/hvmloader.c
patch: **** malformed patch at line 24:sizeof(vgabios_pt));
Quoted 111 lines
[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!!!
Signature · 100 lines
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:[email protected] <mailto:[email protected]> 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<[email protected]> <mailto:[email protected]> Signed-off-by: Weidong Han<[email protected]> <mailto:[email protected]> 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 [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel ------------------------------------------------------------------------ _______________________________________________ Xen-devel mailing list [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel ------------------------------------------------------------------------ _______________________________________________ Xen-devel mailing list [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
I am wondering if there are any cheap consumer ATI PCIe x16 graphics card that does not depend on 1:1 BAR mapping?
Signature · 11 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 878 lines · Mr. Teo En Ming (Zhang Enming)
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.
Signature · 11 lines
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:[email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 737 lines · Tim Moore
Teo,
Did you rename your Nvidia BIOS and copy it into the hvmloader source tree as required ?
It should get compiled into
roms.hin 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:[email protected]] *Sent:* 29 August 2009 14:21
*To:* [email protected]
*Cc:* Tim Moore; [email protected]
*Subject:* Re: [Xen-devel] graphics passthrough with VT-dDear 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.patchand 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_idecho "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/bindI 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.
Signature · 11 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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.handssdt_tpm.hin source directorytools/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.hcontains:/*
*
* 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.hcontains:/*
*
* 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: [email protected] <mailto:[email protected]>
Email #2: [email protected] <mailto:[email protected]>
MSN: [email protected] <mailto:[email protected]>
Mobile Phone: +65-9648-9798ssdt_pm.h 2009-08-29 19:56:51.813088550 +0800 renamed from ssdt_pm.h 2009-08-29 19:54:52.653088000 +0800 +1
-1@@ -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:57:27.896638884 +0800 renamed from ssdt_tpm.h 2009-08-29 19:55:44.578738954 +0800 +1
-1@@ -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>
Signature · 11 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 08/29/2009 07:03 PM, Mr. Teo En Ming (Zhang Enming) wrote:
Hi,
I clonedhttp://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.aslIntel ACPI Component Architecture
ASL Optimizing Compiler version 20090730 [Aug 29 2009] Copyright (C) 2000 - 2009 Intel Corporation Supports ACPI Specification Revision 4.0ASL Input: ssdt_tpm.asl - 31 lines, 1111 bytes, 3 keywords AML Output: SSDT_TPM.aml - 76 bytes, 3 named objects, 0 executable opcodesCompilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations
mv ssdt_tpm.hexssdt_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.aslIntel ACPI Component Architecture
ASL Optimizing Compiler version 20090730 [Aug 29 2009] Copyright (C) 2000 - 2009 Intel Corporation Supports ACPI Specification Revision 4.0ASL Input: ssdt_pm.asl - 425 lines, 12754 bytes, 192 keywords AML Output: SSDT_PM.aml - 1494 bytes, 64 named objects, 128 executable opcodesCompilation complete. 0 Errors, 0 Warnings, 0 Remarks, 31 Optimizations
mv ssdt_pm.hexssdt_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.obuild.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 herebuild.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 2Any ideas about this Advanced Configuration and Power Interface code?
Signature · 11 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 08/29/2009 02:58 PM, Mr. Teo En Ming (Zhang Enming) wrote:
Hi
Anybody available today? I know it's Saturday. :-)
Signature · 11 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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.cbuild.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 2There is an undeclared identifier in
tools/firmware/hvmloader/acpi/build.csource 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.
Signature · 11 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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?
Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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:* [email protected] <mailto:[email protected]> [mailto:[email protected]] *On Behalf Of *Mr. Teo En Ming (Zhang Enming)
*Sent:* 28 August 2009 21:14
*To:* [email protected] <mailto:[email protected]>
*Cc:* [email protected] <mailto:[email protected]>; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected] <mailto:[email protected]>; [email protected] <mailto:[email protected]>; [email protected] <mailto:[email protected]> *Subject:* Re: [Xen-devel] [PATCH 2/2] graphics passthrough with VT-dAfter applying the 1st and 2nd patch to xen-unstable successfully, I examined the source codes
Makefileandhvmloader.cintools/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:29:12.763299633 +0800 renamed from Makefile 2009-08-29 03:24:52.413083774 +0800 +1
-0@@ -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.hhvmloader.c 2009-08-29 03:31:43.172084995 +0800 renamed from hvmloader.c 2009-08-29 03:26:06.911085797 +0800 +3
-3@@ -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?
Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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.
Seehttp://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 filetools/firmware/hvmloader/hvmloader.c
Hunk #1 FAILED at 688.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/hvmloader.c.rejNow patching
tools/firmware/hvmloader/Makefileis successful but patchingtools/firmware/hvmloader/hvmloader.cstill failed.Signature · 10 lines
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:[email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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
494be76c1ad9tools/firmware/hvmloader/Makefiletools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800 renamed from tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800 +1
-0@@ -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.hdiff -r
494be76c1ad9tools/firmware/hvmloader/hvmloader.ctools/firmware/hvmloader/hvmloader.c Thu Aug 27 17:23:00 2009 +0800 renamed from tools/firmware/hvmloader/hvmloader.c Thu Aug 27 16:54:33 2009 +0800 +3
-3@@ -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.bintools/firmware/vgabios/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# lstools/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]# wgethttp://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 filetools/firmware/hvmloader/config.h
patching filetools/firmware/hvmloader/hvmloader.c
patching filetools/libxc/ia64/xc_ia64_hvm_build.c
patching filetools/libxc/xc_hvm_build.c
patching filetools/libxc/xc_linux.c
patching filetools/libxc/xenctrl.h
patching filetools/libxc/xenguest.h
patching filetools/python/xen/lowlevel/xc/xc.c
patching filetools/python/xen/xend/XendConfig.py
Hunk #1 succeeded at 174 (offset -1 lines).
patching filetools/python/xen/xend/image.py
Hunk #1 succeeded at 780 (offset -6 lines).
Hunk #3 succeeded at 895 (offset -6 lines).
patching filetools/python/xen/xm/create.py
[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# wgethttp://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.patchtools/ioemu-remote/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cdtools/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 filehw/pass-through.h
patching filehw/pc.c
patching filevl.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 filetools/firmware/hvmloader/Makefile
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/Makefile.rejpatching filetools/firmware/hvmloader/hvmloader.c
patch: **** malformed patch at line 24:sizeof(vgabios_pt));Quoted 111 lines
[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!!!
Signature · 100 lines
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:[email protected] <mailto:[email protected]> 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<[email protected]> <mailto:[email protected]> Signed-off-by: Weidong Han<[email protected]> <mailto:[email protected]> 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 [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel ------------------------------------------------------------------------ _______________________________________________ Xen-devel mailing list [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel ------------------------------------------------------------------------ _______________________________________________ Xen-devel mailing list [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Han, Weidong
AppliedTeo,
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: [email protected] [mailto:[email protected]] On Behalf Of Mr. Teo En Ming (Zhang Enming)
Sent: 2009年8月29日 22:13
To: [email protected]
Cc: [email protected]
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: [email protected]<mailto:[email protected]>
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:[email protected]]
Sent: 29 August 2009 14:21
To: [email protected]<mailto:[email protected]>
Cc: Tim Moore; [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
Email #2: [email protected]<mailto:[email protected]>
MSN: [email protected]<mailto:[email protected]>
Mobile Phone: +65-9648-9798
ssdt_pm.h 2009-08-29 19:56:51.813088550 +0800 renamed from ssdt_pm.h 2009-08-29 19:54:52.653088000 +0800 +1 -1
@@ -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:57:27.896638884 +0800 renamed from ssdt_tpm.h 2009-08-29 19:55:44.578738954 +0800 +1 -1
@@ -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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Mr. Teo En Ming (Zhang Enming)
Sent: 28 August 2009 21:14
To: [email protected]<mailto:[email protected]>
Cc: [email protected]<mailto:[email protected]>; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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
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
[email protected]<mailto:[email protected]>
http://lists.xensource.com/xen-devel
________________________________
_______________________________________________
Xen-devel mailing list
[email protected]<mailto:[email protected]>
http://lists.xensource.com/xen-devel
________________________________
_______________________________________________
Xen-devel mailing list
[email protected]<mailto:[email protected]>
http://lists.xensource.com/xen-devel
tools/firmware/hvmloader/Makefile +1 -0
@@ -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
tools/firmware/hvmloader/hvmloader.c +10 -2
@@ -115,6 +115,9 @@ unsigned long pci_mem_end = PCI_MEM_END;static enum { VGA_none, VGA_std, VGA_cirrus, VGA_pt } virtual_vga = VGA_none; +/* virtual BDF of pass-throughed gfx */ +static uint8_t gfx_bdf; +static void init_hypercalls (void ) {uint32_t eax, ebx, ecx, edx;
@@ -215,7 +218,10 @@ static void pci_setup(void)else if ( (vendor_id ==0x1013 ) && (device_id ==0xb8 ) ) virtual_vga = VGA_cirrus;else + { virtual_vga = VGA_pt; + gfx_bdf = devfn; + }break ;case 0x0680 :/* PIIX4 ACPI PM. Special device with special PCI config space. */
@@ -689,8 +695,10 @@ int main(void)break ;case VGA_pt:printf ("Loading VGABIOS of passthroughed gfx ...\n" ); - vgabios_sz = -round_option_rom ((*(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS +2 )) *512 ); +memcpy ((void *)VGABIOS_PHYSICAL_ADDRESS , + vgabios_pt,sizeof (vgabios_pt)); + *(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS +sizeof (vgabios_pt)) = gfx_bdf; + vgabios_sz =round_option_rom (sizeof (vgabios_pt) +1 );break ;default :printf ("No emulated VGA adaptor ...\n" );
tools/firmware/hvmloader/acpi/dsdt.asl +28 -0
@@ -175,6 +175,34 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, 0x000BFFFF, 0x00000000, 0x00020000) + + /* reserve MMIO BARs of gfx for 1:1 mapping */ + DWordMemory( + ResourceProducer, PosDecode, MinFixed, MaxFixed, + Cacheable, ReadWrite, + 0x00000000, + 0xE0000000, + 0xEFFFFFFF, + 0x00000000, + 0x10000000) + + DWordMemory( + ResourceProducer, PosDecode, MinFixed, MaxFixed, + NonCacheable, ReadWrite, + 0x00000000, + 0xC0000000, + 0xC1FFFFFF, + 0x00000000, + 0x02000000) + + DWordMemory( + ResourceProducer, PosDecode, MinFixed, MaxFixed, + NonCacheable, ReadWrite, + 0x00000000, + 0xC2000000, + 0xC2FFFFFF, + 0x00000000, + 0x01000000) DWordMemory( ResourceProducer, PosDecode, MinFixed, MaxFixed,
tools/firmware/hvmloader/hvmloader.c +34 -0
@@ -221,6 +221,40 @@ static void pci_setup(void) { virtual_vga = VGA_pt; gfx_bdf = devfn; + +/* Make vBAR=pBAR */ +printf ("Make vBAR = pBAR of assigned gfx\n" ); +for ( bar =0 ; bar <7 ; bar++ ) + { + bar_reg =PCI_BASE_ADDRESS_0 +4 *bar; +if ( bar ==6 ) + bar_reg =PCI_ROM_ADDRESS ; +/* When first time read, it will return physical address */ + bar_data =pci_readl (devfn, bar_reg); +pci_writel (devfn, bar_reg, bar_data); + +/* Now enable the memory or I/O mapping. */ + cmd =pci_readw (devfn,PCI_COMMAND ); +if ( (bar_reg ==PCI_ROM_ADDRESS ) || + ((bar_data &PCI_BASE_ADDRESS_SPACE ) == +PCI_BASE_ADDRESS_SPACE_MEMORY ) ) + cmd |=PCI_COMMAND_MEMORY ; +else + cmd |=PCI_COMMAND_IO ; + cmd |=PCI_COMMAND_MASTER ; +pci_writew (devfn,PCI_COMMAND , cmd); + } + +/* Map the interrupt. */ + pin =pci_readb (devfn,PCI_INTERRUPT_PIN ); +if ( pin !=0 ) + { +/* This is the barber's pole mapping used by Xen. */ + link = ((pin -1 ) + (devfn >>3 )) &3 ; + isa_irq =pci_readb (PCI_ISA_DEVFN ,0x60 + link); +pci_writeb (devfn,PCI_INTERRUPT_LINE , isa_irq); + } +continue ; }break ;case 0x0680 :
From 9cf295ed48542ce58a6484d64d45ba9a35d311fd Mon Sep 17 00:00:00 2001
From: Weidong Han <[email protected]>
Date: Mon, 31 Aug 2009 16:10:03 +0800
Subject: [PATCH] qemu change for vBAR=pBAR
--- hw/pass-through.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
hw/pass-through.c +11 -0
@@ -3174,6 +3174,7 @@ static int pt_cmd_reg_read(struct pt_dev *ptdev, }/* read BAR */ +static int gfx_first_read_BAR[7 ] = {1 ,1 ,1 ,1 ,1 ,1 ,1 };static int pt_bar_reg_read (struct pt_dev *ptdev,struct pt_reg_tbl *cfg_entry,uint32_t *value,uint32_t valid_mask)
@@ -3196,6 +3197,16 @@ static int pt_bar_reg_read(struct pt_dev *ptdev,/* use fixed-up value from kernel sysfs */ *value = ptdev->pci_dev->base_addr[index]; +if ( ptdev->pci_dev->device_class ==0x300 ) + { +if ( gfx_first_read_BAR[index] ==1 ) + { + gfx_first_read_BAR[index] =0 ; +PT_LOG ("first read BARs of gfx\n" ); +return 0 ; + } + } +/* set emulate mask depend on BAR flag */ switch (ptdev->bases[index].bar_flag) {
Signature · 1 line
1.6.0.4
From 76d1d7aaedfc1ca450503ae77e19dce48db3bbba Mon Sep 17 00:00:00 2001
From: Weidong Han <[email protected]>
Date: Mon, 31 Aug 2009 16:30:25 +0800
Subject: [PATCH] claim vga cycle for secondary gfx passthrough
--- hw/pass-through.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 76 insertions(+), 0 deletions(-)
hw/pass-through.c +76 -0
88 lines not on this page · raw message
Signature · 1 line
1.6.0.4
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Dear Weidong,
Thank you for releasing the experimental patches for vga passthrough.
I have patched xen-unstable with your initial 2 patches and the patches which you released today.
However, it can't work. It caused my Dom 0 to crash and Dom U cannot start.
Signature · 11 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 30 lines · Weidong
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:* [email protected] [mailto:[email protected]] *On Behalf Of *Mr. Teo En Ming (Zhang Enming)
*Sent:* 2009年8月29日 22:13
*To:* [email protected]
*Cc:* [email protected]
*Subject:* Re: [Xen-devel] graphics passthrough with VT-d
Quoted 898 lines
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.
Signature · 11 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of SingaporeQuoted 761 lines · Tim Moore
Teo,
Did you rename your Nvidia BIOS and copy it into the hvmloader source tree as required ?
It should get compiled into
roms.hin 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:[email protected]]
*Sent:* 29 August 2009 14:21
*To:* [email protected]
*Cc:* Tim Moore; [email protected] *Subject:* Re: [Xen-devel] graphics passthrough with VT-dDear 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.patchand 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_idecho "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/bindI 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.
Signature · 11 lines
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: [email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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.handssdt_tpm.hin source directorytools/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.hcontains:/*
*
* 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.hcontains:/*
*
* 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: [email protected] <mailto:[email protected]> Email #2: [email protected] <mailto:[email protected]>
MSN: [email protected] <mailto:[email protected]> Mobile Phone: +65-9648-9798ssdt_pm.h 2009-08-29 19:56:51.813088550 +0800 renamed from ssdt_pm.h 2009-08-29 19:54:52.653088000 +0800 +1
-1@@ -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:57:27.896638884 +0800 renamed from ssdt_tpm.h 2009-08-29 19:55:44.578738954 +0800 +1
-1@@ -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>
Signature · 11 lines
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: [email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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.aslIntel ACPI Component Architecture
ASL Optimizing Compiler version 20090730 [Aug 29 2009] Copyright (C) 2000 - 2009 Intel Corporation Supports ACPI Specification Revision 4.0ASL Input: ssdt_tpm.asl - 31 lines, 1111 bytes, 3 keywords AML Output: SSDT_TPM.aml - 76 bytes, 3 named objects, 0 executable opcodesCompilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations
mv ssdt_tpm.hexssdt_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.aslIntel ACPI Component Architecture
ASL Optimizing Compiler version 20090730 [Aug 29 2009] Copyright (C) 2000 - 2009 Intel Corporation Supports ACPI Specification Revision 4.0ASL Input: ssdt_pm.asl - 425 lines, 12754 bytes, 192 keywords AML Output: SSDT_PM.aml - 1494 bytes, 64 named objects, 128 executable opcodesCompilation complete. 0 Errors, 0 Warnings, 0 Remarks, 31 Optimizations
mv ssdt_pm.hexssdt_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.obuild.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 herebuild.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 2Any ideas about this Advanced Configuration and Power Interface code?
Signature · 11 lines
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: [email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 08/29/2009 02:58 PM, Mr. Teo En Ming (Zhang Enming) wrote:
Hi
Anybody available today? I know it's Saturday. :-)
Signature · 11 lines
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: [email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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.cbuild.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 2There is an undeclared identifier in
tools/firmware/hvmloader/acpi/build.csource 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.
Signature · 11 lines
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: [email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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?
Signature · 10 lines
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: [email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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:* [email protected] <mailto:[email protected]> [mailto:[email protected]] *On Behalf Of *Mr. Teo En Ming (Zhang Enming)
*Sent:* 28 August 2009 21:14
*To:* [email protected] <mailto:[email protected]> *Cc:* [email protected] <mailto:[email protected]>; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected] <mailto:[email protected]>; [email protected] <mailto:[email protected]>; [email protected] <mailto:[email protected]>
*Subject:* Re: [Xen-devel] [PATCH 2/2] graphics passthrough with VT-dAfter applying the 1st and 2nd patch to xen-unstable successfully, I examined the source codes
Makefileandhvmloader.cintools/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:29:12.763299633 +0800 renamed from Makefile 2009-08-29 03:24:52.413083774 +0800 +1
-0@@ -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.hhvmloader.c 2009-08-29 03:31:43.172084995 +0800 renamed from hvmloader.c 2009-08-29 03:26:06.911085797 +0800 +3
-3@@ -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?
Signature · 10 lines
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: [email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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 filetools/firmware/hvmloader/hvmloader.c
Hunk #1 FAILED at 688.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/hvmloader.c.rejNow patching
tools/firmware/hvmloader/Makefileis successful but patchingtools/firmware/hvmloader/hvmloader.cstill failed.Signature · 10 lines
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: [email protected] <mailto:[email protected]> Alma Maters: Singapore Polytechnic, National University of SingaporeOn 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.htmlI saved the following code
<CODE>
diff -r
494be76c1ad9tools/firmware/hvmloader/Makefiletools/firmware/hvmloader/Makefile Thu Aug 27 17:22:01 2009 +0800 renamed from tools/firmware/hvmloader/Makefile Thu Aug 27 16:54:33 2009 +0800 +1
-0@@ -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.hdiff -r
494be76c1ad9tools/firmware/hvmloader/hvmloader.ctools/firmware/hvmloader/hvmloader.c Thu Aug 27 17:23:00 2009 +0800 renamed from tools/firmware/hvmloader/hvmloader.c Thu Aug 27 16:54:33 2009 +0800 +3
-3@@ -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.bintools/firmware/vgabios/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# lstools/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 filetools/firmware/hvmloader/config.h
patching filetools/firmware/hvmloader/hvmloader.c
patching filetools/libxc/ia64/xc_ia64_hvm_build.c
patching filetools/libxc/xc_hvm_build.c
patching filetools/libxc/xc_linux.c
patching filetools/libxc/xenctrl.h
patching filetools/libxc/xenguest.h
patching filetools/python/xen/lowlevel/xc/xc.c
patching filetools/python/xen/xend/XendConfig.py
Hunk #1 succeeded at 174 (offset -1 lines).
patching filetools/python/xen/xend/image.py
Hunk #1 succeeded at 780 (offset -6 lines).
Hunk #3 succeeded at 895 (offset -6 lines).
patching filetools/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.patchtools/ioemu-remote/[root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cdtools/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 filehw/pass-through.h
patching filehw/pc.c
patching filevl.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 filetools/firmware/hvmloader/Makefile
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED -- saving rejects to filetools/firmware/hvmloader/Makefile.rejpatching filetools/firmware/hvmloader/hvmloader.c
patch: **** malformed patch at line 24:sizeof(vgabios_pt));Quoted 111 lines
[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!!!
Signature · 100 lines
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: [email protected] <mailto:[email protected]> 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 <[email protected]> <mailto:[email protected]> Signed-off-by: Weidong Han <[email protected]> <mailto:[email protected]> 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 [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel ------------------------------------------------------------------------ _______________________________________________ Xen-devel mailing list [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel ------------------------------------------------------------------------ _______________________________________________ Xen-devel mailing list [email protected] <mailto:[email protected]> http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
I took a snapshot from xen-unstable and applied those patches. However when trying to create a HVM domU the following error comes up:
# xm create test2.xm Error: local variable 'str' referenced before assignment Using config file "/etc/xen/test2.xm".
And xend-debug.log gives some more info:
[2009-08-31 18:10:23 6189] DEBUG (XendDomainInfo:99) XendDomainInfo.create(['vm', ['name', 'TEST2'], ['memory', 4096], ['vcpus', 8], ['on_xend_start', 'ignore'], ['on_xend_stop', 'ignore'], ['uuid', '06ed00ff-1162-4fc4-b5d8-11993ee4a8c0'], ['image', ['hvm', ['kernel', '/usr/lib/xen/boot/hvmloader'], ['videoram', 4], ['device_model', '/usr/lib/xen/bin/qemu-dm'], ['pae', 1], ['vcpus', 8], ['boot', 'c'], ['fda', ''], ['fdb', ''], ['timer_mode', 1], ['localtime', 0], ['serial', ''], ['stdvga', 0], ['isa', 0], ['nographic', 0], ['soundhw', ''], ['vncunused', 1], ['display', ':0.0'], ['xauthority', '/root/.xauthPdEBhy'], ['rtc_timeoffset', 0], ['monitor', 0], ['acpi', 1], ['apic', 1], ['usb', 0], ['usbdevice', ''], ['keymap', ''], ['pci', [['0x0000', '0x03', '0x00', '0x0', '0x100', [], '03:00.0']]], ['hpet', 0], ['guest_os_type', 'default'], ['hap', 1], ['cpuid', []], ['cpuid_check', []], ['viridian', 0], ['pci_msitranslate', 1], ['vpt_align', 1], ['pci_power_mgmt', 0], ['xen_platform_pci', 1], ['gfx_passthru', 2]]], ['s3_integrity', 1], ['device', ['vbd', ['uname', 'phy:vgtest/test2'], ['dev', 'xvda'], ['mode', 'w']]], ['device', ['pci', ['dev', ['slot', '0x00'], ['domain', '0x0000'], ['key', '03:00.0'], ['bus', '0x03'], ['vdevfn', '0x100'], ['func', '0x0']]]], ['device', ['vif', ['bridge', 'eth0'], ['mac', '00:16:3e:00:00:22'], ['type', 'netfront']]]])
[2009-08-31 18:10:23 6189] DEBUG (XendDomainInfo:2366) XendDomainInfo.constructDomain
[2009-08-31 18:10:23 6189] DEBUG (balloon:181) Balloon: 4101688 KiB free; need 4096; done.
[2009-08-31 18:10:23 6189] ERROR (XendDomainInfo:467) VM start failed Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 452, in start
XendTask.log_progress(0, 30, self._constructDomain)
File "/usr/lib/python2.6/site-packages/xen/xend/XendTask.py", line
209, in log_progress
retval = func(*args, **kwds)
File "/usr/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 2470, in _constructDomain
pci_str = str(pci)
UnboundLocalError: local variable 'str' referenced before assignment
Is this error related to the patches or is something else broken? I have to admit that I've not been using xen-unstable for some time, only release-3.4.1 and recently Xenclient, so I don't know if this is also a problem on unpatched xen-unstable.
The error disappears when I omit the "pci=" line, but obviously this is not a good scenario to test gfx passthrough ;-)
My config file for the test-domU:
kernel = "/usr/lib/xen/boot/hvmloader" builder='hvm'
memory = 4096
name = "TEST2"
vcpus=8
vif = [ 'type=netfront, mac=00:16:3e:ff:ff:22, bridge=eth0' ] disk = [ 'phy:vgtest/test2,xvda,w' ]
#viridian = 1device_model = '/usr/lib/xen/bin/qemu-dm' #boot="cd"
#sdl=0
#opengl=0
#vnc=1
#vnclisten="127.0.0.1"
#vncdisplay=1
#vncpasswd=''
#stdvga=0
gfx_passthru=2
pci=['03:00.0']
Thanks,
Christian
Quoted 24 lines · Weidong
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
I had the same problem with unpatched xen-unstable that was up-to-date this morning. This was simply in trying to pass through a usb controller, to test xen-unstable before I went ahead and applied the gfx passthrough patches.
This seems like a bug in xen-unstable.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Christian Tramnitz
Sent: Monday, August 31, 2009 12:48 PM
To: [email protected]
Subject: [Xen-devel] Re: graphics passthrough with VT-d
I took a snapshot from xen-unstable and applied those patches. However when trying to create a HVM domU the following error comes up:
# xm create test2.xm Error: local variable 'str' referenced before assignment Using config file "/etc/xen/test2.xm".
And xend-debug.log gives some more info:
[2009-08-31 18:10:23 6189] DEBUG (XendDomainInfo:99) XendDomainInfo.create(['vm', ['name', 'TEST2'], ['memory', 4096], ['vcpus', 8], ['on_xend_start', 'ignore'], ['on_xend_stop', 'ignore'], ['uuid', '06ed00ff-1162-4fc4-b5d8-11993ee4a8c0'], ['image', ['hvm', ['kernel', '/usr/lib/xen/boot/hvmloader'], ['videoram', 4], ['device_model', '/usr/lib/xen/bin/qemu-dm'], ['pae', 1], ['vcpus', 8], ['boot', 'c'], ['fda', ''], ['fdb', ''], ['timer_mode', 1], ['localtime', 0], ['serial', ''], ['stdvga', 0], ['isa', 0], ['nographic', 0], ['soundhw', ''], ['vncunused', 1], ['display', ':0.0'], ['xauthority', '/root/.xauthPdEBhy'], ['rtc_timeoffset', 0], ['monitor', 0], ['acpi', 1], ['apic', 1], ['usb', 0], ['usbdevice', ''], ['keymap', ''], ['pci', [['0x0000', '0x03', '0x00', '0x0', '0x100', [], '03:00.0']]], ['hpet', 0], ['guest_os_type', 'default'], ['hap', 1], ['cpuid', []], ['cpuid_check', []], ['viridian', 0], ['pci_msitranslate', 1], ['vpt_align', 1], ['pci_power_mgmt', 0], ['xen_platform_pci', 1], ['gfx_passthru', 2]]], ['s3_integrity', 1], ['device', ['vbd', ['uname', 'phy:vgtest/test2'], ['dev', 'xvda'], ['mode', 'w']]], ['device', ['pci', ['dev', ['slot', '0x00'], ['domain', '0x0000'], ['key', '03:00.0'], ['bus', '0x03'], ['vdevfn', '0x100'], ['func', '0x0']]]], ['device', ['vif', ['bridge', 'eth0'], ['mac', '00:16:3e:00:00:22'], ['type', 'netfront']]]])
[2009-08-31 18:10:23 6189] DEBUG (XendDomainInfo:2366) XendDomainInfo.constructDomain
[2009-08-31 18:10:23 6189] DEBUG (balloon:181) Balloon: 4101688 KiB free; need 4096; done.
[2009-08-31 18:10:23 6189] ERROR (XendDomainInfo:467) VM start failed Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 452, in start
XendTask.log_progress(0, 30, self._constructDomain)
File "/usr/lib/python2.6/site-packages/xen/xend/XendTask.py", line
209, in log_progress
retval = func(*args, **kwds)
File "/usr/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 2470, in _constructDomain
pci_str = str(pci)
UnboundLocalError: local variable 'str' referenced before assignment
Is this error related to the patches or is something else broken? I have to admit that I've not been using xen-unstable for some time, only release-3.4.1 and recently Xenclient, so I don't know if this is also a problem on unpatched xen-unstable.
The error disappears when I omit the "pci=" line, but obviously this is not a good scenario to test gfx passthrough ;-)
My config file for the test-domU:
kernel = "/usr/lib/xen/boot/hvmloader" builder='hvm'
memory = 4096
name = "TEST2"
vcpus=8
vif = [ 'type=netfront, mac=00:16:3e:ff:ff:22, bridge=eth0' ] disk = [ 'phy:vgtest/test2,xvda,w' ]
#viridian = 1device_model = '/usr/lib/xen/bin/qemu-dm' #boot="cd"
#sdl=0
#opengl=0
#vnc=1
#vnclisten="127.0.0.1"
#vncdisplay=1
#vncpasswd=''
#stdvga=0
gfx_passthru=2
pci=['03:00.0']
Thanks,
Christian
Quoted 3 lines · Weidong
Teo,
I attached some experimental patches for you to try to sthorugh
Geforce
Quoted 17 lines
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
...
Quoted 4 lines
Regards,
Weidong
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
This is probably due to c/s 20137 and now fixed by c/s 20141.
Thanks,
Keir
Quoted 133 lines · On 31/08/2009 18:03, "[email protected]" <[email protected]> wrote:
I had the same problem with unpatched xen-unstable that was up-to-date this morning. This was simply in trying to pass through a usb controller, to test xen-unstable before I went ahead and applied the gfx passthrough patches.
This seems like a bug in xen-unstable.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Christian Tramnitz
Sent: Monday, August 31, 2009 12:48 PM
To: [email protected]
Subject: [Xen-devel] Re: graphics passthrough with VT-dI took a snapshot from xen-unstable and applied those patches. However when trying to create a HVM domU the following error comes up:
# xm create test2.xm Error: local variable 'str' referenced before assignment Using config file "/etc/xen/test2.xm".And xend-debug.log gives some more info:
[2009-08-31 18:10:23 6189] DEBUG (XendDomainInfo:99) XendDomainInfo.create(['vm', ['name', 'TEST2'], ['memory', 4096], ['vcpus', 8], ['on_xend_start', 'ignore'], ['on_xend_stop', 'ignore'], ['uuid', '06ed00ff-1162-4fc4-b5d8-11993ee4a8c0'], ['image', ['hvm', ['kernel', '/usr/lib/xen/boot/hvmloader'], ['videoram', 4], ['device_model', '/usr/lib/xen/bin/qemu-dm'], ['pae', 1], ['vcpus', 8], ['boot', 'c'], ['fda', ''], ['fdb', ''], ['timer_mode', 1], ['localtime', 0], ['serial', ''], ['stdvga', 0], ['isa', 0], ['nographic', 0], ['soundhw', ''], ['vncunused', 1], ['display', ':0.0'], ['xauthority', '/root/.xauthPdEBhy'], ['rtc_timeoffset', 0], ['monitor', 0], ['acpi', 1], ['apic', 1], ['usb', 0], ['usbdevice', ''], ['keymap', ''], ['pci', [['0x0000', '0x03', '0x00', '0x0', '0x100', [], '03:00.0']]], ['hpet', 0], ['guest_os_type', 'default'], ['hap', 1], ['cpuid', []], ['cpuid_check', []], ['viridian', 0], ['pci_msitranslate', 1], ['vpt_align', 1], ['pci_power_mgmt', 0], ['xen_platform_pci', 1], ['gfx_passthru', 2]]], ['s3_integrity', 1], ['device', ['vbd', ['uname', 'phy:vgtest/test2'], ['dev', 'xvda'], ['mode', 'w']]], ['device', ['pci', ['dev', ['slot', '0x00'], ['domain', '0x0000'], ['key', '03:00.0'], ['bus', '0x03'], ['vdevfn', '0x100'], ['func', '0x0']]]], ['device', ['vif', ['bridge', 'eth0'], ['mac', '00:16:3e:00:00:22'], ['type', 'netfront']]]])
[2009-08-31 18:10:23 6189] DEBUG (XendDomainInfo:2366) XendDomainInfo.constructDomain
[2009-08-31 18:10:23 6189] DEBUG (balloon:181) Balloon: 4101688 KiB free; need 4096; done.
[2009-08-31 18:10:23 6189] ERROR (XendDomainInfo:467) VM start failed Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 452, in start
XendTask.log_progress(0, 30, self._constructDomain)
File "/usr/lib/python2.6/site-packages/xen/xend/XendTask.py", line
209, inlog_progress
retval =func(*args, **kwds)
File "/usr/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 2470, in_constructDomain
pci_str= str(pci)
UnboundLocalError: local variable 'str' referenced before assignmentIs this error related to the patches or is something else broken? I have to admit that I've not been using xen-unstable for some time, only release-3.4.1 and recently Xenclient, so I don't know if this is also a problem on unpatched xen-unstable.
The error disappears when I omit the "pci=" line, but obviously this is not a good scenario to test gfx passthrough ;-)My config file for the test-domU:
kernel = "/usr/lib/xen/boot/hvmloader" builder='hvm'
memory = 4096
name = "TEST2"
vcpus=8
vif = [ 'type=netfront, mac=00:16:3e:ff:ff:22, bridge=eth0' ] disk = [ 'phy:vgtest/test2,xvda,w' ]
#viridian = 1device_model= '/usr/lib/xen/bin/qemu-dm' #boot="cd"
#sdl=0
#opengl=0
#vnc=1
#vnclisten="127.0.0.1"
#vncdisplay=1
#vncpasswd=''
#stdvga=0
gfx_passthru=2
pci=['03:00.0']Thanks,
ChristianQuoted 3 lines · Weidong
Teo,
I attached some experimental patches for you to try to sthorugh
Geforce
Quoted 17 lines
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...
Quoted 4 lines
Regards,
Weidong_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hi Guys,
Do you have any success after applying Weidong's gfx passthrough and 1:1 bar mapping patches to xen-unstable?
Signature · 11 lines
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: [email protected] Alma Maters: Singapore Polytechnic, National University of Singapore
Quoted 154 lines · Keir Fraser
This is probably due to c/s 20137 and now fixed by c/s 20141.
Thanks,
KeirQuoted 134 lines · On 31/08/2009 18:03, "[email protected]"<[email protected]> wrote:
I had the same problem with unpatched xen-unstable that was up-to-date this morning. This was simply in trying to pass through a usb controller, to test xen-unstable before I went ahead and applied the gfx passthrough patches.
This seems like a bug in xen-unstable.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Christian Tramnitz
Sent: Monday, August 31, 2009 12:48 PM
To: [email protected]
Subject: [Xen-devel] Re: graphics passthrough with VT-dI took a snapshot from xen-unstable and applied those patches. However when trying to create a HVM domU the following error comes up:
# xm create test2.xm Error: local variable 'str' referenced before assignment Using config file "/etc/xen/test2.xm".And xend-debug.log gives some more info:
[2009-08-31 18:10:23 6189] DEBUG (XendDomainInfo:99) XendDomainInfo.create(['vm', ['name', 'TEST2'], ['memory', 4096], ['vcpus', 8], ['on_xend_start', 'ignore'], ['on_xend_stop', 'ignore'], ['uuid', '06ed00ff-1162-4fc4-b5d8-11993ee4a8c0'], ['image', ['hvm', ['kernel', '/usr/lib/xen/boot/hvmloader'], ['videoram', 4], ['device_model', '/usr/lib/xen/bin/qemu-dm'], ['pae', 1], ['vcpus', 8], ['boot', 'c'], ['fda', ''], ['fdb', ''], ['timer_mode', 1], ['localtime', 0], ['serial', ''], ['stdvga', 0], ['isa', 0], ['nographic', 0], ['soundhw', ''], ['vncunused', 1], ['display', ':0.0'], ['xauthority', '/root/.xauthPdEBhy'], ['rtc_timeoffset', 0], ['monitor', 0], ['acpi', 1], ['apic', 1], ['usb', 0], ['usbdevice', ''], ['keymap', ''], ['pci', [['0x0000', '0x03', '0x00', '0x0', '0x100', [], '03:00.0']]], ['hpet', 0], ['guest_os_type', 'default'], ['hap', 1], ['cpuid', []], ['cpuid_check', []], ['viridian', 0], ['pci_msitranslate', 1], ['vpt_align', 1], ['pci_power_mgmt', 0], ['xen_platform_pci', 1], ['gfx_passthru', 2]]], ['s3_integrity', 1], ['device', ['vbd', ['uname', 'phy:vgtest/test2'], ['dev', 'xvda'], ['mode', 'w']]], ['device', ['pci', ['dev', ['slot', '0x00'], ['domain', '0x0000'], ['key', '03:00.0'], ['bus', '0x03'], ['vdevfn', '0x100'], ['func', '0x0']]]], ['device', ['vif', ['bridge', 'eth0'], ['mac', '00:16:3e:00:00:22'], ['type', 'netfront']]]])
[2009-08-31 18:10:23 6189] DEBUG (XendDomainInfo:2366) XendDomainInfo.constructDomain
[2009-08-31 18:10:23 6189] DEBUG (balloon:181) Balloon: 4101688 KiB free; need 4096; done.
[2009-08-31 18:10:23 6189] ERROR (XendDomainInfo:467) VM start failed Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 452, in start
XendTask.log_progress(0, 30, self._constructDomain)
File "/usr/lib/python2.6/site-packages/xen/xend/XendTask.py", line
209, inlog_progress
retval =func(*args, **kwds)
File "/usr/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 2470, in_constructDomain
pci_str= str(pci)
UnboundLocalError: local variable 'str' referenced before assignmentIs this error related to the patches or is something else broken? I have to admit that I've not been using xen-unstable for some time, only release-3.4.1 and recently Xenclient, so I don't know if this is also a problem on unpatched xen-unstable.
The error disappears when I omit the "pci=" line, but obviously this is not a good scenario to test gfx passthrough ;-)My config file for the test-domU:
kernel = "/usr/lib/xen/boot/hvmloader" builder='hvm'
memory = 4096
name = "TEST2"
vcpus=8
vif = [ 'type=netfront, mac=00:16:3e:ff:ff:22, bridge=eth0' ] disk = [ 'phy:vgtest/test2,xvda,w' ]
#viridian = 1device_model= '/usr/lib/xen/bin/qemu-dm' #boot="cd"
#sdl=0
#opengl=0
#vnc=1
#vnclisten="127.0.0.1"
#vncdisplay=1
#vncpasswd=''
#stdvga=0
gfx_passthru=2
pci=['03:00.0']Thanks,
ChristianQuoted 4 lines · Weidong
Teo,
I attached some experimental patches for you to try to sthorugh
Geforce
Quoted 18 lines
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...
Quoted 5 lines
Regards,
Weidong_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-develQuoted 5 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Actually yes, that helped a lot. And finally some progress on VGA passthrough:
I have a X58 board with two ATI PCIe cards (RV770 and RV370). Currently the RV770 is the primary card that is used during bootup and also with Xorg in dom0 (radeonhd-only no fglrx).
With the latest patches in this thread and a recent Xenclient kernel (haven't tested 2.6.18 in a while) I was able to passthrough the RV370 to a HVM domu, seeing the BIOS boot and the OS loading in text mode and then going into graphics mode.
Windows (both pre-installed images I had and new installation attempts from CD) isn't working yet, telling me I don't have a fully ACPI compliant BIOS and quiting with a BSOD and STOP 0x5A, but I guess thats a minor thing because I've got a stock Knoppix to boot and load in gfx mode on the passthrough graphics card.
I really haven't expected that much progress since I haven't heard about any ATI tests at all for a while. Now I'm looking to get the STOP 0x5A resolved and then passthrough additional devices (USB, Sound, Network, Storage controller) and I'll also try to swap the RV370 and RV770 to get some 3D performance into the HVM domU.
Observations so far:
- when creating the domU while I'm in text mode the dom0 stalls. It doesn't lock up completely but the terminal and keyboard are frozen. When I create the domU while dom0 is running X everything is fine.
- none of the HVM domU's have picked up the USB bus I tried to passthrough (with keyboard and mouse attached). Not sure if I just passed through the wrong bus or something else is broken
- after a domU is stopped it will still show the last image on the passthrough gfx card (Knoppix desktop or Windows BSOD in my case)
- after a couple of restarts (xm destroy/ the hard way due to lack of mouse/keyboard in domU) the secondary ATI gliteched and only showed a gren screen, had to reboot to get it working again.
- I've tried Windows domUs with and without Viridian enabled, didn't make a difference in regards to the STOP
I'll continue to work on that and keep you posted. Any hints regarding the STOP 0x5A and Keyboard/Mouse passthrough would be much appreciated. (I actually have two keyboards connected, one on legacy PS/2 meant for dom0 and a USB keyboard and USB mouse that I'd like to passthrough)
Best regards,
Christian
Quoted 5 lines · Keir Fraser
This is probably due to c/s 20137 and now fixed by c/s 20141.
Thanks,
Keir
Quoted 22 lines · Christian Tramnitz
Actually yes, that helped a lot. And finally some progress on VGA passthrough:
I have a X58 board with two ATI PCIe cards (RV770 and RV370). Currently the RV770 is the primary card that is used during bootup and also with Xorg in dom0 (radeonhd-only no fglrx).
With the latest patches in this thread and a recent Xenclient kernel (haven't tested 2.6.18 in a while) I was able to passthrough the RV370 to a HVM domu, seeing the BIOS boot and the OS loading in text mode and then going into graphics mode.
Windows (both pre-installed images I had and new installation attempts from CD) isn't working yet, telling me I don't have a fully ACPI compliant BIOS and quiting with a BSOD and STOP0x5A, but I guess thats a minor thing because I've got a stock Knoppix to boot and load in gfx mode on the passthrough graphics card.I really haven't expected that much progress since I haven't heard about any ATI tests at all for a while. Now I'm looking to get the STOP
0x5Aresolved and then passthrough additional devices (USB, Sound, Network, Storage controller) and I'll also try to swap the RV370 and RV770 to get some 3D performance into the HVM domU.
Quoted 4 lines
Observations so far:
- when creating the domU while I'm in text mode the dom0 stalls. It doesn't lock up completely but the terminal and keyboard are frozen. When I create the domU while dom0 is running X everything is fine.
When you passthrough secondary gfx to guest, it needs to claim the VGA cycle for assigned gfx to display guest booting progress. Then primary gfx doesn't own the VGA cycle to display text mode. In your case, pls use X in dom0 or use VNC to access dom0.
Quoted 3 lines
- none of the HVM domU's have picked up the USB bus I tried to passthrough (with keyboard and mouse attached). Not sure if I just passed through the wrong bus or something else is broken
Firstly, make sure you assign the correct USB controllers attached keyboard and mouse to guest. BTW, I found USB controller assignment doesn't work well with pv-ops dom0
Quoted 2 lines
- after a domU is stopped it will still show the last image on the passthrough gfx card (Knoppix desktop or Windows BSOD in my case)
It seems that the gfx card is not reset (FLR).
Quoted 3 lines
- after a couple of restarts (xm destroy/ the hard way due to lack of mouse/keyboard in domU) the secondary ATI gliteched and only showed a gren screen, had to reboot to get it working again.
I think it's still related to gfx reset (FLR).
Regards,
Weidong
Quoted 28 lines
- I've tried Windows domUs with and without Viridian enabled, didn't make a difference in regards to the STOP
I'll continue to work on that and keep you posted. Any hints regarding the STOP
0x5Aand Keyboard/Mouse passthrough would be much appreciated. (I actually have two keyboards connected, one on legacy PS/2 meant for dom0 and a USB keyboard and USB mouse that I'd like to passthrough)Best regards,
ChristianQuoted 5 lines · Keir Fraser
This is probably due to c/s 20137 and now fixed by c/s 20141.
Thanks,
Keir_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 5 lines · Weidong
Quoted 3 lines
- when creating the domU while I'm in text mode the dom0 stalls. It doesn't lock up completely but the terminal and keyboard are frozen. When I create the domU while dom0 is running X everything is fine.
When you passthrough secondary gfx to guest, it needs to claim the VGA cycle for assigned gfx to display guest booting progress. Then primary gfx doesn't own the VGA cycle to display text mode. In your case, pls use X in dom0 or use VNC to access dom0.
Actually I can see the text-mode boot process in domU on the passthrough secondary gfx card, it's just that the console stalls when running "xm create". This doesnt happen using an xterm, but I'm still able to see the text mode boot process (incl BOCHS Bios) on the secondary gfx card.
Quoted 6 lines
Quoted 4 lines
- none of the HVM domU's have picked up the USB bus I tried to passthrough (with keyboard and mouse attached). Not sure if I just passed through the wrong bus or something else is broken
Firstly, make sure you assign the correct USB controllers attached keyboard and mouse to guest. BTW, I found USB controller assignment doesn't work well with pv-ops dom0
I'm using a xenclient kernel, but will simply passthrough *all* USB busses today.
Quoted 5 lines
Quoted 3 lines
- after a domU is stopped it will still show the last image on the passthrough gfx card (Knoppix desktop or Windows BSOD in my case)
It seems that the gfx card is not reset (FLR).
I thought the xenclient kernel has XCI already implemented but then again this might be limited to certain devices (Intel IGD). It's no big deal anyway, just wanted to report it.
I'll continue to work on this patch-set instead of the just posted v2 to be able to passthrough the secondary gfx card and use pBAR-vBAR 1:1 mapping.
Thanks and best regards,
Christian
Quoted 9 lines · Christian Tramnitz
Quoted 8 lines · Weidong
Quoted 3 lines
- when creating the domU while I'm in text mode the dom0 stalls. It doesn't lock up completely but the terminal and keyboard are frozen. When I create the domU while dom0 is running X everything is fine.
When you passthrough secondary gfx to guest, it needs to claim the VGA cycle for assigned gfx to display guest booting progress. Then primary gfx doesn't own the VGA cycle to display text mode. In your case, pls use X in dom0 or use VNC to access dom0.
Quoted 6 lines
Actually I can see the text-mode boot process in domU on the passthrough secondary gfx card, it's just that the console stalls when running "xm create". This doesnt happen using an xterm, but I'm still able to see
the text mode boot process (incl BOCHS Bios) on the secondary gfx card.
Yes, I mean you can see text mode boot process on the secondary gfx card, because it will claim VGA cycle. But at the same time, the primary gfx cannot display in text mode.
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
- none of the HVM domU's have picked up the USB bus I tried to passthrough (with keyboard and mouse attached). Not sure if I just passed through the wrong bus or something else is broken
Quoted 6 lines
Quoted 3 lines
Firstly, make sure you assign the correct USB controllers attached keyboard and mouse to guest. BTW, I found USB controller assignment doesn't work well with pv-ops dom0
I'm using a xenclient kernel, but will simply passthrough *all* USB busses today.
Yes, this is an easy way.
Regards,
Weidong
Quoted 25 lines
Quoted 6 lines
Quoted 4 lines
- after a domU is stopped it will still show the last image on the passthrough gfx card (Knoppix desktop or Windows BSOD in my case)
It seems that the gfx card is not reset (FLR).
I thought the xenclient kernel has XCI already implemented but then again this might be limited to certain devices (Intel IGD). It's no big deal anyway, just wanted to report it.
I'll continue to work on this patch-set instead of the just posted v2 to
be able to passthrough the secondary gfx card and use pBAR-vBAR 1:1 mapping.Thanks and best regards,
Christian_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
FYI, apparently I passed through the wrong usb bus, now with all USB controllers passed through I have keyboard and mouse in HVM domU. Knoppix still boots on secondary gfx cards (and even uses Compiz Fusion on 3D accelerated desktop), but I still can't get Windows to boot.
The STOP code is actually A5 (and not 5A as reported earlier) and indicates an ACPI error of the available PCI resources, MS KB says:
"STOP 0x000000A5"
(0x00000002, Parameter2, Parameter3, Parameter4):
This error is defined as ACPI root PCI resource failure. To discover what current resources are being used by PCI devices, it must be able to query the CRS descriptor in the ACPI namespace. This error occurs because the BIOS lacks a pointer to the list, the list is empty, or contains errors/conflicts.
I haven't seen this before, so its most probably related to the passthrough and not so trivial as I initially assumed.
If I had keyboard access early in the bootup process I could press F7 to get the Standard-PC HAL (non-ACPI), but it seems the Bochs BIOS lacks USB HID support, so I only have the keyboard available when the OS is loading the drivers which is to late for Windows HAL selection...
Any ideas?
Thanks,
Christian
I also cannot get Window HVM Dom U to boot.
Regards,
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering)
Technical Support Engineer
Information Technology Department
Asiasoft Online Pte Ltd
Tampines Central 1 #04-01 Tampines Plaza
Singapore 529541
Republic of Singapore
Mobile: +65-9648-9798
MSN: [email protected]
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Christian Tramnitz
Sent: Wednesday, September 02, 2009 4:39 PM
To: [email protected]
Subject: [Xen-devel] Re: graphics passthrough with VT-d
FYI, apparently I passed through the wrong usb bus, now with all USB controllers passed through I have keyboard and mouse in HVM domU. Knoppix still boots on secondary gfx cards (and even uses Compiz Fusion on 3D accelerated desktop), but I still can't get Windows to boot.
The STOP code is actually A5 (and not 5A as reported earlier) and indicates an ACPI error of the available PCI resources, MS KB says:
"STOP 0x000000A5"
(0x00000002, Parameter2, Parameter3, Parameter4):
This error is defined as ACPI root PCI resource failure. To discover what current resources are being used by PCI devices, it must be able to query the CRS descriptor in the ACPI namespace. This error occurs because the BIOS lacks a pointer to the list, the list is empty, or contains errors/conflicts.
I haven't seen this before, so its most probably related to the passthrough and not so trivial as I initially assumed.
If I had keyboard access early in the bootup process I could press F7 to get the Standard-PC HAL (non-ACPI), but it seems the Bochs BIOS lacks USB HID support, so I only have the keyboard available when the OS is loading the drivers which is to late for Windows HAL selection...
Any ideas?
Thanks,
Christian
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.75/2340 - Release Date: 09/01/09 20:03:00
No virus found in this outgoing message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.75/2340 - Release Date: 09/01/09 20:03:00
I didn't meet this issue. I can passthrough gfx to WinXP guest.
Did you try the same Windows guest without gfx passthrough patches?
Regards,
Weidong
Quoted 39 lines · Christian Tramnitz
FYI, apparently I passed through the wrong usb bus, now with all USB controllers passed through I have keyboard and mouse in HVM domU. Knoppix still boots on secondary gfx cards (and even uses Compiz Fusion on 3D accelerated desktop), but I still can't get Windows to boot.
The STOP code is actually A5 (and not 5A as reported earlier) and indicates an ACPI error of the available PCI resources, MS KB says:
"STOP
0x000000A5"
(0x00000002, Parameter2, Parameter3, Parameter4):
This error is defined as ACPI root PCI resource failure. To discover what current resources are being used by PCI devices, it must be able to query the CRS descriptor in the ACPI namespace. This error occurs because the BIOS lacks a pointer to the list, the list is empty, or contains errors/conflicts.I haven't seen this before, so its most probably related to the passthrough and not so trivial as I initially assumed.
If I had keyboard access early in the bootup process I could press F7 to get the Standard-PC HAL (non-ACPI), but it seems the Bochs BIOS lacks USB HID support, so I only have the keyboard available when the OS is loading the drivers which is to late for Windows HAL selection...
Any ideas?
Thanks,
Christian_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Yes without gfx_passthrough it was working (even the same domU with just USB devices passed through). I think it might be related to the modifications to the memory addresses you mentioned in another post. I'll verify that, recompile and retest.
Best regards,
Christian
Quoted 6 lines · Weidong
I didn't meet this issue. I can passthrough gfx to WinXP guest.
Did you try the same Windows guest without gfx passthrough patches?
Regards,
Weidong
It seems this was unrelated to the gfx_passthrough, I started with "fresh" domU configs and also reinstalled them and now its working WITH gfx_passthrough and USB (the whole controller as pci device) passthrough.
I do have (all as pass-through):
- accelerated video (even survives hardware detection during Win7 installation)
- audio (onboard HDA, using digital output)
- USB (UHCI only, EHCI crashed Windows during HW detection) running Windows 7 x64 (b7600).
I'll now try to swap the primary and secondary gfx (both ATI) to get some real 3D horse-power.
Best regards,
Christian
Quoted 3 lines · Christian Tramnitz
Yes without
gfx_passthroughit was working (even the same domU with just USB devices passed through). I think it might be related to the modifications to the memory addresses you mentioned in another post. I'll verify that, recompile and retest.
Tim Moore
AppliedHi 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
Andpt_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:[email protected]]
Sent: 31 August 2009 09:47
To: '[email protected]'; Tim Moore
Cc: '[email protected]'
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: [email protected] [mailto:[email protected]] On Behalf Of Mr. Teo En Ming (Zhang Enming)
Sent: 2009年8月29日 22:13
To: [email protected]
Cc: [email protected]
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: [email protected]<mailto:[email protected]>
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:[email protected]]
Sent: 29 August 2009 14:21
To: [email protected]<mailto:[email protected]>
Cc: Tim Moore; [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
Email #2: [email protected]<mailto:[email protected]>
MSN: [email protected]<mailto:[email protected]>
Mobile Phone: +65-9648-9798
ssdt_pm.h 2009-08-29 19:56:51.813088550 +0800 renamed from ssdt_pm.h 2009-08-29 19:54:52.653088000 +0800 +1 -1
@@ -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:57:27.896638884 +0800 renamed from ssdt_tpm.h 2009-08-29 19:55:44.578738954 +0800 +1 -1
@@ -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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Mr. Teo En Ming (Zhang Enming)
Sent: 28 August 2009 21:14
To: [email protected]<mailto:[email protected]>
Cc: [email protected]<mailto:[email protected]>; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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
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
[email protected]<mailto:[email protected]>
http://lists.xensource.com/xen-devel
________________________________
_______________________________________________
Xen-devel mailing list
[email protected]<mailto:[email protected]>
http://lists.xensource.com/xen-devel
________________________________
_______________________________________________
Xen-devel mailing list
[email protected]<mailto:[email protected]>
http://lists.xensource.com/xen-devel
domid: 1
qemu: the number of cpus is 1
Discrete graphics card assignment
config qemu network with xen bridge for tap1.0 xenbr0
Watching /local/domain/0/device-model/1/logdirty/next-active
Watching /local/domain/0/device-model/1/command
char device redirected to /dev/pts/1qemu_map_cache_init nr_buckets = 10000 size 4194304
shared page at pfn feffd
buffered io page at pfn feffb
Guest uuid = 3f3da690-84db-e24a-4831-e385fbfe6de3
Time offset set 0
Register xen platform.
Done register platform.xs_read(/vm/3f3da690-84db-e24a-4831-e385fbfe6de3/log-throttling): read errorplatform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state. xs_read(/local/domain/0/device-model/1/xen_extended_power_mgmt): read errorxs_read(): vncpasswd get error. /vm/3f3da690-84db-e24a-4831-e385fbfe6de3/vncpasswd.
medium change watch on `hdc' (index: 1):
I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0
dm-command: hot insert pass-through pci devregister_real_device: Assigning real physical device 03:00.0 ...pt_iomul_init: Error: pt_iomul_init: No such device: setup io multiplexing failed! 0x3:0x0.0x0pt_register_regions: IO region registered (size=0x01000000 base_addr=0xb2000000)pt_register_regions: IO region registered (size=0x20000000 base_addr=0xc000000c)pt_register_regions: IO region registered (size=0x02000000 base_addr=0xb0000004)pt_register_regions: IO region registered (size=0x00000080 base_addr=0x00002001)gfx_claim_vga_cycle: bridge for bus 1, previous bridge control is 0gfx_claim_vga_cycle: bus=0x0, dev=0x1, func=0x0gfx_claim_vga_cycle: bridge for bus 1, updated bridge control is 0gfx_claim_vga_cycle: bridge for bus 2, previous bridge control is 18gfx_claim_vga_cycle: bus=0x0, dev=0x3, func=0x0gfx_claim_vga_cycle: bridge for bus 2, updated bridge control is 0gfx_claim_vga_cycle: bridge for bus 3, previous bridge control is 0gfx_claim_vga_cycle: bus=0x0, dev=0x7, func=0x0gfx_claim_vga_cycle: bridge for bus 3, updated bridge control is 18gfx_claim_vga_cycle: bridge for bus 7, previous bridge control is 0gfx_claim_vga_cycle: bus=0x0, dev=0x1e, func=0x0gfx_claim_vga_cycle: bridge for bus 7, updated bridge control is 0gfx_claim_vga_cycle: previous igd control is d1gfx_claim_vga_cycle: updated igd control is d3pt_msi_setup: msi mapped with pirq 1fregister_real_device: Real physical device 03:00.0 registered successfuly!
IRQ type = MSI-INTxpt_bar_reg_read: first read BARs of gfxpt_iomem_map: e_phys=b2000000 maddr=b2000000 type=0 len=16777216 index=0 first_map=1pt_bar_reg_read: first read BARs of gfxpt_iomem_map: e_phys=c0000000 maddr=c0000000 type=8 len=536870912 index=1 first_map=1pt_bar_reg_read: first read BARs of gfxpt_bar_reg_read: first read BARs of gfxpt_iomem_map: e_phys=b0000000 maddr=b0000000 type=0 len=33554432 index=3 first_map=1pt_bar_reg_read: first read BARs of gfxpt_bar_reg_read: first read BARs of gfxpt_ioport_map: e_phys=2000 pio_base=2000 len=128 index=5 first_map=1pt_pci_write_config: Warning: Guest attempt to set address to unused Base Address Register. [00:04.0][Offset:30h][Length:4]platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state.platform_fixed_ioport: changed ro/rw state of ROM memory area. now is ro state.pt_iomem_map: e_phys=ffffffff maddr=b2000000 type=0 len=16777216 index=0 first_map=0pt_iomem_map: e_phys=ffffffff maddr=c0000000 type=8 len=536870912 index=1 first_map=0pt_iomem_map: e_phys=ffffffff maddr=b0000000 type=0 len=33554432 index=3 first_map=0pt_ioport_map: e_phys=ffff pio_base=2000 len=128 index=5 first_map=0pt_pci_write_config: Warning: Guest attempt to set address to unused Base Address Register. [00:04.0][Offset:30h][Length:4]pt_pci_write_config: Warning: Guest attempt to set address to unused Base Address Register. [00:04.0][Offset:30h][Length:4]pt_iomem_map: e_phys=b2000000 maddr=b2000000 type=0 len=16777216 index=0 first_map=0pt_iomem_map: e_phys=c0000000 maddr=c0000000 type=8 len=536870912 index=1 first_map=0pt_iomem_map: e_phys=b0000000 maddr=b0000000 type=0 len=33554432 index=3 first_map=0pt_ioport_map: e_phys=2000 pio_base=2000 len=128 index=5 first_map=0pt_iomem_map: e_phys=ffffffff maddr=b2000000 type=0 len=16777216 index=0 first_map=0pt_iomem_map: e_phys=ffffffff maddr=c0000000 type=8 len=536870912 index=1 first_map=0pt_iomem_map: e_phys=ffffffff maddr=b0000000 type=0 len=33554432 index=3 first_map=0pt_ioport_map: e_phys=ffff pio_base=2000 len=128 index=5 first_map=0pt_pci_write_config: Warning: Guest attempt to set address to unused Base Address Register. [00:04.0][Offset:30h][Length:4]pt_iomem_map: e_phys=b2000000 maddr=b2000000 type=0 len=16777216 index=0 first_map=0pt_iomem_map: e_phys=c0000000 maddr=c0000000 type=8 len=536870912 index=1 first_map=0pt_iomem_map: e_phys=b0000000 maddr=b0000000 type=0 len=33554432 index=3 first_map=0pt_ioport_map: e_phys=2000 pio_base=2000 len=128 index=5 first_map=0
Warning: attempted read from physical address 0xe0000000 in xen platform mmio spacept_iomem_map: e_phys=ffffffff maddr=b2000000 type=0 len=16777216 index=0 first_map=0pt_iomem_map: e_phys=ffffffff maddr=c0000000 type=8 len=536870912 index=1 first_map=0pt_iomem_map: e_phys=ffffffff maddr=b0000000 type=0 len=33554432 index=3 first_map=0pt_ioport_map: e_phys=ffff pio_base=2000 len=128 index=5 first_map=0pt_iomem_map: e_phys=b2000000 maddr=b2000000 type=0 len=16777216 index=0 first_map=0pt_iomem_map: e_phys=c0000000 maddr=c0000000 type=8 len=536870912 index=1 first_map=0pt_iomem_map: e_phys=b0000000 maddr=b0000000 type=0 len=33554432 index=3 first_map=0pt_ioport_map: e_phys=2000 pio_base=2000 len=128 index=5 first_map=0
Warning: attempted read from physical address 0xe0000000 in xen platform mmio space
[2009-08-31 21:05:08 4851] INFO (SrvDaemon:332) Xend Daemon started
[2009-08-31 21:05:08 4851] INFO (SrvDaemon:336) Xend changeset: Thu Aug 27 11:25:34 2009 +0100 20128:e8004f6c254a.
[2009-08-31 21:05:08 4851] DEBUG (XendDomainInfo:147) XendDomainInfo.recreate({'max_vcpu_id': 7, 'cpu_time': 5873639544L, 'ssidref': 0, 'hvm': 0, 'shutdown_reason': 0, 'dying': 0, 'online_vcpus': 8, 'domid': 0, 'paused': 0, 'crashed': 0, 'running': 1, 'maxmem_kb': 17179869180L, 'shutdown': 0, 'mem_kb': 2095872L, 'handle': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'blocked': 0, 'name': 'Domain-0'})
[2009-08-31 21:05:08 4851] INFO (XendDomainInfo:165) Recreating domain 0, UUID 00000000-0000-0000-0000-000000000000. at /local/domain/0
[2009-08-31 21:05:08 4851] DEBUG (XendDomainInfo:3150) Storing VM details: {'on_xend_stop': 'ignore', 'shadow_memory': '0', 'uuid': '00000000-0000-0000-0000-000000000000', 'on_reboot': 'restart', 'image': '(linux (kernel ) (superpages 0))', 'on_poweroff': 'destroy', 'bootloader_args': '', 'on_xend_start': 'ignore', 'on_crash': 'restart', 'xend/restart_count': '0', 'vcpus': '8', 'vcpu_avail': '255', 'bootloader': '', 'name': 'Domain-0'}
[2009-08-31 21:05:08 4851] DEBUG (XendDomainInfo:1685) Storing domain details: {'cpu/3/availability': 'online', 'name': 'Domain-0', 'console/limit': '1048576', 'memory/target': '2095872', 'cpu/2/availability': 'online', 'vm': '/vm/00000000-0000-0000-0000-000000000000', 'domid': '0', 'cpu/7/availability': 'online', 'cpu/0/availability': 'online', 'cpu/1/availability': 'online', 'cpu/5/availability': 'online', 'control/platform-feature-multiprocessor-suspend': '1', 'cpu/6/availability': 'online', 'console/type': 'xenconsoled', 'cpu/4/availability': 'online'}
[2009-08-31 21:05:08 4851] DEBUG (XendDomain:452) Adding Domain: 0
[2009-08-31 21:05:08 4851] DEBUG (XendDomain:386) number of vcpus to use is 0
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: VBD.set_device not found
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: VBD.set_type not found
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: session.get_all_records not found
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: event.get_record not found
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: event.get_all not found
[2009-08-31 21:05:09 4851] DEBUG (XendDomainInfo:1772) XendDomainInfo.handleShutdownWatch
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: VIF.get_network not found
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: VIF.set_device not found
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: VIF.set_MAC not found
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: VIF.set_MTU not found
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: debug.get_all not found
[2009-08-31 21:05:09 4851] INFO (XMLRPCServer:156) Opening Unix domain socket XML-RPC server on /var/run/xend/xen-api.sock; authentication has been disabled for this server.
[2009-08-31 21:05:09 4851] INFO (XMLRPCServer:156) Opening Unix domain socket XML-RPC server on /var/run/xend/xmlrpc.sock.
[2009-08-31 21:06:27 4851] DEBUG (XendDomainInfo:99) XendDomainInfo.create(['vm', ['name', 'WinXP'], ['memory', 2048], ['vcpus', 1], ['on_xend_start', 'ignore'], ['on_xend_stop', 'ignore'], ['image', ['hvm', ['kernel', 'hvmloader'], ['videoram', 4], ['device_model', 'qemu-dm'], ['pae', 1], ['vcpus', 1], ['boot', 'c'], ['fda', ''], ['fdb', ''], ['timer_mode', 1], ['localtime', 0], ['serial', 'pty'], ['stdvga', 0], ['isa', 0], ['nographic', 0], ['soundhw', ''], ['vnc', 1], ['vncunused', 1], ['sdl', 0], ['xauthority', '/root/.Xauthority'], ['rtc_timeoffset', 0], ['monitor', 0], ['acpi', 1], ['apic', 1], ['usb', 0], ['usbdevice', ''], ['keymap', ''], ['pci', [['0x0000', '0x03', '0x00', '0x0', '0x100', [], '03:00.0']]], ['hpet', 0], ['guest_os_type', 'default'], ['hap', 1], ['opengl', 1], ['cpuid', []], ['cpuid_check', []], ['viridian', 0], ['pci_msitranslate', 1], ['vpt_align', 1], ['pci_power_mgmt', 0], ['xen_platform_pci', 1], ['gfx_passthru', 2], ['vncpasswd', 'XXXXXXXX']]], ['s3_integrity', 1], ['device', ['vbd', ['uname', 'phy:/dev/xenclient/storage'], ['dev', 'hda'], ['mode', 'w']]], ['device', ['vbd', ['uname', ''], ['dev', 'hdc:cdrom'], ['mode', 'r']]], ['device', ['pci', ['dev', ['slot', '0x00'], ['domain', '0x0000'], ['key', '03:00.0'], ['bus', '0x03'], ['vdevfn', '0x100'], ['func', '0x0']]]], ['device', ['vif', ['bridge', 'xenbr0'], ['mac', '00:16:3e:00:00:12'], ['type', 'ioemu']]]]) [2009-08-31 21:06:27 4851] DEBUG (XendDomainInfo:2366) XendDomainInfo.constructDomain
[2009-08-31 21:06:27 4851] DEBUG (balloon:181) Balloon: 4083012 KiB free; need 4096; done.
[2009-08-31 21:06:27 4851] DEBUG (XendDomain:452) Adding Domain: 1
[2009-08-31 21:06:27 4851] DEBUG (XendDomainInfo:2591) XendDomainInfo.initDomain: 1 256
[2009-08-31 21:06:27 4851] DEBUG (image:338) No VNC passwd configured for vfb access
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: boot, val: c
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: fda, val: None
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: fdb, val: None
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: soundhw, val: None
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: localtime, val: 0
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: serial, val: ['pty']
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: std-vga, val: 0
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: isa, val: 0
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: acpi, val: 1
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: usb, val: 0
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: usbdevice, val: None
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: gfx_passthru, val: 2
[2009-08-31 21:06:27 4851] INFO (image:779) Need to create platform device.[domid:1]
[2009-08-31 21:06:27 4851] DEBUG (XendDomainInfo:2618) _initDomain:shadow_memory=0x0, memory_static_max=0x80000000, memory_static_min=0x0.
[2009-08-31 21:06:27 4851] DEBUG (balloon:181) Balloon: 4081592 KiB free; need 2126848; done.
[2009-08-31 21:06:27 4851] INFO (image:181) buildDomain os=hvm dom=1 vcpus=1
[2009-08-31 21:06:27 4851] DEBUG (image:896) domid = 1 [2009-08-31 21:06:27 4851] DEBUG (image:897) image = /usr/lib/xen/boot/hvmloader [2009-08-31 21:06:27 4851] DEBUG (image:898) store_evtchn = 2 [2009-08-31 21:06:27 4851] DEBUG (image:899) memsize = 2048 [2009-08-31 21:06:27 4851] DEBUG (image:900) target = 2048 [2009-08-31 21:06:27 4851] DEBUG (image:901) vcpus = 1 [2009-08-31 21:06:27 4851] DEBUG (image:902) acpi = 1 [2009-08-31 21:06:27 4851] DEBUG (image:903) apic = 1 [2009-08-31 21:06:27 4851] DEBUG (image:904) gfx_passthru = 2
[2009-08-31 21:06:28 4851] INFO (XendDomainInfo:2237) createDevice: vfb : {'vncunused': 1, 'other_config': {'vncunused': 1, 'vnc': '1'}, 'vnc': '1', 'uuid': '01dd4b4c-0ddf-2e20-3f48-f8c985e6d378'}
[2009-08-31 21:06:28 4851] DEBUG (DevController:95) DevController: writing {'state': '1', 'backend-id': '0', 'backend': '/local/domain/0/backend/vfb/1/0'} to /local/domain/1/device/vfb/0.
[2009-08-31 21:06:28 4851] DEBUG (DevController:97) DevController: writing {'vncunused': '1', 'domain': 'WinXP', 'frontend': '/local/domain/1/device/vfb/0', 'uuid': '01dd4b4c-0ddf-2e20-3f48-f8c985e6d378', 'frontend-id': '1', 'state': '1', 'online': '1', 'vnc': '1'} to /local/domain/0/backend/vfb/1/0.
[2009-08-31 21:06:28 4851] INFO (XendDomainInfo:2237) createDevice: vbd : {'uuid': 'f43b3ea1-bc58-437a-b609-0856e5cdb082', 'bootable': 1, 'driver': 'paravirtualised', 'dev': 'hda', 'uname': 'phy:/dev/xenclient/storage', 'mode': 'w'}
[2009-08-31 21:06:28 4851] DEBUG (DevController:95) DevController: writing {'backend-id': '0', 'virtual-device': '768', 'device-type': 'disk', 'state': '1', 'backend': '/local/domain/0/backend/vbd/1/768'} to /local/domain/1/device/vbd/768.
[2009-08-31 21:06:28 4851] DEBUG (DevController:97) DevController: writing {'domain': 'WinXP', 'frontend': '/local/domain/1/device/vbd/768', 'uuid': 'f43b3ea1-bc58-437a-b609-0856e5cdb082', 'bootable': '1', 'dev': 'hda', 'state': '1', 'params': '/dev/xenclient/storage', 'mode': 'w', 'online': '1', 'frontend-id': '1', 'type': 'phy'} to /local/domain/0/backend/vbd/1/768.
[2009-08-31 21:06:28 4851] INFO (XendDomainInfo:2237) createDevice: vbd : {'uuid': '3e6e4b3e-7cf5-04b4-a7e0-47446ddfb956', 'bootable': 0, 'driver': 'paravirtualised', 'dev': 'hdc:cdrom', 'uname': '', 'mode': 'r'}
[2009-08-31 21:06:28 4851] DEBUG (DevController:95) DevController: writing {'backend-id': '0', 'virtual-device': '5632', 'device-type': 'cdrom', 'state': '1', 'backend': '/local/domain/0/backend/vbd/1/5632'} to /local/domain/1/device/vbd/5632.
[2009-08-31 21:06:28 4851] DEBUG (DevController:97) DevController: writing {'domain': 'WinXP', 'frontend': '/local/domain/1/device/vbd/5632', 'uuid': '3e6e4b3e-7cf5-04b4-a7e0-47446ddfb956', 'bootable': '0', 'dev': 'hdc', 'state': '1', 'params': '', 'mode': 'r', 'online': '1', 'frontend-id': '1', 'type': ''} to /local/domain/0/backend/vbd/1/5632.
[2009-08-31 21:06:28 4851] INFO (XendDomainInfo:2237) createDevice: vif : {'bridge': 'xenbr0', 'mac': '00:16:3e:00:00:12', 'type': 'ioemu', 'uuid': '330c58f8-2917-6ee5-f2ed-3ec0776e5080'}
[2009-08-31 21:06:28 4851] DEBUG (DevController:95) DevController: writing {'state': '1', 'backend-id': '0', 'backend': '/local/domain/0/backend/vif/1/0'} to /local/domain/1/device/vif/0.
[2009-08-31 21:06:28 4851] DEBUG (DevController:97) DevController: writing {'bridge': 'xenbr0', 'domain': 'WinXP', 'handle': '0', 'uuid': '330c58f8-2917-6ee5-f2ed-3ec0776e5080', 'script': '/etc/xen/scripts/vif-bridge', 'mac': '00:16:3e:00:00:12', 'frontend-id': '1', 'state': '1', 'online': '1', 'frontend': '/local/domain/1/device/vif/0', 'type': 'ioemu'} to /local/domain/0/backend/vif/1/0.
[2009-08-31 21:06:28 4851] INFO (XendDomainInfo:2237) createDevice: pci : {'devs': [{'slot': '0x00', 'domain': '0x0000', 'key': '03:00.0', 'bus': '0x03', 'vdevfn': '0x100', 'func': '0x0', 'uuid': 'a3b3e9fd-6347-fa3f-9c38-52a105b5bc07'}], 'uuid': 'b189db77-4a72-1f06-2fd8-a0328bb95d42'}
[2009-08-31 21:06:28 4851] DEBUG (pciif:449) pci: register aer watch /local/domain/0/backend/pci/1/0/aerState
[2009-08-31 21:06:28 4851] DEBUG (DevController:95) DevController: writing {'state': '1', 'backend-id': '0', 'backend': '/local/domain/0/backend/pci/1/0'} to /local/domain/1/device/pci/0.
[2009-08-31 21:06:28 4851] DEBUG (DevController:97) DevController: writing {'domain': 'WinXP', 'key-0': '03:00.0', 'vdevfn-0': '100', 'uuid': 'b189db77-4a72-1f06-2fd8-a0328bb95d42', 'power_mgmt': '0', 'msitranslate': '1', 'dev-0': '0000:03:00.0', 'frontend-id': '1', 'state': '1', 'online': '1', 'frontend': '/local/domain/1/device/pci/0', 'uuid-0': 'a3b3e9fd-6347-fa3f-9c38-52a105b5bc07', 'num_devs': '1'} to /local/domain/0/backend/pci/1/0.
[2009-08-31 21:06:28 4851] INFO (image:410) spawning device models: /usr/lib/xen/bin/qemu-dm ['/usr/lib/xen/bin/qemu-dm', '-d', '1', '-domain-name', 'WinXP', '-videoram', '4', '-vnc', '0.0.0.0:0', '-vncunused', '-vcpus', '1', '-boot', 'c', '-serial', 'pty', '-acpi', '-gfx_passthru', '2', '-net', 'nic,vlan=1,macaddr=00:16:3e:00:00:12,model=rtl8139', '-net', 'tap,vlan=1,ifname=tap1.0,bridge=xenbr0', '-M', 'xenfv']
[2009-08-31 21:06:28 4851] INFO (image:459) device model pid: 5360
[2009-08-31 21:06:28 4851] DEBUG (XendDomainInfo:837) XendDomainInfo.pci_device_configure: ['pci', ['dev', ['slot', '0x00'], ['domain', '0x0000'], ['key', '03:00.0'], ['bus', '0x03'], ['vdevfn', '0x100'], ['func', '0x0'], ['uuid', 'a3b3e9fd-6347-fa3f-9c38-52a105b5bc07']], ['state', 'Initialising'], ['sub_state', 'Booting']]
[2009-08-31 21:06:28 4851] DEBUG (XendDomainInfo:740) XendDomainInfo.hvm_pci_device_insert: {'devs': [{'slot': '0x00', 'domain': '0x0000', 'key': '03:00.0', 'bus': '0x03', 'vdevfn': '0x100', 'func': '0x0', 'uuid': 'a3b3e9fd-6347-fa3f-9c38-52a105b5bc07'}], 'states': ['Initialising']}
[2009-08-31 21:06:28 4851] DEBUG (XendDomainInfo:751) XendDomainInfo.hvm_pci_device_insert_dev: {'slot': '0x00', 'domain': '0x0000', 'key': '03:00.0', 'bus': '0x03', 'vdevfn': '0x100', 'func': '0x0', 'uuid': 'a3b3e9fd-6347-fa3f-9c38-52a105b5bc07'}
[2009-08-31 21:06:28 4851] INFO (image:561) waiting for sentinel_fifo
[2009-08-31 21:06:28 4851] DEBUG (XendDomainInfo:760) XendDomainInfo.hvm_pci_device_insert_dev: 0000:03:00.0@100
[2009-08-31 21:06:28 4851] DEBUG (image:479) signalDeviceModel: orig_state is None, retrying
[2009-08-31 21:06:28 4851] DEBUG (image:479) signalDeviceModel: orig_state is None, retrying
[2009-08-31 21:06:28 4851] INFO (image:509) signalDeviceModel:restore dm state to running
[2009-08-31 21:06:28 4851] DEBUG (pciif:151) Reconfiguring PCI device 0000:03:00.0.
[2009-08-31 21:06:28 4851] INFO (pciquirk:92) NO quirks found for PCI device [10de:0640:0000:0000]
[2009-08-31 21:06:28 4851] DEBUG (pciquirk:135) Permissive mode NOT enabled for PCI device [10de:0640:0000:0000]
[2009-08-31 21:06:28 4851] DEBUG (pciif:312) pci: enabling ioport 0x2000/0x80
[2009-08-31 21:06:28 4851] DEBUG (pciif:326) pci: enabling iomem 0xb2000000/0x1000000 pfn 0xb2000/0x1000
[2009-08-31 21:06:28 4851] DEBUG (pciif:326) pci: enabling iomem 0xc0000000/0x20000000 pfn 0xc0000/0x20000
[2009-08-31 21:06:28 4851] DEBUG (pciif:326) pci: enabling iomem 0xb0000000/0x2000000 pfn 0xb0000/0x2000
[2009-08-31 21:06:28 4851] DEBUG (pciif:355) pci: enabling irq 16
[2009-08-31 21:06:28 4851] DEBUG (XendDomainInfo:3150) Storing VM details: {'on_xend_stop': 'ignore', 'shadow_memory': '17', 'uuid': '3f3da690-84db-e24a-4831-e385fbfe6de3', 'on_reboot': 'restart', 'start_time': '1251749188.71', 'on_poweroff': 'destroy', 'bootloader_args': '', 'on_xend_start': 'ignore', 'on_crash': 'restart', 'xend/restart_count': '0', 'vcpus': '1', 'vcpu_avail': '1', 'bootloader': '', 'image': '(hvm (kernel ) (superpages 0) (videoram 4) (hpet 0) (stdvga 0) (loader /usr/lib/xen/boot/hvmloader) (serial pty) (vncunused 1) (xen_platform_pci 1) (opengl 1) (gfx_passthru 2) (boot c) (rtc_timeoffset 0) (pci ((0x0000 0x03 0x00 0x0 0x100 ()))) (pae 1) (vpt_align 1) (hap 1) (viridian 0) (acpi 1) (localtime 0) (timer_mode 1) (vnc 1) (nographic 0) (guest_os_type default) (pci_msitranslate 1) (apic 1) (sdl 0) (monitor 0) (device_model /usr/lib/xen/bin/qemu-dm) (pci_power_mgmt 0) (usb 0) (xauthority /root/.Xauthority) (isa 0) (notes (SUSPEND_CANCEL 1)))', 'name': 'WinXP'} [2009-08-31 21:06:28 4851] DEBUG (XendDomainInfo:1685) Storing domain details: {'console/port': '3', 'name': 'WinXP', 'console/limit': '1048576', 'store/port': '2', 'vm': '/vm/3f3da690-84db-e24a-4831-e385fbfe6de3', 'domid': '1', 'image/suspend-cancel': '1', 'cpu/0/availability': 'online', 'memory/target': '2097152', 'control/platform-feature-multiprocessor-suspend': '1', 'store/ring-ref': '1044476', 'console/type': 'ioemu'}
[2009-08-31 21:06:28 4851] DEBUG (DevController:95) DevController: writing {'state': '1', 'backend-id': '0', 'backend': '/local/domain/0/backend/console/1/0'} to /local/domain/1/device/console/0.
[2009-08-31 21:06:28 4851] DEBUG (DevController:97) DevController: writing {'domain': 'WinXP', 'frontend': '/local/domain/1/device/console/0', 'uuid': '700c7645-83c8-b254-013c-d2f30e2f04bb', 'frontend-id': '1', 'state': '1', 'location': '3', 'online': '1', 'protocol': 'vt100'} to /local/domain/0/backend/console/1/0.
[2009-08-31 21:06:28 4851] DEBUG (pciif:453) XendDomainInfo.handleAerStateWatch
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices tap2.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices vif.
[2009-08-31 21:06:28 4851] DEBUG (DevController:144) Waiting for 0.
[2009-08-31 21:06:28 4851] DEBUG (XendDomainInfo:1772) XendDomainInfo.handleShutdownWatch
[2009-08-31 21:06:28 4851] DEBUG (DevController:628) hotplugStatusCallback /local/domain/0/backend/vif/1/0/hotplug-status.
[2009-08-31 21:06:28 4851] DEBUG (DevController:642) hotplugStatusCallback 1.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices vscsi.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices vbd.
[2009-08-31 21:06:28 4851] DEBUG (DevController:144) Waiting for 768.
[2009-08-31 21:06:28 4851] DEBUG (DevController:628) hotplugStatusCallback /local/domain/0/backend/vbd/1/768/hotplug-status.
[2009-08-31 21:06:28 4851] DEBUG (DevController:642) hotplugStatusCallback 1.
[2009-08-31 21:06:28 4851] DEBUG (DevController:144) Waiting for 5632.
[2009-08-31 21:06:28 4851] DEBUG (DevController:628) hotplugStatusCallback /local/domain/0/backend/vbd/1/5632/hotplug-status.
[2009-08-31 21:06:28 4851] DEBUG (DevController:642) hotplugStatusCallback 1.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices irq.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices vkbd.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices vfb.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices console.
[2009-08-31 21:06:28 4851] DEBUG (DevController:144) Waiting for 0.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices pci.
[2009-08-31 21:06:28 4851] DEBUG (DevController:144) Waiting for 0.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices ioports.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices tap.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices vtpm.
[2009-08-31 21:06:28 4851] INFO (XendDomain:1180) Domain WinXP (1) unpaused.
d0 MCE: wrmsr MCG_STATUS 0
(XEN) mce.c:871:d0 MCE: wr MC0_STATUS 0
(XEN) mce.c:871:d0 MCE: wr MC1_STATUS 0
(XEN) mce.c:871:d0 MCE: wr MC2_STATUS 0
(XEN) mce.c:871:d0 MCE: wr MC3_STATUS 0
(XEN) mce.c:871:d0 MCE: wr MC4_STATUS 0
(XEN) mce.c:871:d0 MCE: wr MC5_STATUS 0
(XEN) PCI add device 00:00.0
(XEN) PCI add device 00:01.0
(XEN) PCI add device 00:03.0
(XEN) PCI add device 00:07.0
(XEN) PCI add device 00:10.0
(XEN) PCI add device 00:10.1
(XEN) PCI add device 00:14.0
(XEN) PCI add device 00:14.1
(XEN) PCI add device 00:14.2
(XEN) PCI add device 00:14.3
(XEN) PCI add device 00:19.0
(XEN) PCI add device 00:1a.0
(XEN) PCI add device 00:1a.1
(XEN) PCI add device 00:1a.2
(XEN) PCI add device 00:1a.7
(XEN) PCI add device 00:1b.0
(XEN) PCI add device 00:1c.0
(XEN) PCI add device 00:1c.1
(XEN) PCI add device 00:1c.4
(XEN) PCI add device 00:1d.0
(XEN) PCI add device 00:1d.1
(XEN) PCI add device 00:1d.2
(XEN) PCI add device 00:1d.7
(XEN) PCI add device 00:1e.0
(XEN) PCI add device 00:1f.0
(XEN) PCI add device 00:1f.2
(XEN) PCI add device 00:1f.3
(XEN) PCI add device 01:00.0
(XEN) PCI add device 02:00.0
(XEN) PCI add device 03:00.0
(XEN) PCI add device 06:00.0
(XEN) PCI add device 07:03.0
(XEN) PCI add device 00:19.0
(XEN) PCI add device 06:00.0
(XEN) PCI add device 00:1f.2
(XEN) PCI add device 00:1a.0
(XEN) PCI add device 00:1a.1
(XEN) PCI add device 00:1a.2
(XEN) PCI add device 00:1d.0
(XEN) PCI add device 00:1d.1
(XEN) PCI add device 00:1d.2
(XEN) Set CPU acpi_id(0) cpuid(0) Px State info:
(XEN) _PPC: 0
(XEN) cpuid.MWAIT[.eax=40, .ebx=40, .ecx=3, .edx=1120]
(XEN) Monitor-Mwait will be used to enter C-1 state
(XEN) cpuid.MWAIT[.eax=40, .ebx=40, .ecx=3, .edx=1120]
(XEN) Monitor-Mwait will be used to enter C-3 state
(XEN) Set CPU acpi_id(0) cpuid(0) Px State info:
(XEN) _PCT: descriptor=130, length=12, space_id=127, bit_width=64, bit_offset=0, reserved=0, address=409
(XEN) _PCT: descriptor=130, length=12, space_id=127, bit_width=16, bit_offset=0, reserved=0, address=408
(XEN) _PSS: state_count=10
(XEN) State0: 2661MHz 90000mW 10us 10us 0x15 0x15
(XEN) State1: 2660MHz 90000mW 10us 10us 0x14 0x14
(XEN) State2: 2527MHz 80000mW 10us 10us 0x13 0x13
(XEN) State3: 2394MHz 70000mW 10us 10us 0x12 0x12
(XEN) State4: 2261MHz 60000mW 10us 10us 0x11 0x11
(XEN) State5: 2128MHz 50000mW 10us 10us 0x10 0x10
(XEN) State6: 1995MHz 40000mW 10us 10us 0xf 0xf
(XEN) State7: 1862MHz 30000mW 10us 10us 0xe 0xe
(XEN) State8: 1729MHz 20000mW 10us 10us 0xd 0xd
(XEN) State9: 1596MHz 10000mW 10us 10us 0xc 0xc
(XEN) _PSD: num_entries=5 rev=0 domain=0 coord_type=252 num_processors=8
(XEN) _PPC: 0
(XEN) xen_pminfo: @acpi_cpufreq_cpu_init,HARDWARE addr space
(XEN) CPU 0 initialization completed
(XEN) Set CPU acpi_id(1) cpuid(1) Px State info:
(XEN) _PPC: 0
(XEN) cpuid.MWAIT[.eax=40, .ebx=40, .ecx=3, .edx=1120]
(XEN) Monitor-Mwait will be used to enter C-1 state
(XEN) cpuid.MWAIT[.eax=40, .ebx=40, .ecx=3, .edx=1120]
(XEN) Monitor-Mwait will be used to enter C-3 state
(XEN) Set CPU acpi_id(1) cpuid(1) Px State info:
(XEN) _PCT: descriptor=130, length=12, space_id=127, bit_width=64, bit_offset=0, reserved=0, address=409
(XEN) _PCT: descriptor=130, length=12, space_id=127, bit_width=16, bit_offset=0, reserved=0, address=408
(XEN) _PSS: state_count=10
(XEN) State0: 2661MHz 90000mW 10us 10us 0x15 0x15
(XEN) State1: 2660MHz 90000mW 10us 10us 0x14 0x14
(XEN) State2: 2527MHz 80000mW 10us 10us 0x13 0x13
(XEN) State3: 2394MHz 70000mW 10us 10us 0x12 0x12
(XEN) State4: 2261MHz 60000mW 10us 10us 0x11 0x11
(XEN) State5: 2128MHz 50000mW 10us 10us 0x10 0x10
(XEN) State6: 1995MHz 40000mW 10us 10us 0xf 0xf
(XEN) State7: 1862MHz 30000mW 10us 10us 0xe 0xe
(XEN) State8: 1729MHz 20000mW 10us 10us 0xd 0xd
(XEN) State9: 1596MHz 10000mW 10us 10us 0xc 0xc
(XEN) _PSD: num_entries=5 rev=0 domain=0 coord_type=252 num_processors=8
(XEN) _PPC: 0
(XEN) adding CPU 1
(XEN) Set CPU acpi_id(2) cpuid(2) Px State info:
(XEN) _PPC: 0
(XEN) cpuid.MWAIT[.eax=40, .ebx=40, .ecx=3, .edx=1120]
(XEN) Monitor-Mwait will be used to enter C-1 state
(XEN) cpuid.MWAIT[.eax=40, .ebx=40, .ecx=3, .edx=1120]
(XEN) Monitor-Mwait will be used to enter C-3 state
(XEN) Set CPU acpi_id(2) cpuid(2) Px State info:
(XEN) _PCT: descriptor=130, length=12, space_id=127, bit_width=64, bit_offset=0, reserved=0, address=409
(XEN) _PCT: descriptor=130, length=12, space_id=127, bit_width=16, bit_offset=0, reserved=0, address=408
(XEN) _PSS: state_count=10
(XEN) State0: 2661MHz 90000mW 10us 10us 0x15 0x15
(XEN) State1: 2660MHz 90000mW 10us 10us 0x14 0x14
(XEN) State2: 2527MHz 80000mW 10us 10us 0x13 0x13
(XEN) State3: 2394MHz 70000mW 10us 10us 0x12 0x12
(XEN) State4: 2261MHz 60000mW 10us 10us 0x11 0x11
(XEN) State5: 2128MHz 50000mW 10us 10us 0x10 0x10
(XEN) State6: 1995MHz 40000mW 10us 10us 0xf 0xf
(XEN) State7: 1862MHz 30000mW 10us 10us 0xe 0xe
(XEN) State8: 1729MHz 20000mW 10us 10us 0xd 0xd
(XEN) State9: 1596MHz 10000mW 10us 10us 0xc 0xc
(XEN) _PSD: num_entries=5 rev=0 domain=0 coord_type=252 num_processors=8
(XEN) _PPC: 0
(XEN) adding CPU 2
(XEN) Set CPU acpi_id(3) cpuid(3) Px State info:
(XEN) _PPC: 0
(XEN) cpuid.MWAIT[.eax=40, .ebx=40, .ecx=3, .edx=1120]
(XEN) Monitor-Mwait will be used to enter C-1 state
(XEN) cpuid.MWAIT[.eax=40, .ebx=40, .ecx=3, .edx=1120]
(XEN) Monitor-Mwait will be used to enter C-3 state
(XEN) Set CPU acpi_id(3) cpuid(3) Px State info:
(XEN) _PCT: descriptor=130, length=12, space_id=127, bit_width=64, bit_offset=0, reserved=0, address=409
(XEN) _PCT: descriptor=130, length=12, space_id=127, bit_width=16, bit_offset=0, reserved=0, address=408
(XEN) _PSS: state_count=10
(XEN) State0: 2661MHz 90000mW 10us 10us 0x15 0x15
(XEN) State1: 2660MHz 90000mW 10us 10us 0x14 0x14
(XEN) State2: 2527MHz 80000mW 10us 10us 0x13 0x13
(XEN) State3: 2394MHz 70000mW 10us 10us 0x12 0x12
(XEN) State4: 2261MHz 60000mW 10us 10us 0x11 0x11
(XEN) State5: 2128MHz 50000mW 10us 10us 0x10 0x10
(XEN) State6: 1995MHz 40000mW 10us 10us 0xf 0xf
(XEN) State7: 1862MHz 30000mW 10us 10us 0xe 0xe
(XEN) State8: 1729MHz 20000mW 10us 10us 0xd 0xd
(XEN) State9: 1596MHz 10000mW 10us 10us 0xc 0xc
(XEN) _PSD: num_entries=5 rev=0 domain=0 coord_type=252 num_processors=8
(XEN) _PPC: 0
(XEN) adding CPU 3
(XEN) Set CPU acpi_id(4) cpuid(4) Px State info:
(XEN) _PPC: 0
(XEN) cpuid.MWAIT[.eax=40, .ebx=40, .ecx=3, .edx=1120]
(XEN) Monitor-Mwait will be used to enter C-1 state
(XEN) cpuid.MWAIT[.eax=40, .ebx=40, .ecx=3, .edx=1120]
(XEN) Monitor-Mwait will be used to enter C-3 state
(XEN) Set CPU acpi_id(4) cpuid(4) Px State info:
(XEN) _PCT: descriptor=130, length=12, space_id=127, bit_width=64, bit_offset=0, reserved=0, address=409
(XEN) _PCT: descriptor=130, length=12, space_id=127, bit_width=16, bit_offset=0, reserved=0, address=408
(XEN) _PSS: state_count=10
(XEN) State0: 2661MHz 90000mW 10us 10us 0x15 0x15
(XEN) State1: 2660MHz 90000mW 10us 10us 0x14 0x14
(XEN) State2: 2527MHz 80000mW 10us 10us 0x13 0x13
(XEN) State3: 2394MHz 70000mW 10us 10us 0x12 0x12
(XEN) State4: 2261MHz 60000mW 10us 10us 0x11 0x11
(XEN) State5: 2128MHz 50000mW 10us 10us 0x10 0x10
(XEN) State6: 1995MHz 40000mW 10us 10us 0xf 0xf
(XEN) State7: 1862MHz 30000mW 10us 10us 0xe 0xe
(XEN) State8: 1729MHz 20000mW 10us 10us 0xd 0xd
(XEN) State9: 1596MHz 10000mW 10us 10us 0xc 0xc
(XEN) _PSD: num_entries=5 rev=0 domain=0 coord_type=252 num_processors=8
(XEN) _PPC: 0
(XEN) adding CPU 4
(XEN) Set CPU acpi_id(5) cpuid(5) Px State info:
(XEN) _PPC: 0
(XEN) cpuid.MWAIT[.eax=40, .ebx=40, .ecx=3, .edx=1120]
(XEN) Monitor-Mwait will be used to enter C-1 state
(XEN) cpuid.MWAIT[.eax=40, .ebx=40, .ecx=3, .edx=1120]
(XEN) Monitor-Mwait will be used to enter C-3 state
(XEN) Set CPU acpi_id(5) cpuid(5) Px State info:
(XEN) _PCT: descriptor=130, length=12, space_id=127, bit_width=64, bit_offset=0, reserved=0, address=409
(XEN) _PCT: descriptor=130, length=12, space_id=127, bit_width=16, bit_offset=0, reserved=0, address=408
(XEN) _PSS: state_count=10
(XEN) State0: 2661MHz 90000mW 10us 10us 0x15 0x15
(XEN) State1: 2660MHz 90000mW 10us 10us 0x14 0x14
(XEN) State2: 2527MHz 80000mW 10us 10us 0x13 0x13
(XEN) State3: 2394MHz 70000mW 10us 10us 0x12 0x12
(XEN) State4: 2261MHz 60000mW 10us 10us 0x11 0x11
(XEN) State5: 2128MHz 50000mW 10us 10us 0x10 0x10
(XEN) State6: 1995MHz 40000mW 10us 10us 0xf 0xf
(XEN) State7: 1862MHz 30000mW 10us 10us 0xe 0xe
(XEN) State8: 1729MHz 20000mW 10us 10us 0xd 0xd
(XEN) State9: 1596MHz 10000mW 10us 10us 0xc 0xc
(XEN) _PSD: num_entries=5 rev=0 domain=0 coord_type=252 num_processors=8
(XEN) _PPC: 0
(XEN) adding CPU 5
(XEN) Set CPU acpi_id(6) cpuid(6) Px State info:
(XEN) _PPC: 0
(XEN) cpuid.MWAIT[.eax=40, .ebx=40, .ecx=3, .edx=1120]
(XEN) Monitor-Mwait will be used to enter C-1 state
(XEN) cpuid.MWAIT[.eax=40, .ebx=40, .ecx=3, .edx=1120]
(XEN) Monitor-Mwait will be used to enter C-3 state
(XEN) Set CPU acpi_id(6) cpuid(6) Px State info:
(XEN) _PCT: descriptor=130, length=12, space_id=127, bit_width=64, bit_offset=0, reserved=0, address=409
(XEN) _PCT: descriptor=130, length=12, space_id=127, bit_width=16, bit_offset=0, reserved=0, address=408
(XEN) _PSS: state_count=10
(XEN) State0: 2661MHz 90000mW 10us 10us 0x15 0x15
(XEN) State1: 2660MHz 90000mW 10us 10us 0x14 0x14
(XEN) State2: 2527MHz 80000mW 10us 10us 0x13 0x13
(XEN) State3: 2394MHz 70000mW 10us 10us 0x12 0x12
(XEN) State4: 2261MHz 60000mW 10us 10us 0x11 0x11
(XEN) State5: 2128MHz 50000mW 10us 10us 0x10 0x10
(XEN) State6: 1995MHz 40000mW 10us 10us 0xf 0xf
(XEN) State7: 1862MHz 30000mW 10us 10us 0xe 0xe
(XEN) State8: 1729MHz 20000mW 10us 10us 0xd 0xd
(XEN) State9: 1596MHz 10000mW 10us 10us 0xc 0xc
(XEN) _PSD: num_entries=5 rev=0 domain=0 coord_type=252 num_processors=8
(XEN) _PPC: 0
(XEN) adding CPU 6
(XEN) Set CPU acpi_id(7) cpuid(7) Px State info:
(XEN) _PPC: 0
(XEN) cpuid.MWAIT[.eax=40, .ebx=40, .ecx=3, .edx=1120]
(XEN) Monitor-Mwait will be used to enter C-1 state
(XEN) cpuid.MWAIT[.eax=40, .ebx=40, .ecx=3, .edx=1120]
(XEN) Monitor-Mwait will be used to enter C-3 state
(XEN) Set CPU acpi_id(7) cpuid(7) Px State info:
(XEN) _PCT: descriptor=130, length=12, space_id=127, bit_width=64, bit_offset=0, reserved=0, address=409
(XEN) _PCT: descriptor=130, length=12, space_id=127, bit_width=16, bit_offset=0, reserved=0, address=408
(XEN) _PSS: state_count=10
(XEN) State0: 2661MHz 90000mW 10us 10us 0x15 0x15
(XEN) State1: 2660MHz 90000mW 10us 10us 0x14 0x14
(XEN) State2: 2527MHz 80000mW 10us 10us 0x13 0x13
(XEN) State3: 2394MHz 70000mW 10us 10us 0x12 0x12
(XEN) State4: 2261MHz 60000mW 10us 10us 0x11 0x11
(XEN) State5: 2128MHz 50000mW 10us 10us 0x10 0x10
(XEN) State6: 1995MHz 40000mW 10us 10us 0xf 0xf
(XEN) State7: 1862MHz 30000mW 10us 10us 0xe 0xe
(XEN) State8: 1729MHz 20000mW 10us 10us 0xd 0xd
(XEN) State9: 1596MHz 10000mW 10us 10us 0xc 0xc
(XEN) _PSD: num_entries=5 rev=0 domain=0 coord_type=252 num_processors=8
(XEN) _PPC: 0
(XEN) adding CPU 7
(XEN) [VT-D]iommu.c:1288:d0 domain_context_unmap:PCIe: bdf = 3:0.0 (XEN) [VT-D]iommu.c:1174:d0 domain_context_mapping:PCIe: bdf = 3:0.0 (XEN) domctl.c:887:d0 ioport_map:add f_gport=3b0 f_mport=3b0 np=c (XEN) domctl.c:887:d0 ioport_map:add f_gport=3c0 f_mport=3c0 np=20 (XEN) domctl.c:836:d0 memory_map:add: gfn=a0 mfn=a0 nr_mfns=20
(XEN) [VT-D]io.c:284:d0 VT-d irq bind: m_irq = 1f device = 4 intx = 0 (XEN) HVM1: HVM Loader
(XEN) HVM1: Detected Xen v3.5-unstable
(XEN) HVM1: CPU speed is 2667 MHz
(XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5
(XEN) HVM1: PCI-ISA link 0 routed to IRQ5
(XEN) irq.c:243: Dom1 PCI link 1 changed 0 -> 10
(XEN) HVM1: PCI-ISA link 1 routed to IRQ10
(XEN) irq.c:243: Dom1 PCI link 2 changed 0 -> 11
(XEN) HVM1: PCI-ISA link 2 routed to IRQ11
(XEN) irq.c:243: Dom1 PCI link 3 changed 0 -> 5
(XEN) HVM1: PCI-ISA link 3 routed to IRQ5
(XEN) HVM1: pci dev 01:3 INTA->IRQ10
(XEN) HVM1: pci dev 02:0 INTA->IRQ11
(XEN) HVM1: pci dev 03:0 INTA->IRQ5
(XEN) HVM1: Make vBAR = pBAR of assigned gfx
(XEN) domctl.c:836:d0 memory_map:add: gfn=b2000 mfn=b2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=20000 (XEN) domctl.c:836:d0 memory_map:add: gfn=b0000 mfn=b0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=2000 f_mport=2000 np=80 (XEN) HVM1: pci dev 02:0 bar 14 size 01000000: e0000008
(XEN) HVM1: pci dev 02:0 bar 10 size 00000100: 0000c001
(XEN) HVM1: pci dev 03:0 bar 10 size 00000100: 0000c101
(XEN) HVM1: pci dev 03:0 bar 14 size 00000100: e1000000
(XEN) HVM1: pci dev 01:1 bar 20 size 00000010: 0000c201
(XEN) HVM1: Multiprocessor initialisation:
(XEN) HVM1: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [3/8] ... done. (XEN) HVM1: Testing HVM environment:
(XEN) HVM1: - REP INSB across page boundaries ... passed
(XEN) HVM1: - GS base MSRs and SWAPGS ... passed
(XEN) HVM1: Passed 2 of 2 tests
(XEN) HVM1: Writing SMBIOS tables ...
(XEN) HVM1: Loading ROMBIOS ...
(XEN) HVM1: 9660 bytes of ROMBIOS high-memory extensions:
(XEN) HVM1: Relocating to 0xfc000000-0xfc0025bc ... done
(XEN) HVM1: Creating MP tables ...
(XEN) HVM1: Loading VGABIOS of passthroughed gfx ...
(XEN) HVM1: Loading PCI Option ROM ...
(XEN) HVM1: - Manufacturer: http://etherboot.org
(XEN) HVM1: - Product name: gPXE
(XEN) HVM1: Loading ACPI ...
(XEN) HVM1: - Lo data: 000ea020-000ea04f
(XEN) HVM1: - Hi data: fc002800-fc011e1f
(XEN) HVM1: vm86 TSS at fc012000
(XEN) HVM1: BIOS map:
(XEN) HVM1: c0000-c07ff: VGA BIOS (XEN) HVM1: c8000-d47ff: Etherboot ROM (XEN) HVM1: eb000-eb14e: SMBIOS tables (XEN) HVM1: f0000-fffff: Main BIOS
(XEN) HVM1: Invoking ROMBIOS ...
(XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: Bochs BIOS - build: 06/23/99
(XEN) HVM1: $Revision: 1.221 $ $Date: 2008/12/07 17:32:29 $ (XEN) HVM1: Options: apmbios pcibios eltorito PMM
(XEN) HVM1:
(XEN) HVM1: ata0-0: PCHS=16383/16/63 translation=lba LCHS=1024/255/63 (XEN) HVM1: ata0 master: QEMU HARDDISK ATA-7 Hard-Disk (38912 MBytes) (XEN) HVM1: IDE time out
(XEN) HVM1: ata1 master: QEMU DVD-ROM ATAPI-4 CD-Rom/DVD-Rom (XEN) HVM1: IDE time out
(XEN) HVM1:
(XEN) HVM1:
(XEN) HVM1:
(XEN) HVM1: Press F12 for boot menu.
(XEN) HVM1:
(XEN) HVM1: Booting from Hard Disk...
(XEN) HVM1: Booting from 0000:7c00
(XEN) HVM1: int13_harddisk: function 15, unmapped device for ELDL=81 (XEN) HVM1: *** int 15h function AX=e980, BX=006e not yet supported! (XEN) mce.c:694:d1 MCE: rdmsr MCG_CAP 0x1809
(XEN) mce.c:714:d1 MCE: rdmsr MC0_CTL 0xffffffffffffffff
(XEN) mce.c:694:d1 MCE: rdmsr MCG_CAP 0x1809
(XEN) domctl.c:846:d0 memory_map:remove: gfn=b2000 mfn=b2000 nr_mfns=1000 (XEN) domctl.c:846:d0 memory_map:remove: gfn=c0000 mfn=c0000 nr_mfns=20000 (XEN) domctl.c:846:d0 memory_map:remove: gfn=b0000 mfn=b0000 nr_mfns=2000 (XEN) domctl.c:911:d0 ioport_map:remove f_gport=2000 f_mport=2000 np=80 (XEN) domctl.c:836:d0 memory_map:add: gfn=b2000 mfn=b2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=20000 (XEN) domctl.c:836:d0 memory_map:add: gfn=b0000 mfn=b0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=2000 f_mport=2000 np=80 (XEN) domctl.c:846:d0 memory_map:remove: gfn=b2000 mfn=b2000 nr_mfns=1000 (XEN) domctl.c:846:d0 memory_map:remove: gfn=c0000 mfn=c0000 nr_mfns=20000 (XEN) domctl.c:846:d0 memory_map:remove: gfn=b0000 mfn=b0000 nr_mfns=2000 (XEN) domctl.c:911:d0 ioport_map:remove f_gport=2000 f_mport=2000 np=80 (XEN) domctl.c:836:d0 memory_map:add: gfn=b2000 mfn=b2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=20000 (XEN) domctl.c:836:d0 memory_map:add: gfn=b0000 mfn=b0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=2000 f_mport=2000 np=80 (XEN) irq.c:243: Dom1 PCI link 0 changed 5 -> 0
(XEN) irq.c:243: Dom1 PCI link 0 changed 0 -> 5
(XEN) domctl.c:846:d0 memory_map:remove: gfn=b2000 mfn=b2000 nr_mfns=1000 (XEN) domctl.c:846:d0 memory_map:remove: gfn=c0000 mfn=c0000 nr_mfns=20000 (XEN) domctl.c:846:d0 memory_map:remove: gfn=b0000 mfn=b0000 nr_mfns=2000 (XEN) domctl.c:911:d0 ioport_map:remove f_gport=2000 f_mport=2000 np=80 (XEN) domctl.c:836:d0 memory_map:add: gfn=b2000 mfn=b2000 nr_mfns=1000 (XEN) domctl.c:836:d0 memory_map:add: gfn=c0000 mfn=c0000 nr_mfns=20000 (XEN) domctl.c:836:d0 memory_map:add: gfn=b0000 mfn=b0000 nr_mfns=2000 (XEN) domctl.c:887:d0 ioport_map:add f_gport=2000 f_mport=2000 np=80 (XEN) irq.c:243: Dom1 PCI link 0 changed 5 -> 0
[2009-08-31 21:05:08 4851] INFO (SrvDaemon:332) Xend Daemon started
[2009-08-31 21:05:08 4851] INFO (SrvDaemon:336) Xend changeset: Thu Aug 27 11:25:34 2009 +0100 20128:e8004f6c254a.
[2009-08-31 21:05:08 4851] DEBUG (XendDomainInfo:147) XendDomainInfo.recreate({'max_vcpu_id': 7, 'cpu_time': 5873639544L, 'ssidref': 0, 'hvm': 0, 'shutdown_reason': 0, 'dying': 0, 'online_vcpus': 8, 'domid': 0, 'paused': 0, 'crashed': 0, 'running': 1, 'maxmem_kb': 17179869180L, 'shutdown': 0, 'mem_kb': 2095872L, 'handle': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'blocked': 0, 'name': 'Domain-0'})
[2009-08-31 21:05:08 4851] INFO (XendDomainInfo:165) Recreating domain 0, UUID 00000000-0000-0000-0000-000000000000. at /local/domain/0
[2009-08-31 21:05:08 4851] DEBUG (XendDomainInfo:3150) Storing VM details: {'on_xend_stop': 'ignore', 'shadow_memory': '0', 'uuid': '00000000-0000-0000-0000-000000000000', 'on_reboot': 'restart', 'image': '(linux (kernel ) (superpages 0))', 'on_poweroff': 'destroy', 'bootloader_args': '', 'on_xend_start': 'ignore', 'on_crash': 'restart', 'xend/restart_count': '0', 'vcpus': '8', 'vcpu_avail': '255', 'bootloader': '', 'name': 'Domain-0'}
[2009-08-31 21:05:08 4851] DEBUG (XendDomainInfo:1685) Storing domain details: {'cpu/3/availability': 'online', 'name': 'Domain-0', 'console/limit': '1048576', 'memory/target': '2095872', 'cpu/2/availability': 'online', 'vm': '/vm/00000000-0000-0000-0000-000000000000', 'domid': '0', 'cpu/7/availability': 'online', 'cpu/0/availability': 'online', 'cpu/1/availability': 'online', 'cpu/5/availability': 'online', 'control/platform-feature-multiprocessor-suspend': '1', 'cpu/6/availability': 'online', 'console/type': 'xenconsoled', 'cpu/4/availability': 'online'}
[2009-08-31 21:05:08 4851] DEBUG (XendDomain:452) Adding Domain: 0
[2009-08-31 21:05:08 4851] DEBUG (XendDomain:386) number of vcpus to use is 0
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: VBD.set_device not found
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: VBD.set_type not found
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: session.get_all_records not found
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: event.get_record not found
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: event.get_all not found
[2009-08-31 21:05:09 4851] DEBUG (XendDomainInfo:1772) XendDomainInfo.handleShutdownWatch
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: VIF.get_network not found
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: VIF.set_device not found
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: VIF.set_MAC not found
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: VIF.set_MTU not found
[2009-08-31 21:05:09 4851] WARNING (XendAPI:701) API call: debug.get_all not found
[2009-08-31 21:05:09 4851] INFO (XMLRPCServer:156) Opening Unix domain socket XML-RPC server on /var/run/xend/xen-api.sock; authentication has been disabled for this server.
[2009-08-31 21:05:09 4851] INFO (XMLRPCServer:156) Opening Unix domain socket XML-RPC server on /var/run/xend/xmlrpc.sock.
[2009-08-31 21:06:27 4851] DEBUG (XendDomainInfo:99) XendDomainInfo.create(['vm', ['name', 'WinXP'], ['memory', 2048], ['vcpus', 1], ['on_xend_start', 'ignore'], ['on_xend_stop', 'ignore'], ['image', ['hvm', ['kernel', 'hvmloader'], ['videoram', 4], ['device_model', 'qemu-dm'], ['pae', 1], ['vcpus', 1], ['boot', 'c'], ['fda', ''], ['fdb', ''], ['timer_mode', 1], ['localtime', 0], ['serial', 'pty'], ['stdvga', 0], ['isa', 0], ['nographic', 0], ['soundhw', ''], ['vnc', 1], ['vncunused', 1], ['sdl', 0], ['xauthority', '/root/.Xauthority'], ['rtc_timeoffset', 0], ['monitor', 0], ['acpi', 1], ['apic', 1], ['usb', 0], ['usbdevice', ''], ['keymap', ''], ['pci', [['0x0000', '0x03', '0x00', '0x0', '0x100', [], '03:00.0']]], ['hpet', 0], ['guest_os_type', 'default'], ['hap', 1], ['opengl', 1], ['cpuid', []], ['cpuid_check', []], ['viridian', 0], ['pci_msitranslate', 1], ['vpt_align', 1], ['pci_power_mgmt', 0], ['xen_platform_pci', 1], ['gfx_passthru', 2], ['vncpasswd', 'XXXXXXXX']]], ['s3_integrity', 1], ['device', ['vbd', ['uname', 'phy:/dev/xenclient/storage'], ['dev', 'hda'], ['mode', 'w']]], ['device', ['vbd', ['uname', ''], ['dev', 'hdc:cdrom'], ['mode', 'r']]], ['device', ['pci', ['dev', ['slot', '0x00'], ['domain', '0x0000'], ['key', '03:00.0'], ['bus', '0x03'], ['vdevfn', '0x100'], ['func', '0x0']]]], ['device', ['vif', ['bridge', 'xenbr0'], ['mac', '00:16:3e:00:00:12'], ['type', 'ioemu']]]]) [2009-08-31 21:06:27 4851] DEBUG (XendDomainInfo:2366) XendDomainInfo.constructDomain
[2009-08-31 21:06:27 4851] DEBUG (balloon:181) Balloon: 4083012 KiB free; need 4096; done.
[2009-08-31 21:06:27 4851] DEBUG (XendDomain:452) Adding Domain: 1
[2009-08-31 21:06:27 4851] DEBUG (XendDomainInfo:2591) XendDomainInfo.initDomain: 1 256
[2009-08-31 21:06:27 4851] DEBUG (image:338) No VNC passwd configured for vfb access
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: boot, val: c
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: fda, val: None
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: fdb, val: None
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: soundhw, val: None
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: localtime, val: 0
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: serial, val: ['pty']
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: std-vga, val: 0
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: isa, val: 0
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: acpi, val: 1
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: usb, val: 0
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: usbdevice, val: None
[2009-08-31 21:06:27 4851] DEBUG (image:843) args: gfx_passthru, val: 2
[2009-08-31 21:06:27 4851] INFO (image:779) Need to create platform device.[domid:1]
[2009-08-31 21:06:27 4851] DEBUG (XendDomainInfo:2618) _initDomain:shadow_memory=0x0, memory_static_max=0x80000000, memory_static_min=0x0.
[2009-08-31 21:06:27 4851] DEBUG (balloon:181) Balloon: 4081592 KiB free; need 2126848; done.
[2009-08-31 21:06:27 4851] INFO (image:181) buildDomain os=hvm dom=1 vcpus=1
[2009-08-31 21:06:27 4851] DEBUG (image:896) domid = 1 [2009-08-31 21:06:27 4851] DEBUG (image:897) image = /usr/lib/xen/boot/hvmloader [2009-08-31 21:06:27 4851] DEBUG (image:898) store_evtchn = 2 [2009-08-31 21:06:27 4851] DEBUG (image:899) memsize = 2048 [2009-08-31 21:06:27 4851] DEBUG (image:900) target = 2048 [2009-08-31 21:06:27 4851] DEBUG (image:901) vcpus = 1 [2009-08-31 21:06:27 4851] DEBUG (image:902) acpi = 1 [2009-08-31 21:06:27 4851] DEBUG (image:903) apic = 1 [2009-08-31 21:06:27 4851] DEBUG (image:904) gfx_passthru = 2
[2009-08-31 21:06:28 4851] INFO (XendDomainInfo:2237) createDevice: vfb : {'vncunused': 1, 'other_config': {'vncunused': 1, 'vnc': '1'}, 'vnc': '1', 'uuid': '01dd4b4c-0ddf-2e20-3f48-f8c985e6d378'}
[2009-08-31 21:06:28 4851] DEBUG (DevController:95) DevController: writing {'state': '1', 'backend-id': '0', 'backend': '/local/domain/0/backend/vfb/1/0'} to /local/domain/1/device/vfb/0.
[2009-08-31 21:06:28 4851] DEBUG (DevController:97) DevController: writing {'vncunused': '1', 'domain': 'WinXP', 'frontend': '/local/domain/1/device/vfb/0', 'uuid': '01dd4b4c-0ddf-2e20-3f48-f8c985e6d378', 'frontend-id': '1', 'state': '1', 'online': '1', 'vnc': '1'} to /local/domain/0/backend/vfb/1/0.
[2009-08-31 21:06:28 4851] INFO (XendDomainInfo:2237) createDevice: vbd : {'uuid': 'f43b3ea1-bc58-437a-b609-0856e5cdb082', 'bootable': 1, 'driver': 'paravirtualised', 'dev': 'hda', 'uname': 'phy:/dev/xenclient/storage', 'mode': 'w'}
[2009-08-31 21:06:28 4851] DEBUG (DevController:95) DevController: writing {'backend-id': '0', 'virtual-device': '768', 'device-type': 'disk', 'state': '1', 'backend': '/local/domain/0/backend/vbd/1/768'} to /local/domain/1/device/vbd/768.
[2009-08-31 21:06:28 4851] DEBUG (DevController:97) DevController: writing {'domain': 'WinXP', 'frontend': '/local/domain/1/device/vbd/768', 'uuid': 'f43b3ea1-bc58-437a-b609-0856e5cdb082', 'bootable': '1', 'dev': 'hda', 'state': '1', 'params': '/dev/xenclient/storage', 'mode': 'w', 'online': '1', 'frontend-id': '1', 'type': 'phy'} to /local/domain/0/backend/vbd/1/768.
[2009-08-31 21:06:28 4851] INFO (XendDomainInfo:2237) createDevice: vbd : {'uuid': '3e6e4b3e-7cf5-04b4-a7e0-47446ddfb956', 'bootable': 0, 'driver': 'paravirtualised', 'dev': 'hdc:cdrom', 'uname': '', 'mode': 'r'}
[2009-08-31 21:06:28 4851] DEBUG (DevController:95) DevController: writing {'backend-id': '0', 'virtual-device': '5632', 'device-type': 'cdrom', 'state': '1', 'backend': '/local/domain/0/backend/vbd/1/5632'} to /local/domain/1/device/vbd/5632.
[2009-08-31 21:06:28 4851] DEBUG (DevController:97) DevController: writing {'domain': 'WinXP', 'frontend': '/local/domain/1/device/vbd/5632', 'uuid': '3e6e4b3e-7cf5-04b4-a7e0-47446ddfb956', 'bootable': '0', 'dev': 'hdc', 'state': '1', 'params': '', 'mode': 'r', 'online': '1', 'frontend-id': '1', 'type': ''} to /local/domain/0/backend/vbd/1/5632.
[2009-08-31 21:06:28 4851] INFO (XendDomainInfo:2237) createDevice: vif : {'bridge': 'xenbr0', 'mac': '00:16:3e:00:00:12', 'type': 'ioemu', 'uuid': '330c58f8-2917-6ee5-f2ed-3ec0776e5080'}
[2009-08-31 21:06:28 4851] DEBUG (DevController:95) DevController: writing {'state': '1', 'backend-id': '0', 'backend': '/local/domain/0/backend/vif/1/0'} to /local/domain/1/device/vif/0.
[2009-08-31 21:06:28 4851] DEBUG (DevController:97) DevController: writing {'bridge': 'xenbr0', 'domain': 'WinXP', 'handle': '0', 'uuid': '330c58f8-2917-6ee5-f2ed-3ec0776e5080', 'script': '/etc/xen/scripts/vif-bridge', 'mac': '00:16:3e:00:00:12', 'frontend-id': '1', 'state': '1', 'online': '1', 'frontend': '/local/domain/1/device/vif/0', 'type': 'ioemu'} to /local/domain/0/backend/vif/1/0.
[2009-08-31 21:06:28 4851] INFO (XendDomainInfo:2237) createDevice: pci : {'devs': [{'slot': '0x00', 'domain': '0x0000', 'key': '03:00.0', 'bus': '0x03', 'vdevfn': '0x100', 'func': '0x0', 'uuid': 'a3b3e9fd-6347-fa3f-9c38-52a105b5bc07'}], 'uuid': 'b189db77-4a72-1f06-2fd8-a0328bb95d42'}
[2009-08-31 21:06:28 4851] DEBUG (pciif:449) pci: register aer watch /local/domain/0/backend/pci/1/0/aerState
[2009-08-31 21:06:28 4851] DEBUG (DevController:95) DevController: writing {'state': '1', 'backend-id': '0', 'backend': '/local/domain/0/backend/pci/1/0'} to /local/domain/1/device/pci/0.
[2009-08-31 21:06:28 4851] DEBUG (DevController:97) DevController: writing {'domain': 'WinXP', 'key-0': '03:00.0', 'vdevfn-0': '100', 'uuid': 'b189db77-4a72-1f06-2fd8-a0328bb95d42', 'power_mgmt': '0', 'msitranslate': '1', 'dev-0': '0000:03:00.0', 'frontend-id': '1', 'state': '1', 'online': '1', 'frontend': '/local/domain/1/device/pci/0', 'uuid-0': 'a3b3e9fd-6347-fa3f-9c38-52a105b5bc07', 'num_devs': '1'} to /local/domain/0/backend/pci/1/0.
[2009-08-31 21:06:28 4851] INFO (image:410) spawning device models: /usr/lib/xen/bin/qemu-dm ['/usr/lib/xen/bin/qemu-dm', '-d', '1', '-domain-name', 'WinXP', '-videoram', '4', '-vnc', '0.0.0.0:0', '-vncunused', '-vcpus', '1', '-boot', 'c', '-serial', 'pty', '-acpi', '-gfx_passthru', '2', '-net', 'nic,vlan=1,macaddr=00:16:3e:00:00:12,model=rtl8139', '-net', 'tap,vlan=1,ifname=tap1.0,bridge=xenbr0', '-M', 'xenfv']
[2009-08-31 21:06:28 4851] INFO (image:459) device model pid: 5360
[2009-08-31 21:06:28 4851] DEBUG (XendDomainInfo:837) XendDomainInfo.pci_device_configure: ['pci', ['dev', ['slot', '0x00'], ['domain', '0x0000'], ['key', '03:00.0'], ['bus', '0x03'], ['vdevfn', '0x100'], ['func', '0x0'], ['uuid', 'a3b3e9fd-6347-fa3f-9c38-52a105b5bc07']], ['state', 'Initialising'], ['sub_state', 'Booting']]
[2009-08-31 21:06:28 4851] DEBUG (XendDomainInfo:740) XendDomainInfo.hvm_pci_device_insert: {'devs': [{'slot': '0x00', 'domain': '0x0000', 'key': '03:00.0', 'bus': '0x03', 'vdevfn': '0x100', 'func': '0x0', 'uuid': 'a3b3e9fd-6347-fa3f-9c38-52a105b5bc07'}], 'states': ['Initialising']}
[2009-08-31 21:06:28 4851] DEBUG (XendDomainInfo:751) XendDomainInfo.hvm_pci_device_insert_dev: {'slot': '0x00', 'domain': '0x0000', 'key': '03:00.0', 'bus': '0x03', 'vdevfn': '0x100', 'func': '0x0', 'uuid': 'a3b3e9fd-6347-fa3f-9c38-52a105b5bc07'}
[2009-08-31 21:06:28 4851] INFO (image:561) waiting for sentinel_fifo
[2009-08-31 21:06:28 4851] DEBUG (XendDomainInfo:760) XendDomainInfo.hvm_pci_device_insert_dev: 0000:03:00.0@100
[2009-08-31 21:06:28 4851] DEBUG (image:479) signalDeviceModel: orig_state is None, retrying
[2009-08-31 21:06:28 4851] DEBUG (image:479) signalDeviceModel: orig_state is None, retrying
[2009-08-31 21:06:28 4851] INFO (image:509) signalDeviceModel:restore dm state to running
[2009-08-31 21:06:28 4851] DEBUG (pciif:151) Reconfiguring PCI device 0000:03:00.0.
[2009-08-31 21:06:28 4851] INFO (pciquirk:92) NO quirks found for PCI device [10de:0640:0000:0000]
[2009-08-31 21:06:28 4851] DEBUG (pciquirk:135) Permissive mode NOT enabled for PCI device [10de:0640:0000:0000]
[2009-08-31 21:06:28 4851] DEBUG (pciif:312) pci: enabling ioport 0x2000/0x80
[2009-08-31 21:06:28 4851] DEBUG (pciif:326) pci: enabling iomem 0xb2000000/0x1000000 pfn 0xb2000/0x1000
[2009-08-31 21:06:28 4851] DEBUG (pciif:326) pci: enabling iomem 0xc0000000/0x20000000 pfn 0xc0000/0x20000
[2009-08-31 21:06:28 4851] DEBUG (pciif:326) pci: enabling iomem 0xb0000000/0x2000000 pfn 0xb0000/0x2000
[2009-08-31 21:06:28 4851] DEBUG (pciif:355) pci: enabling irq 16
[2009-08-31 21:06:28 4851] DEBUG (XendDomainInfo:3150) Storing VM details: {'on_xend_stop': 'ignore', 'shadow_memory': '17', 'uuid': '3f3da690-84db-e24a-4831-e385fbfe6de3', 'on_reboot': 'restart', 'start_time': '1251749188.71', 'on_poweroff': 'destroy', 'bootloader_args': '', 'on_xend_start': 'ignore', 'on_crash': 'restart', 'xend/restart_count': '0', 'vcpus': '1', 'vcpu_avail': '1', 'bootloader': '', 'image': '(hvm (kernel ) (superpages 0) (videoram 4) (hpet 0) (stdvga 0) (loader /usr/lib/xen/boot/hvmloader) (serial pty) (vncunused 1) (xen_platform_pci 1) (opengl 1) (gfx_passthru 2) (boot c) (rtc_timeoffset 0) (pci ((0x0000 0x03 0x00 0x0 0x100 ()))) (pae 1) (vpt_align 1) (hap 1) (viridian 0) (acpi 1) (localtime 0) (timer_mode 1) (vnc 1) (nographic 0) (guest_os_type default) (pci_msitranslate 1) (apic 1) (sdl 0) (monitor 0) (device_model /usr/lib/xen/bin/qemu-dm) (pci_power_mgmt 0) (usb 0) (xauthority /root/.Xauthority) (isa 0) (notes (SUSPEND_CANCEL 1)))', 'name': 'WinXP'} [2009-08-31 21:06:28 4851] DEBUG (XendDomainInfo:1685) Storing domain details: {'console/port': '3', 'name': 'WinXP', 'console/limit': '1048576', 'store/port': '2', 'vm': '/vm/3f3da690-84db-e24a-4831-e385fbfe6de3', 'domid': '1', 'image/suspend-cancel': '1', 'cpu/0/availability': 'online', 'memory/target': '2097152', 'control/platform-feature-multiprocessor-suspend': '1', 'store/ring-ref': '1044476', 'console/type': 'ioemu'}
[2009-08-31 21:06:28 4851] DEBUG (DevController:95) DevController: writing {'state': '1', 'backend-id': '0', 'backend': '/local/domain/0/backend/console/1/0'} to /local/domain/1/device/console/0.
[2009-08-31 21:06:28 4851] DEBUG (DevController:97) DevController: writing {'domain': 'WinXP', 'frontend': '/local/domain/1/device/console/0', 'uuid': '700c7645-83c8-b254-013c-d2f30e2f04bb', 'frontend-id': '1', 'state': '1', 'location': '3', 'online': '1', 'protocol': 'vt100'} to /local/domain/0/backend/console/1/0.
[2009-08-31 21:06:28 4851] DEBUG (pciif:453) XendDomainInfo.handleAerStateWatch
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices tap2.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices vif.
[2009-08-31 21:06:28 4851] DEBUG (DevController:144) Waiting for 0.
[2009-08-31 21:06:28 4851] DEBUG (XendDomainInfo:1772) XendDomainInfo.handleShutdownWatch
[2009-08-31 21:06:28 4851] DEBUG (DevController:628) hotplugStatusCallback /local/domain/0/backend/vif/1/0/hotplug-status.
[2009-08-31 21:06:28 4851] DEBUG (DevController:642) hotplugStatusCallback 1.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices vscsi.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices vbd.
[2009-08-31 21:06:28 4851] DEBUG (DevController:144) Waiting for 768.
[2009-08-31 21:06:28 4851] DEBUG (DevController:628) hotplugStatusCallback /local/domain/0/backend/vbd/1/768/hotplug-status.
[2009-08-31 21:06:28 4851] DEBUG (DevController:642) hotplugStatusCallback 1.
[2009-08-31 21:06:28 4851] DEBUG (DevController:144) Waiting for 5632.
[2009-08-31 21:06:28 4851] DEBUG (DevController:628) hotplugStatusCallback /local/domain/0/backend/vbd/1/5632/hotplug-status.
[2009-08-31 21:06:28 4851] DEBUG (DevController:642) hotplugStatusCallback 1.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices irq.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices vkbd.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices vfb.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices console.
[2009-08-31 21:06:28 4851] DEBUG (DevController:144) Waiting for 0.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices pci.
[2009-08-31 21:06:28 4851] DEBUG (DevController:144) Waiting for 0.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices ioports.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices tap.
[2009-08-31 21:06:28 4851] DEBUG (DevController:139) Waiting for devices vtpm.
[2009-08-31 21:06:28 4851] INFO (XendDomain:1180) Domain WinXP (1) unpaused.
02:00.0 VGA compatible controller: nVidia Corporation GT200 [GeForce GTX 260] (rev a1) (prog-if 00 [VGA controller])
Subsystem: nVidia Corporation Device 068e
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 11
Region 0: Memory at b6000000 (32-bit, non-prefetchable) [size=16M]
Region 1: Memory at e0000000 (64-bit, prefetchable) [size=256M]
Region 3: Memory at b4000000 (64-bit, non-prefetchable) [size=32M]
Region 5: I/O ports at 3000 [size=128]
Expansion ROM at <ignored> [disabled]
Capabilities: [60] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [78] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <1us, L1 <4us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Latency L0 <1us, L1 <1us
ClockPM- Surprise- LLActRep- BwNot-
LnkCtl: ASPM L0s L1 Enabled; RCB 128 bytes Disabled- Retrain- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
Capabilities: [100] Virtual Channel <?>
Capabilities: [128] Power Budgeting <?>
Capabilities: [600] Vendor Specific Information <?>
03:00.0 VGA compatible controller: nVidia Corporation G96 [GeForce 9500 GT] (rev a1) (prog-if 00 [VGA controller])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 16
Region 0: Memory at b2000000 (32-bit, non-prefetchable) [size=16M]
Region 1: Memory at c0000000 (64-bit, prefetchable) [size=512M]
Region 3: Memory at b0000000 (64-bit, non-prefetchable) [size=32M]
Region 5: I/O ports at 2000 [size=128]
Capabilities: [60] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: 00000000fee003f8 Data: 0000
Capabilities: [78] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <256ns, L1 <4us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Latency L0 <256ns, L1 <1us
ClockPM- Surprise- LLActRep- BwNot-
LnkCtl: ASPM L1 Enabled; RCB 128 bytes Disabled- Retrain- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
Capabilities: [b4] Vendor Specific Information <?>
Capabilities: [100] Virtual Channel <?>
Capabilities: [128] Power Budgeting <?>
Capabilities: [600] Vendor Specific Information <?>
Kernel driver in use: pciback
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Han, Weidong
AppliedI forgot to mention that you should change memory addresses in xen-vBAR-pBAR.patch according to your MMIO BARs of your assigned gfx card.
For example, the output of 'lspci -s 01:00.0 -v':
01:00.0 VGA compatible controller: nVidia Corporation Unknown device 05ff (rev a1) (prog-if 00 [VGA controller])
Subsystem: nVidia Corporation Unknown device 0661
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at c2000000 (32-bit, non-prefetchable) [size=16M]
Memory at e0000000 (64-bit, prefetchable) [size=256M]
Memory at c0000000 (64-bit, non-prefetchable) [size=32M]
I/O ports at 9c00 [size=128]
Expansion ROM at bff00000 [disabled] [size=512K]
Capabilities: [60] Power Management version 3
Capabilities: [68] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable+
Capabilities: [78] Express Endpoint IRQ 0
you can see I reserve above memories in dsdt.asl in xen-vBAR-pBAR.patch. you should replace them with memories of your gfx.
Regards,
Weidong
________________________________
From: Tim Moore [mailto:[email protected]]
Sent: 2009年9月1日 3:35
To: Han, Weidong
Cc: '[email protected]'; '[email protected]'
Subject: RE: [Xen-devel] graphics passthrough with VT-d
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
Andpt_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:[email protected]]
Sent: 31 August 2009 09:47
To: '[email protected]'; Tim Moore
Cc: '[email protected]'
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: [email protected] [mailto:[email protected]] On Behalf Of Mr. Teo En Ming (Zhang Enming)
Sent: 2009年8月29日 22:13
To: [email protected]
Cc: [email protected]
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: [email protected]<mailto:[email protected]>
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:[email protected]]
Sent: 29 August 2009 14:21
To: [email protected]<mailto:[email protected]>
Cc: Tim Moore; [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
Email #2: [email protected]<mailto:[email protected]>
MSN: [email protected]<mailto:[email protected]>
Mobile Phone: +65-9648-9798
ssdt_pm.h 2009-08-29 19:56:51.813088550 +0800 renamed from ssdt_pm.h 2009-08-29 19:54:52.653088000 +0800 +1 -1
@@ -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:57:27.896638884 +0800 renamed from ssdt_tpm.h 2009-08-29 19:55:44.578738954 +0800 +1 -1
@@ -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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Mr. Teo En Ming (Zhang Enming)
Sent: 28 August 2009 21:14
To: [email protected]<mailto:[email protected]>
Cc: [email protected]<mailto:[email protected]>; 'Lin, Ben Y'; 'Kay, Allen M'; 'Jean Guyader'; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
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
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
[email protected]<mailto:[email protected]>
http://lists.xensource.com/xen-devel
________________________________
_______________________________________________
Xen-devel mailing list
[email protected]<mailto:[email protected]>
http://lists.xensource.com/xen-devel
________________________________
_______________________________________________
Xen-devel mailing list
[email protected]<mailto:[email protected]>
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel