Tim Deegan [Thu, 10 Nov 2011 11:12:35 +0000 (11:12 +0000)]
x86/mm: Enforce ordering constraints for the page alloc lock in the PoD code
The page alloc lock is sometimes used in the PoD code, with an
explicit expectation of ordering. Use our ordering constructs in the
mm layer to enforce this.
The additional book-keeping variables are kept in the arch_domain
sub-struct, as they are x86-specific to the whole domain.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Tim Deegan [Thu, 10 Nov 2011 11:12:35 +0000 (11:12 +0000)]
x86/mm: Declare an order-enforcing construct for external locks used in the mm layer
Declare an order-enforcing construct for a lock used in the mm layer
that is not of type mm_lock_t. This is useful whenever the mm layer
takes locks from other subsystems, or locks not implemented as
mm_lock_t.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Tim Deegan [Thu, 10 Nov 2011 11:12:35 +0000 (11:12 +0000)]
x86/mm: Refactor mm-lock ordering constructs
The mm layer has a construct to enforce locks are taken in a pre-
defined order, and thus avert deadlock. Refactor pieces of this
code for later use, no functional changes.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Jean Guyader [Tue, 8 Nov 2011 19:41:47 +0000 (19:41 +0000)]
xsm: Add support for HVMOP_track_dirty_vram.
Xen try to inforce the xsm policy when a HVMOP_track_dirty_vram
is received (xen/arch/x86/hvm/hvm.c:3637). It was failing because
in flask_hvmcontext, xsm didn't have any case for this operation.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
Juergen Gross [Mon, 7 Nov 2011 14:36:44 +0000 (14:36 +0000)]
Make lock profiling usable again
Using lock profiling (option lock_profile in xen/Rules.mk) resulted in
build errors.
Changes:
- Include public/sysctl.h in spinlock.h when using lock profiling.
- Allocate profile data in an own structure to avoid struct domain
becoming larger then one page
Jan Beulich [Mon, 7 Nov 2011 09:29:14 +0000 (10:29 +0100)]
cpufreq: allocate CPU masks dynamically
struct cpufreq_policy, including a cpumask_t member, gets copied in
cpufreq_limit_change(), cpufreq_add_cpu(), set_cpufreq_gov(), and
set_cpufreq_para(). Make the member a cpumask_var_t, thus reducing the
amount of data needing copying (particularly with large NR_CPUS).
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Jan Beulich [Mon, 7 Nov 2011 09:26:23 +0000 (10:26 +0100)]
powernow: don't read never initialized structure member
c/s 20361:51b031b0737e removed the writing of struct
processor_performance's shared_cpu_map member, but the powernow driver
still has code to read it (though presumably that code path can't be
taken on actual hardware supported by the powernow driver). Remove the
use of the field along with the field itself.
Jan Beulich [Fri, 4 Nov 2011 14:55:50 +0000 (15:55 +0100)]
x86/IRQ: fix create_irq() after c/s 24068:6928172f7ded
init_one_irq_desc() must be called with interrupts enabled (as it may
call functions from the xmalloc() group). Rather than mis-using
vector_lock to also protect the finding of an unused IRQ, make this
lockless through using cmpxchg(), and obtain the lock only around the
actual assignment of the vector.
Also fold find_unassigned_irq() into its only caller.
It is, btw, questionable whether create_irq() calling
__assign_irq_vector() (rather than assign_irq_vector()) is actually
correct - desc->affinity appears to not get initialized properly in
this case.
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Anthony PERARD [Fri, 4 Nov 2011 12:38:24 +0000 (12:38 +0000)]
libxl: libxl_qmp: Always insert a command id in the callback_list.
Because the function qmp_synchronous_send rely on the presence of the id
in the callback_list.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Fri, 4 Nov 2011 12:38:24 +0000 (12:38 +0000)]
libxl: libxl_qmp: Introduce list of arguments to qmp_send
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Fri, 4 Nov 2011 12:38:23 +0000 (12:38 +0000)]
libxl: libxl_qmp: Introduce an opaque argument to the callbacks.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Fri, 4 Nov 2011 12:38:23 +0000 (12:38 +0000)]
libxl: libxl: Introduce dm-version xenstore key.
The all key is /libxl/$domid/dm-version.
The /libxl/$domid dir is created with the domain and should be only accessible
by the toolstack domain. The function libxl__xs_libxl_path() give this path.
This come with libxl__device_model_version_running() helper function.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Jan Beulich [Thu, 3 Nov 2011 16:28:41 +0000 (17:28 +0100)]
x86/IRQ: consolidate IRQ disabling when acquiring vector lock
__assign_irq_vector() doesn't need to disable interrupts (its callers
are required to when acquiring the lock), and set_desc_affinity() can
use the normal spin lock primitives.
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Jan Beulich [Thu, 3 Nov 2011 16:27:38 +0000 (17:27 +0100)]
IRQ: allocate CPU masks dynamically
This includes delaying the initialization of dynamically created IRQs
until their actual first use and some further elimination of uses of
struct irq_cfg.
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Tim Deegan [Thu, 3 Nov 2011 12:19:23 +0000 (12:19 +0000)]
xen: provide pse36 cpuid bit
Provide pse36 cpuid bit if guest runs in 32bit PAE
or in long mode. Hyper-V refuses to start as
the "cpu does not provide required hw features"
if it does not find the pse36 cpuid bits.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Roger Pau Monne [Wed, 2 Nov 2011 17:06:04 +0000 (17:06 +0000)]
libxl: handle the return value of wait_for_dev_destroy select
Handle the return value of the select call inside wait_for_dev_destroy
properly, and return 0 if a device is removed, or ERROR_* if a timeout
or error happened. Use the return value of wait_for_dev_destroy inside
libxl__device_remove to properly return from that function.
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>
Philipp Hahn [Wed, 2 Nov 2011 16:28:57 +0000 (16:28 +0000)]
pygrub: Add HybridISO support for PyGrub2
grub-mkrescue internally uses xorriso, which generates a so-called
"Hybrid ISO": The ISO images also contains a DOS partition table,
which allows the identical ISO file to be stored on an USB stick for
booting from it. This breaks PyGrub, since it (wrongly) detects only
the DOS partition table and uses the first partition instead of the
complete ISO file.
Add a check to detect HybridISO files and use offset 0 in addition to
partition table parsing.
Signed-off-by: Philipp Hahn <hahn@univention.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Wed, 2 Nov 2011 16:25:18 +0000 (16:25 +0000)]
libxl: libxl__device_pci_destroy_all should succeed if there is no PCI bus
Since 23915:4c4b72c94bac "" it is possible that no bus exists and this is not
an error. Removes the following spurious warning when destroying a PV domain
with no PCI devices:
libxl: error: libxl.c:759:libxl_domain_destroy: pci shutdown failed
for domid 1005
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Roger Pau Monne <roger.pau@entel.upc.edu> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Christoph Egger [Wed, 2 Nov 2011 16:23:23 +0000 (16:23 +0000)]
libxl: allow to enable/disable cpuid bits
Allow to enable/disable SVM specific cpuid bits in the guest config
file via cpuid config option. Also allow to enable/disable the
hypervisor cpuid bit in the guest config file. We need to disable the
hypervisor cpuid bit to get Hyper-V going.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Roger Pau Monne [Wed, 2 Nov 2011 15:46:54 +0000 (15:46 +0000)]
libxl: reimplement buffer for bootloading and drop data if buffer is full.
Implement a buffer for the bootloading process that appends data to
the end until it's full. Drop the whole buffer if a timeout has
occurred and the buffer is full. Prevents the bootloader from getting
stuck when using ptys with small buffers.
Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Olaf Hering [Thu, 27 Oct 2011 09:54:16 +0000 (11:54 +0200)]
libxl: update prototype of libxl__spawn_check
libxl__spawn_check expects a malloc'd libxl__spawn_starting. The
currently only user of libxl__spawn_check gets a libxl__spawn_starting
and passes it on. Update prototype to not take a void pointer, and also
update comment in header file.
Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Jan Beulich [Wed, 2 Nov 2011 12:53:05 +0000 (13:53 +0100)]
passthrough: re-attempt ACS and ATS enabling when devices get reported by Dom0
Since extended config space accesses may not be possible when
scan_pci_devices() runs (due to MMCFG resources not being reserved in
the E820 table, which the specification allows to be the case),
functionality enabling of which requires such must be re-attempted
when it is known whether MMCFG is safe to use.
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: "Kay, Allen M" <allen.m.kay@intel.com>
Jan Beulich [Wed, 2 Nov 2011 12:51:28 +0000 (13:51 +0100)]
VT-d/ATS: cleanup
- make acpi_find_matched_atsr_unit() consistent with
acpi_find_matched_drhd_unit() (and constify their parameter)
- make ats_device() take a struct pci_dev * instead of seg:bus:devfn
and additionally the matching DRHD (as its callers already worked
that out)
- remove a stale prototype
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: "Kay, Allen M" <allen.m.kay@intel.com>
Christoph Egger [Tue, 1 Nov 2011 19:03:38 +0000 (19:03 +0000)]
tools/ocaml: unify build process
Unify ocaml build process for different platforms.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
This is the initial version of an xl man page, based on the old xm man
page. Almost every command implemented in xl should be present, a
notable exception are the tmem commands that are currently missing.
Further improvements and clarifications to this man page are very
welcome.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Thu, 27 Oct 2011 08:55:22 +0000 (09:55 +0100)]
docs: install text documentation
Including markdown docs.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Thu, 27 Oct 2011 08:55:14 +0000 (09:55 +0100)]
xl: add some example configuration files
These are much more minimal than the equivalent xmexamples but should
eventually reference a more complete document describing the available options.
These are based on the guest configuration files that I actually use day-to-day.
There is an unresolved reference to a document describing the complete syntax.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Thu, 27 Oct 2011 08:54:28 +0000 (09:54 +0100)]
docs: add a document describing the xl vif syntax
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Wed, 26 Oct 2011 16:44:03 +0000 (17:44 +0100)]
unmodified_drivers: update README from http://wiki.xen.org/xenwiki/UnmodifiedDrivers
Add reference to the fact that these drivers are for "classic-Xen" kernels only
and do not work with PVops but point towards the PVHVM functionality in
mainstream.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Wed, 26 Oct 2011 16:23:37 +0000 (17:23 +0100)]
docs: add some scaffolding for building HTML docs from markdown
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Currently this lives in qemu-xen.git i386-dm/README.hvm-pv-magic-ioport-disable
and I can never find it when I want it. As we transition to upstream qemu this
location becomes less useful.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Daniel De Graaf [Tue, 1 Nov 2011 18:25:17 +0000 (18:25 +0000)]
xenstored: Fix processing of zero-length messages
When a message with zero length is sent to xenstore, the body of the
message was not processed until the socket or ring had more data to
read; this will cause deadlocks if the requestor is waiting on a
response to continue.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:43 +0000 (13:36 +0100)]
libxl: add a flags argument to libxl_ctx_alloc.
Currently unused but gives us scope for expansion in an ABI compatible manner
in the future.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:43 +0000 (13:36 +0100)]
libxl: convert PCI device handling to device API
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:43 +0000 (13:36 +0100)]
libxl: reorder device functions to put functions for each device together.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:43 +0000 (13:36 +0100)]
libxl: convert VFB handling to device API
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:43 +0000 (13:36 +0100)]
libxl: convert VKB handling to device API
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:43 +0000 (13:36 +0100)]
libxl: remove libxl_device_console_add.
It has no callers, the only code which adds consoles in internal to libxl and
uses libxl__device_console_add directly.
Rather than worrying about what the public API should look like in this case
simply remove it, adding new APIs is much easier than fixing broken ones...
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:42 +0000 (13:36 +0100)]
libxl: convert NIC handling to device API
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:42 +0000 (13:36 +0100)]
libxl: convert disk handling to device API
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:42 +0000 (13:36 +0100)]
libxl: use more descriptive variable names in libxl__devices_destroy.
It's not immediately clear that "l1" iterates over device types and "l2"
iterates over individual devices. Name things in a way which makes this more
obvious.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:42 +0000 (13:36 +0100)]
libxl: merge libxl__device_del into libxl__device_remove
Note that the "wait" parameter added to libxl_device_remove is different to the
wait paramter previously used by similar functions. In the past not-wait meant
forced whereas now in means wait for a graceful shutdown, as opposed to setting
off a graceful shutdown but not waiting.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:42 +0000 (13:36 +0100)]
libxl: use libxl__device in libxl_devices_destroy etc.
Use libxl__device in libxl_devices_destroy and
libxl__device_pci_remove_xenstore.
Doing this allows us to use the common functions for removing devices.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:42 +0000 (13:36 +0100)]
libxl: do not remove unidentified frontend paths in libxl__devices_destroy
Currently this appears to only include "/local/domain/<domid>/device/suspend".
Ultimately the caller will nuke the whole guest directory anyway but not having
this function remove things which don't look like devices seems less
surprising.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:42 +0000 (13:36 +0100)]
libxl: use IDL to define device front- and back-end kinds
I'd like to use the from_string functionality...
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:42 +0000 (13:36 +0100)]
libxl: split forced and non-forced uses of libxl__device_del
Most forced users can now simply call libxl__device_destroy directly.
libxl__devices_destroy is something of a special case, it is really
just iterating over an opaque set of xenstore directories and removing
them. Until this can be refactored just do the force-remove case
manually, doing otherwise led to too much entanglement with the other
callers of libxl__device_destroy which do know about specific device
types.
For the time being do the same in libxl__device_pci_remove_xenstore.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:42 +0000 (13:36 +0100)]
libxl: separate forced and non-forced device remove.
The function libxl__device_destroy currently takes a force parameter however:
* in the forced case we initiate a graceful shutdown and then
immediately nuke the backend directory, quite likely before anyone
got a chance to react.
* the callers all have a "wait" variable and pass in "!wait" as the
force argument which is confusing since not waiting is not really
the same thing as forcing the destroy.
Therefore split the function into libxl__device_remove and
libxl__device_destroy. The former initiates a graceful shutdown which
the latter simply nukes the backend directory.
This makes some of the callers look a bit odd but that should fall out as I
continue to pull this piece of string.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:42 +0000 (13:36 +0100)]
libxl: libxl_devid_to_* should take an integer device id
Currently takes a string.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:42 +0000 (13:36 +0100)]
libxl: reimplement devid->disk in terms of from_xs_be function.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:42 +0000 (13:36 +0100)]
libxl: reimplement devid->nic in terms of from_xs_be function.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:42 +0000 (13:36 +0100)]
libxl: update nic list API to use common device API style
libxl_device_nic_list returns an array of libxl_device_nic and
libxl_device_nic_getinfo retrieves further information.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 12:36:15 +0000 (13:36 +0100)]
libxl: do not read f.e. xenstore dir in disk list function
Instead store a duplicate of the "device-type" node in the backend dir
and use that instead.
This maintains the invariant that the list function is always "safe".
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 09:35:56 +0000 (10:35 +0100)]
libxl: refactor code to construct disk from xenstore backend
Temporarily retain unsafe behaviour of reading f.e. directory.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 09:35:55 +0000 (10:35 +0100)]
libxl: various fixes to libxl_device_disk_list (and internals)
- handle realloc errors
- remove redundancy of libxl__append_disk_list_of_type return value
and ndisks paramter.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 09:35:55 +0000 (10:35 +0100)]
libxl: add a comment describing the device interfaces.
Subsequent patches will endeavour to make reality match this defined
interface.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Now that IDL type destructors are no longer libxl_*_destroy we can use the more
common libxl_NOUN_VERB structure here.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 09:35:55 +0000 (10:35 +0100)]
libxl: idl: use "dispose" rather than "destroy" for function to free IDL types
Destroy is an overloaded term which would commonly like to be used for actual
destructive operations, such as destroying a domain etc.
Dispose isn't a great term but it does the job.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 18 Oct 2011 09:35:55 +0000 (10:35 +0100)]
libxl: remove generated file testidl.c on clean
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Christoph Egger [Fri, 28 Oct 2011 16:23:51 +0000 (17:23 +0100)]
nestedsvm: fix lazy fpu switching causing a triple fault
Fix FPU switching uncovered with Hyper-V: Do FPU switching always on
the n1 vmcb rather doing it on the current active vmcb. The FPU state
between n1 and n2 vmcb is already synced in the vmrun and vmexit
emulation.
This fixes the situation where the n2 vmcb had the #NM intercept bit
set but the virtual vmcb did not. That means it was believed the l1
guest can handle an #NM intercept but was actually wrong.
The result were three #GP's with error code 0x11 in the l1 guest.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Committed-by: Keir Fraser <keir@xen.org>