Commit Graph
2974 Commits
Author SHA1 Message Date
Keir Fraser ca896d0ca6 libxl/xl: fix multivcpu handling
Signed-off-by: Stefano Stabellini<stefano.stabellini@eu.citrix.com>
2010-06-04 10:14:06 +01:00
Keir Fraser 88d60e45ef xl: enable hap, parse hap option in the config files
This simple patch enables hap by default in xl and also allows xl to
parse the hap option in the VM config file.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-06-04 10:13:02 +01:00
Keir Fraser 8d6cdfed76 xl: correct help message of migrate and migrate-receive command
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-06-04 10:12:11 +01:00
Keir Fraser 9a9657f15a xl: fix vcpu-* command line args
Command line arguments start at argv[2]

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-06-04 10:11:40 +01:00
Keir Fraser 8ce5d64e3b xl: fix network-detach command line parsing
Command line arguments start at argv[2].  Also, exit(1) on failure.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-06-04 10:10:45 +01:00
Keir Fraser 89c41cfacc xl: fix network-list command line parsing
Command line arguments start at argv[2].

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-06-04 10:10:25 +01:00
Keir Fraser 46d24c4a83 xl: fix network-attach command line parsing
Command line arguments start at argv[2].

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-06-04 10:09:59 +01:00
Keir Fraser da923a6fff Bash completion scripts go to /etc/bash_completion.d/
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-04 10:09:11 +01:00
Keir Fraser c1d7e20205 xl: adds shutdown and reboot commands
libxl : remote shutdown to work for pure hvm domains

Signed-off-by: Gihan Munasinghe <GMunasinghe@flexiant.com>
2010-06-02 10:52:17 +01:00
Keir Fraser 1f60b34911 xl: remove duplicate code in migrate_domain()
libxl_domid_to_name() have already been called in
save_domain_core_begin()->find_domain(), so remove it.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-06-01 07:06:50 +01:00
Keir Fraser 81c0e00a2e libxl: fix domain suspend debug typo.
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2010-06-01 07:06:05 +01:00
Keir Fraser e693e5f1a7 tools: Build fixes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-28 09:45:50 +01:00
Keir Fraser 455a17fea9 xl/libxtl: Remove glitch in xl migrate log output
* Provide a new XTL_STDIOSTREAM_HIDE_PROGRESS flag in the stdio logger
* Provide a way to adjust the flags after logger setup
* Use these to disable progress output from the migration receiver, as
  the sender is also sending progress information.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2010-05-28 09:38:56 +01:00
Keir Fraser b140baacc3 xl: Allow control of logging level.
The -v option, which must come before the xl command, increases the
logging level each time it is supplied.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-05-28 09:35:12 +01:00
Keir Fraser 1fe4b0e07c libxl: Use the caller's logger (xentoollog)
We now require callers to provide a xentoollog_logger* for
libxl_ctx_init, and use that for all our own logging and also for
xc_interface_open.

Corresponding change to xl.c.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-05-28 09:34:42 +01:00
Keir Fraser 4046aa9cbe libxl: Fix up some incorrect printf formats
We need to use PRIu32 for domids, and also to pass arguments in the
right order.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-05-28 09:31:43 +01:00
Keir Fraser 5cc436c1d2 libxc: eliminate static variables, use xentoollog; API change
This patch eliminate the global variables in libxenctrl (used for
logging and error reporting).

Instead the information which was in the global variables is now in a
new xc_interface* opaque structure, which xc_interface open returns
instead of the raw file descriptor; furthermore, logging is done via
xentoollog.

There are three new parameters to xc_interface_open to control the
logging, but existing callers can just pass "0" for all three to get
the old behaviour.

All libxc callers have been adjusted accordingly.

Also update QEMU_TAG for corresponding qemu change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-05-28 09:30:19 +01:00
Keir Fraser ca1ba18256 xl: Move "extern" declarations to xl.h
Declarations (as opposed to definitions) of external objects should
not appear in .c files.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2010-05-28 09:25:34 +01:00
Keir Fraser 63e8667404 xl: Combine headers into one header file.
This provides a single place to put declarations of external symbols
etc.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2010-05-28 09:25:07 +01:00
Keir Fraser 76a5dc5492 xl: print BDF parse errors
When parsing BDFs for pci-attach/detach, check the return of scanf
rather than operating on random devices.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-28 08:12:15 +01:00
Keir Fraser 596cf420ec xl: fix pci-detach usage message
"xl pci-detach -h" shows the usage for pci-attach

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-28 08:11:47 +01:00
Keir Fraser c53944ad66 xl: fix PCI resource parsing
The parsing of PCI resources has two problems:

   1. it assumes devices are 32-bits, whereas the fields in the
      "resources" file can have full 64-bit values
   2. it only parses the first resource because the format string is
      missing a \n

Fix both of these up, which allows my Intel 82574L to work with MSI-X.

However, this should probably be using a PCI access library rather
than rummaging around in /sys/bus/pci...

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-28 08:10:48 +01:00
Keir Fraser 56022b3071 libxl: Do not provide arbitrary string as format specifier to printf.
Original patch from Dulloor <dulloor@gmail.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-27 08:26:52 +01:00
Keir Fraser a8ad76437e xl: Some small fixes
- When use mem-set, I got suspicious error output:
  # xl mem-set 1 256g
  setting domid 1 memory to : 268435456
  [0] libxl.c:2535:libxl_set_memory_target: memory_dynamic_max must be
  less than or equal to memory_static_max
  : Success
- String generated by strdup() should be freed
- When using 'xl help', mem-max and mem-set's output is not as intend,
  and it also breaks bash completion, fix it.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-26 08:13:47 +01:00
Keir Fraser 961652b3bd xl: allow nameless domains to be named
At present, find_domain() will exit(2) if you specify a domain by
number, but that domain doesn't have a corresponding name.  However,
nothing seem to critically depend on common_domname being set, and the
test prevents dom0 or other nameless domains from being named.  So
just remove the check.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Acked-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-26 08:12:15 +01:00
Keir Fraser 4024bae739 xl: Add subcommand 'xl dmesg'
Can be used to read and/or clear dmesg buffer.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-05-26 07:45:51 +01:00
Keir Fraser a1a1b2c951 libxl: small build fix to pass uint8_t to tolower().
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-05-25 11:00:55 +01:00
Keir Fraser 8aca668075 xl: fix block-attach command parsing
Fix two command-line parsing problems:
 - the argc check is wrong: it must be provided with the frontend
 device
 - the ro/rw mode is optional, so default to rw if it is absent

Also, update the usage message accordingly.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-21 15:25:10 +01:00
Keir Fraser d015de71fe xl: Check for dom0 when instructed to destroy a domain.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-19 12:53:44 +01:00
Keir Fraser 00c08b5e07 xl: Add subcommand "xl debug-keys"
Can be used to send debug keys to Xen.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-05-19 12:51:16 +01:00
Keir Fraser 5c898a05f4 libxl: Add tmem support commands
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-19 12:48:32 +01:00
Keir Fraser 7e62eca7a1 libxl: Compilation and other small fixes
* Some of the library functions such as fscanf, system, and asprintf
are declared with warn_unused_result (ubuntu server 9.10), causing
compilation errors in libxl.
* When using asprintf, the caller is responsible for freeing the
memory.
* memset takes wrong size argument in one of the places (caught by
a builtin gcc check).

Signed-off-by: Dulloor Rao <dulloor@gmail.com>
2010-05-19 08:20:46 +01:00
Keir Fraser 4d8af85966 xl: recognize the "extra" entry in the domain config file
"extra" defines extra parameters to be added to the kernel command
line, so append it accordingly.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-19 08:18:51 +01:00
Keir Fraser 034b34e084 libxl: Set default shadow memory based on final values for vcpus and memory
Set default shadow memory based on final versions of memory and vcpus,
not on minimum default versions.

Failure mode was failed p2m allocaitons, e.g., with hvm-linux PV
drivers mapping the shared-info page.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2010-05-19 08:15:05 +01:00
Keir Fraser 6cbd479e30 xl: allow scaling suffix on memory sizes in mem-set and mem-max
Allow mem-set and mem-max to take 'b', 'k', 'm', 'g' and 't' as
scaling suffixes for bytes, kilobytes, mega, etc.  An unadorned number
is still treated as kilobytes so no existing users should be affected.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-18 11:38:12 +01:00
Keir Fraser 1efc662aba libxl: Add missing start_time entry when create and restore VMs.
Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
2010-05-15 08:27:22 +01:00
Keir Fraser e1e86ff4a2 xl: Add include-only-once checks to xl_cmd{impl,table}.h
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-14 08:05:05 +01:00
Keir Fraser 9fa16606cb xl: Add "xl uptime" command, a clone of "xm uptime".
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-14 08:01:51 +01:00
Keir Fraser 102f8460ca xl: Check invalid domid in find_domain()
If domain id is invalid, find_domain should return error because
the specified domain does not exist.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-14 07:56:43 +01:00
Keir Fraser 1803120b06 libxl: Fix missing memory/target xenstore entry on domain creation
There was a simple bug in stuffing the initial setup array.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-05-14 07:55:14 +01:00
Keir Fraser 3921297ea2 libxl: Adjustments to memset/memmax handling
I think xl memset should change the memory currently used by the guest
and xl memmax should change the size of the guest's address space and
not the population.  For this reason libxl_set_memory_target should
provide a way to enforce the memory target, calling
xc_domain_setmaxmem.  On the other hand xl memmax shouldn't call
xc_domain_setmaxmem because that is the upper bound of the memory
reservation, it should just change static-max, that at the moment
wouldn't do much, but we can imagine that in the future could trigger
something useful in the guest.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jonathan Knowles <Jonathan.Knowles@eu.citrix.com>=20
2010-05-14 07:53:16 +01:00
Keir Fraser eac0f64d80 libxl: Check return codes of write/asprintf/daemon consistently.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-13 09:35:05 +01:00
Keir Fraser f4de8d0315 xl: Implement block-detach command
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:52:47 +01:00
Keir Fraser a9733d50ff xl: Implement block-list command
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:51:50 +01:00
Keir Fraser 2b579c5add xl: Implement block-attach command
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:50:54 +01:00
Keir Fraser d32239ba6e xl: Implement network-detach command
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:49:41 +01:00
Keir Fraser 742c6e551a xl: Implement network-list command
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:48:35 +01:00
Keir Fraser 1a043dad2a xl: Implement network-attach
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:46:57 +01:00
Keir Fraser c0910cbc5b xl: Add check for command 'xl mem-set'
Get max memory from /local/domain/$domid/memory/static-max, and then
do value check. The value larger than static-max is invalid.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-05-12 08:53:27 +01:00
Keir Fraser bf4215becc xl: Add command 'xl mem-max'
Add subcommand 'xl mem-max', can be used to set static max memory

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-05-12 08:52:59 +01:00