From: "Daniel P. Berrange" <berrange@redhat.com>
To: xen-devel@lists.xensource.com
Subject: Re: PATCH: 10/10: Make xenconsoled ignore doms with qemu-dm
Date: Wed, 22 Aug 2007 23:34:07 +0100 [thread overview]
Message-ID: <20070822223407.GB18061@redhat.com> (raw)
In-Reply-To: <20070822222653.GR18061@redhat.com>
This patch writes a field /local/vm/DOMID/console/type taking the
value 'ioemu' or 'xenconsoled'. If xenconsoled sees a type that is
not its own, then it skips handling of that guest. The qemu-dm
process doesn't need to read this field since it will only attach
to the console if given the -serial pty arg which XenD already
ensures matches this xenstore field.
The overall behaviour is that if a paravirt guest has a qemu-dm
process running then that handles the console, otherwise the
xenconsoled handles it. The former is more functional, with the
exception of not currently supporting persistent logging to a
file at the same time as exposing a PTY.
console/daemon/io.c | 9 +++++++++
python/xen/xend/XendDomainInfo.py | 7 +++++++
2 files changed, 16 insertions(+)
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Dan.
diff -r 4559faae3790 tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Wed Aug 22 16:24:48 2007 -0400
+++ b/tools/console/daemon/io.c Wed Aug 22 18:48:05 2007 -0400
@@ -327,6 +327,7 @@ static int domain_create_ring(struct dom
static int domain_create_ring(struct domain *dom)
{
int err, remote_port, ring_ref, rc;
+ char *type, path[PATH_MAX];
err = xs_gather(xs, dom->serialpath,
"ring-ref", "%u", &ring_ref,
@@ -343,6 +344,14 @@ static int domain_create_ring(struct dom
} else
dom->use_consolepath = 0;
+ sprintf(path, "%s/type", dom->use_consolepath ? dom->conspath: dom->serialpath);
+ type = xs_read(xs, XBT_NULL, path, NULL);
+ if (type && strcmp(type, "xenconsoled") != 0) {
+ free(type);
+ return 0;
+ }
+ free(type);
+
if ((ring_ref == dom->ring_ref) && (remote_port == dom->remote_port))
goto out;
diff -r 4559faae3790 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Wed Aug 22 16:24:48 2007 -0400
+++ b/tools/python/xen/xend/XendDomainInfo.py Wed Aug 22 18:36:15 2007 -0400
@@ -883,8 +883,15 @@ class XendDomainInfo:
else:
to_store[n] = str(v)
+ # Figure out if we need to tell xenconsoled to ignore this guest's
+ # console - device model will handle console if it is running
+ constype = "ioemu"
+ if 'device_model' not in self.info['platform']:
+ constype = "xenconsoled"
+
f('console/port', self.console_port)
f('console/ring-ref', self.console_mfn)
+ f('console/type', constype)
f('store/port', self.store_port)
f('store/ring-ref', self.store_mfn)
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
next prev parent reply other threads:[~2007-08-22 22:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-22 22:26 PATCH: 0/10: Merge paravirt FB & console into qemu-dm Daniel P. Berrange
2007-08-22 22:28 ` PATCH: 1/10: Add a QEMU machine type for fullvirt guests Daniel P. Berrange
2007-08-22 22:29 ` PATCH: 2/10: Add a QEMU machine type for paravirt guests Daniel P. Berrange
2007-08-22 22:29 ` PATCH: 3/10: Remove standalone xenfb code Daniel P. Berrange
2007-08-22 22:30 ` PATCH: 4/10: Refactor xenfb event handlers Daniel P. Berrange
2007-08-22 22:31 ` PATCH: 5/10: Refactor QEMU console integration Daniel P. Berrange
2007-08-22 22:31 ` PATCH: 6/10: Merge private & public xenfb structs Daniel P. Berrange
2007-08-22 22:32 ` PATCH: 7/10: Async negotiation with xenfb frontend Daniel P. Berrange
2007-08-22 22:32 ` PATCH: 8/10: Add pv console to QEMU paravirt machine Daniel P. Berrange
2007-08-22 22:33 ` PATCH: 9/10: XenD device model re-factoring Daniel P. Berrange
2007-08-22 22:34 ` Daniel P. Berrange [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-10-24 20:35 PATCH 0/10: Merge PV framebuffer & console into QEMU Daniel P. Berrange
2007-10-24 20:44 ` PATCH 10/10: Make xenconsoled ignore doms with qemu-dm Daniel P. Berrange
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=20070822223407.GB18061@redhat.com \
--to=berrange@redhat.com \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.