From: Bhupinder Thakur <bhupinder.thakur@linaro.org>
To: xen-devel@lists.xenproject.org
Cc: Wei Liu <wei.liu2@citrix.com>,
Julien Grall <julien.grall@arm.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [PATCH 06/10] xen/arm: vpl011: Add new parameters to xenstore for the virtual console
Date: Mon, 3 Apr 2017 15:14:29 +0530 [thread overview]
Message-ID: <1491212673-13476-7-git-send-email-bhupinder.thakur@linaro.org> (raw)
In-Reply-To: <1491212673-13476-1-git-send-email-bhupinder.thakur@linaro.org>
Add two new parameters to the xen store:
- newly allocated PFN to be used as IN/OUT ring buffer by xenconsoled
- a new event channel read from Xen using a hvm call to be used by xenconsoled
Signed-off-by: Bhupinder Thakur <bhupinder.thakur@linaro.org>
---
tools/libxl/libxl.c | 10 ++++++++++
tools/libxl/libxl_dom.c | 13 ++++++++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index d400fa2..5fa1e41 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -1791,6 +1791,9 @@ int libxl_console_exec(libxl_ctx *ctx, uint32_t domid, int cons_num,
case LIBXL_CONSOLE_TYPE_SERIAL:
cons_type_s = "serial";
break;
+ case LIBXL_CONSOLE_TYPE_VCON:
+ cons_type_s = "vcon";
+ break;
default:
goto out;
}
@@ -3159,6 +3162,13 @@ int libxl__device_console_add(libxl__gc *gc, uint32_t domid,
flexarray_append(ro_front, GCSPRINTF("%"PRIu32, state->console_port));
flexarray_append(ro_front, "ring-ref");
flexarray_append(ro_front, GCSPRINTF("%lu", state->console_mfn));
+ if (state->vconsole_enabled)
+ {
+ flexarray_append(ro_front, "vcon-port");
+ flexarray_append(ro_front, GCSPRINTF("%"PRIu32, state->vconsole_port));
+ flexarray_append(ro_front, "vcon-ring-ref");
+ flexarray_append(ro_front, GCSPRINTF("%lu", state->vconsole_mfn));
+ }
} else {
flexarray_append(front, "state");
flexarray_append(front, GCSPRINTF("%d", XenbusStateInitialising));
diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
index d519c8d..8df1e10 100644
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -302,7 +302,7 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid,
libxl_ctx *ctx = libxl__gc_owner(gc);
char *xs_domid, *con_domid;
int rc;
- uint64_t size;
+ uint64_t size, val;
if (xc_domain_max_vcpus(ctx->xch, domid, info->max_vcpus) != 0) {
LOG(ERROR, "Couldn't set max vcpu count");
@@ -432,6 +432,16 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid,
state->store_port = xc_evtchn_alloc_unbound(ctx->xch, domid, state->store_domid);
state->console_port = xc_evtchn_alloc_unbound(ctx->xch, domid, state->console_domid);
+ state->vconsole_port = -1;
+
+ if (state->vconsole_enabled)
+ {
+ rc = xc_hvm_param_get(ctx->xch, domid, HVM_PARAM_VCONSOLE_EVTCHN,
+ &val);
+ if ( !rc )
+ state->vconsole_port = val;
+ }
+
if (info->type == LIBXL_DOMAIN_TYPE_HVM) {
hvm_set_conf_params(ctx->xch, domid, info);
#if defined(__i386__) || defined(__x86_64__)
@@ -771,6 +781,7 @@ int libxl__build_pv(libxl__gc *gc, uint32_t domid,
if (xc_dom_feature_translated(dom)) {
state->console_mfn = dom->console_pfn;
state->store_mfn = dom->xenstore_pfn;
+ state->vconsole_mfn = dom->vconsole_pfn;
} else {
state->console_mfn = xc_dom_p2m(dom, dom->console_pfn);
state->store_mfn = xc_dom_p2m(dom, dom->xenstore_pfn);
--
2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-04-03 9:45 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 9:44 [PATCH 00/10] pl011 emulation support in Xen Bhupinder Thakur
2017-04-03 9:44 ` [PATCH 01/10] xen/arm: vpl011: Add pl011 uart emulation " Bhupinder Thakur
2017-04-12 16:32 ` Wei Liu
2017-04-19 0:15 ` Stefano Stabellini
2017-04-19 7:28 ` Bhupinder Thakur
2017-04-19 8:36 ` Julien Grall
2017-04-19 18:40 ` Stefano Stabellini
2017-04-25 7:31 ` Bhupinder Thakur
2017-04-25 17:56 ` Stefano Stabellini
2017-04-26 7:49 ` Bhupinder Thakur
2017-04-26 8:13 ` Julien Grall
2017-04-26 17:03 ` Stefano Stabellini
2017-04-03 9:44 ` [PATCH 02/10] xen/arm: vpl011: Add new virtual console hvm params " Bhupinder Thakur
2017-04-19 0:22 ` Stefano Stabellini
2017-04-19 8:48 ` Bhupinder Thakur
2017-04-03 9:44 ` [PATCH 03/10] xen/arm: vpl011: Enable pl011 emulation for a guest domain " Bhupinder Thakur
2017-04-19 0:27 ` Stefano Stabellini
2017-04-03 9:44 ` [PATCH 04/10] xen/arm: vpl011: Provide a knob in libxl to enable/disable pl011 emulation Bhupinder Thakur
2017-04-12 16:32 ` Wei Liu
2017-04-13 8:19 ` Bhupinder Thakur
2017-04-13 8:37 ` Wei Liu
2017-04-19 0:29 ` Stefano Stabellini
2017-04-19 9:17 ` Bhupinder Thakur
2017-04-19 10:25 ` Wei Liu
2017-04-19 11:06 ` Julien Grall
2017-04-03 9:44 ` [PATCH 05/10] xen/arm: vpl011: Allocate a new PFN in the toolstack for the virtual console Bhupinder Thakur
2017-04-12 16:33 ` Wei Liu
2017-04-13 8:37 ` Bhupinder Thakur
2017-04-13 8:53 ` Wei Liu
2017-04-19 0:36 ` Stefano Stabellini
2017-04-19 10:28 ` Wei Liu
2017-04-19 11:01 ` Julien Grall
2017-04-19 13:05 ` Bhupinder Thakur
2017-04-19 13:35 ` Julien Grall
2017-04-03 9:44 ` Bhupinder Thakur [this message]
2017-04-12 16:32 ` [PATCH 06/10] xen/arm: vpl011: Add new parameters to xenstore " Wei Liu
2017-04-25 10:18 ` Bhupinder Thakur
2017-04-25 11:55 ` Wei Liu
2017-04-19 18:58 ` Stefano Stabellini
2017-04-03 9:44 ` [PATCH 07/10] xen/arm: vpl011: Add a new console type to domain structure in xenconsole Bhupinder Thakur
2017-04-12 16:33 ` Wei Liu
2017-04-13 9:49 ` Bhupinder Thakur
2017-04-19 19:09 ` Stefano Stabellini
2017-04-03 9:44 ` [PATCH 08/10] xen/arm: vpl011: Modify the APIs in xenconsole to acces both PV and VCON consoles Bhupinder Thakur
2017-04-12 16:33 ` Wei Liu
2017-04-24 14:52 ` Bhupinder Thakur
2017-04-03 9:44 ` [PATCH 09/10] xen/arm: vpl011: Add new virtual console to xenconsole client Bhupinder Thakur
2017-04-19 18:55 ` Stefano Stabellini
2017-04-03 9:44 ` [PATCH 10/10] xen/arm: vpl011: Add a pl011 uart DT node in the guest device tree Bhupinder Thakur
2017-04-19 18:53 ` Stefano Stabellini
2017-04-20 12:47 ` [PATCH 00/10] pl011 emulation support in Xen Julien Grall
2017-04-26 15:21 ` Bhupinder Thakur
2017-04-26 17:09 ` Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1491212673-13476-7-git-send-email-bhupinder.thakur@linaro.org \
--to=bhupinder.thakur@linaro.org \
--cc=ian.jackson@eu.citrix.com \
--cc=julien.grall@arm.com \
--cc=sstabellini@kernel.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).