From mboxrd@z Thu Jan 1 00:00:00 1970 From: David TECHER Subject: Re : Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable Date: Tue, 6 Dec 2011 13:57:30 +0000 (GMT) Message-ID: <1323179850.78658.YahooMailNeo@web29801.mail.ird.yahoo.com> References: <1316777654598-4833174.post@n5.nabble.com> <1316786412428-4833637.post@n5.nabble.com> <20110923172115.GI12984@reaktio.net> <1318672856439-4904945.post@n5.nabble.com> <1319630071722-4939528.post@n5.nabble.com> <1319636130.20499.YahooMailNeo@web29808.mail.ird.yahoo.com> <1319695116310-4942047.post@n5.nabble.com> <1319710499.206.YahooMailNeo@web29804.mail.ird.yahoo.com> <1323123990448-5050354.post@n5.nabble.com> <1323170568.90631.YahooMailNeo@web29813.mail.ird.yahoo.com> <1323173094434-5051880.post@n5.nabble.com> Reply-To: David TECHER Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7989788617255817618==" Return-path: In-Reply-To: <1323173094434-5051880.post@n5.nabble.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: n4rC0t1C , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --===============7989788617255817618== Content-Type: multipart/alternative; boundary="908097277-1377650170-1323179850=:78658" --908097277-1377650170-1323179850=:78658 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi=0A=0AThanks for these informations. I am on Debian. So it could be usefu= ll for Ubuntu users.=0A=0AThanks.=0A=0ADavid=0A=0A=0A=0A___________________= _____________=0A De=A0: n4rC0t1C =0A=C0=A0: xen-devel@l= ists.xensource.com =0AEnvoy=E9 le : Mardi 6 D=E9cembre 2011 13h04=0AObjet= =A0: Re: [Xen-devel] Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA= -Passthrough XEN 4.2 unstable=0A =0AIep I used your last patches, (your web= site it's at the top of my bookmarks),=0Aand they apply to xen-unstable rev= . 24341 as well (which i'm using). =0A=0AI forgot to mention that I had to = make a couple of fix to xen tree, cause it=0Awasn't compiling on my system = due to=A0 "error: format not a string literal=0Aand no format arguments":= =0A=0A=0A--- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_cr= eate.c=0A+++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_cr= eate.c=0A@@ -462,7 +462,7 @@=0A=A0 =A0 path =3D libxl__xs_libxl_path(gc, d= omid);=0A=A0 =A0 path =3D libxl__sprintf(gc, "%s/dm-version", path);=0A=A0= =A0 return libxl__xs_write(gc, XBT_NULL, path, libxl__strdup(gc,=0A-=A0 = =A0 =A0 =0Alibxl_device_model_version_to_string(dm_info->device_model_versi= on)));=0A+=A0 =A0 =A0 =0Alibxl_device_model_version_to_string(dm_info->devi= ce_model_version)),"%s");=0A}=0A=0Astatic int do_domain_create(libxl__gc *g= c, libxl_domain_config *d_config,=0A=0A=0A--- /usr/src/xen-unstable.hg-rev-= 24341-460gtx/tools/libxl/libxl_device.c=0A+++ /usr/src/xen-unstable.hg-rev-= 24341-460gtx/tools/libxl/libxl_device.c=0A@@ -516,7 +516,7 @@=0A=A0 =A0 =A0= =A0 for (j =3D 0; j < num_devs; j++) {=0A=A0 =A0 =A0 =A0 =A0 =A0 path = =3D libxl__sprintf(gc,=0A"/local/domain/%d/device/%s/%s/backend",=0A=A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 domid, kinds[= i], devs[j]);=0A-=A0 =A0 =A0 =A0 =A0 =A0 path =3D libxl__xs_read(gc, XBT_NU= LL, libxl__sprintf(gc, path));=0A+=A0 =A0 =A0 =A0 =A0 =A0 path =3D libxl__x= s_read(gc, XBT_NULL, libxl__sprintf(gc,=0Apath,"%s"));=0A=A0 =A0 =A0 =A0 = =A0 =A0 if (path && libxl__parse_backend_path(gc, path, &dev) =3D=3D 0) {= =0A=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 dev.domid =3D domid;=0A=A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 dev.kind =3D kind;=0A=0Aand an due to an argument missing:= =0A=0A--- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_dom.c= =0A+++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_dom.c=0A= @@ -625,7 +625,7 @@=0A=A0 =A0 =A0 =A0 break;=0A=A0 =A0 }=0A=A0 =A0 case = LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN:=0A-=A0 =A0 =A0 =A0 fd2 =3D open(filena= me, O_WRONLY | O_CREAT | O_TRUNC);=0A+=A0 =A0 =A0 =A0 fd2 =3D open(filename= , O_WRONLY | O_CREAT | O_TRUNC, 0644);=0A=A0 =A0 =A0 =A0 if (fd2 < 0) {=0A= =A0 =A0 =A0 =A0 =A0 =A0 LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,=0A=A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "Unable to create a QEM= U save file\n");=0A=0AAs far as I know those doesn't break anything, but do= nt take too seriously,=0Ai'm not an experienced developer :)=0A=0A=0AForgot= 2:=0ASince I'm using an ubuntu kernel, the xen support is not integrated, = but you=0Aneed to add xen modules at your inittrd file. I did this by addin= g those:=0A=0Axen-pciback passthrough=3D1=0Axen-blkback=0Axenfs=0Axen-netba= ck=0Apci-stub=0A=0Ato /etc/xen/initramfs-tools/modules and the issuing upda= te-initramfs. =0A=0AIn the future, I'll try to boot a linux domU, right now= I'm still smiling=0Acause I can fully wipe my Windows installation from th= e hard disk. And I'm=0Asure that in future Win7 will be supported too.=0A= =0AThanks again David and everyone,=0AIvo=0A=0A--=0AView this message in co= ntext: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2= -unstable-tp4406265p5051880.html=0ASent from the Xen - Dev mailing list arc= hive at Nabble.com.=0A=0A_______________________________________________=0A= Xen-devel mailing list=0AXen-devel@lists.xensource.com=0Ahttp://lists.xenso= urce.com/xen-devel --908097277-1377650170-1323179850=:78658 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hi<= /div>

Thanks for these informations. = I am on Debian. So it could be usefull for Ubuntu users.
<= br>
Thanks.

=
David


De : n4rC0t1C <shandivo@gmail.com>
= =C0 : xen-devel@lists= .xensource.com
Envoy=E9 le : Mardi 6 D=E9cembre 2011 13h04
Objet : Re: [Xen-devel] Re : Re : Re : Re : Re : Re= : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable

Ie= p I used your last patches, (your website it's at the top of my bookmarks),=
and they apply to xen-unstable rev. 24341 as well (which i'm using).
I forgot to mention that I had to make a couple of fix to xen tree, c= ause it
wasn't compiling on my system due to  "error: format not a = string literal
and no format arguments":


--- /usr/src/xen-uns= table.hg-rev-24341-460gtx/tools/libxl/libxl_create.c
+++ /usr/src/xen-un= stable.hg-rev-24341-460gtx/tools/libxl/libxl_create.c
@@ -462,7 +462,7 @= @
    path =3D libxl__xs_libxl_path(gc, domid);
  &nb= sp; path =3D libxl__sprintf(gc, "%s/dm-version", path);
    = return libxl__xs_write(gc, XBT_NULL, path, libxl__strdup(gc,
-  &nb= sp;  =20
libxl_device_model_version_to_string(dm_info->device_model_version)= ));
+     
libxl_device_model_version_to_string(dm_i= nfo->device_model_version)),"%s");
}

static int do_domain_c= reate(libxl__gc *gc, libxl_domain_config *d_config,


--- /usr/src= /xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_device.c
+++ /usr/sr= c/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_device.c
@@ -516,7 = +516,7 @@
        for (j =3D 0; j < num_devs; j+= +) {
            path =3D libxl__sprintf(= gc,
"/local/domain/%d/device/%s/%s/backend",
      &nb= sp;                     &= nbsp;     domid, kinds[i], devs[j]);
-      &n= bsp;     path =3D libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc,= path));
+            path =3D libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc,
path,"%s"));
  =           if (path && libxl__parse_backen= d_path(gc, path, &dev) =3D=3D 0) {
         = ;       dev.domid =3D domid;
       =         dev.kind =3D kind;

and an due to an ar= gument missing:

--- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/= libxl/libxl_dom.c
+++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/li= bxl/libxl_dom.c
@@ -625,7 +625,7 @@
        brea= k;
    }
    case LIBXL_DEVICE_MODEL_VERSION_QE= MU_XEN:
-        fd2 =3D open(filename, O_WRONLY | O= _CREAT | O_TRUNC);
+        fd2 =3D open(filename, O= _WRONLY | O_CREAT | O_TRUNC, 0644);
        if (fd2= < 0) {
            LIBXL__LOG_ERRNO(c= tx, LIBXL__LOG_ERROR,
              &nbs= p;               "Unable to create a QEM= U save file\n");

As far as I know those doesn't break anything, but = dont take too seriously,
i'm not an experienced developer :)


= Forgot 2:
Since I'm using an ubuntu kernel, the xen support is not integ= rated, but you
need to add xen modules at your inittrd file. I did this = by adding those:

xen-pciback passthrough=3D1
xen-blkback
xenfs=
xen-netback
pci-stub

to /etc/xen/initramfs-tools/modules and = the issuing update-initramfs.

In the future, I'll try to boot a lin= ux domU, right now I'm still smiling
cause I can fully wipe my Windows i= nstallation from the hard disk. And I'm
sure that in future Win7 will be= supported too.

Thanks again David and everyone,
Ivo

--View this message in context: http://xen.1045712.n5= .nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5051880.= html
Sent from the Xen - Dev mailing list archive at Nabble.com.
=
_______________________________________________
Xen-devel mailing li= st
Xen-devel@lists.xensource.com
http://lists.xe= nsource.com/xen-devel


--908097277-1377650170-1323179850=:78658-- --===============7989788617255817618== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============7989788617255817618==--