aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc
Commit message (Collapse)AuthorAgeFilesLines
...
* Use a reserved pfn in the guest address space to store mem event ringsTim Deegan2012-03-088-19/+107
| | | | | | | | | | | | | | | | | | This solves a long-standing issue in which the pages backing these rings were pages belonging to dom0 user-space processes. Thus, if the process would die unexpectedly, Xen would keep posting events to a page now belonging to some other process. We update all API-consumers in tree (xenpaging and xen-access). This is an API/ABI change, so please speak up if it breaks your accumptions. The patch touches tools, hypervisor x86/hvm bits, and hypervisor x86/mm bits. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Tim Deegan <tim@xen.org>
* Tools: Remove shared page from mem_event/access/paging interfacesTim Deegan2012-03-084-12/+26
| | | | | | | | | | | | | | | | | | | | | | Don't use the superfluous shared page, return the event channel directly as part of the domctl struct, instead. In-tree consumers (xenpaging, xen-access) updated. This is an ABI/API change, so please voice any concerns. Known pending issues: - pager could die and its ring page could be used by some other process, yet Xen retains the mapping to it. - use a saner interface for the paging_load buffer. This change also affects the x86/mm bits in the hypervisor that process the mem_event setup domctl. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Tim Deegan <tim@xen.org>
* arm: compile libxcStefano Stabellini2012-03-015-0/+174
| | | | | | | | | | Introduce an empty implementation of the arch specific ARM functions in xc_core_arm.c and xc_core_arm.h; define barriers on ARM. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86,tools/libxc: expose HLE/RTM features to pv and hvmLiu, Jinsong2012-03-012-0/+6
| | | | | | | | | Intel recently release 2 new features, HLE and TRM. Refer to http://software.intel.com/file/41417. This patch expose them to pv and hvm Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> Committed-by: Keir Fraser <keir@xen.org>
* xenpaging: remove obsolete XENMEM_paging_op_resumeOlaf Hering2012-03-012-10/+0
| | | | | | | | | | | | | | | | | | | | 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>
* libxc: add MMIO hole size parameter to xc_hvm_build()David Vrabel2012-03-012-11/+19
| | | | | | | | | | | | | | | | | 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>
* libxc: pass arguments to xc_hvm_build() in a structureDavid Vrabel2012-03-014-104/+62
| | | | | | | | | | | | | | | 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>
* x86/vMCE: save/restore MCA capabilitiesJan Beulich2012-02-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* libxc: Implement SCHEDOP sysctl for credit schedulerGeorge Dunlap2012-02-232-1/+50
| | | | | | 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>
* libxc: remove tests of alloca() return valueDavid Vrabel2012-02-201-45/+34
| | | | | | | | | alloca() does not return NULL on an allocation failure on Linux so remove the unneccessary tests from this Linux-specific code. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Cc: Santosh Jodh <santosh.jodh@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc/NetBSD: return ioctl return value on errorRoger Pau Monne2012-01-191-1/+1
| | | | | | | | | | | NetBSD libxc hypercall implementation was returning -errno on error, instead of the actual error value from ioctl. Returning error is easier to understand, and the caller can always check errno. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Campbell <ian.campbell.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Reported-by: Olaf Hering <olaf@aepfle.de>
* libxc: add comment to why NetBSD return hypercall->retvalRoger Pau Monne2012-01-191-0/+6
| | | | | | | | | | Added a comment that explains why NetBSD return hypercall->retval on success. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Campbell <ian.campbell.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Reported-by: Olaf Hering <olaf@aepfle.de>
* x86/mm: New sharing audit memopAndres Lagar-Cavilla2012-02-102-0/+12
| | | | | | | | | | | | | | | | | Remove costly mem_sharing audits from the inline path, and instead make them callable as a memop. Have the audit function return the number of errors detected. Update memshrtool to be able to trigger audits. Set sharing audits as enabled by default. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Signed-off-by: Adin Scannell <adin@scannell.ca> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Tim Deegan <tim@xen.org>
* Use memops for mem paging, sharing, and access, instead of domctlsAndres Lagar-Cavilla2012-02-105-133/+134
| | | | | | | | | | | | | | | | | | | | | | | Per page operations in the paging, sharing, and access tracking subsystems are all implemented with domctls (e.g. a domctl to evict one page, or to share one page). Under heavy load, the domctl path reveals a lack of scalability. The domctl lock serializes dom0's vcpus in the hypervisor. When performing thousands of per-page operations on dozens of domains, these vcpus will spin in the hypervisor. Beyond the aggressive locking, an added inefficiency of blocking vcpus in the domctl lock is that dom0 is prevented from re-scheduling any of its other work-starved processes. We retain the domctl interface for setting up and tearing down paging/sharing/mem access for a domain. But we migrate all the per page operations to use the memory_op hypercalls (e.g XENMEM_*). Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla> Signed-off-by: Adin Scannell <adin@scannell.ca> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Tim Deegan <tim@xen.org>
* mini-os: remove per-fd evtchn limitAlex Zeffertt2012-02-091-66/+74
| | | | | | | | | | | | | This changes the minios evtchn implementation to use a list instead of an array which ahis allows it to grow as necessary to support any number of ports, only limited by Xen (NR_EVS is 1024, should be enough for now). Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com> Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* lib{xc,xl}: Seed grant tables with xenstore and console grantsAlex Zeffertt2012-02-095-2/+194
| | | | | | | | | | | | | | | | | | This patch claims one reserved grant entry for the console and another for the xenstore. It modifies the builder to fill in the grant table entries for the console and the xenstore. Previous versions of this patch have been sent to xen-devel. See http://lists.xensource.com/archives/html/xen-devel/2008-07/msg00610.html http://lists.xensource.com/archives/html/xen-devel/2009-03/msg01491.html Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com> Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxc: Replace malloc with alloca in hot pathSantosh Jodh2012-02-071-5/+2
| | | | | | | | Replace malloc with alloc in hot paths for improved performance. Signed-off-by: Santosh Jodh <santosh.jodh@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86/AMD: Add support for AMD's OSVW feature in guests.Boris Ostrovsky2012-02-071-0/+1
| | | | | | | | | | | | | | | | | | In some cases guests should not provide workarounds for errata even when the physical processor is affected. For example, because of erratum 400 on family 10h processors a Linux guest will read an MSR (resulting in VMEXIT) before going to idle in order to avoid getting stuck in a non-C0 state. This is not necessary: HLT and IO instructions are intercepted and therefore there is no reason for erratum 400 workaround in the guest. This patch allows us to present a guest with certain errata as fixed, regardless of the state of actual hardware. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com> Acked-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Jan Beulich <jbeulich@suse.com>
* flask: Update flask_op hypercall structureDaniel De Graaf2012-02-063-257/+220
| | | | | | | | Instead of placing string parsing inside the hypervisor, use binary structures like other Xen hypercalls do. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
* tools/flask: remove libflaskDaniel De Graaf2012-02-062-0/+62
| | | | | | | | This library has been deprecated since July 2010; remove the in-tree users and library. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
* tools/libxc: remove volatile keyword for bitmap operationsOlaf Hering2012-01-311-5/+5
| | | | | | | | | | | | All bitmaps maintained by xc_bitops.h are used in single threaded applications. So nothing will change the bitmaps content, adding volatile adds just unneeded memory reloads. xenpaging uses bitmaps alot and using non-volatile versions will slightly improve performance. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Keir Fraser <keir@xen.org>
* tools/libxc: fix bitmap_alloc usage in xc_ia64_send_vcpumapOlaf Hering2012-01-311-2/+2
| | | | | | | | Changeset 23577:607474aeefe1 introduced an error in xc_ia64_send_vcpumap(), bitmap_alloc() was not used correctly. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Keir Fraser <keir@xen.org>
* mini-os: convert mlock macros to C functionsOlaf Hering2012-01-312-2/+2
| | | | | | | | | mlock and munlock are implemented as macros in mini-os. Their usage requires casting in common code. Convert them to C syntax and provide an empty dummy function. Remove the now unneeded (void) cast from two munlock calls. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* xen: allow global VIRQ handlers to be delegated to other domainsDaniel De Graaf2012-01-282-0/+19
| | | | | | | | | | | | | | | | | This patch sends global VIRQs to a domain designated as the VIRQ handler instead of sending all global VIRQ events to dom0. This is required in order to run xenstored in a stubdom, because VIRQ_DOM_EXC must be sent to xenstored for domain destruction to work properly. This patch was inspired by the xenstored stubdomain patch series sent to xen-devel by Alex Zeffertt in 2009. Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com> Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* tools/libxc: handle fallback in linux_privcmd_map_foreign_bulk properlyOlaf Hering2012-01-271-2/+3
| | | | | | | | | | | If the first ioctl fails with ENOENT it means the command is known. If a second attempt to map each gfn happens to fail then there is no need to run the fallback code. Some gfns are paged and the fallback code would not fix the failure. Instead return the EINVAL to the caller. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Fix build.Tim Deegan2012-01-261-1/+1
| | | | | | | Bring xc_mem_paging.c in line with other users of munlock in libxc. Otherwise it trips over -Werror=unused-value Signed-off-by: Tim Deegan <tim@xen.org>
* Tools: Expose to libxc the total number of shared frames and space savedAndres Lagar-Cavilla2012-01-262-0/+27
| | | | | | Signed-off-by: Adin Scannell <adin@scannell.ca> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Committed-by: Tim Deegan <tim@xen.org>
* Update memshr API and toolsAndres Lagar-Cavilla2012-01-262-5/+77
| | | | | | | | | | | | | | | | | | | | | | | This patch is the folded version of API updates, along with the associated tool changes to ensure that the build is always consistent. API updates: - The source domain in the sharing calls is no longer assumed to be dom0. - Previously, the mem sharing code would return an opaque handle to index shared pages (and nominees) in its global hash table. By removing the hash table, the handle becomes a version, to avoid sharing a stale version of a page. Thus, libxc wrappers and tools need to be updated to recall the share functions with the information needed to fetch the page (which they readily have). Tool updates: The only (in-tree, that we know of) consumer of the mem sharing API is the memshr tool. This is updated to use the new API. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Signed-off-by: Adin Scannell <adin@scannell.ca> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Tim Deegan <tim@xen.org>
* tools/libxc: fix error handling in xc_mem_paging_loadOlaf Hering2012-01-261-5/+10
| | | | | | | | | | | | | | xc_mem_paging_load() does not pass errors in errno and the actual errno from xc_mem_event_control() is overwritten by munlock(). xenpaging_populate_page() needs to check errno, but with the switch to xc_mem_paging_load() it could not receive ENOMEM anymore. Update xc_mem_paging_load() to return -1 and preserve errno during munlock(). Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Committed-by: Keir Fraser <keir@xen.org>
* libelf-loader: introduce elf_load_imageStefano Stabellini2012-01-232-3/+10
| | | | | | | | | | | | | | Implement a new function, called elf_load_image, to perform the actually copy of the elf image and clearing the padding. The function is implemented as memcpy and memset when the library is built as part of the tools, but it is implemented as raw_copy_to_guest and raw_clear_guest when built as part of Xen, so that it can be safely called with an HVM style dom0. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* libxc: Update rmb/wmb for x86.Keir Fraser2012-01-211-4/+6
| | | | | | Only the compiler needs to see the barriers; not the CPU. Signed-off-by: Keir Fraser <keir@xen.org>
* tools: VM generation ID save/restore and migrate.Paul Durrant2011-12-166-6/+73
| | | | | | | | | | | | | | | Add code to track the address of the VM generation ID buffer across a save/restore or migrate, and increment it as necessary. The address of the buffer is written into xenstore by hvmloader at boot time. It must be read from xenstore by the caller of xc_domain_save() and then written back again by the caller of xc_domain_restore(). Note that the changes to xc_save.c and xc_restore.c are merely sufficient for them to build. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* Fix types used in xc_memshr_* functionsAndres Lagar-Cavilla2012-01-102-21/+21
| | | | | | | | | | | | | Currently the memshr functions use uint32_t for the domid. This actually leads to a funny domid_t -> uint32_t -> domid_t sequence of casts. This patch updates the API functions to be domid_t in the first place. No tools need to be modified with this patch, the casts were implicit. Signed-off-by: Adin Scannell <adin@scannell.ca> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: Only retry mapping pages when ENOENT is returnedAndres Lagar-Cavilla2012-01-101-1/+1
| | | | | | | | | | | If the return value from the ioctl() is not ENOENT, it's possible that err[i] will not be updated and libxc will just loop forever. Although it's unlikely that err[i] would not be updated after the ioctl() gets through at least once, it's better to be defensive. Signed-off-by: Adin Scannell <adin@scannell.ca> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* X86: Prepare PCID/INVPCID for hvmLiu, Jinsong2011-12-061-0/+2
| | | | | | | | | | This patch is used to prepare exposing PCID/INVPCID features to hvm guest. The specific exposure result depend on hvm paging mode (hap/shadow), which would be handled at next patch. Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> Committed-by: Keir Fraser <keir@xen.org>
* X86: Disable PCID/INVPCID for pvLiu, Jinsong2011-12-062-0/+3
| | | | | | | This patch disable PCID/INVPCID for pv. Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> Committed-by: Keir Fraser <keir@xen.org>
* X86: expose Intel new features to pv/hvmLiu, Jinsong2011-12-062-4/+18
| | | | | | | | | | Intel recently release some new features, including FMA/AVX2/BMI1/BMI2/LZCNT/MOVBE. Refer to http://software.intel.com/file/36945 This patch expose these new features to pv and hvm. Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> Committed-by: Keir Fraser <keir@xen.org>
* tools/libxc: Fix x86_32 build breakage in previous changeset.Keir Fraser2011-12-021-1/+1
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* tools/x86_64: Fix cpuid() inline asm to not clobber stack's red zoneKeir Fraser2011-12-021-9/+9
| | | | | | | | | | Pushing stuff onto the stack on x86-64 when we do not specify -mno-red-zone is unsafe. Since the complicated asm is due to register pressure on i386, we simply implement an all-new simpler alternative for x86-64. Signed-off-by: Keir Fraser <keir@xen.org> Acked-by: Jan Beulich <jbeulich@novell.com>
* x86/mm: remove 0x55 debug pattern from M2P tableTim Deegan2011-12-022-12/+7
| | | | | | | | It's not really any more useful than explicitly setting new M2P entries to the invalid value. Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Keir Fraser <keir@xen.org>
* libxc: Fix checks on grant notify argumentsDaniel De Graaf2011-12-011-3/+3
| | | | | | | | | | | The notify offset and event channels are both unsigned variables, so testing for >= 0 will not correctly detect the use of -1 to indicate the field is unused. Remove the useless comparison and replace with correct range checks or comparisons to -1. Reported-by: Anil Madhavapeddy <anil@recoil.org> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Tools: Libxc wrappers to automatically fill in page oud page contents on prepareAndres Lagar-Cavilla2011-12-013-2/+27
| | | | | | Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Tim Deegan <tim@xen.org>
* tools/libxc: Remus Checkpoint CompressionShriram Rajagopalan2011-12-017-11/+1015
| | | | | | | | | | | | | | | | | Instead of sending dirty pages of guest memory as-is, use a simple compression algorithm that sends a RLE-encoded XOR of the page against its last sent copy. A small LRU cache is used to hold recently dirtied pages. Pagetable pages are sent as-is, as they are canonicalized at sender side and uncanonicalized at receiver. [ Fixed up a conflict in sg_save_restore.h. I had to increase the ID values used from -11 and -12 to -12 and -13 because -11 had been taken by ..._HVM_VIRIDIAN in the meantime. -iwj ] Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-by: Brendan Cully <brendan@cs.ubc.ca> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/libxc: introduce xc_memalign in xc_{minios,linux,solaris,netbsd}.cShriram Rajagopalan2011-12-016-6/+35
| | | | | | | | | | | Move (page aligned) buffer allocations in {os}_privcmd_alloc_hypercall_buffer into a global function xc_memalign. This API is also used by Remus compression code to allocate compression caches that need to be page aligned. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Brendan Cully <brendan@cs.ubc.ca> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Tools: Add libxc wrapper for p2m audit domctlAndres Lagar-Cavilla2011-12-012-0/+49
| | | | | | Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Tim Deegan <tim@xen.org>
* Tools: When passing no bitmap for the shadow log dirty bitmap clean up, we ↵Andres Lagar-Cavilla2011-12-011-0/+2
| | | | | | | | | | | should not get EFAULT This is due to a stale check for guest_handle_null in the hypervisor, which doesn't necessarily work with the hypercall buffers. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Tim Deegan <tim@xen.org>
* Fix save/restore for HVM domains with viridian=1Paul Durrant2011-11-253-0/+27
| | | | | | | | | | | | | xc_domain_save/restore currently pay no attention to HVM_PARAM_VIRIDIAN which results in an HVM domain running a recent version on Windows (post-Vista) locking up on a domain restore due to EOIs (done via a viridian MSR write) being silently dropped. This patch adds an extra save entry for the viridian parameter and also adds code in the viridian kernel module to catch attempted use of viridian functionality when the HVM parameter has not been set. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* libxc: add bitmap_clear functionOlaf Hering2011-11-201-0/+6
| | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* hvmloader: Move acpi_enabled out of hvm_info_table into xenstorePaul Durrant2011-11-181-1/+0
| | | | | | | | | Since hvmloader has a xentore client, use a platform key in xenstore to indicate whether ACPI is enabled or not rather than the shared hvm_info_table structure. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* elf: Fix Elf64 types and structs to match the specification.Keir Fraser2011-11-161-1/+1
| | | | | | | | The layouts were actually correct, but the type names were a bit messed up. Original patch by Volker Eckert <volker.eckert@citrix.com> Signed-off-by: Keir Fraser <keir@xen.org>