From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Stabellini Subject: Re: [PATCH v4] add support for libvirt-like channels Date: Thu, 7 Aug 2014 15:26:58 +0100 Message-ID: References: <1403512141-12283-1-git-send-email-dave.scott@citrix.com> <1406041520-561-1-git-send-email-dave.scott@citrix.com> <53D65C8A.8040905@citrix.com> <98BD7D14-8B1C-4048-9E3F-8D6BED797AFF@citrix.com> <53E3895F.1030004@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="1342847746-1186566984-1407421618=:2293" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XFOfv-0003bC-Eq for xen-devel@lists.xenproject.org; Thu, 07 Aug 2014 14:28:15 +0000 In-Reply-To: <53E3895F.1030004@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: Dave Scott , Wei Liu , Ian Campbell , Stefano Stabellini , Ian Jackson , "xen-devel@lists.xenproject.org" List-Id: xen-devel@lists.xenproject.org --1342847746-1186566984-1407421618=:2293 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 7 Aug 2014, David Vrabel wrote: > On 07/08/14 14:37, Dave Scott wrote: > >=20 > > On 28 Jul 2014, at 15:22, David Vrabel wrote: > >=20 > >> On 22/07/14 16:05, David Scott wrote: > >>> > >>> Note: I've seen a problem with some Linux console frontends which att= empt > >>> to overwrite the read-only key 'type' (=3D xenconsoled|ioemu) in the = frontend > >>> directory. [ this key is already present, it's not added by these pat= ches ] > >>> Since 'type' refers to the toolstack's choice of implementation servi= ce > >>> (which is none of the guest's business) I think the read/only permiss= ions > >>> are right. The location of the key is not ideal (it should be in the > >>> backend directory IMHO) but this is the case with several other keys = located > >>> in the frontend such as 'limit' and 'tty'. I think this is a Linux fr= ontend > >>> bug which should be fixed there. These patches work with Mirage VMs a= nd > >>> with Linux if I workaround the permissions by giving the guest read/w= rite > >>> to the 'type' key.=20 > >> > >> Which Linux front ends? > >=20 > > I just tested a Debian jessie with > >=20 > > # uname -a > > Linux jessie 3.13-6-686-pae #1 SMP Debian 3.13.5-1 (2014-03-04) i686 = GNU/Linux > >=20 > > In my xenstored access log I see: > >=20 > > Aug 7 14:28:30 localhost xenstored: D40.6 write device/c= onsole/1/ring-ref 8 > > Aug 7 14:28:30 localhost xenstored: D40.6 write device/c= onsole/1/port 10 > > Aug 7 14:28:30 localhost xenstored: D40.6 write device/c= onsole/1/type ioemu > >=20 > > =E2=80=94 I think the last line is suspicious. >=20 > This was introduced by Stefano in 3.4 with 02e19f9c7cac (hvc_xen: > implement multiconsole support). >=20 > Stefano, can you advise on whether it it safe to remove the write of the > "type" key or whether we need to make it conditional on it being absent. =20 I think that the original idea was that since only ioemu backends (QEMU) are capable of handling multiple consoles and the new xenstore based console protocol, then the "type" had to be "ioemu". I agree that the type key has no business being in the frontend directory. I also agree that the frontend shouldn't be writing it, since the backend would have already been started anyway. I think it would be OK to: --- xen_hvc: no reason to write the type key on xenstore The backend type is chosen by the toolstack. Regardless the frontend should not care. Signed-off-by: Stefano Stabellini diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index 636c9ba..b8491f5 100644 --- a/drivers/tty/hvc/hvc_xen.c +++ b/drivers/tty/hvc/hvc_xen.c @@ -402,9 +402,6 @@ static int xencons_connect_backend(struct xenbus_device= *dev, =09=09=09 evtchn); =09if (ret) =09=09goto error_xenbus; -=09ret =3D xenbus_printf(xbt, dev->nodename, "type", "ioemu"); -=09if (ret) -=09=09goto error_xenbus; =09ret =3D xenbus_transaction_end(xbt, 0); =09if (ret) { =09=09if (ret =3D=3D -EAGAIN) --1342847746-1186566984-1407421618=:2293 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.xen.org http://lists.xen.org/xen-devel --1342847746-1186566984-1407421618=:2293--