From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH] replace stat(/etc/disable-guest-log-throttle) in xen_platform.c
Date: Thu, 28 May 2009 15:31:27 +0100 [thread overview]
Message-ID: <4A1EA03F.90907@eu.citrix.com> (raw)
Hi all,
currently xen_platform reads /etc/disable-guest-log-throttle at boot to
decide whether is going to throttle guest logging or not.
When using stubdom this is the only code in qemu that rely on
fs-backend, apart from saving and loading the statefile for migration.
This patch removes the read from /etc and adds a read from xenstore
instead.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
diff --git a/hw/xen_platform.c b/hw/xen_platform.c
index 9827e3f..36610a4 100644
--- a/hw/xen_platform.c
+++ b/hw/xen_platform.c
@@ -276,6 +276,8 @@ static int platform_fixed_ioport_load(QEMUFile *f, void *opaque, int version_id)
void platform_fixed_ioport_init(void)
{
struct stat stbuf;
+ char *throttling;
+ int len = 1;
register_savevm("platform_fixed_ioport", 0, 1, platform_fixed_ioport_save,
platform_fixed_ioport_load, NULL);
@@ -286,8 +288,11 @@ void platform_fixed_ioport_init(void)
register_ioport_read(0x10, 16, 2, platform_fixed_ioport_read2, NULL);
register_ioport_read(0x10, 16, 1, platform_fixed_ioport_read1, NULL);
- if (stat("/etc/disable-guest-log-throttle", &stbuf) == 0)
- throttling_disabled = 1;
+ throttling = xenstore_vm_read(domid, "log-throttling", &len);
+ if (throttling != NULL) {
+ throttling_disabled = (throttling[0] - '0');
+ free(throttling);
+ }
platform_fixed_ioport_write1(NULL, 0x10, 0);
}
reply other threads:[~2009-05-28 14:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4A1EA03F.90907@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.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.