Commit Graph
359 Commits
Author SHA1 Message Date
Andrew Cooper f524e27671 tools/mfn-dump: Fixes to 'dump-p2m'
* Don't walk off the end of p2m_table under the mistaken impression that it
  contains toolstack unsigned longs.  Despite its array type it contains guest
  unsigned longs so unconditionally needs casting to the guest width to use
  correctly.  Furthermore, a 64bit toolstack must be extra careful when it
  finds a 32bit guest's INVALID_MFN.

* Drop 'mapped' and 'pinned' descriptions.  This are both bogus, including all
  uses of the is_mapped() macro.

* Rearrange the type name printing to be more concise.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2014-05-02 13:34:35 +01:00
Andrew Cooper 8fde66c8c0 tools/misc: Fix linkage of libxenstore
* xen-mfndump doesn't use xenstore at all.  Don't link against it.

* xen-hptool can include the correct header rather than externing itself a
  single function.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2014-05-02 13:34:35 +01:00
Fabio Fantoni 074535021b tools: improve make debball
- Remove version from installed package name, to make "upgrades" work
- Add conffiles to manage files in /etc on package install/update/remove
- Added in description that this is a .deb for testing only

Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2014-04-11 15:46:30 +01:00
Jan Beulich ca57e4c9b8 x86/idle: update to include further package/core residency MSRs
With the number of these growing it becomes increasingly desirable to
not repeatedly alter the sysctl interface to accommodate them. Replace
the explicit listing of numbered states by arrays, unused fields of
which will remain untouched by the hypercall.

The adjusted sysctl interface at once fixes an unrelated shortcoming
of the original one: The "nr" field, specifying the size of the
"triggers" and "residencies" arrays, has to be an input (along with
being an output), which the previous implementation didn't obey to.

Note that the bouncing direction in the libxc interface at once gets
corrected to OUT (was BOTH).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
2014-03-18 11:52:34 +01:00
Ian Jackson 7b0360b761 libxc: suspend: Fix suspend event channel locking
Use fcntl F_SETLK, rather than writing our pid into a "lock" file.
That way if we crash we don't leave the lockfile lying about.  Callers
now need to keep the fd for our lockfile.  (We don't use flock because
we don't want anyone who inherits this fd across fork to end up with a
handle onto the lock.)

While we are here:
 * Move the lockfile to /var/run/xen
 * De-duplicate the calculation of the pathname
 * Compute the buffer size for the pathname so that it will definitely
   not overrun (and use the computed value everywhere)
 * Fix various error handling bugs

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
2014-03-17 15:53:59 +00:00
Ian Jackson d310a8339c libxc: suspend: Rename, improve xc_suspend_evtchn_init
xc_suspend_evtchn_init expects to eat the first event on the xce.  If
the xce is used for any other purpose then this can break.  Document
this fact and rename the function to xc_suspend_evtchn_init_exclusive.
(I haven't checked the call sites for improper shared use of the xce.)

Provide a corresponding xc_suspend_evtchn_init_sane which doesn't try
to eat an event, and instead leaves the caller the ability to
demultiplex.

Also document that xc_await_suspend needs exclusive use of the xce.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CC: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Acked-by: Ian Campbell <ian.campbell@citrix.com>

---
v3: Drop spurious addition of #include <assert.h>
2014-03-17 15:53:59 +00:00
Andrew Cooper e927d4be84 tools/mfndump: Avoid unintentional NULL dereference
If we failed to open an xc interface, using xch to log an error will end in
tears.  Print to stderr instead, as we are bailing immediately later.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Coverity-id: 1191885
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Dario Faggioli <dario.faggioli@citrix.com>
2014-03-13 18:03:37 +00:00
George Dunlap b630217a57 Add a "make rpmball" target
Build a simplistic dummy package, similar to "make debball", for
developers on rpm-based systems.

[ Fixed some trailing whitespace -iwj ]

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
CC: Ian Jackson <ian.jackson@citrix.com>
CC: Ian Campbell <ian.campbell@citrix.com>
CC: Dario Faggioli <dario.faggioli@citrix.com>
CC: Olaf Hering <olaf@aepfle.de>
CC: Don Slutz <dslutz@verizon.com>
CC: M A Young <m.a.young@durham.ac.uk>
Tested-by: Don Slutz <dslutz@verizon.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2014-03-11 11:42:04 +00:00
Olaf Hering 269324ae07 tools/libxc: remove double inclusion of errno.h
xc_private.h includes errno.h already

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2014-03-10 16:50:17 +00:00
Andrew Cooper f55f10a27c tools/xen-mfndump: Avoid using -ERROR as an upper loop bound
Coverity ID: 1090375

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2013-11-25 12:16:11 +00:00
Andrew Cooper 4fa0ddeef7 tools/xen-mfndump: Avoid munmap(NULL, PAGE_SIZE) on certain error paths
Coverity ID 1090361 1090362 1090363

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2013-11-25 12:15:55 +00:00
Matthew Daley c07134ccca tools: remove unnecessary null pointer checks before frees
Patch generated by the following semantic patch
(http://coccinelle.lip6.fr/):

@@
expression *P;
@@

- if(P) free(P);
+ free(P);

...and then by filtering through the following command:

filterdiff -p1 -x 'stubdom/*' -x 'tools/firmware/*' -x 'tools/qemu-*' -x 'tools/blktap*'

Signed-off-by: Matthew Daley <mattjd@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-10-31 20:04:25 +00:00
Ian Campbell 593470233f xen-mfndump: Use inttypes.h to format uint64_t types.
Fixes 32-bit build:

cc1: warnings being treated as errors
xen-mfndump.c: In function 'dump_ptes_func':
xen-mfndump.c:236: error: format '%lx' expects type 'long unsigned int', but argument 3 has type 'uint64_t'
xen-mfndump.c: In function 'lookup_pte_func':
xen-mfndump.c:305: error: format '%lx' expects type 'long unsigned int', but argument 5 has type 'uint64_t'

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2013-09-14 08:40:17 +01:00
Dario Faggioli ae763e4224 tools/misc: introduce xen-mfndump.
A little development and debugging tool, useful when looking
for information about MFN to PFN mappings, MFN/PFN mappings
in a guest's PTEs, etc.

This is what it can do as of now:

$ /usr/sbin/xen-mfndump
Usage: xen-mfndump <command> [args]
Commands:
  help                      show this help
  dump-m2p                  show M2P
  dump-p2m    <domid>       show P2M of <domid>
  dump-ptes   <domid> <mfn> show the PTEs in <mfn>
  lookup-pte  <domid> <mfn> find the PTE mapping <mfn>
  memcmp-mfns <domid1> <mfn1> <domid2> <mfn2>
                            (str)compare content of <mfn1> & <mfn2>

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-09-13 13:10:10 +01:00
Ian Campbell 5c52c9e0af tools: remove lomount
Build was disabled by default in 2008 (9bb7f7e2ac). As noted at the time
people should be using kpartx these days instead.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Matt Wilson <msw@amazon.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2013-08-20 15:34:34 +01:00
Ian Campbell 337452d04d tools: remove miniterm
It has been disabled by default since 2008 (9bb7f7e2ac). Back then Ian J
asserted it was useful to keep them in the tree in source form. I don't think
this is true anymore.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Matt Wilson <msw@amazon.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2013-08-20 15:34:24 +01:00
Ian Campbell 4b07ff449a tools: delete xsview
This was apparently a Qt xenstore viewer. It hasn't been touched since it was
first committed in 2007 and I can't beleive anyone is actually using even if
it still happens to work.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Matt Wilson <msw@amazon.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2013-08-20 15:34:15 +01:00
Ian Campbell 9af42f3598 tools: move xm and xend under tools python
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Matt Wilson <msw@amazon.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2013-08-20 15:33:37 +01:00
Jacob Shin 6b104d91b8 cpufreq, xenpm: fix cpufreq and xenpm mismatch
Currently cpufreq and xenpm are out of sync. Fix cpufreq reporting of
if turbo mode is enabled or not. Fix xenpm to not decode for tristate,
but a boolean.

Signed-off-by: Jacob Shin <jacob.shin@amd.com>
2013-07-02 08:47:00 +02:00
Frediano Ziglio 55e5d9527c gcov: Do not use mmap directly but use xc_hypercall_buffer_alloc
xencov.c did not compile on NetBSD so use xc_hypercall_buffer which is
more portable.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-06-27 12:11:32 +01:00
Frediano Ziglio cc1eca5194 gcov: Add script to split coverage informations.
Split coverage informations extracted from xencov utility.
This script accept coverage blob either as file or from input and extract
into files compatible with gcc format (gcda).

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-30 09:30:18 +01:00
Frediano Ziglio eb459da885 gcov: Add small utility to deal with test coverage information from Xen
Currently the utility can read and reset coverage informations.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
2013-02-21 16:28:11 +00:00
Dan Magenheimer b46c24edb7 xen-tmem-list-parse: fix ugly parse output
The program xen-tmem-list-parse parses the output of xm/xl tmem-list
into human-readable format.  A missing NULL terminator sometimes
causes garbage to be spewed where the two-letter pool type
should be output.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-11-14 10:24:28 +00:00
Liu, Jinsong e35cd2cce4 x86: Save/restore TSC adjust during HVM guest migration
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
2012-09-26 12:13:38 +02:00
Liu, Jinsong 19b03acdd1 x86: vMCE save and restore
This patch provides vMCE save/restore when migration.
1. MCG_CAP is well-defined. However, considering future cap extension,
   we keep save/restore logic that Jan implement at c/s 24887;
2. MCi_CTL2 initialized by guestos when booting, so need save/restore
   otherwise guest would surprise;
3. Other MSRs do not need save/restore since they are either error-
   related and pointless to save/restore, or, unified among all vMCE
   platform;

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>

- fix handling of partial data in XEN_DOMCTL_set_ext_vcpucontext
- fix adjustment of xen_domctl_ext_vcpucontext

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
2012-09-26 12:05:55 +02:00
Jan Beulich ae165a0659 xenpm: make argument parsing and error handling more consistent
Specifically, what values are or aren't accepted as CPU identifier, and
how the values get interpreted should be consistent across sub-commands
(intended behavior now: non-negative values are okay, and along with
omitting the argument, specifying "all" will also be accepted).

For error handling, error messages should get consistently issued to
stderr, and the tool should now (hopefully) produce an exit code of
zero only in the (partial) success case (there may still be a small
number of questionable cases).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2012-09-17 10:09:59 +02:00
Boris Ostrovsky db48465811 xenpm, x86: Fix reporting of idle state average residency times
If CPU stays in the same idle state for the full duration of
xenpm sample then average residency may not be reported correctly
since usage counter will not be incremented.

In addition, in order to calculate averages correctly residence
time and usage counter should be read and written atomically.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-06-06 16:34:53 +01:00
Boris Ostrovsky de0e85188c xenpm: Fix reporting of C0 residence times
Idle state residence times as provided by pmstat_get_cx_stat() are not
reported precisely since remote core may be in idle state and
therefore has not updated its statistics at the time local core
collected them.  This causes C0 residencies as calculated by xenpm to
sometimes become negative.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-05-30 09:26:02 +01:00
George Dunlap 10c88f1c18 tools: Install pv bootloaders in libexec rather than /usr/bin
pygrub and xenpvnetboot are meant to be run by tools, and not by the user,
and thus should be in /usr/lib/xen/bin rather than /usr/bin.

Because most config files will still have an absolute path pointing to
/usr/bin/pygrub, make a symbolic link that we will deprecate.

Signed-off-by: George Dunlap <george.dunlap@eu.ctirix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-05-15 16:28:11 +01:00
Ian Campbell debddaa56c nstore: rename public xenstore headers
The xenstore header xs.h is producing conflicts with other software[1].

xs is a too short identifier and does not matche the library. Renaming
the headers to xenstore.h and xenstore_lib.h is the easiest way to make
them easy recognizable and prevent furthe problems.

[1]: http://bugs.debian.org/668550

[ Also update QEMU_TAG, to bring in corresponding change to
qemu-xen-traditional. -iwj ]

Signed-off-by: Bastian Blank <waldi@debian.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

--HG--
rename : tools/xenstore/xs.h => tools/xenstore/xenstore.h
rename : tools/xenstore/xs_lib.h => tools/xenstore/xenstore_lib.h
2012-05-14 17:15:36 +01:00
Ian Campbell 8a54dd6247 tools: xen-lowmemd is x86 specific, only install for x86
It is TARGETS-$(CONFIG_X86) so it should be INSTALL_SBIN-$(CONFIG_X86) too

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2012-05-14 16:34:29 +01:00
Tim Deegan 87b3ab022c tools: Fix FPU save area definition in xen-hvmctx
Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2012-04-24 18:39:18 +01:00
Roger Pau Monne 65da491321 autoconf: add check for curses library
Check for a curses compatible library (curses or ncurses basically).
One of those is needed to compile Xen tools (gtraceview and xentop).

Modify Makefiles/sources to use configure output (fetch CURSES_LIBS
from tools/Tools.mk and header to include from tools/config.h)

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2012-03-13 15:23:35 +00:00
Zhigang Wang b129ff2b04 add new bootloader xenpvnetboot for pv guest
`xenpvnetboot' supports getting boot images from following locations:

 - http://host/path
 - https://host/path
 - ftp://host/path
 - file:///path
 - tftp://host/path
 - nfs:host:/path
 - /path
 - /path/file.iso
 - /path/filesystem.img
 - /dev/sda1
 - nfs+iso:host:/path/file.iso
 - nfs+iso:host:/path/filesystem.img

To use it, make `xenpvnetboot' as bootloader for PV guest::

    bootloader = '/usr/bin/xenpvnetboot'

To get boot images from various locations, set the right bootloader
arguments, e.g.:

    bootloarder_args = ['--location=http://192.168.0.1/fedora/x86_64']
    bootloarder_args = ['--location=ftp://192.168.0.1/fedora/x86_64']
    bootloarder_args = ['--location=file:///fedora/x86_64']
    bootloarder_args = ['--location=tftp://192.168.0.1/fedora/x86_64']
    bootloarder_args = ['--location=/fedora/x86_64']
    bootloarder_args = ['--location=/fedora/Fedora-16-x86_64-DVD.iso']
    bootloarder_args = ['--location=nfs:192.168.0.1:/fedora/x86_64']
    bootloarder_args = ['--location=nfs+iso:192.168.0.1:/fedora/Fedora-16-x86_64-DVD.iso']

You can use `kernel' and `ramdisk' to specify the relative path of
boot kernel and ramdisk. `xenpvnetboot' will join them with the
location to find the boot kernel and ramdisk, e.g.:

    kernel = 'images/pxeboot/vmlinuz'
    ramdisk = 'images/pxeboot/initrd.img'
    bootloarder_args = ['--location=http://192.168.0.1/fedora/x86_64']

    kernel = 'fedora/x86_64/images/pxeboot/vmlinuz'
    ramdisk = 'fedora/x86_64/images/pxeboot/initrd.img'
    bootloarder_args = ['--location=http://192.168.0.1/']

You can also omit the `--location' option and specify the full URL for
`kernel' and `ramdisk' directly, e.g.:

    kernel = 'http://192.168.0.1/fedora/x86_64/images/pxeboot/vmlinuz'
    ramdisk = 'http://192.168.0.1/fedora/x86_64/images/pxeboot/initrd.img'

If only `--location' is specified and `kernel' and `ramdisk' are not
specified, `xenpvnetboot' will search the following places for boot
images from the location::

    ('images/xen/vmlinuz', 'images/xen/initrd.img'), # Fedora <= 10 and OL = 5
    ('boot/i386/vmlinuz-xen', 'boot/i386/initrd-xen'), # openSUSE >= 10.2 and SLES >= 10
    ('boot/x86_64/vmlinuz-xen', 'boot/x86_64/initrd-xen'), # openSUSE >= 10.2 and SLES >= 10
    ('current/images/netboot/xen/vmlinuz', 'current/images/netboot/xen/initrd.gz'), # Debian
    ('images/pxeboot/vmlinuz', 'images/pxeboot/initrd.img'), # Fedora >=10 and OL >= 6
    ('isolinux/vmlinuz', 'isolinux/initrd.img'), # Fedora >= 10 and OL >= 6

`xenpvnetboot' requires python module `urlgrabber'
http://urlgrabber.baseurl.org/.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2012-03-01 18:54:37 +00:00
Keir Fraser c933085d09 lowmemd: Fix build when xs.h has not been previously installed.
Signed-off-by: Keir Fraser <keir@xen.org>
2012-03-01 16:43:46 +00:00
Andres Lagar-Cavilla f140a8b192 Lowmemd: Simple demo code to show use of VIRQ_ENOMEM
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2012-03-01 16:41:39 +00:00
Jan Beulich e1dc98e3c3 x86/vMCE: save/restore MCA capabilities
This allows migration to a host with less MCA banks than the source
host had, while without this patch accesses to the excess banks' MSRs
caused #GP-s in the guest after migration (and it depended on the guest
kernel whether this would be fatal).

A fundamental question is whether we should also save/restore MCG_CTL
and MCi_CTL, as the HVM save record would better be defined to the
complete state that needs saving from the beginning (I'm unsure whether
the save/restore logic allows for future extension of an existing
record).

Of course, this change is expected to make migration from new to older
Xen impossible (again I'm unsure what the save/restore logic does with
records it doesn't even know about).

The (trivial) tools side change may seem unrelated, but the code should
have been that way from the beginning to allow the hypervisor to look
at currently unused ext_vcpucontext fields without risking to read
garbage when those fields get a meaning assigned in the future. This
isn't being enforced here - should it be? (Obviously, for backwards
compatibility, the hypervisor must assume these fields to be clear only
when the extended context's size exceeds the old original one.)

A future addition to this change might be to allow configuration of the
number of banks and other MCA capabilities for a guest before it starts
(i.e. to not inherits the values seen on the first host it runs on).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2012-02-24 09:07:54 +01:00
Jan Beulich 0e6f8cfd47 xenpm: assorted adjustments
- use consistent error values (stop mixing of [positive] errno values
  with literal -E... ones)
- properly format output
- don't use leading zeros in decimal output
- move printing of average frequency into P-state conditional (rather
  than a C-state one)
- don't print some C-state related info when CPU idle management is
  disabled in the hypervisor
- use calloc() for array allocations that also got cleared via memset()
  so far

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2012-01-10 16:24:50 +00:00
Keir Fraser 51b4edac54 tools/x86_64: Fix cpuid() inline asm to not clobber stack's red zone
Pushing stuff onto the stack on x86-64 when we do not specify
-mno-red-zone is unsafe. Since the complicated asm is due to register
pressure on i386, we simply implement an all-new simpler alternative
for x86-64.

Signed-off-by: Keir Fraser <keir@xen.org>
Acked-by: Jan Beulich <jbeulich@novell.com>
2011-12-02 06:31:14 -08:00
Roger Pau Monne 9163062a39 tools/build: Introduce {PREPEND,APPEND}_{LIB,INCLUDES}
Create two new variables called APPEND_ and PREPEND_ to add compile
flags at the beginning or at the end of the search path.

Added a new semantic for user defined compile flags, here is the list
of possible options:

PREPEND_LIB: add libraries to the search path before xen
             (before xen installation folders).
PREPEND_INCLUDES: add headers to the search path before xen
                  (before xen installation folders).
APPEND_LIB: add libraries to the search path at the end
            (after all xen installation folders have been added).
APPEND_INCLUDES: add libraries to the search path at the end
                 (after all xen installation folders have been added).

EXTRA_INCLUDES and EXTRA_LIB can still be used, and they will have the
same effect as PREPEND_INCLUDES and PREPEND_LIB.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-11-14 18:14:07 +00:00
Yang Zhang 56d1d85a0c x86 pm: provide CC7/PC2 residency
Sandy bridge introduces new MSR to get cc7/pc2 residency (core C-state
7/package C-state 2). Print the cc7/pc2 residency when on sandy bridge
platform.

Signed-off-by: Yang Zhang <yang.z.zhang@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
2011-10-25 16:46:47 +01:00
Paul Durrant 5f47247ded Add save/restore support for viridian APIC assist pfn.
c/s 17b754cab7b0 introduced a per-VCPU viridian structure to
store the APIC assist pfn. This patch adds support for save and
restore of that value.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
2011-09-26 22:10:21 +01:00
Ian Campbell ef80eecda3 tools: fix install of lomount
$(BIN) went away in 23124:e3d4c34b14a3.

Also there are no *.so, *.a or *.rpm built in here

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2011-09-22 18:37:06 +01:00
Kevin Tian 4776f8ddd2 xenpm: clean up print messages
Signed-off-by Kevin Tian <kevin.tian@intel.com>
2011-07-08 08:33:01 +01:00
Daniel Stodden 707c078455 tools: xen-ringwatch: spot, and work around, broken frontend/backend ring I/O
Adds tool support to debug backends which expose I/O ring state in
sysfs. Currently supports /sys/devices/xen-backend/vbd-*-*/io_ring
nodes for block I/O, where implemented.

Primary function is to observe ring state make progress over a period
of time, then report stuck message queue halves where pending
consumer/event are not moving.

Adding --kick will re-issue event notifications to frontends, and/or
kick backends out of wait state.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-06-21 15:38:52 +01:00
Keir Fraser a51d11c6e8 xen-detect: Fix cpuid asm for 32-bit PIC compilation.
Signed-off-by: Keir Fraser <keir@xen.org>
2011-06-17 08:08:13 +01:00
Tim Deegan dcf2f8a8e1 Fix the filename of the archive produced by 'make deb'
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2011-05-27 18:41:12 +01:00
Tim Deegan ad06dc009b Build target to wrap dist/install in a .deb archive.
Adds "make deb", which does a "make dist" build and wraps the
resulting dist/install files in dist/xen-<version>.deb

This is _not_ a "packaged" version of Xen for Debian users, nor is it
intended to compete with anyone else's packaging efforts.  In
particular it doesn't do any of the boot-time or fstab fixups needed
to actually start the xen tools.  It's just a quick hack for
developers to be able to quickly install and uninstall a Xen build on
a test box.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2011-05-16 13:34:25 +01:00
Ian Campbell 9ac650d825 tools: remove pattern matched linking rules
Most subdirs only build a single tool to start with and those which
build multiple tools often have different linkage requirements.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-03-31 19:34:56 +01:00
Ian Campbell 61d0fe74c6 tools: Remove $(CFLAGS) from links lines.
The relevant variable in these circumstances is called $(LDFLAGS).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-03-31 19:32:18 +01:00