From: "Mr. Teo En Ming (Zhang Enming)" <enming.teo@asiasoftsea.net>
To: timothy.moore@expidas.net
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH(es)] graphics passthrough with VT-d
Date: Sat, 29 Aug 2009 00:28:50 +0800 [thread overview]
Message-ID: <4A9805C2.2030409@asiasoftsea.net> (raw)
In-Reply-To: <14D9C9E2ED61ED41BC3B37ACDF4E880002CE4F3F9CE3@heavy-vm03.heavy.org.uk>
[-- Attachment #1.1: Type: text/plain, Size: 12176 bytes --]
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.
--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering)
Technical Support Engineer
Information Technology Department
Asiasoft Online Pte Ltd
Tampines Central 1 #04-01 Tampines Plaza
Singapore 529541
Republic of Singapore
Mobile: +65-9648-9798
MSN: teoenming@hotmail.com
Alma Maters: Singapore Polytechnic, National University of Singapore
On 08/29/2009 12:10 AM, Tim Moore wrote:
>
> 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:* xen-devel-bounces@lists.xensource.com
> [mailto:xen-devel-bounces@lists.xensource.com] *On Behalf Of *Mr. Teo
> En Ming (Zhang Enming)
> *Sent:* 28 August 2009 16:55
> *To:* weidong.han@intel.com
> *Cc:* xen-devel@lists.xensource.com; 'Lin, Ben Y'; 'Kay, Allen M';
> 'Jean Guyader'; Keir.Fraser@eu.citrix.com; bengheng@eecs.umich.edu
> *Subject:* Re: [Xen-devel] [PATCH 2/2] 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]# 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 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]# 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.patch tools/ioemu-remote/
> [root@fedora11-x86-64-host xen-unstable.hg-vgapt]# cd tools/ioemu-remote/
> [root@fedora11-x86-64-host ioemu-remote]# patch -p1< qemu-
> qemu-aio.h qemu-img.c qemu-sockets.c
> qemu-binfmt-conf.sh qemu-img.texi qemu-tech.texi
> qemu-char.c qemu-lock.h qemu-timer.h
> qemu-char.h qemu-log.h qemu-tool.c
> qemu-common.h qemu-malloc.c qemu-xen.h
> qemu-doc.texi qemu-nbd.c
> qemu-gfx-passthrough.patch qemu-nbd.texi
> [root@fedora11-x86-64-host ioemu-remote]# patch -p1< qemu-gfx-passthrough.patch
> patching file hw/pass-through.c
> patching file hw/pass-through.h
> patching file hw/pc.c
> patching file vl.c
> [root@fedora11-x86-64-host ioemu-remote]# cd ..
> [root@fedora11-x86-64-host tools]# cd ..
> [root@fedora11-x86-64-host xen-unstable.hg-vgapt]# vi intel-gfx-passthru-patch-3.patch
> [root@fedora11-x86-64-host xen-unstable.hg-vgapt]# patch -p1< intel-gfx-passthru-patch-3.patch
> patching file tools/firmware/hvmloader/Makefile
> Hunk #1 FAILED at 50.
> 1 out of 1 hunk FAILED -- saving rejects to file tools/firmware/hvmloader/Makefile.rej
> patching file tools/firmware/hvmloader/hvmloader.c
> patch: **** malformed patch at line 24: sizeof(vgabios_pt));
>
> [root@fedora11-x86-64-host xen-unstable.hg-vgapt]# vi intel-gfx-passthru-patch-3.patch
>
> For everybody's convenience, I have attached intel-gfx-passthru-patch-3.patch and the firmware for my nVidia GeForce 8400 GS PCI Express x16 graphics card in this email.
>
> Please help me complete intel-gfx-passthru-patch-3.patch as I really need it.
>
> Thank you very much!!!
> --
> Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering)
> Technical Support Engineer
> Information Technology Department
> Asiasoft Online Pte Ltd
> Tampines Central 1 #04-01 Tampines Plaza
> Singapore 529541
> Republic of Singapore
> Mobile: +65-9648-9798
> MSN:teoenming@hotmail.com <mailto:teoenming@hotmail.com>
> Alma Maters: Singapore Polytechnic, National University of Singapore
>
> This patch supports basic gfx passthrough on QEMU:
>
> - disable emulated VGA adpater if there is passthroughed gfx
>
> - register/unregister legacy VGA I/O ports and MMIOs for passthroughed gfx
>
>
>
> Signed-off-by: Ben Lin<ben.y.lin@intel.com> <mailto:ben.y.lin@intel.com>
>
> Signed-off-by: Weidong Han<weidong.han@intel.com> <mailto:weidong.han@intel.com>
>
> No virus found in this incoming message.
>
> Checked by AVG -www.avg.com <http://www.avg.com>
>
> Version: 8.5.409 / Virus Database: 270.13.69/2328 - Release Date: 08/27/09
>
> 18:02:00
>
>
>
> No virus found in this outgoing message.
>
> Checked by AVG -www.avg.com <http://www.avg.com>
>
> Version: 8.5.409 / Virus Database: 270.13.71/2330 - Release Date: 08/27/09
>
> 18:02:00
>
>
>
>
>
> ------------------------------------------------------------------------
>
>
>
>
>
>
> _______________________________________________
>
> Xen-devel mailing list
>
> Xen-devel@lists.xensource.com <mailto:Xen-devel@lists.xensource.com>
>
> http://lists.xensource.com/xen-devel
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
[-- Attachment #1.2: Type: text/html, Size: 25746 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2009-08-28 16:28 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-28 15:34 [PATCH 2/2] graphics passthrough with VT-d Teo En Ming (Zhang Enming)
2009-08-28 15:55 ` Mr. Teo En Ming (Zhang Enming)
2009-08-28 16:08 ` Mr. Teo En Ming (Zhang Enming)
2009-08-28 16:10 ` [PATCH(es)] " Tim Moore
2009-08-28 16:19 ` Alan Cox
2009-08-28 16:22 ` Tim Moore
2009-08-28 16:28 ` Mr. Teo En Ming (Zhang Enming) [this message]
2009-08-28 16:31 ` Mr. Teo En Ming (Zhang Enming)
2009-08-28 16:36 ` Alan Cox
2009-08-28 16:39 ` Mr. Teo En Ming (Zhang Enming)
2009-08-28 16:59 ` [PATCH 2/2] " Mr. Teo En Ming (Zhang Enming)
2009-08-28 20:13 ` Mr. Teo En Ming (Zhang Enming)
2009-08-28 22:42 ` Tim Moore
2009-08-29 2:17 ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 3:48 ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 6:58 ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 11:03 ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 12:25 ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 13:20 ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 13:29 ` Tim Moore
2009-08-29 14:12 ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 14:48 ` Mr. Teo En Ming (Zhang Enming)
2009-08-31 8:47 ` Han, Weidong
2009-08-31 14:54 ` Mr. Teo En Ming (Zhang Enming)
2009-08-31 16:48 ` Christian Tramnitz
2009-08-31 17:03 ` djmagee
2009-08-31 17:18 ` Keir Fraser
2009-08-31 17:22 ` Mr. Teo En Ming (Zhang Enming)
2009-08-31 21:14 ` Christian Tramnitz
2009-09-01 8:08 ` Han, Weidong
2009-09-01 8:29 ` Christian Tramnitz
2009-09-01 8:59 ` Han, Weidong
2009-09-02 8:38 ` Christian Tramnitz
2009-09-02 8:48 ` Teo En Ming (Zhang Enming)
2009-09-02 8:57 ` Han, Weidong
2009-09-03 19:38 ` Christian Tramnitz
2009-09-04 10:25 ` Christian Tramnitz
2009-08-31 19:35 ` Tim Moore
2009-09-01 1:07 ` Han, Weidong
2009-09-01 7:12 ` Han, Weidong
2009-08-29 13:46 ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 14:39 ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 15:06 ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 10:41 ` Failure when "make tools" via xen-3.4.1 tarball on Ubuntu 9.10 Server ALPHA 4 Boris Derzhavets
2009-08-29 11:05 ` Boris Derzhavets
2009-08-29 15:17 ` Failure to setup Xen 3.4.1 Dom0 on top of Ubuntu 9.10 Server HVM DomU ( 2.6.30.2 xenified kernel) Boris Derzhavets
2009-08-30 9:32 ` Boris Derzhavets
2009-08-30 12:44 ` Keir Fraser
2009-08-30 13:19 ` Boris Derzhavets
2009-08-30 17:55 ` Ian Pratt
2009-08-30 18:17 ` Tim Moore
2009-08-30 18:32 ` Keir Fraser
2009-08-30 13:26 ` Christian Tramnitz
2009-08-30 15:17 ` Boris Derzhavets
2009-08-30 15:53 ` Boris Derzhavets
2009-08-30 15:50 ` Keir Fraser
2009-08-30 16:22 ` Boris Derzhavets
2009-08-30 16:41 ` Keir Fraser
2009-08-30 16:55 ` Keir Fraser
2009-08-30 17:10 ` Boris Derzhavets
2009-08-30 17:49 ` Keir Fraser
2009-08-30 18:14 ` Failure to start Xen >3.4.1 and xen-3.5-unstable Dom0 using GRUB2 Tim Moore
2009-08-30 18:19 ` Re: Failure to setup Xen 3.4.1 Dom0 on top of Ubuntu 9.10 Server HVM DomU ( 2.6.30.2 xenified kernel) Boris Derzhavets
2009-08-31 7:17 ` Boris Derzhavets
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A9805C2.2030409@asiasoftsea.net \
--to=enming.teo@asiasoftsea.net \
--cc=timothy.moore@expidas.net \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.