From patchwork Thu Aug 7 14:26:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 35045 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f197.google.com (mail-yk0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 10FDD21137 for ; Thu, 7 Aug 2014 14:30:32 +0000 (UTC) Received: by mail-yk0-f197.google.com with SMTP id 142sf12257367ykq.0 for ; Thu, 07 Aug 2014 07:30:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:in-reply-to:message-id :references:user-agent:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type; bh=jgUzJ3kl8EUzo3HFkbqvpHBdUsWZr9+rCnzxksHDhrU=; b=MQPBesBWj8YwvhTAERngbEUcGty/OdaqpJa0sPCzFrlSmqtV2sI8cvd8TTxMlBax8/ 32CgPD8U0Rn3vvBrkXhE2DoTcW2qsopr46T/Hyac8OQIxdDe06aZ+cC6eY2n2mlCctgJ zzYFSYVV24ql2TZkCca5w+AO5sH1qmiRQ5IatKMfuyYUByhnuvVs3XD2bKGstH/Izobt Kya7U5vP1PSHeYrszmiUjGetYNhIRayhm6EapE6Nbp8rbR9YpZ3WWp/JIKBDknP77bh3 xpiADgLPon3yWTZzXATeHuGXcYJaqqsxyEKVcvhtHDR8LlVzLjbAEACOFbSMGoeZIYlC Oz8g== X-Gm-Message-State: ALoCoQmrGa4k4GBEXlJ8vK7nt0hARuKzUNFTBzYwJUnXmW5YM9rIxirvSaCyP63yS6iOEGGgPiNj X-Received: by 10.236.43.20 with SMTP id k20mr314013yhb.54.1407421831792; Thu, 07 Aug 2014 07:30:31 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.32.138 with SMTP id h10ls152652qgh.87.gmail; Thu, 07 Aug 2014 07:30:31 -0700 (PDT) X-Received: by 10.52.64.140 with SMTP id o12mr780937vds.70.1407421831704; Thu, 07 Aug 2014 07:30:31 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id q7si1837036vcz.47.2014.08.07.07.30.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 07 Aug 2014 07:30:31 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so6376456vcb.29 for ; Thu, 07 Aug 2014 07:30:31 -0700 (PDT) X-Received: by 10.52.144.14 with SMTP id si14mr194156vdb.95.1407421831625; Thu, 07 Aug 2014 07:30:31 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp34719vcb; Thu, 7 Aug 2014 07:30:31 -0700 (PDT) X-Received: by 10.42.12.6 with SMTP id w6mr4391769icw.69.1407421830561; Thu, 07 Aug 2014 07:30:30 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id e1si19146938igg.62.2014.08.07.07.30.30 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 07 Aug 2014 07:30:30 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XFOfx-0003bH-CG; Thu, 07 Aug 2014 14:28:17 +0000 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 Received: from [85.158.137.68:34137] by server-10.bemta-3.messagelabs.com id 17/CE-28313-EFC83E35; Thu, 07 Aug 2014 14:28:14 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-7.tower-31.messagelabs.com!1407421692!12447405!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 10695 invoked from network); 7 Aug 2014 14:28:14 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-7.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 7 Aug 2014 14:28:14 -0000 X-IronPort-AV: E=Sophos;i="5.01,818,1400025600"; d="scan'208";a="159678898" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Thu, 7 Aug 2014 10:28:11 -0400 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1XFOfr-00047h-4K; Thu, 07 Aug 2014 15:28:11 +0100 Date: Thu, 7 Aug 2014 15:26:58 +0100 From: Stefano Stabellini X-X-Sender: sstabellini@kaball.uk.xensource.com To: David Vrabel In-Reply-To: <53E3895F.1030004@citrix.com> 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> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-DLP: MIA2 Cc: Dave Scott , Wei Liu , Ian Campbell , Stefano Stabellini , Ian Jackson , "xen-devel@lists.xenproject.org" Subject: Re: [Xen-devel] [PATCH v4] add support for libvirt-like channels X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stefano.stabellini@eu.citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: On Thu, 7 Aug 2014, David Vrabel wrote: > On 07/08/14 14:37, Dave Scott wrote: > > > > On 28 Jul 2014, at 15:22, David Vrabel wrote: > > > >> On 22/07/14 16:05, David Scott wrote: > >>> > >>> Note: I've seen a problem with some Linux console frontends which attempt > >>> to overwrite the read-only key 'type' (= xenconsoled|ioemu) in the frontend > >>> directory. [ this key is already present, it's not added by these patches ] > >>> Since 'type' refers to the toolstack's choice of implementation service > >>> (which is none of the guest's business) I think the read/only permissions > >>> 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 frontend > >>> bug which should be fixed there. These patches work with Mirage VMs and > >>> with Linux if I workaround the permissions by giving the guest read/write > >>> to the 'type' key. > >> > >> Which Linux front ends? > > > > I just tested a Debian jessie with > > > > # uname -a > > Linux jessie 3.13-6-686-pae #1 SMP Debian 3.13.5-1 (2014-03-04) i686 GNU/Linux > > > > In my xenstored access log I see: > > > > Aug 7 14:28:30 localhost xenstored: D40.6 write device/console/1/ring-ref 8 > > Aug 7 14:28:30 localhost xenstored: D40.6 write device/console/1/port 10 > > Aug 7 14:28:30 localhost xenstored: D40.6 write device/console/1/type ioemu > > > > — I think the last line is suspicious. > > This was introduced by Stefano in 3.4 with 02e19f9c7cac (hvc_xen: > implement multiconsole support). > > 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. 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, evtchn); if (ret) goto error_xenbus; - ret = xenbus_printf(xbt, dev->nodename, "type", "ioemu"); - if (ret) - goto error_xenbus; ret = xenbus_transaction_end(xbt, 0); if (ret) { if (ret == -EAGAIN)