Roger Pau Monne [Thu, 1 Mar 2012 16:41:15 +0000 (16:41 +0000)]
build: autoconf: remove python xml check
Remove the xml module check from autoconf and move it to xend init
script (in a later patch), since it's a run time dependency.
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>
Roger Pau Monne [Thu, 1 Mar 2012 16:19:29 +0000 (16:19 +0000)]
build: autoconf: remove ip check
ip is a run-time dependency, and it is not needed to build Xen tools.
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>
Ian Campbell [Thu, 1 Mar 2012 16:03:21 +0000 (16:03 +0000)]
hcall: markup the event channel hypercalls to improve generated docs
As part of this I looked through the relevant chapter from interfaces.tex (from
4.1, deleted in unstable) to ensure no critical information was missing.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Olaf Hering [Thu, 1 Mar 2012 15:58:02 +0000 (15:58 +0000)]
xenpaging: remove obsolete XENMEM_paging_op_resume
With changeset 24364:
0964341efd65 an event channel based notification of
new responses in the ringbuffer is implemented. This makes the memevent
interface obsolete. Currently a call to p2m_mem_paging_resume() is
triggered twice by xenpaging, once per memevent and once per even
channel. In practice this double call does not lead to issues because
p2m_mem_paging_resume() processes only available events.
xenpaging used the event channel notification since the beginning, but
it was a no-op until changeset mentioned above. This change removes the
unneeded XENMEM_paging_op_resume functionality. Pagers are notified via
an event channel of new requests, and now they are required to notify
the hypervisor about their responses also with an event channel.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Thu, 1 Mar 2012 15:23:31 +0000 (15:23 +0000)]
build: rerun autoconf
24942:
d70b4a1155e3 contains changes to configure.in and thus we need
to rerun autogen.sh.
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Daniel De Graaf [Thu, 1 Mar 2012 15:22:09 +0000 (15:22 +0000)]
build: remove hypervisor-only configuration from tools/configure
When adding autoconf support, the configuration options for XSM and
FLASK_ENABLE were incorrectly removed from Config.mk and added to the
tools configuration. Since these are hypervisor configuration options,
they should not depend on running tools configuration.
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>
David Vrabel [Thu, 1 Mar 2012 15:18:08 +0000 (15:18 +0000)]
libxc: add MMIO hole size parameter to xc_hvm_build()
Add a parameter for the MMIO hole size when building a HVM domain.
This is useful for specifying a larger than normal MMIO hole to ensure
that no PCIe device's MMIO region overlaps with RAM in a guest's
physical address space. This is needed on certain systems with PCIe
switches with a broken ACS capability. On these systems, if a device
downstream of the switch attempts a DMA to a guest physical address
that overlaps with the MMIO region of another downstream device, then
the switch routes the transfer directly to the device and the read or
write never hits RAM.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
David Vrabel [Thu, 1 Mar 2012 15:16:22 +0000 (15:16 +0000)]
libxc: pass arguments to xc_hvm_build() in a structure
To allow new parameters to be added to the xc_hvm_build*() family of
functions, pass them in a structure. Make the other variants fill in
the structure and call xc_hvm_build() (except for xc_hvm_build_mem()
which had no users and is removed).
The units of the mem_size and mem_target arguments are in bytes (not
MiB like the old functions).
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Thu, 1 Mar 2012 12:31:15 +0000 (12:31 +0000)]
Merge
Ian Campbell [Thu, 1 Mar 2012 12:26:15 +0000 (12:26 +0000)]
libxl: autogenerate libxl_FOO_init and libxl_FOO_init_FIELD
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:15 +0000 (12:26 +0000)]
libxl: idl: generate KeyedUnion key member as part of the KeyedUnion
Rather than specifying it twice in the IDL.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:15 +0000 (12:26 +0000)]
libxl: Make IDL KeyedUnion keyvar an idl.Field
This is more logical than having keyvar_name and keyvar_type members.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:15 +0000 (12:26 +0000)]
libxl: add libxl_domain_build_info_init_type
Use instead of parameterising libxl_domain_build_info_init. This allows callers
to initialise a libxl_domain_build_info but not to commit to a particular type
later on (e.g. after they've parsed the domain config)
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:15 +0000 (12:26 +0000)]
libxl: switch device model selection over to libxl_defbool
This allows it to be set via the _init/_setdefault methods.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
[since last v -- ERROR_INVAL on stubdomains + !traditional qemu]
Ian Campbell [Thu, 1 Mar 2012 12:26:15 +0000 (12:26 +0000)]
libxl: do not explicitly initialise members of build info to zero
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:15 +0000 (12:26 +0000)]
libxl: Select BIOS using libxl_domain_build_info_setdefaults
Remove libxl__domain_bios -- it is no longer necessary.
Also we appear to have been setting the xenstore key even for device models for
PV guests -- stop doing that.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:15 +0000 (12:26 +0000)]
libxl: use defbool for graphics related options
This allows them to be set via the _init/_setdefault methods.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:15 +0000 (12:26 +0000)]
libxl: switch generation id control to libxl_defbool.
This allows it to be set via the _init/_setdefault methods.
Also switch the sense of the variable in the libxl API, since once you add
defbool to the mix the double negatives become even more confusing.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Paul Durrant <Paul.Durrant@citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:15 +0000 (12:26 +0000)]
libxl: make boolean members of libxl_domain_build_info into libxl_defbool
This allows them to be set via the _init/_setdefault methods.
This just covers the obvious ones.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:14 +0000 (12:26 +0000)]
libxl: make boolean members of libxl_domain_create_info into libxl_defbool
This allows them to be set via the _init/_setdefault methods.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:14 +0000 (12:26 +0000)]
libxl: add new "defbool" built in type.
This type is a but like a "boolean" but with a third state "default" (so really
I suppose it's a tristate).
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:14 +0000 (12:26 +0000)]
libxl: pci: use _init/_setdefault
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:14 +0000 (12:26 +0000)]
libxl: make libxl_device_console internal
consoles are not directly exposed to users of the library and there are no API
functions for manipluating them (only the console_exec function). Rather than
commit to a particular API now make the type internal.
When a user does come along it is much easier to add a completely new API
rather than to fix an existing broken one. It's easier to do this in a manner
which users of the library can cope with in a compatible way e.g. adding a new
API is easier to check for with ./configure.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:14 +0000 (12:26 +0000)]
libxl: vfb/vkb: use _init/_setdefault
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:14 +0000 (12:26 +0000)]
libxl: nic: use _init/_setdefault
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:14 +0000 (12:26 +0000)]
libxl: disk: use _init/_setdefault
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:14 +0000 (12:26 +0000)]
libxl: introduce a descriminating default value for memkb fields.
Consitently make such fields 64 bit values as used by dominfo.
It is not clear if ->video_memkb and/or shadow_memkb shouldn't be part of
->u.hvm but I have not changed that here.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:14 +0000 (12:26 +0000)]
libxl: drop 8M slack for PV guests.
This serves no purpose. It relates to the old 8M to "account for backend
allocations" which we used to add. This leaves a bit of unpopulated space in
the Pseudo-physical address space which can be used by backends when mapping
foreign memory. However 8M is not representative of that any more and modern
kernels do not operate in this way anyway.
I suspect an argument could be made for removing this from the libxl API
altogether but instead lets just set the overhead to 0.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:13 +0000 (12:26 +0000)]
libxl: use an explicit LIBXL_TIMER_MODE_DEFAULT value
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:13 +0000 (12:26 +0000)]
libxl: provide _init and _setdefault for libxl_domain_build_info.
Some fields require further scaffolding before they can use the
_init/_setdefault scheme and are handled in later patches.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:13 +0000 (12:26 +0000)]
libxl: provide _init and _setdefault for libxl_domain_create_info.
Some fields require further scaffolding before they can use the
_init/_setdefault scheme and are handled in later patches.
It doesn't seem reasonable for the library to pick a default for the domain
type so reject as invalid.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:13 +0000 (12:26 +0000)]
libxl: Document _init/_dispose/_setdefault functions.
Subsequent patches will transition to them.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:13 +0000 (12:26 +0000)]
libxl: generate a _dispose function for all Aggregate types
Don't special case types which we happen to know do not contain allocated data
such that in the future if this changes we do not need to add an API. Although
there is likely to be latent bugs in callers due to this having the API in old
libraries mean that when callers are fixed they will not need to make special
arrangements to handle old and new versions of the library.
Adds dispose functions for:
- libxl_dominfo
- libxl_cpupoolinfo
- libxl_physinfo
- libxl_sched_credit
- libxl_sched_credit2
I have attempted to fix any latent bugs in xl by inspection but have not
bothered with libxl (on the basis that internally the library is allowed to
make these sorts of assumptions and because it was looking like a very invasive
job and that more would only creep in anyway).
Several callsites use libxl_domain_info to check for the presence of a domain
and throw away the actual info. As a convenience accept a NULL info pointer and
just return the status.
Also fix a memory leak in libxl_domain_list.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:13 +0000 (12:26 +0000)]
libxl: allow specification of testidl random seed.
Useful if you are interested in before/after results of changing the IDL or
generator.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:13 +0000 (12:26 +0000)]
libxl: Remove xen/sched.h from public interface
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 1 Mar 2012 12:26:13 +0000 (12:26 +0000)]
libxl: remove sysctl.h from public interface
Using sysctl.h is restricted to "node control tools only" and requires magic
defines. Therefore make its use internal to libxl.
Also removes an indirect include of domctl.h which has the same restrction.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Wed, 29 Feb 2012 17:01:41 +0000 (17:01 +0000)]
configure: do not require Bison or Flex
This isn't required because we also checkin the generated files. A
more complete fix might also allow the user to force regeneration but
I didn't bother here.
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>
Attilio Rao [Wed, 29 Feb 2012 16:25:38 +0000 (16:25 +0000)]
libxl, xl: Add the bios option to specify the bios to load
Signed-off-by: Attilio Rao <attilio.rao@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Wed, 29 Feb 2012 15:11:31 +0000 (15:11 +0000)]
Revert 24897:
f25e5785327e "Export configure variables to hypervisor build"
Signed-off-by: Keir Fraser <keir@xen.org>
Ian Jackson [Wed, 29 Feb 2012 14:38:28 +0000 (14:38 +0000)]
tools: xencommons: revert accidental hunk in 24905:
2b5cf6bde62d
24905:
2b5cf6bde62d accidentally contained a change to
tools/hotplug/Linux/init.d/xencommons. That change is probably OK but
should not be in 24905 so remove it.
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Roger Pau Monne [Wed, 29 Feb 2012 14:36:04 +0000 (14:36 +0000)]
install: remove old checks from install.sh
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>
Olaf Hering [Wed, 29 Feb 2012 14:32:51 +0000 (14:32 +0000)]
libxl: use libxl wrapper for yajl_gen_alloc
To fix compile errors with libyajl2:
* use libxl_yajl_gen_alloc()
* use libxl_yajl_length
* link xl with -lyajl for yajl_gen_string()
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Olaf Hering [Wed, 29 Feb 2012 14:31:59 +0000 (14:31 +0000)]
libxl: rename libxl__yajl_gen_alloc
libxl__yajl_gen_alloc() is called by generic code,
rename it to libx_yajl_gen_alloc().
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Dietmar Hahn [Wed, 29 Feb 2012 13:51:42 +0000 (13:51 +0000)]
vpmu: No need for two initialisation functions
With the changeset 24529:
87854d3bed93 we got 2 initialisation
functions for the arch specific stuff. This is no more needed.
Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
Committed-by: Keir Fraser <keir@xen.org>
Dietmar Hahn [Wed, 29 Feb 2012 13:51:12 +0000 (13:51 +0000)]
vpmu: cleanup structures
- struct msr_load_store_entry is unused
- struct pmumsr is only used in the vmx part
Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
Committed-by: Keir Fraser <keir@xen.org>
Daniel De Graaf [Wed, 29 Feb 2012 13:48:41 +0000 (13:48 +0000)]
xsm: expose context of event channel peers
This hypercall allows a domain to identify the security context of a
domain that it is communicating with using the interdomain event
channel that it is using for the communication. This can be used to
augment Xen's security permissions with intra-domain security checks.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
Daniel De Graaf [Wed, 29 Feb 2012 13:47:41 +0000 (13:47 +0000)]
xsm/flask: buffer AVC messages for output
When multiple CPUs hit an AVC audit message, the resulting output in
the ring buffer and serial console is garbled due to the audit process
using many separate printk invocations for each message. Change the
AVC audit process to use a temporary buffer and output the contents
once the entire audit message is complete.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
Daniel De Graaf [Wed, 29 Feb 2012 13:47:11 +0000 (13:47 +0000)]
xsm/flask: clean interdomain event channel hook
Don't attempt to relabel the already-bound half of the event channel
pair created by an interdomain event channel. This relabeling also
performed an incorrect check that the destination domain is permitted
to create the reverse event channel, which may not be true if the
unbound channel was created by the domain builder (like the xenstore
channel).
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
Daniel De Graaf [Wed, 29 Feb 2012 13:46:32 +0000 (13:46 +0000)]
xsm: label xen-consumer event channels
Event channels created during the domain build process for HVM domains
did not call the XSM creation hook. Since these channels are used
internally by Xen, redirect them to DOMAIN_INVAID instead of failing
to create if the XSM hook fails the permissions check.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
Keir Fraser [Wed, 29 Feb 2012 13:43:44 +0000 (13:43 +0000)]
Update autoconf-generated configure script.
Signed-off-by: Keir Fraser <keir@xen.org>
Daniel De Graaf [Wed, 29 Feb 2012 13:40:25 +0000 (13:40 +0000)]
build: Export configure variables to hypervisor build
Since the introduction of autoconf, builds with XSM enabled in .config
have been broken unless FLASK_ENABLE was explicitly set. Since the
setting in .config has apparently been deprecated in favor of an
autoconf --enable-xsm, add config/Xen.mk to export this to Xen. This
also makes --disable-debug and some paths to be pulled from the
configure process in the hypervisor build.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
Attilio Rao [Wed, 29 Feb 2012 13:33:51 +0000 (13:33 +0000)]
hvmloader: drop the ovmf32 support and rename ovmf64 -> ovmf.
- Remove the 15cpus hack from ovmf because it should be unnecessary on
nowadays windows/EFI supported.
Signed-off-by: Attilio Rao <attilio.rao@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
Tim Deegan [Tue, 28 Feb 2012 10:17:27 +0000 (10:17 +0000)]
arm: Handle booting on SMP platforms
Make all non-boot CPUs wait forever instead of trying to boot in parallel.
Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Tim Deegan [Tue, 28 Feb 2012 10:17:27 +0000 (10:17 +0000)]
arm: strip xen binary
The symbols in it are wrong anyway and will only confuse people
who ought to be looking at xen-syms.
Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Liu, Jinsong [Tue, 28 Feb 2012 08:06:27 +0000 (09:06 +0100)]
X86: expose HLE/RTM features to dom0
Intel recently release 2 new features, HLE and TRM.
Refer to http://software.intel.com/file/41417.
This patch expose them to dom0.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
Ian Campbell [Mon, 27 Feb 2012 17:05:18 +0000 (17:05 +0000)]
Update SEABIOS_UPSTREAM_TAG
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
David Vrabel [Mon, 27 Feb 2012 17:05:18 +0000 (17:05 +0000)]
arm: fix unaligned memcpy() and memmove()
If memcpy() and memmove() were used with source and destination of
different alignment then the result would be all jumbled.
When their implementations were imported from Linux some macros for
big-endian platforms were taken instead of the correct little-endian
ones (specifically, the push and pull macros in assembler.h).
Fix this by taking Linux's arch/include/asm/assembler.h as-is and
making only the minimum changes necessary for Xen.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
Ian Campbell [Mon, 27 Feb 2012 16:12:24 +0000 (16:12 +0000)]
SEABIOS_UPSTREAM_TAG Update
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
Keir Fraser [Mon, 27 Feb 2012 12:10:29 +0000 (12:10 +0000)]
Revert 24875:
a59c1dcfe968 "blkif.h: Define and document the request number/size/segments extension"
Breaks the build.
Signed-off-by: Keir Fraser <keir@xen.org>
Jan Beulich [Fri, 24 Feb 2012 10:46:32 +0000 (11:46 +0100)]
passthrough: release assigned PCI devices earlier during domain shutdown
At least with xend, where there's not even a tool stack side attempt to
de-assign devices during domain shutdown, this allows immediate re-
starts of a domain to work reliably. (There's no apparent reason why
c/s 18010:
c1577f094ae4 chose to put this in the asynchronous part of
domain destruction).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Jan Beulich [Fri, 24 Feb 2012 08:07:54 +0000 (09:07 +0100)]
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>
Jan Beulich [Fri, 24 Feb 2012 08:03:43 +0000 (09:03 +0100)]
x86/vMCE: don't advertise features we don't support
... or even know of. Apart from CMCI, which was masked off already,
this now also suppresses the advertising of extended state registers
(reading of which would likely be meaningless in a guest and represent
an information leak).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Olaf Hering [Mon, 20 Feb 2012 21:16:32 +0000 (22:16 +0100)]
mem_event: use C99 initializers for mem_event_request_t users
Use C99 initializers for mem_event_request_t users to make sure req is
always cleared, even with local debug patches that shuffle code around
to have a single exit point.
The common case is to use and send req, so it does not add significant
overhead to always clear req.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Olaf Hering [Mon, 20 Feb 2012 21:09:40 +0000 (22:09 +0100)]
mem_event: remove type member
When mem_event was added the type flag should indicate who the consumer
is. But the concept of a single ring buffer for multiple event types can
not work for two reasons. One is that no multiplexer exists which
provides individual event types to the final consumer, and second is
that even if such multiplexer can not work reliable because a request
needs to be answered with a response. The response should be sent
roughly in the order of received events. But with multiple consumers one
of them can so stall all the others.
For that reason the single mem_event buffer for all types of events was
split into individual ring buffers with commit 23842:
483c5f8319ad. This
commit made the type member already obsolete because the meaning of each
buffer is now obvious.
This change removes the type member and increases the flags field.
Even though this is an ABI incompatible change, it will have no practical
impact on existing binaries because the changeset referenced above already
bumped the SONAME. So these binaries have to be recompiled anyway for the
upcoming major release.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Tim Deegan [Thu, 23 Feb 2012 10:29:27 +0000 (10:29 +0000)]
x86/mm: Don't check for invalid bits in non-present PTEs.
If _PAGE_PRESENT is clean in a pagetable entry, any pattern of bits
is valid in the rest of the entry. OSes that special-case
PFEC_invalid_bits (since it should never happen) will be confused
by our setting it in this way.
Signed-off-by: Tim Deegan <tim@xen.org>
George Dunlap [Thu, 23 Feb 2012 10:19:57 +0000 (10:19 +0000)]
libxl: Rename libxl_sched_* to include _domain
In preparation for introducing a schedule parameter-based structure,
rename libxl_sched_{credit,credit2,sedf} to libxl_sched_{}_domain.
No functional changes.
v2: Wrap long lines while I'm at it
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
George Dunlap [Thu, 23 Feb 2012 10:17:50 +0000 (10:17 +0000)]
libxc: Implement SCHEDOP sysctl for credit scheduler
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
George Dunlap [Thu, 23 Feb 2012 10:17:21 +0000 (10:17 +0000)]
scheduler: Implement SCHEDOP sysctl for credit scheduler
Allow tslice_ms and ratelimit_us to be modified.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
George Dunlap [Thu, 23 Feb 2012 10:16:10 +0000 (10:16 +0000)]
scheduler: Print ratelimit in scheduler debug key
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
George Dunlap [Thu, 23 Feb 2012 10:15:40 +0000 (10:15 +0000)]
scheduler: Add a #define for the default ratelimit
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
George Dunlap [Thu, 23 Feb 2012 10:14:55 +0000 (10:14 +0000)]
cleanup: Remove dependency files in efi directory during a make clean
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
Attilio Rao [Thu, 23 Feb 2012 10:11:58 +0000 (10:11 +0000)]
hvmloader: Add OVMF UEFI support and directly use it
...when specified in the guest configuration file.
This work is somewhat based on Bei Guan effort during the SoC 2011 and
relies on upstream edk2/ovmf Tianocore ROM to be built separately and
manually copied as:
Build/OvmfX64/DEBUG_GCC44/FV/OVMF.fd ->
tools/firmware/ovmf/ovmf-x64.bin
Build/OvmfIa32/DEBUG_GCC44/FV/OVMF.fd ->
toolf/firmware/ovmf/ovmf-ia32.bin
A way to integrate OVMF build directly into XEN has still be discussed
on the mailing list appropriately.
Signed-off-by: Attilio Rao <attilio.rao@citrix.com>
Disable CONFIG_OVMF by default as ovmf is not integrated into the
build.
Signed-off-by: Keir Fraser <keir@xen.org>
Committed-by: Keir Fraser <keir@xen.org>
Justin T. Gibbs [Thu, 23 Feb 2012 10:03:07 +0000 (10:03 +0000)]
blkif.h: Define and document the request number/size/segments extension
Note: As of __XEN_INTERFACE_VERSION__ 0x00040201 the definition of
BLKIF_MAX_SEGMENTS_PER_REQUEST has changed. Drivers must be
updated to, at minimum, use BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK,
before being recompiled with a __XEN_INTERFACE_VERSION greater
than or equal to this value.
This extension first appeared in the FreeBSD Operating System.
Signed-off-by: Justin T. Gibbs <justing@spectralogic.com>
Committed-by: Keir Fraser <keir@xen.org>
Justin T. Gibbs [Thu, 23 Feb 2012 10:02:30 +0000 (10:02 +0000)]
blkif.h: Document the Red Hat and Citrix blkif multi-page ring extensions
No functional changes.
Signed-off-by: Justin T. Gibbs <justing@spectralogic.com>
Committed-by: Keir Fraser <keir@xen.org>
Justin T. Gibbs [Thu, 23 Feb 2012 10:01:59 +0000 (10:01 +0000)]
blkif.h: Provide more complete documentation of the blkif interface
o Document the XenBus nodes used in this protocol.
o Add a state diagram illustrating the roles and responsibilities
of both the front and backend during startup.
o Correct missed BLKIF_OP_TRIM => BLKIF_OP_DISCARD conversion in a
comment.
No functional changes.
Signed-off-by: Justin T. Gibbs <justing@spectralogic.com>
Committed-by: Keir Fraser <keir@xen.org>
Justin T. Gibbs [Thu, 23 Feb 2012 10:01:26 +0000 (10:01 +0000)]
blkif.h: Miscelaneous style fixes
o Remove trailing whitespace.
o Remove a blank line so that a comment block is adjacent to the
code it documents.
No functional changes.
Signed-off-by: Justin T. Gibbs <justing@spectralogic.com>
Committed-by: Keir Fraser <keir@xen.org>
Ian Campbell [Thu, 23 Feb 2012 09:59:35 +0000 (09:59 +0000)]
xen: add missing unlock from gnttab_get_version
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reported-by: Francisco Rocha <f.e.liberal-rocha@newcastle.ac.uk>
Committed-by: Keir Fraser <keir@xen.org>
Andrew Cooper [Thu, 23 Feb 2012 09:58:47 +0000 (09:58 +0000)]
IO-APIC: Prevent using EOI broadcast suppression if user specified ioapic_ack=new on the command line.
Currently, if EOI broadcast suppression is advertised on the BSP
LAPIC, Xen will discard any user specified option regarding IO-APIC
ack mode.
This patch introduces a check which prevents EOI Broadcast suppression
from forcing the IO-APIC ack mode to old if the user has explicitly
asked for the new ack mode on the command line.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
Ian Campbell [Wed, 22 Feb 2012 14:33:24 +0000 (14:33 +0000)]
arm: lr register in hyp mode is really LR_usr.
Save and restore it in the same way for both hypervisor and user stack frames
rather than saving both individually in the user stack frame.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
Ian Campbell [Wed, 22 Feb 2012 14:33:23 +0000 (14:33 +0000)]
arm: restore ELR_hyp and SPSR_hyp on return from hypervisor to hypervisor.
This is necessary to handle nested traps to the hypervisor more than one deep.
I've not seen an actually failure relating to this but I'm not quite sure how
we've managed to get away with not doing it (I suppose multiply nested traps
are uncommon).
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
David Vrabel [Wed, 22 Feb 2012 14:33:23 +0000 (14:33 +0000)]
arm: move check for CONFIG_DTB_FILE to xen/arch/arm/Makefile
CONFIG_DTB_FILE only needs to be set when building Xen itself.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
Ian Campbell [Wed, 22 Feb 2012 14:33:22 +0000 (14:33 +0000)]
arm: use a per-VCPU stack
We do not do any lazy state switching. Outside of context_switch() the current
stack is always that of the VCPU which current returns.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
Ian Jackson [Wed, 22 Feb 2012 14:27:18 +0000 (14:27 +0000)]
autoconf: Rerun autogen.sh
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Roger Pau Monne [Wed, 22 Feb 2012 13:06:42 +0000 (13:06 +0000)]
autoconf: clean brctl options
This bit was missing, sorry.
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>
Roger Pau Monne [Wed, 22 Feb 2012 11:56:24 +0000 (11:56 +0000)]
autoconf: remove udev checks from build
There's no need to have udev when building Xen since it's only used at
run time.
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>
Roger Pau Monne [Wed, 22 Feb 2012 11:54:16 +0000 (11:54 +0000)]
autoconf: remove brctl check
Remove brctl check since it's usually only available to users with
high privileges, but Xen should be buildable by regular users.
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>
Ian Jackson [Wed, 22 Feb 2012 01:55:04 +0000 (01:55 +0000)]
.gitignore: add autoconf-related files
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Wed, 22 Feb 2012 01:55:03 +0000 (01:55 +0000)]
build: add autoconf to replace custom checks in tools/check
Added autotools magic to replace custom check scripts. The previous
checks have been ported to autoconf, and some additional ones have
been added (plus the suggestions from running autoscan). Two files are
created as a result from executing configure script, config/Tools.mk
and config.h.
conf/Tools.mk is included by tools/Rules.mk, and contains most of the
options previously defined in .config, that can now be set passing
parameters or defining environment variables when executing configure
script.
config.h is only used by libxl/xl to detect yajl_version.h.
[ tools/config.sub and config.guess copied from
autotools-dev
20100122.1 from Debian squeeze i386,
which is GPLv2.
tools/configure generated using the included ./autogen.sh
which ran autoconf 2.67-2 from Debian squeeze i386. autoconf
is GPLv3+ but has a special exception for the autoconf output;
this exception applies to us and exempts us from complying
with GPLv3+ for configure, which is good as Xen is GPL2 only.
- Ian Jackson ]
Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Tested-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Bamvor Jian Zhang [Tue, 21 Feb 2012 18:01:04 +0000 (18:01 +0000)]
libxl: Export libxl_event.h
This fixes a compile error in libvirt.
Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
George Dunlap [Tue, 21 Feb 2012 17:45:59 +0000 (17:45 +0000)]
libxl: cleanup: Remove pointless ERRNOVAL
Just call LIBXL__LOG rather than passing a meaningless ERRNOVAL.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Olaf Hering [Mon, 20 Feb 2012 20:18:44 +0000 (21:18 +0100)]
xenpaging: implement stack of free slots in pagefile
Scanning the slot_to_gfn[] array for a free slot is expensive because
evict_pages() always needs to scan the whole array. Remember the last
slots freed during page-in requests and reuse them in evict_pages().
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Olaf Hering [Mon, 20 Feb 2012 20:18:44 +0000 (21:18 +0100)]
xenpaging: move page_buffer into struct xenpaging
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Olaf Hering [Mon, 20 Feb 2012 20:18:44 +0000 (21:18 +0100)]
xenpaging: move pagefile filedescriptor into struct xenpaging
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Olaf Hering [Mon, 20 Feb 2012 20:18:44 +0000 (21:18 +0100)]
xenpaging: unify error handling
Update functions to return -1 on error, 0 on success.
Simplify init_page() and make sure errno is assigned.
Adjust PERROR/ERROR usage, use PERROR early because it overwrites errno.
Adjust xenpaging_populate_page() to handle gfn as unsigned long.
Update xenpaging exit code handling. xenpaging_teardown cant possible
fail. Adjust mainloop to indicate possible errors to final exit.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Olaf Hering [Mon, 20 Feb 2012 20:18:44 +0000 (21:18 +0100)]
xenpaging: improve performance in policy_choose_victim
policy_choose_victim() is one of the bottlenecks in xenpaging. It is called
alot to find free bits in the fragmented bitmaps.
Reduce turnaround time by skipping longs with all bits set.
Adjust wrap detection in loop.
v2:
- fix copy&paste error, bitmap was tested twice
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Olaf Hering [Mon, 20 Feb 2012 20:18:44 +0000 (21:18 +0100)]
xenpaging: move nominate+evict into single function
Move all code to evict a single gfn into one function. This simplifies
error handling in caller. The function returns -1 on fatal error, 0 on
success and 1 if the gfn cant be paged.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Olaf Hering [Mon, 20 Feb 2012 20:18:44 +0000 (21:18 +0100)]
xenpaging: reduce number of qemu cache flushes
Currently the command to flush the qemu cache is called alot if there
are no more pages to evict. This causes churn in the logfiles, and qemu
can not release more pages anyway since the last command.
Fix this by remembering the current number of paged-out gfns, if this
number did not change since the last flush command then sending another
new flush command will not free any more gfns.
Remove return code from xenpaging_mem_paging_flush_ioemu_cache() since
errors do not matter, and will be handled elsewhere. Also failure to
send the flush command is not fatal.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Olaf Hering [Mon, 20 Feb 2012 20:18:44 +0000 (21:18 +0100)]
xenpaging: no poll timeout while page-out is in progress
The main loop calls xenpaging_wait_for_event_or_timeout() unconditionally
before doing any work. This function calls poll() with a timeout of 100ms. As
a result the page-out process is very slow due to the delay in poll().
Call poll() without timeout so that it returns immediately until the page-out
is done. Page-out is done when either the policy finds no more pages to
nominate or when the requested number of pages is reached.
The condition is cleared when a watch event arrives, so that processing the
new target is not delayed once again by poll().
v2:
- no poll timeout also when large number of evicts is pending
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Olaf Hering [Mon, 20 Feb 2012 20:18:44 +0000 (21:18 +0100)]
xenpaging: use flat index for pagefile and page-in requests
This change is based on an idea by <hongkaixing@huawei.com> and
<bicky.shi@huawei.com>.
Scanning the victims[] array is time consuming with a large number of
target pages. Replace the loop to find the slot in the pagefile which
holds the requested gfn with an index.
Remove the victims array and replace it with a flat array. This array
holds the gfn for a given slot in the pagefile. Adjust all users of the
victims array.
Rename variable in main() from i to slot to clearify the meaning.
Update xenpaging_evict_page() to pass a pointer to xen_pfn_t to
xc_map_foreign_pages().
Update policy_choose_victim() to return either a gfn or INVALID_MFN.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Christoph Egger [Tue, 21 Feb 2012 16:44:15 +0000 (16:44 +0000)]
libxl: add missing includes
include <poll.h> for struct pollfd
include <sys/time.h> for struct timeval
Fixes gcc complaints about implicit declaration.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>