From: Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= Subject: Re: Video Presentation on PCI Express x16 VGA Pass Through to Xen-based Windows XP Home Edition HVM Virtual Machine Date: Sun, 13 Sep 2009 22:45:44 +0300 Message-ID: <20090913194544.GY31123@reaktio.net> References: <20090911160319.GJ31123@reaktio.net> <20090913091247.GM31123@reaktio.net> <20090913192610.GW31123@reaktio.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Mr. Teo En Ming (Zhang Enming)" Cc: Jeremy Fitzhardinge , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Mon, Sep 14, 2009 at 03:33:57AM +0800, Mr. Teo En Ming (Zhang Enming) = wrote: > Dear Pasi, >=20 > No, I have not tried it yet. I have 8 GB of memory on my computer. >=20 > What does dom0_mem parameter do? >=20 > If I set dom0_mem, does it mean I cannot access more than 4 GB of memor= y > even though I have 8 GB of memory? >=20 Yes. It limits the memory dom0 will have. The rest of the memory is available for other virtual machines (ie. "xm info" lists it as free memory). If you don't limit dom0 memory then every time you create a guest dom0 memory needs to be ballooned down to be able to give it to the new guest. So it's better to always have dom0_mem specified, so that dom0 kernel settings don't get confused when it gets ballooned much more down than what it had available at boot time. Example grub.conf entry: kernel /boot/xen-3.4.gz dom0_mem=3D1024M This allocates 1024 MB of memory for dom0, and the rest is free for other domains to use. There is a bug in the recent pv_ops dom0 kernel that causes problems if dom0 has >4096 MB of memory. So please try to limit your dom0 memory, it might fix the USB problems. -- Pasi > --=20 > Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical > Engineering) > Alma Maters: > (1) Singapore Polytechnic > (2) National University of Singapore > Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com > Email: space.time.universe@gmail.com > MSN: teoenming@hotmail.com > Mobile Phone: +65-9648-9798 > Street: Bedok Reservoir Road > Republic of Singapore >=20 > On Mon, Sep 14, 2009 at 3:26 AM, Pasi K=E4rkk=E4inen wro= te: >=20 > > On Mon, Sep 14, 2009 at 02:22:00AM +0800, Mr. Teo En Ming (Zhang Enmi= ng) > > wrote: > > > Dear Pasi, > > > > > > Yes, I have tried the nomodeset kernel parameter without result. > > > > > > I couldn't get Jeremy's rebase/master branch (pvops dom 0 kernel 2.= 6.31) > > to > > > work despite disabling all of USB support in the kernel. I will > > troubleshoot > > > this issue with the serial console enabled another time. > > > > > > Meanwhile, I got Linus' mainline kernel 2.6.31 to work on my system= . So > > > apparently the dom 0 patched kernel 2.6.31 has some issues or I did= not > > > configure it properly. > > > > > > > Did you try pv_ops dom0 kernel with dom0_mem=3D1024M parameter for xe= n.gz? > > > > Some others are seeing problems with the recent kernels if they have > > >4096M of memory for dom0. > > > > -- Pasi > > > > > -- > > > Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechani= cal > > > Engineering) > > > Alma Maters: > > > (1) Singapore Polytechnic > > > (2) National University of Singapore > > > Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com > > > Email: space.time.universe@gmail.com > > > MSN: teoenming@hotmail.com > > > Mobile Phone: +65-9648-9798 > > > Street: Bedok Reservoir Road > > > Republic of Singapore > > > > > > On Sun, Sep 13, 2009 at 5:12 PM, Pasi K=E4rkk=E4inen = wrote: > > > > > > > On Sun, Sep 13, 2009 at 08:31:26AM +0800, Mr. Teo En Ming (Zhang > > Enming) > > > > wrote: > > > > > I have disabled all USB support in the kernel but I still could= n't > > get > > > > pvops > > > > > dom0-patched kernel 2.6.31 final to complete loading. All I get= is a > > > > > blinking cursor at the top left hand corner of the monitor. > > > > > > > > > > > > > Did you try "nomodeset" parameter for the dom0 kernel? > > > > > > > > Have you tried setting up a serial console and capturing the kern= el > > boot > > > > messages? > > > > > > > > -- Pasi > > > > > > > > > -- > > > > > Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) > > BEng(Hons)(Mechanical > > > > > Engineering) > > > > > Alma Maters: > > > > > (1) Singapore Polytechnic > > > > > (2) National University of Singapore > > > > > Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com > > > > > Email: space.time.universe@gmail.com > > > > > MSN: teoenming@hotmail.com > > > > > Mobile Phone: +65-9648-9798 > > > > > Street: Bedok Reservoir Road > > > > > Republic of Singapore > > > > > > > > > > On Sat, Sep 12, 2009 at 8:23 PM, Mr. Teo En Ming (Zhang Enming)= < > > > > > space.time.universe@gmail.com> wrote: > > > > > > > > > > > OK I have UHCI, OHCI, EHCI, and xHCI all disabled in the kern= el but > > I > > > > still > > > > > > can't get pvops dom 0 kernel 2.6.31 final to boot up complete= ly. > > > > > > > > > > > > Really puzzled. > > > > > > > > > > > > -- > > > > > > Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) > > BEng(Hons)(Mechanical > > > > > > Engineering) > > > > > > Alma Maters: > > > > > > (1) Singapore Polytechnic > > > > > > (2) National University of Singapore > > > > > > Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com > > > > > > Email: space.time.universe@gmail.com > > > > > > MSN: teoenming@hotmail.com > > > > > > Mobile Phone: +65-9648-9798 > > > > > > Street: Bedok Reservoir Road > > > > > > Republic of Singapore > > > > > > > > > > > > On Sat, Sep 12, 2009 at 6:11 PM, Mr. Teo En Ming (Zhang Enmin= g) < > > > > > > space.time.universe@gmail.com> wrote: > > > > > > > > > > > >> I have disabled USB 1.0 and USB 2.0 drivers simultaneously a= nd > > enabled > > > > USB > > > > > >> 3.0 driver but the kernel stops loading. > > > > > >> > > > > > >> Then I totally disabled all USB support by passing the "nous= b" > > > > parameter > > > > > >> to the kernel but it still stops loading. > > > > > >> > > > > > >> pvops dom 0 2.6.31 final can't work. > > > > > >> > > > > > >> -- > > > > > >> Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) > > BEng(Hons)(Mechanical > > > > > >> Engineering) > > > > > >> Alma Maters: > > > > > >> (1) Singapore Polytechnic > > > > > >> (2) National University of Singapore > > > > > >> Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com > > > > > >> Email: space.time.universe@gmail.com > > > > > >> MSN: teoenming@hotmail.com > > > > > >> Mobile Phone: +65-9648-9798 > > > > > >> Street: Bedok Reservoir Road > > > > > >> Republic of Singapore > > > > > >> > > > > > >> On Sat, Sep 12, 2009 at 4:44 PM, Mr. Teo En Ming (Zhang Enmi= ng) < > > > > > >> space.time.universe@gmail.com> wrote: > > > > > >> > > > > > >>> After disabling the USB 1.0 driver, but leaving the USB 2.0 > > driver > > > > > >>> compiled statically into the kernel, I get an error with th= e USB > > 2.0 > > > > driver. > > > > > >>> This means I cannot use either of the USB 1.0 and USB 2.0 > > drivers. > > > > > >>> > > > > > >>> Please refer to my blog post here: > > > > > >>> > > > > > >>> > > > > > >>> > > > > > > http://teo-en-ming-aka-zhang-enming.blogspot.com/2009/09/after-disabl= ing-usb-10-host-controller.html > > > > > >>> > > > > > >>> -- > > > > > >>> Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) > > > > BEng(Hons)(Mechanical > > > > > >>> Engineering) > > > > > >>> Alma Maters: > > > > > >>> (1) Singapore Polytechnic > > > > > >>> (2) National University of Singapore > > > > > >>> Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com > > > > > >>> Email: space.time.universe@gmail.com > > > > > >>> MSN: teoenming@hotmail.com > > > > > >>> Mobile Phone: +65-9648-9798 > > > > > >>> Street: Bedok Reservoir Road > > > > > >>> Republic of Singapore > > > > > >>> > > > > > >>> On Sat, Sep 12, 2009 at 10:52 AM, Mr. Teo En Ming (Zhang En= ming) > > < > > > > > >>> space.time.universe@gmail.com> wrote: > > > > > >>> > > > > > >>>> Hi, > > > > > >>>> > > > > > >>>> I have tried pvops dom 0 kernel 2.6.31 final from Jeremy's= tree. > > > > > >>>> > > > > > >>>> But it gave me a USB host controller died error. > > > > > >>>> > > > > > >>>> Please refer to the error output here: > > > > > >>>> > > > > > >>>> > > > > > >>>> > > > > > > http://teo-en-ming-aka-zhang-enming.blogspot.com/2009/09/error-with-p= v-ops-dom-0-kernel-2631.html > > > > > >>>> > > > > > >>>> -- > > > > > >>>> Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) > > > > BEng(Hons)(Mechanical > > > > > >>>> Engineering) > > > > > >>>> Alma Maters: > > > > > >>>> (1) Singapore Polytechnic > > > > > >>>> (2) National University of Singapore > > > > > >>>> Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com > > > > > >>>> Email: space.time.universe@gmail.com > > > > > >>>> MSN: teoenming@hotmail.com > > > > > >>>> Mobile Phone: +65-9648-9798 > > > > > >>>> Street: Bedok Reservoir Road > > > > > >>>> Republic of Singapore > > > > > >>>> > > > > > >>>> On Sat, Sep 12, 2009 at 12:03 AM, Pasi K=E4rkk=E4inen > > > > > > wrote: > > > > > >>>> > > > > > >>>>> On Fri, Sep 11, 2009 at 11:37:15PM +0800, Mr. Teo En Ming > > (Zhang > > > > > >>>>> Enming) wrote: > > > > > >>>>> > Hi, > > > > > >>>>> > > > > > > >>>>> > Please refer to the disk I/O benchmark results here: > > > > > >>>>> > > > > > > >>>>> > > > > > > >>>>> > > > > > > http://teo-en-ming-aka-zhang-enming.blogspot.com/2009/09/disk-io-benc= hmark-results-with-xen.html > > > > > >>>>> > > > > > > >>>>> > Results show that Win XP HVM guest runs faster in 2.6.3= 0-rc3 > > than > > > > > >>>>> > 2.6.31-rc6. > > > > > >>>>> > > > > > > >>>>> > > > > > >>>>> Btw you might also want to test with the latest rebase/ma= ster > > tree; > > > > > >>>>> it's > > > > > >>>>> at Linux 2.6.31 final now. > > > > > >>>>> > > > > > >>>>> -- Pasi > > > > > >>>>> > > > > > >>>>> > -- > > > > > >>>>> > Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) > > > > > >>>>> BEng(Hons)(Mechanical > > > > > >>>>> > Engineering) > > > > > >>>>> > Alma Maters: > > > > > >>>>> > (1) Singapore Polytechnic > > > > > >>>>> > (2) National University of Singapore > > > > > >>>>> > Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.= com > > > > > >>>>> > Email: space.time.universe@gmail.com > > > > > >>>>> > MSN: teoenming@hotmail.com > > > > > >>>>> > Mobile Phone: +65-9648-9798 > > > > > >>>>> > Street: Bedok Reservoir Road > > > > > >>>>> > Republic of Singapore > > > > > >>>>> > > > > > > >>>>> > On Fri, Sep 11, 2009 at 8:19 AM, Mr. Teo En Ming (Zhang > > Enming) < > > > > > >>>>> > space.time.universe@gmail.com> wrote: > > > > > >>>>> > > > > > > >>>>> > > Hi, > > > > > >>>>> > > > > > > > >>>>> > > I will try to stop unnecessary services on Dom 0 and = do a > > disk > > > > I/O > > > > > >>>>> > > benchmark between WinXP domU on 2.6.30-rc3 and 2.6.31= -rc6 > > > > tonight > > > > > >>>>> (Singapore > > > > > >>>>> > > time). That will be more conclusive. > > > > > >>>>> > > > > > > > >>>>> > > -- > > > > > >>>>> > > Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) > > > > > >>>>> BEng(Hons)(Mechanical > > > > > >>>>> > > Engineering) > > > > > >>>>> > > Alma Maters: > > > > > >>>>> > > (1) Singapore Polytechnic > > > > > >>>>> > > (2) National University of Singapore > > > > > >>>>> > > Blog URL: http://teo-en-ming-aka-zhang-enming.blogspo= t.com > > > > > >>>>> > > Email: space.time.universe@gmail.com > > > > > >>>>> > > MSN: teoenming@hotmail.com > > > > > >>>>> > > Mobile Phone: +65-9648-9798 > > > > > >>>>> > > Street: Bedok Reservoir Road > > > > > >>>>> > > Republic of Singapore > > > > > >>>>> > > > > > > > >>>>> > > On Fri, Sep 11, 2009 at 2:17 AM, Jeremy Fitzhardinge = < > > > > > >>>>> jeremy@goop.org>wrote: > > > > > >>>>> > > > > > > > >>>>> > >> On 09/10/09 07:03, Pasi K=E4rkk=E4inen wrote: > > > > > >>>>> > >> > On Thu, Sep 10, 2009 at 08:28:03PM +0800, Mr. Teo = En > > Ming > > > > (Zhang > > > > > >>>>> Enming) > > > > > >>>>> > >> wrote: > > > > > >>>>> > >> > > > > > > >>>>> > >> >> Dear All, > > > > > >>>>> > >> >> > > > > > >>>>> > >> >> Here is my latest video presentation on VGA > > passthrough. > > > > Please > > > > > >>>>> check > > > > > >>>>> > >> out my > > > > > >>>>> > >> >> blog at > > http://teo-en-ming-aka-zhang-enming.blogspot.com/or > > > > > >>>>> the > > > > > >>>>> > >> Youtube > > > > > >>>>> > >> >> link at http://www.youtube.com/watch?v=3D1ia3IwG6= tp4 > > > > > >>>>> > >> >> > > > > > >>>>> > >> >> The "not enough free resources" problem for nVidi= a > > Geforce > > > > 8400 > > > > > >>>>> GS PCI > > > > > >>>>> > >> >> Express x16 graphics card in earlier presentation > > videos: > > > > > >>>>> > >> >> > > > > > >>>>> > >> >> http://www.youtube.com/watch?v=3DHNEiSI...< > > > > > >>>>> > >> http://www.youtube.com/watch?v=3DHNEiSInrav0> > > > > > >>>>> > >> >> > > > > > >>>>> > >> >> http://www.youtube.com/watch?v=3D_hOT_9...< > > > > > >>>>> > >> http://www.youtube.com/watch?v=3D_hOT_9LIG5w> > > > > > >>>>> > >> >> > > > > > >>>>> > >> >> was fixed. Device manager in Windows XP HVM domU = no > > longer > > > > > >>>>> shows an > > > > > >>>>> > >> >> exclamation mark besides the nVidia Geforce 8400 = GS > > > > graphics > > > > > >>>>> card. The > > > > > >>>>> > >> >> device is working properly and the resources tab = shows > > the > > > > > >>>>> available > > > > > >>>>> > >> memory > > > > > >>>>> > >> >> ranges. > > > > > >>>>> > >> >> > > > > > >>>>> > >> >> Full VGA passthrough to Windows XP HVM guest oper= ating > > > > system > > > > > >>>>> using Xen > > > > > >>>>> > >> >> virtualization has been realized. I am now able t= o run > > 3-D > > > > > >>>>> video > > > > > >>>>> > >> benchmarks > > > > > >>>>> > >> >> on the passed through nVidia GeForce 8400 GS grap= hics > > card. > > > > > >>>>> > >> >> > > > > > >>>>> > >> >> All this is possible using Xen 3.5 hypervisor wit= h > > Intel > > > > > >>>>> supplied VGA > > > > > >>>>> > >> >> passthrough patches. Instead of using pvops dom0 = kernel > > > > > >>>>> 2.6.31-rc6 > > > > > >>>>> > >> which > > > > > >>>>> > >> >> causes Win XP domU to run slowly, I am now using = pvops > > dom0 > > > > > >>>>> kernel > > > > > >>>>> > >> >> 2.6.30-rc3. > > > > > >>>>> > >> >> > > > > > >>>>> > >> >> > > > > > >>>>> > >> > Jeremy: Are you aware of any changes after 2.6.30-= rc3 > > that > > > > could > > > > > >>>>> cause > > > > > >>>>> > >> > this HVM slowness? > > > > > >>>>> > >> > > > > > > >>>>> > >> > > > > > >>>>> > >> I can't think of anything, unless the new swiotlb co= de is > > > > causing > > > > > >>>>> > >> problems. > > > > > >>>>> > >> > > > > > >>>>> > >> > Any tips how it could be debugged? > > > > > >>>>> > >> > > > > > > >>>>> > >> > > > > > >>>>> > >> It would help to isolate where the slowness is comin= g > > from. > > > > How > > > > > >>>>> much > > > > > >>>>> > >> slowdown are we talking about? Is the HVM domain do= ing > > lots > > > > of IO > > > > > >>>>> at > > > > > >>>>> > >> the time? Are there any processes using lots of tim= e in > > dom0? > > > > > >>>>> What's > > > > > >>>>> > >> the interrupt rate like? > > > > > >>>>> > >> > > > > > >>>>> > >> J > > > > > >>>>> > >> > > > > > >>>>> > > > > > > > >>>>> > > > > > > > >>>>> > > > > > > > >>>>> > > > > > > > >>>>> > > > > > > > >>>>> > > > > > >>>> > > > > > >>>> > > > > > >>>> > > > > > >>>> > > > > > >>>> > > > > > >>> > > > > > >>> > > > > > >>> > > > > > >>> > > > > > >> > > > > > >> > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >