David Scott [Wed, 30 Mar 2011 17:54:28 +0000 (18:54 +0100)]
tools: ocaml: rename the sched_credit types and functions
The aims are:
1. make the records instantiable if they have field names in common; and
2. to make it easier to derive the names programatically from the IDL
Signed-off-by: David Scott <dave.scott@eu.citrix.com> 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>
David Scott [Wed, 30 Mar 2011 17:54:28 +0000 (18:54 +0100)]
tools: ocaml: rename the physinfo types and functions
The aims are:
1. make the records instantiable if they have field names in common; and
2. to make it easier to derive the names programatically from the IDL
Signed-off-by: David Scott <dave.scott@eu.citrix.com> 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>
David Scott [Wed, 30 Mar 2011 17:54:28 +0000 (18:54 +0100)]
tools: ocaml: rename the domain_build_state types and functions
The aims are:
1. make the records instantiable if they have field names in common; and
2. to make it easier to derive the names programatically from the IDL
Signed-off-by: David Scott <dave.scott@eu.citrix.com> 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>
[ijc: s/Device_build_state/Domain_build_state/g]
David Scott [Wed, 30 Mar 2011 17:54:28 +0000 (18:54 +0100)]
tools: ocaml: rename the build_info types and functions
The aims are:
1. make the records instantiable if they have field names in common; and
2. to make it easier to derive the names programatically from the IDL
Signed-off-by: David Scott <dave.scott@eu.citrix.com> 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>
David Scott [Wed, 30 Mar 2011 17:54:28 +0000 (18:54 +0100)]
tools: ocaml: rename the create_info types and functions
The aims are:
1. make the records instantiable if they have field names in common; and
2. to make it easier to derive the names programatically from the IDL
Signed-off-by: David Scott <dave.scott@eu.citrix.com> 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>
David Scott [Wed, 30 Mar 2011 17:54:28 +0000 (18:54 +0100)]
tools: ocaml: remove the domain_make and domain_build functions since they don't work
The actual stubs are missing so these are currently a trap for the unwary.
Signed-off-by: David Scott <dave.scott@eu.citrix.com> 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>
David Scott [Wed, 30 Mar 2011 17:54:28 +0000 (18:54 +0100)]
tools: ocaml: rename the pci types and functions
The aims are:
1. make the records instantiable if they have field names in common; and
2. to make it easier to derive the names programatically from the IDL
Signed-off-by: David Scott <dave.scott@eu.citrix.com> 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>
David Scott [Wed, 30 Mar 2011 17:54:28 +0000 (18:54 +0100)]
tools: ocaml: rename the vkb types and functions
The aims are:
1. make the records instantiable if they have field names in common; and
2. to make it easier to derive the names programatically from the IDL
Signed-off-by: David Scott <dave.scott@eu.citrix.com> 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>
David Scott [Wed, 30 Mar 2011 17:54:28 +0000 (18:54 +0100)]
tools: ocaml: rename the console types and functions
The aims are:
1. make the records instantiable if they have field names in common; and
2. to make it easier to derive the names programatically from the IDL
Signed-off-by: David Scott <dave.scott@eu.citrix.com> 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>
David Scott [Wed, 30 Mar 2011 17:54:28 +0000 (18:54 +0100)]
tools: ocaml: rename the disk_info types and functions
The aims are:
1. make the records instantiable if they have field names in common; and
2. to make it easier to derive the names programatically from the IDL
Signed-off-by: David Scott <dave.scott@eu.citrix.com> 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>
David Scott [Wed, 30 Mar 2011 17:54:28 +0000 (18:54 +0100)]
tools: ocaml: rename the device_nic types and functions
The aims are:
1. make the records instantiable if they have field names in common; and
2. to make it easier to derive the names programatically from the IDL
Signed-off-by: David Scott <dave.scott@eu.citrix.com> 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, 20 Apr 2011 16:13:07 +0000 (17:13 +0100)]
tools: libxl: do not specify protocol node for disk or net
This node is written by the front/backends as part of their negotiation about
how to speak to each other. The toolstack has no part in this and it certainly
shouldn't be hardcoding the 32 bit protocol!
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, 20 Apr 2011 16:13:07 +0000 (17:13 +0100)]
tools: libxl: add concept of in- and out-put only data types to IDL
This allow language bindings to only emit the relevant conversion functions.
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, 20 Apr 2011 16:13:07 +0000 (17:13 +0100)]
tools: libxl: remove BitField type class from IDL
All usages are single bit BitFields, AKA booleans.
In general we prefer to use simple structures (e.g. without packing or
specific layouts) in the libxl API and take care of any require
structure by marshalling within the library instead of expecting users
to do so (e.g. the PCI device BDF is unpacked in the libxl 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 [Wed, 20 Apr 2011 16:13:07 +0000 (17:13 +0100)]
tools: libxl: add libxl_domid to IDL
Language bindings would like to strongly type the domid as a separate
type so make it a defined type.
This patch only impacts the datatypes and autogenerated destructors, I
didn't think the churn of switching the uint32_t's through the code
was worth it.
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, 20 Apr 2011 16:13:07 +0000 (17:13 +0100)]
tools: libxl: add an Enumeration type to the IDL
The IDL requires a specific value for each enumerate, this make it
much easier to avoid (or at least track) ABI changes since they must
now be explicit.
I believe I have used the same values as would have been chosen
previoulsy but have not confirmed.
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, 20 Apr 2011 16:13:07 +0000 (17:13 +0100)]
tools: libxl: namespace enum values within their type.
In other words the values for an enum type libxl_foo always take the
form LIBXL_FOO_VALUE.
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, 20 Apr 2011 16:13:07 +0000 (17:13 +0100)]
tools: libxl: generalize libxl_qemu_machine_type into libxl_domain_type
The FV/PV distinction is not particular to the device model, although
that remains the only user for now.
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, 20 Apr 2011 16:13:07 +0000 (17:13 +0100)]
tools: libxl: move all enum values into the libxl namespace
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, 20 Apr 2011 16:13:06 +0000 (17:13 +0100)]
tools: support SeaBIOS. Use by default when upstream qemu is configured.
The SeaBIOS integration here is only semi-complete and is targetted at
developers and very early adopters who can be expected to cope with
some rough edges. In particular the user must clone, patch as
necessary and compile SeaBIOS themselves since this patchset does not
cover any of that (in the same way we currently do not integrate
upstream qemu clone+build). Include a big comment to that effect next
to the Config.mk option.
Many of the bios_config callback functions are not yet used by
SeaBIOS.
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, 20 Apr 2011 16:13:06 +0000 (17:13 +0100)]
tools: libxl: write selected BIOS to 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 [Wed, 20 Apr 2011 16:13:00 +0000 (17:13 +0100)]
tools: libxl: hide selection of device-model by default.
This should never have been exposed to users as something they are
required to think about, unless they want to.
At the libxl API level:
* Add libxl_device_model_info.device_model_version allowing the
user to say which qemu version (e.g. old qemu-xen or qemu
upstream) they want for a domain.
* Add libxl_device_model_info.device_model_stubdomain allowing
the user to select stub or non-stub device model
* Default both the device_model field to NULL and DTRT when
building a domain with that value in those fields, but still
allow libxl users to specify something explicit if they want.
* Note that libxl_device_model_info.device_model, if specified,
must now be a complete path.
At the xl level:
* Support a new "device_model_version" option which sets the new
libxl_device_model_info.device_model_version field. This
option is mandatory if device_model_override is used.
* Support a new "device_model_stubdomain_override" option which
allows the user to request stubdomain if desired.
* WARN if an HVM guest cfg uses the "device_model" config
option, and direct users to the "device_model_override" option
if they really do not want the default. If the "device_model"
directive contains "stubdom-db" then direct users to the
"device_model_stubdomain_override" directive.
The default qemu remains the existing qemu-xen based qemu-dm and
stubdomain defaults to off. I chose the name "qemu-xen traditional" to
refer to the existing Xen fork of qemu and simply "qemu-xen" to refer to
the new device model based on qemu upstream.
I suspect that the vast majority of users only have these config
options because they've copied them from somewhere and they normally
have no interest in which device model is used. Renaming the fields
and warning when they are used makes these decisions internal. This
will allow us to make decisions at a platform level regarding the
preferred hvmloader, device model, stub domain etc without requiring
everyone to change their configuration files.
Adding a device model version to the API is intended to make it easy
for users to select what they need without having to know about the
paths to specific binaries etc. Most importantly it gets rid of the
parsing of the output of qemu -h...
It's not clear where upstream qemu will eventually be installed, I
went with /usr/bin/qemu for now.
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, 19 Apr 2011 08:16:24 +0000 (09:16 +0100)]
tools: libxl: hide selection of hvmloader by default.
This should never have been exposed to users as something they are
required to think about, unless they want to.
At the libxl API level:
* Move libxl_domain_build_info.kernel into the PV side of the
tagged union (using this field to specify both PV kernel and
hvmloader is confusing)
* Add hvmloader (a string) to the HVM side of the tagged union.
This defaults to NULL and libxl will DTRT with that default
but still allow libxl users to specify something explicit if
they want.
At the xl level:
* WARN if an HVM guest cfg uses the "kernel" config option, and
direct users to the "hvmloader_override" option if they really
do not want the default hvmloader.
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>
George Dunlap [Wed, 27 Apr 2011 12:36:15 +0000 (13:36 +0100)]
credit2: add a callback to migrate to a new cpu
In credit2, there needs to be a strong correlation between
v->processor and the runqueue to which a vcpu is assigned;
much of the code relies on this invariant. Allow credit2
to manage the actual migration itself.
This fixes the most recent credit2 bug reported on the list
(Xen BUG at sched_credit2.c:1606) in Xen 4.1, as well as
the bug at sched_credit2.c:811 in -unstable (which catches the
same condition earlier).
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Daniel Kiper [Wed, 27 Apr 2011 12:29:14 +0000 (13:29 +0100)]
pv-grub: Fix for incorrect dom->p2m_host[] list initialization
Introduction of Linux Kernel git commit ceefccc93932b920a8ec6f35f596db05202a12fe (x86: default
CONFIG_PHYSICAL_START and CONFIG_PHYSICAL_ALIGN to 16 MB) revealed
deeply hidden bug in pv-grub. During kernel load stage dom->p2m_host[]
list has been incorrectly initialized.
At the beginning of kernel load stage dom->p2m_host[] list is
populated with current PFN->MFN layout. Later during memory allocation
(memory is allocated page by page in kexec_allocate()) page order is
changed to establish linear layout in new domain. It is done by
exchanging subsequent MFNs with newly allocated MFNs. dom->p2m_host[]
list is indexed by currently requested PFN (it is incremented from 0)
and PFN of newly allocated paged. If PFN of newly allocated page is
less than currently requested PFN then earlier allocated MFN is
overwritten which leads to domain crash later. This patch corrects
that issue. If PFN of newly allocated page is less then currently
requested PFN then relevant PFN/MFN pair is properly calculated and
usual exchange occurs later.
Signed-off-by: Daniel Kiper <dkiper@net-space.pl> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Tim Deegan [Mon, 25 Apr 2011 12:17:05 +0000 (13:17 +0100)]
vtd: check and print EPT compatibility once, at boot.
Merge the check for EPT/VT-D pagetable compatibility into the other
VT-D boot-time checks. Previously it was checking and printing many
times on each VM boot.
Wei Wang [Mon, 18 Apr 2011 16:24:21 +0000 (17:24 +0100)]
x86/mm: Move p2m type into bits of the PTE that the IOMMU doesn't use.
AMD IOMMU hardware uses bit 9 - bit 11 to encode lower page levels. p2m
type bits in p2m flags has to be shifted from bit 9 to bit 12. Also,
bit 52 to bit 60 cannot be non-zero for iommu pde. So, the definition of
p2m_ram_rw has to be swapped with p2m_invalid.
Signed-off-by: Wei Wang <wei.wang2@amd.com> Acked-by: Tim Deegan <Tim.Deegan@citrix.com> Committed-by: Tim Deegan <Tim.Deegan@citrix.com>
Olaf Hering [Mon, 18 Apr 2011 14:12:04 +0000 (15:12 +0100)]
xentrace: correct overflow check for number of per-cpu trace pages
The calculated number of per-cpu trace pages is stored in t_info and
shared with tools like xentrace. Since its an u16 the value may
overflow because the current check is based on u32. Using the u16
means each cpu could in theory use up to 256MB as trace
buffer. However such a large allocation will currently fail on x86 due
to the MAX_ORDER limit. Check both max theoretical number of pages
per cpu and max number of pages reachable by struct t_buf->prod/cons
variables with requested number of pages.
Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
svm: implement instruction fetch part of DecodeAssist (on #PF/#NPF)
Newer SVM implementations (Bulldozer) copy up to 15 bytes from the
instruction stream into the VMCB when a #PF or #NPF exception is
intercepted. This patch makes use of this information if available.
This saves us from a) traversing the guest's page tables, b) mapping
the guest's memory and c) copy the instructions from there into the
hypervisor's address space.
This speeds up #NPF intercepts quite a lot and avoids cache and TLB
trashing.
Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Keir Fraser <keir@xen.org>
Andre Przywara [Mon, 18 Apr 2011 09:06:37 +0000 (10:06 +0100)]
svm: implement INVLPG part of DecodeAssist
Newer SVM implementations (Bulldozer) give the desired address on
a INVLPG intercept explicitly in the EXITINFO1 field of the VMCB.
Use this address to avoid a costly instruction fetch and decode
cycle.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Andre Przywara [Mon, 18 Apr 2011 09:01:06 +0000 (10:01 +0100)]
svm: implement CR access part of DecodeAssist
Newer SVM implementations (Bulldozer) now give the used general
purpose register on a MOV-CR intercept explictly. This avoids
fetching and decoding the instruction from guest's memory and speeds
up some Windows guest, which exercise CR8 quite often.
Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Keir Fraser <keir@xen.org>
Andre Przywara [Mon, 18 Apr 2011 08:49:13 +0000 (09:49 +0100)]
svm: add bit definitions for SVM DecodeAssist
Chapter 15.33 of recent APM Vol.2 manuals describe some additions
to SVM called DecodeAssist. Add the newly added fields to the VMCB
structure and name the associated CPUID bit.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
vmx/hvm: move mov-cr handling functions to generic HVM code
Currently the handling of CR accesses intercepts is done much
differently in SVM and VMX. For future usage move the VMX part
into the generic HVM path and use the exported functions.
Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Keir Fraser <keir@xen.org>
x86: don't write_tsc() non-zero values on CPUs updating only the lower 32 bits
This means suppressing the uses in time_calibration_tsc_rendezvous(),
cstate_restore_tsc(), and synchronize_tsc_slave(), and fixes a boot
hang of Linux Dom0 when loading processor.ko on such systems that
have support for C states above C1.
Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir@xen.org>
During creation of the PV domain we allocate the E820 structure to
have the amount of E820 entries on the machine, plus the number three.
This will allow the tool stack to fill the E820 with more than three
entries. Specifically the use cases is , where the toolstack retrieves
the E820, sanitizes it, and then sets it for the PV guest (for PCI
passthrough), this dynamic number of E820 is just right.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Keir Fraser <keir@xen.org>
Stephen Smalley [Tue, 12 Apr 2011 13:55:25 +0000 (14:55 +0100)]
xsm: Fix xsm_mmu_* and xsm_update_va_mapping hooks
This is an attempt to properly fix the hypervisor crash previously
described in
http://marc.info/?l=xen-devel&m=128396289707362&w=2
In looking into this issue, I think the proper fix is to move the
xsm_mmu_* and xsm_update_va_mapping hook calls later in the callers,
after more validation has been performed and the page_info struct is
readily available, and pass the page_info to the hooks. This patch
moves the xsm_mmu_normal_update, xsm_mmu_machphys_update and
xsm_update_va_mapping hook calls accordingly, and updates their
interfaces and hook function implementations. This appears to resolve
the crashes for me.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Ian Campbell [Tue, 12 Apr 2011 12:39:22 +0000 (13:39 +0100)]
tools: hvmloader: split scratch and hypercall addressing from ROMBIOS low heap.
Although happen to live at the same physical address their lifespans
do not overlap. The scratch and hypercall spaces are used only within
hvmloader and the same area is reused as a heap within ROMBIOS. But
each is free to make its own decisions about where to place things.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
Ian Campbell [Tue, 12 Apr 2011 12:36:17 +0000 (13:36 +0100)]
tools: hvmloader: split e820 support into its own code module.
Pass the table address as a paramter to the build function and cause
it to return the number of entries. Pass both base and offset as
parameters to the dump function.
This adds a duplicated e820.h header to ROMBIOS. Since the e820 data
structure is well defined by existing BIOS implementations I think
this is OK and simplifies the cross talk between hvmloader and
ROMBIOS.
Reduces the cross talk between ROMBIOS and hvmloader.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
Ian Campbell [Tue, 12 Apr 2011 12:34:30 +0000 (13:34 +0100)]
tools: hvmloader: move ROMBIOS configuration into tools/firmware/rombios/
Currently rombios and hvmloader are rather intertwined. Separate the
ROMBIOS configuration options out into a ROMBIOS provided file so that
the dependency can become strictly from hvmloader to rombios.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
remus: fix incorrect error handling for switch_qemu_logdirty in checkpoint code
c/s 22275: "tools: cleanup domain save switch_qemu_logdirty callback"
introduced a whole bunch of error code fixups. In the process, it also
ended up treating the success return code (0) from
switch_qemu_logdirty as an error and vice versa.
Wei Wang [Tue, 12 Apr 2011 12:26:19 +0000 (13:26 +0100)]
AMD IOMMU: Fix an interrupt remapping issue
Some device could generate bogus interrupts if an IO-APIC RTE and an
iommu interrupt remapping entry are not consistent during 2 adjacent
64bits IO-APIC RTE updates. For example, if the 2nd operation updates
destination bits in RTE for SATA device and unmask it, in some case,
SATA device will assert ioapic pin to generate interrupt immediately
using new destination but iommu could still translate it into the old
destination, then dom0 would be confused. To fix that, we sync up
interrupt remapping entry with IO-APIC IRE on every 32 bits operation
and forward IOAPIC RTE updates after interrupt.
Signed-off-by: Wei Wang <wei.wang2@amd.com> Acked-by: Jan Beulich <jbeulich@novell.com>
They are a pointless level of abstraction beneath nestedhvm_* variants
of the same operations, which all callers should be using.
At the same time, nestedhvm_vcpu_initialise() does not need to call
destroy if initialisation fails. That is the vendor-specific init
function's job (clearing up its own state on failure).
The new --null option allows one to test and play with just the
memory checkpointing and network buffering aspect of remus, without
the need for a second host. The disk is not replicated. All replication
data is sent to /dev/null. This option is pretty handy when a user
wants to see the page churn for his workload or observe the latency hit
though the latter will not be accurate.
Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
While running remus, when an error occurs during checkpointing
(e.g., timeouts on primary, failing to checkpoint network buffer
or disk or even communication failure) the domU is sometimes
left in suspended state on primary. Instead of blindly closing
the checkpoint file handle, attempt to resume the domain before
the close.
Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Fri, 8 Apr 2011 15:39:53 +0000 (16:39 +0100)]
libxl: refactor DISK_BACKEND_PHY handling in libxl_device_disk_add
A step on the path to sharing this code with the tail-end of the
DISK_BACKEND_TAP case.
I made the result of libxl__blktap_devpath non-const to achieve
this. The existing caller calls libxl__strdup on the result but since
the function is an internal one and the result is already garbage
collected I think this is unnecessary and we can just use the
non-const result directly.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Fri, 8 Apr 2011 15:39:19 +0000 (16:39 +0100)]
libxl: only a CDROM type disk can be empty.
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>
Ian Campbell [Fri, 8 Apr 2011 15:38:59 +0000 (16:38 +0100)]
libxl: convert an empty tap disk into a qdisk
I'm not sure that empty disks which are is_cdrom are especially valid,
or that a cdrom can ever be handled by tapdisk anyway but try to do
something sane since it seems that xl's parse_disk_config() routine
could potentially generate such a configuration (although whether from
a valid input string or not I'm not sure).
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Fri, 8 Apr 2011 15:38:36 +0000 (16:38 +0100)]
libxl: make fallback from blktap2 to qdisk more explicit.
When blktap2 is not present we fallback to qdisk, instead of falling
through a switch statement instead make this explicit, with a comment,
prior to the switch statement.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Fri, 8 Apr 2011 15:38:06 +0000 (16:38 +0100)]
libxl: remove impossible check for backend != DISK_BACKEND_QDISK
In this case we are already in the DISK_BACKEND_QDISK case of a switch
statement on the same variable.
It is possible that we fell through from the DISK_BACKEND_TAP case
(although I'm about to remove that in a subsequent patch), however in
that case we are explicitly falling back from blktap2 to qdisk so
DEVICE_QDISK is still the right answer.
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>
Ian Campbell [Fri, 8 Apr 2011 15:36:20 +0000 (16:36 +0100)]
libxl: drop domid field from libxl_device_*
All functions which add a device to a domain already take a domid
argument and the callers typically write the same value to the
structure right before making the call.
Functions which delete a device typically do not but adding this field
makes the interface more consistent anyway and all callers have the
domid to hand.
All functions which return a libxl device structure are given a domid
as a paramter and the caller therefore already knows which domain it
is dealing with.
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>
Ian Campbell [Fri, 8 Apr 2011 15:22:51 +0000 (16:22 +0100)]
xend: drop XenAPI error message translation
The only "translation" is to the C locale (e.g. the NUL
translation). I think it very unlikely we are going to see any new
translations of the XenAPI error messages at this point so the only
purpose of this code appears to be to periodically regenerate
xen-xm.pot with a new embedded timestamp, to the detriment of those of
us who use a version control system.
After much beating with sticks I mananged to enable XenAPI support in
xend and configure xm such that it returns "Permission denied." (AKA
the SESSION_AUTHENTICATION_FAILED message) which I take to be a sign
I've not broken things too badly.
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>
Ian Campbell [Fri, 8 Apr 2011 15:21:12 +0000 (16:21 +0100)]
libxl/xl: drop support for netchannel2
netchannel2 was never widely deployed and no supported kernel includes
either the front- or back-ends. The last known kernel with this
support was the xen.git 2.6.31 branch which has been unsupported for
ages.
xl will warn the user if it spots a "vif2" configration item but
otherwise support is completely removed.
Work is ongoing to add the interesting features of netchannel2 as
protocol extensions to netchannel1.
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>
Ian Campbell [Fri, 8 Apr 2011 15:17:18 +0000 (16:17 +0100)]
libxl: bump SONAME after binary incompatible change.
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>
Tim Deegan [Thu, 7 Apr 2011 14:06:47 +0000 (15:06 +0100)]
xen/acpi: disentangle ACPI enumerations.
There are two sets of ACPI table enums and structs, and clang
complains about implicit casts between them. It would be much better
to remove one entire set of ACPI definitions but for now just use the
right enum for each interface.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
libxc: set all VCPU's online by default in HVM info table
This sets a saner default for the cpu-online-map by setting all bits
to 1. The default assumption ought to be that nr-vcpus ==
nr-vcpus-at-start. If that is not true, then the toolstack must modify
the bitmap, but if it is true, the toolstack oughtn't need to do
anything further.
When offline a page, or, when a broken page occur, the page maybe
populated, or, may at pod cache. This patch is to handle the
offline/broken page at pod cache. It scan pod cache, if hit, remove
and replace it, and then put the offline/broken page to
page_offlined_list/page_broken_list
c/s 19913 break mce offline page logic:
For page_state_is(pg, free), it's impossible to trigger the case;
For page_state_is(pg, offlined), it in fact didn't offline related
page;
This patch fix the bug, and remove an ambiguous comment.
Tim Deegan [Thu, 7 Apr 2011 10:39:35 +0000 (11:39 +0100)]
x86/hvm: do actually init nested HVM state for VCPUs
when nested HVM is enabled after VCPus are allocated.
The previous patch would fail because the call to
nestedhvm_vcpu_initialise() in the HVM param set code
happens before nestedhvm_enabled(v->domain) is true.
Ian Campbell [Wed, 6 Apr 2011 15:50:16 +0000 (16:50 +0100)]
libxl: do not expose libxenctrl/libxenstore headers via libxl.h
This completely removes libxenstore from libxl users' view.
xl still needs libxenctrl directly due to the direct use of the
xentoollog functionality but it is not exposed to the indirect linkage
anymore.
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>