From 157a708a28dfd6e71e59e73d5cb53d9a9477873e Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 1 Nov 2005 10:28:41 +0100 Subject: [PATCH 1/6] Add get_cycles(), to be defined in asm/time.h, as a generic method to access cpu-specific local cycle counter. Signed-off-by: Keir Fraser --- xen/common/trace.c | 2 +- xen/include/asm-x86/time.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/xen/common/trace.c b/xen/common/trace.c index 9746b75102..da359b5908 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -260,7 +260,7 @@ void trace(u32 event, unsigned long d1, unsigned long d2, } rec = &t_recs[smp_processor_id()][buf->prod % nr_recs]; - rdtscll(rec->cycles); + rec->cycles = (u64)get_cycles(); rec->event = event; rec->data[0] = d1; rec->data[1] = d2; diff --git a/xen/include/asm-x86/time.h b/xen/include/asm-x86/time.h index ba5b23139a..b192f55c82 100644 --- a/xen/include/asm-x86/time.h +++ b/xen/include/asm-x86/time.h @@ -2,6 +2,8 @@ #ifndef __X86_TIME_H__ #define __X86_TIME_H__ +#include + extern int timer_ack; extern void calibrate_tsc_bp(void); @@ -10,4 +12,13 @@ extern void calibrate_tsc_ap(void); struct domain; extern void init_domain_time(struct domain *d); +typedef u64 cycles_t; + +static inline cycles_t get_cycles(void) +{ + cycles_t c; + rdtscll(c); + return c; +} + #endif /* __X86_TIME_H__ */ From e4072e1c33b080e67d17cb7098604da09b9dbe7c Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 1 Nov 2005 10:31:25 +0100 Subject: [PATCH 2/6] Fix the DISPLAY configration that breaks vmx domain creation with SDL on vncserver or remote X. Changeset 7547 added a test of opts.vals.display when getenv("DISPLAY"); because there is a default value:localhost:0, that causes the test always to be true. Signed-off-by: Xiaofeng Ling --- tools/python/xen/xm/create.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/python/xen/xm/create.py b/tools/python/xen/xm/create.py index 5bdb8ebf00..d844b2044c 100644 --- a/tools/python/xen/xm/create.py +++ b/tools/python/xen/xm/create.py @@ -376,7 +376,7 @@ gopts.var('sdl', val='', use="""Should the device model use SDL?""") gopts.var('display', val='DISPLAY', - fn=set_value, default='localhost:0', + fn=set_value, default=None, use="X11 display to use") From 2c6df848e649d52e905bb5c93c996099111b8e9a Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 1 Nov 2005 10:33:22 +0100 Subject: [PATCH 3/6] There is an error in xenstat, such that a wild pointer is being dereferenced and written to. Signed-off-by: Charles Coffing --- tools/xenstat/libxenstat/src/xenstat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/xenstat/libxenstat/src/xenstat.c b/tools/xenstat/libxenstat/src/xenstat.c index 0e29cacb4f..58221ebdc6 100644 --- a/tools/xenstat/libxenstat/src/xenstat.c +++ b/tools/xenstat/libxenstat/src/xenstat.c @@ -704,7 +704,6 @@ static char *xenstat_get_domain_name(xenstat_handle *handle, unsigned int domain { char path[80]; char *name; - unsigned int *len; struct xs_transaction_handle *xstranshandle; snprintf(path, sizeof(path),"/local/domain/%i/name", domain_id); @@ -715,7 +714,7 @@ static char *xenstat_get_domain_name(xenstat_handle *handle, unsigned int domain exit(1); /* Change this */ } - name = (char *) xs_read(handle->xshandle, xstranshandle, path, len); + name = (char *) xs_read(handle->xshandle, xstranshandle, path, NULL); xs_transaction_end(handle->xshandle, xstranshandle, false); From e573e24eb8cf0f016ecb4a95cc81253179ece51e Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 1 Nov 2005 10:34:34 +0100 Subject: [PATCH 4/6] Fix docs: xm set-mem => xm mem-set. Signed-off-by: Anthony Liguori --- docs/src/user/control_software.tex | 2 +- docs/src/user/domain_mgmt.tex | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/user/control_software.tex b/docs/src/user/control_software.tex index 629be4c623..d65b7b5eea 100644 --- a/docs/src/user/control_software.tex +++ b/docs/src/user/control_software.tex @@ -60,7 +60,7 @@ custom variables (for instance, the \path{xmdefconfig} file uses a The available commands are as follows: \begin{description} -\item[set-mem] Request a domain to adjust its memory footprint. +\item[mem-set] Request a domain to adjust its memory footprint. \item[create] Create a new domain. \item[destroy] Kill a domain immediately. \item[list] List running domains. diff --git a/docs/src/user/domain_mgmt.tex b/docs/src/user/domain_mgmt.tex index 190c63f795..448f5fddf8 100644 --- a/docs/src/user/domain_mgmt.tex +++ b/docs/src/user/domain_mgmt.tex @@ -160,12 +160,12 @@ memory at the request of the administrator or the user of the domain. \subsection{Setting memory footprints from dom0} The machine administrator can request that a domain alter its memory -footprint using the \path{xm set-mem} command. For instance, we can +footprint using the \path{xm mem-set} command. For instance, we can request that our example ttylinux domain reduce its memory footprint to 32 megabytes. \begin{verbatim} -# xm set-mem ttylinux 32 +# xm mem-set ttylinux 32 \end{verbatim} We can now see the result of this in the output of \path{xm list}: @@ -181,7 +181,7 @@ The domain has responded to the request by returning memory to Xen. We can restore the domain to its original size using the command line: \begin{verbatim} -# xm set-mem ttylinux 64 +# xm mem-set ttylinux 64 \end{verbatim} \subsection{Setting memory footprints from within a domain} From d5dce3e452e19914d3a6896a99d69f59ad643520 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 1 Nov 2005 10:36:19 +0100 Subject: [PATCH 5/6] The following patch adds a section for SHUTDOWN OPTIONS for the xmdomain.cfg man page. It documents the new set of options introduced over the last few weeks. Signed-off-by: Sean Dague --- docs/man/xmdomain.cfg.pod.5 | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/docs/man/xmdomain.cfg.pod.5 b/docs/man/xmdomain.cfg.pod.5 index b1c661ee87..ad38ca09a2 100644 --- a/docs/man/xmdomain.cfg.pod.5 +++ b/docs/man/xmdomain.cfg.pod.5 @@ -72,6 +72,57 @@ A bare minimal config file example might be as follows: =item I +=back + +=head1 DOMAIN SHUTDOWN OPTIONS + +There are 3 options which control domain shutdown (both planned and +unplanned) under certain events. The 3 events currently captured are: + +=over 4 + +=item I + +Triggered on either an I or graceful shutdown from inside +the DomU. + +=item I + +Triggered on either an I or graceful reboot from inside the +DomU. + +=item I + +Triggered when a DomU goes to the crashed state for any reason. + +=back + +All of them take one of 4 valid states listed below. + +=over 4 + +=item I + +The domain will be cleaned up completely. No attempt at respawning +will occur. This is what a typical shutdown would look like. + +=item I + +The domain will be restarted with the same name as the old domain. +This is what a typical reboot would look like. + +=item I + +The domain will not be cleaned up at all. This is often useful for +crash state domains which ensures that enough evidence is to debug the +real issue. + +=item I + +The old domain will not be cleaned up, but will be renamed so a new +domain can be restarted in it's place. (TODO: what does this mean for +resources? What is the renamed name?) + =back =head1 SEE ALSO From b35976750af64fcb5ed2c63831135541ebf2675d Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 1 Nov 2005 10:37:07 +0100 Subject: [PATCH 6/6] Disable guest firmware apm since no apm is supported now to remove the apm handle idle request error when guest os boot Signed-off-by: Winston Wang --- tools/firmware/rombios/rombios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/firmware/rombios/rombios.c b/tools/firmware/rombios/rombios.c index b6e27034ab..857e94523a 100644 --- a/tools/firmware/rombios/rombios.c +++ b/tools/firmware/rombios/rombios.c @@ -149,7 +149,7 @@ #define BX_SUPPORT_FLOPPY 1 #define BX_FLOPPY_ON_CNT 37 /* 2 seconds */ #define BX_PCIBIOS 1 -#define BX_APM 1 +#define BX_APM 0 #define BX_USE_ATADRV 1 #define BX_ELTORITO_BOOT 1