From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Derzhavets Subject: Re: [PATCH] qemu-xen: do not use pipe with stubdom Date: Mon, 23 Mar 2009 10:40:57 -0700 (PDT) Message-ID: <17510.14062.qm@web56102.mail.re3.yahoo.com> References: <49C7B8F6.9000202@eu.citrix.com> Reply-To: bderzhavets@yahoo.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1957384376==" Return-path: In-Reply-To: <49C7B8F6.9000202@eu.citrix.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: xen-devel , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org --===============1957384376== Content-Type: multipart/alternative; boundary="0-1396887153-1237830057=:14062" --0-1396887153-1237830057=:14062 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Patch applied in Xen Unstable & Suse's 2.6.27-5 env .=20 First start fs-backend root@ServerXen331:~# /usr/sbin/fs-backend & [1] 6548 root@ServerXen331:~# Path changed backend/vfs/exports/requests Awaiting next connection. Path changed backend/vfs/exports/requests/2/0/frontend Handling connection from dom=3D2, for export=3D0 Frontend found at: /local/domain/2/device/vfs/0 (gref=3D1789, evtchn=3D5) Awaiting next connection. Awaiting next connection. Backend consumed: 0 requests Pushed responces and notify=3D0 Path changed backend/vfs/exports/requests/2/0/frontend Awaiting next connection. terminate_mount_request /local/domain/2/device/vfs/0 free_mount_request /local/domain/2/device/vfs/0 Awaiting next connection. Path changed backend/vfs/exports/requests/3/0/frontend Handling connection from dom=3D3, for export=3D0 Frontend found at: /local/domain/3/device/vfs/0 (gref=3D1789, evtchn=3D5) Awaiting next connection. Awaiting next connection. Backend consumed: 0 requests Pushed responces and notify=3D0 Path changed backend/vfs/exports/requests/3/0/frontend Awaiting next connection. terminate_mount_request /local/domain/3/device/vfs/0 free_mount_request /local/domain/3/device/vfs/0 Awaiting next connection. Next in an other terminal :- root@ServerXen331:/etc/xen# cat RHELhvm-dm kernel =3D "/usr/lib/xen/boot/ioemu-stubdom.gz" vif =3D [ ' ', 'bridge=3Deth0'] # vfb =3D [ 'type=3Dsdl' ] vfb =3D [ 'type=3Dvnc' ] disk =3D ['phy:/dev/loop0,hdc:cdrom,r','phy:/dev/sdb8,hda,w'] root@ServerXen331:/etc/xen# cat RHELhvm-stubdom kernel =3D "/usr/lib/xen/boot/hvmloader" builder=3D'hvm' memory =3D1024 name =3D "RHELhvm" vif =3D [ 'type=3Dioemu, bridge=3Deth0' ] device_model =3D "/usr/lib/xen/bin/stubdom-dm" boot=3D"d" sdl=3D0 opengl=3D0 vnc=3D0 stdvga=3D0 root@ServerXen331:/etc/xen# xm create RHELhvm-stubdom Using config file "./RHELhvm-stubdom". Started domain RHELhvm (id=3D11) root@ServerXen331:/etc/xen# xm list Name=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ID=A0=A0 Mem VCPUs=A0=A0= =A0=A0=A0 State=A0=A0 Time(s) Domain-0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0 6922=A0=A0=A0=A0 2 =A0 =A0 =A0= =A0 =A0=A0 r-----=A0=A0=A0=A0 99.5 RHELhvm=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 11=A0 1024=A0=A0=A0=A0 1=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 ------=A0=A0=A0=A0=A0 0.0 root@ServerXen331:/etc/xen# netstat -a|grep 590 tcp=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0 0 *:5901=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 *:*=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 LISTEN=A0=A0=A0=A0=20 unix=A0 2=A0=A0=A0=A0=A0 [ ACC ]=A0=A0=A0=A0 STREAM=A0=A0=A0=A0 LISTENING= =A0=A0=A0=A0 18590=A0=A0=A0 /tmp/seahorse-bvfLoE/S.gpg-agent unix=A0 3=A0=A0=A0=A0=A0 [ ]=A0=A0=A0=A0=A0=A0=A0=A0 STREAM=A0=A0=A0=A0 CON= NECTED=A0=A0=A0=A0 19590=A0=A0=A0 @/dbus-vfs-daemon/socket-lDpa7MVy Boris --- On Mon, 3/23/09, Stefano Stabellini = wrote: From: Stefano Stabellini Subject: [Xen-devel] [PATCH] qemu-xen: do not use pipe with stubdom To: "xen-devel" Date: Monday, March 23, 2009, 12:29 PM This patch allows stubdoms to start after the recent merge. Signed-off-by: Stefano Stabellini diff --git a/vl.c b/vl.c index 9b9f7d5..a5361fd 100644 --- a/vl.c +++ b/vl.c @@ -1773,7 +1773,7 @@ static int init_timer_alarm(void) struct qemu_alarm_timer *t =3D NULL; int i, err =3D -1; =20 -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(CONFIG_STUBDOM) int fds[2]; =20 err =3D pipe(fds); @@ -1805,7 +1805,7 @@ static int init_timer_alarm(void) goto fail; } =20 -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(CONFIG_STUBDOM) qemu_set_fd_handler2(alarm_timer_rfd, NULL, try_to_rearm_timer, NULL, t); #endif @@ -1815,7 +1815,7 @@ static int init_timer_alarm(void) return 0; =20 fail: -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(CONFIG_STUBDOM) close(fds[0]); close(fds[1]); #endif _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel =0A=0A=0A --0-1396887153-1237830057=:14062 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Patch applied in Xen Unstable & Suse's 2.= 6.27-5 env .
First start fs-backend

root@ServerXen331:~# /usr/sb= in/fs-backend &
[1] 6548
root@ServerXen331:~# Path changed backen= d/vfs/exports/requests
Awaiting next connection.
Path changed backend= /vfs/exports/requests/2/0/frontend
Handling connection from dom=3D2, for= export=3D0
Frontend found at: /local/domain/2/device/vfs/0 (gref=3D1789= , evtchn=3D5)
Awaiting next connection.
Awaiting next connection.
= Backend consumed: 0 requests
Pushed responces and notify=3D0
Path cha= nged backend/vfs/exports/requests/2/0/frontend
Awaiting next connection.=
terminate_mount_request /local/domain/2/device/vfs/0
free_mount_requ= est /local/domain/2/device/vfs/0
Awaiting next connection.
Path chang= ed backend/vfs/exports/requests/3/0/frontend
Handling connection from do= m=3D3, for export=3D0
Frontend found at: /local/domain/3/device/vfs/0 (gref=3D1789= , evtchn=3D5)
Awaiting next connection.
Awaiting next connection.
= Backend consumed: 0 requests
Pushed responces and notify=3D0
Path cha= nged backend/vfs/exports/requests/3/0/frontend
Awaiting next connection.=
terminate_mount_request /local/domain/3/device/vfs/0
free_mount_requ= est /local/domain/3/device/vfs/0
Awaiting next connection.

Next i= n an other terminal :-

root@ServerXen331:/etc/xen# cat RHELhvm-dmkernel =3D "/usr/lib/xen/boot/ioemu-stubdom.gz"
vif =3D [ ' ', 'bridge= =3Deth0']
# vfb =3D [ 'type=3Dsdl' ]
vfb =3D [ 'type=3Dvnc' ]
disk= =3D ['phy:/dev/loop0,hdc:cdrom,r','phy:/dev/sdb8,hda,w']

root@Serve= rXen331:/etc/xen# cat RHELhvm-stubdom
kernel =3D "/usr/lib/xen/boot/hvml= oader"
builder=3D'hvm'
memory =3D1024
name =3D "RHELhvm"
vif = =3D [ 'type=3Dioemu, bridge=3Deth0' ]
device_model =3D "/usr/lib/xen/bin/stubdom-dm"
boot=3D"d"
sdl=3D0
opengl=3D0
vn= c=3D0
stdvga=3D0

root@ServerXen331:/etc/xen# xm create RHELhvm-st= ubdom
Using config file "./RHELhvm-stubdom".
Started domain RHELhvm (= id=3D11)

root@ServerXen331:/etc/xen# xm list

Name  =             &nb= sp;            =              ID=    Mem VCPUs      State   Time= (s)
Domain-0          =             &nb= sp;            = 0  6922     2          &= nbsp; r-----     99.5
RHELhvm          = ;            &n= bsp;          11  1024&nb= sp;    1        &nbs= p;    ------      0.0

root@S= erverXen331:/etc/xen# netstat -a|grep 590
tcp    &nb= sp;   0      0 *:5901   &= nbsp;           &nbs= p;  *:*          &nb= sp;          LISTEN  = ;  
unix  2      [ ACC ] &= nbsp;   STREAM     LISTENING   = ;  18590    /tmp/seahorse-bvfLoE/S.gpg-agent
unix  3    &n= bsp; [ ]         STREAM  =    CONNECTED     19590    @/db= us-vfs-daemon/socket-lDpa7MVy

Boris

--- On Mon, 3/23/09, S= tefano Stabellini <stefano.stabellini@eu.citrix.com> wrote= :
From: Stefano Stabellini <stefano.stabelli= ni@eu.citrix.com>
Subject: [Xen-devel] [PATCH] qemu-xen: do not use p= ipe with stubdom
To: "xen-devel" <xen-devel@lists.xensource.com>Date: Monday, March 23, 2009, 12:29 PM

This patch allows stub=
doms to start after the recent merge.

Signed-off-by: Stefano Stabell= ini <stefano.stabellini@eu.citrix.com>

diff --git a/vl.c b/vl.= c
index 9b9f7d5..a5361fd 100644
--- a/vl.c
+++ b/vl.c
@@ -1773,7 +1773,7 @@ static int init_timer_alarm(void)
struct qemu_a= larm_timer *t =3D NULL;
int i, err =3D -1;

-#ifndef _WIN32<= br>+#if !defined(_WIN32) && !defined(CONFIG_STUBDOM)
int fd= s[2];

err =3D pipe(fds);
@@ -1805,7 +1805,7 @@ static int i= nit_timer_alarm(void)
goto fail;
}

-#ifndef _WI= N32
+#if !defined(_WIN32) && !defined(CONFIG_STUBDOM)
qe= mu_set_fd_handler2(alarm_timer_rfd, NULL,
try_= to_rearm_timer, NULL, t);
#endif
@@ -1815,7 +1815,7 @@ static int in= it_timer_alarm(void)
return 0;

fail:
-#ifndef _WIN32+#if !defined(_WIN32) && !defined(CONFIG_STUBDOM)
close(fd= s[0]);
close(fds[1]);
#endif

___________________________= ____________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-de= vel

=0A=0A --0-1396887153-1237830057=:14062-- --===============1957384376== 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 --===============1957384376==--