From patchwork Thu Mar 5 12:14:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: pdurrant@amzn.com X-Patchwork-Id: 11421681 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 27CD8138D for ; Thu, 5 Mar 2020 12:15:52 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0BDD620658 for ; Thu, 5 Mar 2020 12:15:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0BDD620658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amzn.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j9pOb-0005gX-Ar; Thu, 05 Mar 2020 12:14:33 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j9pOa-0005gS-FM for xen-devel@lists.xenproject.org; Thu, 05 Mar 2020 12:14:32 +0000 X-Inumbo-ID: de66aab8-5eda-11ea-8eb5-bc764e2007e4 Received: from smtp-fw-9101.amazon.com (unknown [207.171.184.25]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id de66aab8-5eda-11ea-8eb5-bc764e2007e4; Thu, 05 Mar 2020 12:14:32 +0000 (UTC) IronPort-SDR: 0RAc53iAnGJ3KrqDxXbB4NAx1roQW/p+RGvzo1vmsbNoT+GGnVqvU2P3VblaNOjreDj9gUAck3 71qiKqwKoM5g== X-IronPort-AV: E=Sophos;i="5.70,517,1574121600"; d="scan'208";a="21055607" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2a-c5104f52.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP; 05 Mar 2020 12:14:29 +0000 Received: from EX13MTAUEA002.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2a-c5104f52.us-west-2.amazon.com (Postfix) with ESMTPS id D388BA20EF; Thu, 5 Mar 2020 12:14:28 +0000 (UTC) Received: from EX13D32EUB003.ant.amazon.com (10.43.166.165) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1236.3; Thu, 5 Mar 2020 12:14:28 +0000 Received: from EX13MTAUWB001.ant.amazon.com (10.43.161.207) by EX13D32EUB003.ant.amazon.com (10.43.166.165) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 5 Mar 2020 12:14:27 +0000 Received: from u2f063a87eabd5f.cbg10.amazon.com (10.125.106.135) by mail-relay.amazon.com (10.43.161.249) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Thu, 5 Mar 2020 12:14:24 +0000 From: To: Date: Thu, 5 Mar 2020 12:14:16 +0000 Message-ID: <20200305121417.16583-2-pdurrant@amzn.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200305121417.16583-1-pdurrant@amzn.com> References: <20200305121417.16583-1-pdurrant@amzn.com> MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [PATCH v2 1/2] libxl: create domain 'error' node in xenstore X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , Andrew Cooper , Paul Durrant , Ian Jackson , George Dunlap , Jan Beulich , Anthony PERARD Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Paul Durrant Several PV drivers (both historically and currently [1]) report errors by writing text into /local/domain/$DOMID/error. This patch creates the node in libxl and makes it writable by the domain, and also adds some text into xenstore-paths.pandoc to state what the node is for. [1] https://xenbits.xen.org/gitweb/?p=pvdrivers/win/xenvif.git;a=blob;f=src/xenvif/frontend.c;hb=HEAD#l459 Signed-off-by: Paul Durrant Acked-by: Ian Jackson --- Cc: Andrew Cooper Cc: George Dunlap Cc: Jan Beulich Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Wei Liu Cc: Anthony PERARD --- docs/misc/xenstore-paths.pandoc | 5 +++++ tools/libxl/libxl_create.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/docs/misc/xenstore-paths.pandoc b/docs/misc/xenstore-paths.pandoc index 0a6b36146e..e2ab5da54e 100644 --- a/docs/misc/xenstore-paths.pandoc +++ b/docs/misc/xenstore-paths.pandoc @@ -539,6 +539,11 @@ address written in one of these paths to, for example, establish a VNC session to the guest (although clearly some level of trust is placed in the value supplied by the guest in this case). +#### ~/error [w] + +A domain writable path used by some PV drivers to pass error messages +to the toolstack. + ### Paths private to the toolstack #### ~/device-model/$DOMID/state [w] diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 7891fae426..fb7b3999ae 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -797,6 +797,9 @@ retry_transaction: libxl__xs_mknod(gc, t, GCSPRINTF("%s/attr", dom_path), rwperm, ARRAY_SIZE(rwperm)); + libxl__xs_mknod(gc, t, + GCSPRINTF("%s/error", dom_path), + rwperm, ARRAY_SIZE(rwperm)); if (libxl_defbool_val(info->driver_domain)) { /*