aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/public/xen.h
Commit message (Collapse)AuthorAgeFilesLines
* evtchn: add FIFO-based event channel ABIDavid Vrabel2013-10-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Add the event channel hypercall sub-ops and the definitions for the shared data structures for the FIFO-based event channel ABI. The design document for this new ABI is available here: http://xenbits.xen.org/people/dvrabel/event-channels-F.pdf In summary, events are reported using a per-domain shared event array of event words. Each event word has PENDING, LINKED and MASKED bits and a LINK field for pointing to the next event in the event queue. There are 16 event queues (with different priorities) per-VCPU. Key advantages of this new ABI include: - Support for over 100,000 events (2^17). - 16 different event priorities. - Improved fairness in event latency through the use of FIFOs. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: correct public header's documentation of PAT MSR settingsJan Beulich2013-08-231-9/+9
| | | | | | | | The first (PAT6) column was wrong across the board, and the column for PAT7 was missing altogether. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* xen: remove evtchn_upcall_mask from interface on ARMIan Campbell2013-08-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | On ARM event-channel upcalls are masked using the hardware's interrupt mask bit and not by a software bit. Leaving this field present in the interface has caused some confusion already and is liable to mean it gets inadvertently used in the future. So arrange for this field to be turned into a padding field on ARM by introducing a XEN_HAVE_PV_UPCALL_MASK define. This bit is also unused for x86 PV-on-HVM guests, but we can't realistically distinguish those from x86 PV guests in the headers. Add a per-arch vcpu_event_delivery_is_enabled function to replace an open coded use of evtchn_upcall_mask in common code (in a debug keyhandler). The existing local_event_delivery_is_enabled, which operates only on current, was unimplemented on ARM and unused on x86, so remove it. ifdef the use of evtchn_upcall_mask when setting up a new vcpu info page. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xen: arm: include public/xen.h in foreign interface checkingIan Campbell2013-08-201-1/+1
| | | | | | | | | | | | | | | | | mkheader.py doesn't cope with struct foo { }; so add a newline. Define unsigned long and long to a non-existent type on ARM so as to catch their use. Teach mkheader.py to cope with structs which are ifdef'd. This cannot cope with #defines between the #ifdef and the struct definitions, so move MAX_GUEST_CMDLINE to be next to its only usage. 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>
* xen: only expose start_info on architectures which have a PV boot pathIan Campbell2013-08-201-1/+2
| | | | | | | | | Most of this struct is PV MMU specific and it is not used on ARM at all. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jan Beulich <JBeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xen, libxc: rename xenctl_cpumap to xenctl_bitmapDario Faggioli2013-04-171-2/+2
| | | | | | | | | | | | | | | | | | More specifically: 1. replaces xenctl_cpumap with xenctl_bitmap 2. provides bitmap_to_xenctl_bitmap and the reverse; 3. re-implement cpumask_to_xenctl_bitmap with bitmap_to_xenctl_bitmap and the reverse; Other than #3, no functional changes. Interface only slightly afected. This is in preparation of introducing NUMA node-affinity maps. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Juergen Gross <juergen.gross@ts.fujitsu.com> Acked-by: Keir Fraser <keir@xen.org>
* docs: Document start_info changes in Xen 4.2.Konrad Rzeszutek Wilk2013-03-261-1/+11
| | | | | | | | | | | | | | | | The 25833:bb85bbccb1c9. "x86/32-on-64: adjust Dom0 initial page table layout" fixes a bug in the reported value of pt_base versus where the page tables actually start. This documents this in the start of the world header note. This clarifies the implied understanding that the page table space is pointed by pt_base. As in it is ".. implied that the range of page-tables is the range [pt_base, pt_base + nr_pt_frames), whereas that that range here indeed is [pt_base - 2, pt_base -2 + nr_pt_frames)" (Jan Beulich). Also make it crystal clear that pt_base == %cr3. Acked-by: Jan Beulich <JBeulich@suse.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* docs: Document the dom0_vga_console_info structure.Konrad Rzeszutek Wilk2013-03-261-1/+8
| | | | | | | | Mark-up for inclusion of generated docs. Acked-by: Ian Campbell <ian.campbel@citrix.com> [v2: s/dom9/dom0/] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* docs: Document the shared structure.Konrad Rzeszutek Wilk2013-03-261-0/+1
| | | | | | | Mark-up for inclusion of generated docs. Acked-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* xen: arm64: initial build + config changes, start of day codeIan Campbell2013-02-221-1/+1
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: event channel arrays are xen_ulong_t and not unsigned longIan Campbell2013-02-221-4/+4
| | | | | | | | | | On ARM we want these to be the same size on 32- and 64-bit. This is an ABI change on ARM. X86 does not change. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* Fix emacs local variable block to use correct C style variable.David Vrabel2013-02-211-1/+1
| | | | | | | The emacs variable to set the C style from a local variable block is c-file-style, not c-set-style. Signed-off-by: David Vrabel <david.vrabel@citrix.com
* xen: fix build failure due to extra closing commentIan Campbell2012-11-191-1/+0
| | | | | | | Added by 26173:26facad2f1a1 Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: Include prototype for HYPERVISOR_multicallIan Campbell2012-11-191-1/+4
| | | | | | | | Mark-up for inclusion of generated docs. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: Add ToC entry for start of day memory layout.Ian Campbell2012-11-191-1/+2
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: Document HYPERVISOR_mmuext_opIan Campbell2012-11-191-14/+22
| | | | | | | | | | Mark-up for inclusion of generated docs. Remove some trailing whitespace. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: document HYPERVISOR_update_va_mapping(_other_domain)Ian Campbell2012-11-191-0/+17
| | | | | | | | Mark-up for inclusion of generated docs. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xen: retain ulong guest handle for older consumers.Ian Campbell2012-10-181-0/+4
| | | | | | | | | 26072:5529b91bd2e4 removed this but we need to keep it around for older consumers. Bump __XEN_LATEST_INTERFACE_VERSION__ accordingly. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xen: remove XEN_GUEST_HANDLE(ulong)Ian Campbell2012-10-171-2/+0
| | | | | | | | | | | | | | | | | | Having both this handle (always unsigned long) and XEN_GUEST_HANDLE(xen_ulong_t) (unsigned long on x86 and explicit size of ARM) is confusing and error prone. Replace the two remaining uses of the ulong handle, in grant set and x86 set_gdt hypercalls, with xen_ulong_t. This correctly sizes the grant frame entry as 64 bit on ARM but leaves it as unsigned long on x86 (therefore no intended change on x86). Likewise in set_gdt there is no actual change. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xen: arm: implement XENMEM_add_to_physmap_rangeIan Campbell2012-10-171-0/+1
| | | | | | | | | | This allows for foreign mappings as well as batching, fitting all that into XENMEM_add_to_physmap wasn't possible. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: drop ia64 supportIan Campbell2012-09-121-2/+0
| | | | | | | | | | | | | | | | | Removed support from libxc and mini-os. This also took me under xen/include/public via various symlinks. Dropped tools/debugger/xenitp entirely, it was described upon commit as: "Xenitp is a low-level debugger for ia64" and doesn't appear to be linked into the build anywhere. 99 files changed, 14 insertions(+), 32361 deletions(-) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* Global virq for low memory situationsAndres Lagar-Cavilla2012-03-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When a low memory threshold on the Xen heap is reached, we fire a global dom0 virq. If someone's listening, they can free up some more memory. The low threshold is configurable via the command line token 'low_mem_virq_limit", and defaults to 64MiB. If the user specifies zero via the command line, the virq is disabled. We define a new virq VIRQ_ENOMEM. Potential listeners include squeezed, xenballoond, or anything else that can be fired through xencommons. We error-check the low mem virq against initial available heap (after dom0 allocation), to avoid firing immediately. Virq issuing is controlled by a hysteresis algorithm: when memory dips below a threshold, the virq is issued and the next virq will fire when memory shrinks another order of magnitude. The virq will not fire again in the current "band" until memory grows over the next higher order of magnitude. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Committed-by: Keir Fraser <keir@xen.org>
* hcall: markup the event channel hypercalls to improve generated docsIan Campbell2012-03-011-0/+2
| | | | | | | | | | 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>
* arm: header filesStefano Stabellini2012-02-091-0/+2
| | | | | | | | | | A simple implementation of everything under asm-arm and arch-arm.h; some of these files are shamelessly taken from Linux. 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: Ian Campbell <ian.campbell@citrix.com>
* doc: Update MMU_NORMAL_PT_UPDATE about the val.Konrad Rzeszutek Wilk2011-11-291-0/+66
| | | | | | | | | The val is used as the pagetable entry with the machine frame number and some page table bits. This explains what those page table bits are. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* doc: Update MMU_NORMAL_PT_UPDATE requirements.Konrad Rzeszutek Wilk2011-11-291-0/+34
| | | | | | | | | | There are some implicit requirements when using the hypercall which are not mentioned. Mainly the requirement that the pagetable be RO. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* docs/html/: Generate an "index.html" for hypercall docsIan Jackson2011-11-291-1/+3
| | | | | | | | Generate an "index.html" containing various useful links. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* docs/html/: Annotations for two hypercallsIan Jackson2011-11-291-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Add annotations for a couple of the hypercalls: HYPERVISOR_set_trap_table HYPERVISOR_mmu_update We do this by * annotating the list of #defines for hypercall numbers * annotating the list of error values * providing a function prototype for the systematically-named functions The header generator does the rest. This exercise revealed a couple of infelicities: * In the actual source code, do_mmu_update is defined to return an int and do_set_trap_table a long. However both functions return either -Efoo (on error) or 0 for success. * The error numbers are defined only in the private header file xen/include/xen/errno.h and then only with names which will typically clash with other projects. It would be nice to include a public version of this header which defines XEN_E*. But for now we run xen-headers on errno.h too. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* Placeholder for V4V hypercall and VIRQ numbersRoss Philipson2011-07-141-0/+2
| | | | | | | | | | | | | The V4V Xen functionality is currently in our product trees for XenClient b= ut is not yet in a state suitable for submission. We hope to make available= the rest of the V4V functionality in the not too distant future. Since the= se values are already in use in our product, we would like to reserve them = in open source to prevent issues or incompatibilities down the road. Signed-off-by: Ross Philipson <ross.philipson@citrix.com>
* x86-64: EFI boot codeJan Beulich2011-06-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Besides introducing the relevant code paralleling parts of what is under xen/arch/x86/boot/, this adjusts the build logic so that with a single compilation two images (gzip-compressed ELF and EFI application) can get created. The EFI part of this depends on a new enough compiler (supposedly gcc 4.4.x and above, but so far only tested to work with 4.5.x) and a properly configured linker (must support the i386pep emulation). If either functionality is found to not be available, the EFI part of the build will simply be skipped. The patch adds all code to allow Xen and the (accordingly enabled) Dom0 kernel to boot, but doesn't allow Dom0 to make use of EFI runtime calls (this will be the subject of the next patch). Parts of the code were lifted from an earlier never published OS project of ours - whether respective license information needs to be added to the respective source file is unclear to me (I was told internally that adding a GPLv2 license header can be done if needed by the community). Open issues (not preventing this from being committed imo): The trampoline allocation and initialization isn't really nice. This is due to the trampoline needing to be placed at a fixed address, and hence making the trampoline relocatable would seem desirable here (as well as for BIOS-based booting, where the trampoline location needed to be adjusted a number of time already in the past, due to it colliding with firmware data). By excluding mem.S, edd.S, and video.S from copied trampoline (i.e. moving up wakeup.S? and making sure none of the symbols are used from EFI code), the effective trampoline size could at least be reduced. Should the mappings of [__XEN_VIRT_START, mbi.mem_upper) and [_end, __XEN_VIRT_START+BOOTSTRAP_MAP_BASE) be destroyed, despite non-EFI code also keeping them? Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Move IDLE_DOMAIN_ID defn to public header, and change DOMID_INVALID to fix ↵Keir Fraser2010-12-091-2/+5
| | | | | | clash. Signed-off-by: Keir Fraser <keir@xen.org>
* x86: allow passing initrd to kernel without exposing it through the initial ↵Keir Fraser2010-11-091-1/+4
| | | | | | | | | | | | | | mapping The (Dom0 only for now) kernel can indicate that it doesn't need its initrd mapped through a newly added ELF note - it gets passed the PFN of the initrd in this case instead of the virtual address. Even for kernels not making use of the new feature, the initrd will no longer get copied into the initial mapping, but the memory it lives in will get assigned to and mapped for the guest instead. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Revert 5b03813d8d6e "Make uint64_aligned_t and GUEST_HANDLE_64 visible to ↵Keir Fraser2010-09-021-1/+6
| | | | | | | | | guests." This introduced non-ANSI gcc-isms into the guest-visible sections of public headers. Not allowed after all. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Make uint64_aligned_t and GUEST_HANDLE_64 visible to guests.Keir Fraser2010-09-011-6/+1
| | | | | | | No reason to hide them and they're useful for building 32/64-bit invariant hypercall structures. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: add CMCI software injection interfaceKeir Fraser2010-06-091-0/+9
| | | | | | | | A new command is added. User can set the target CPU map, since the CMCI can be triggered on some specific CPUs. Please be noticed that the xenctl_cpumap structure is moved from domctl.h to xen.h. Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
* Reserve MMUEXT_[UN]MARK_SUPER mmuext operations.Keir Fraser2010-05-141-1/+6
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: add support for domain-initiated global cache flushKeir Fraser2010-05-041-0/+5
| | | | | | | | | Newer Linux' AGP code wants to flush caches on all CPUs under certain circumstances. Since doing this on all vCPU-s of the domain in question doesn't yield the intended effect, this needs to be done in the hypervisor. Add a new MMUEXT operation for this. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* This patch defines a new PGT type called PGT_shared_page and a new syntheticKeir Fraser2009-12-171-0/+4
| | | | | | | | | | domain called 'dom_cow'. In order to share a page, the type needs to be changed to PGT_shared_page and the owner to dom_dow. Only pages with PGT_none, and no type count are allowed to become sharable. Conversly, sharable pages can only be made 'private' if type count equals one. page_make_sharable() and page_make_private() handle these transitions. Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>
* Base domain structure and public interface to support memory events.Keir Fraser2009-12-171-0/+1
| | | | Signed-off-by: Patrick Colp <Patrick.Colp@citrix.com>
* domain builder: multiboot-like module supportKeir Fraser2009-12-111-0/+27
| | | | | | | | | This defines how multiple modules can be passed to a domain by packing them together into a "multiboot module" in a way very similar to the multiboot standard. An SIF_ flag is added to announce such package. This also adds a packing implementation to PV-GRUB. Signed-Off-By: Samuel Thibault <samuel.thibault@ens-lyon.org>
* Hypercall to expose physical CPU information.Keir Fraser2009-11-101-0/+1
| | | | | | | | | | | | It also make some changes to current cpu online/offline logic: 1) Firstly, cpu online/offline will trigger a vIRQ to dom0 for status changes notification. 2) It also add an interface to platform operation to online/offline physical CPU. Currently the cpu online/offline interface is in sysctl, which can't be triggered in kernel. With this change, it is possible to trigger cpu online/offline in dom0 through sysfs interface. Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
* Introduce a grant_entry_v2 structure.Keir Fraser2009-10-071-0/+1
| | | | Signed-off-by: Steven Smith <steven.smith@citrix.com>
* x86: extend mmu_update hypercall to allow update of foreign pagetables.Keir Fraser2009-07-071-9/+17
| | | | Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
* x86_64: allow more vCPU-s per guestKeir Fraser2009-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Since the shared info layout is fixed, guests are required to use VCPUOP_register_vcpu_info prior to booting any vCPU beyond the traditional limit of 32. MAX_VIRT_CPUS, being an implemetation detail of the hypervisor, is no longer being exposed in the public headers. The tools changes are clearly incomplete (and done only so things would build again), and the current state of the tools (using scalar variables all over the place to represent vCPU bitmaps) very likely doesn't permit booting DomU-s with more than the traditional number of vCPU-s. Testing of the extended functionality was done with Dom0 (96 vCPU-s, as well as 128 vCPU-s out of which the kernel elected - by way of a simple kernel side patch - to use only some, resulting in a sparse bitmap). ia64 changes only to make things build, and build-tested only (and the tools part only as far as the build would go without encountering unrelated problems in the blktap code). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Transcendent memory ("tmem") for Xen.Keir Fraser2009-05-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tmem, when called from a tmem-capable (paravirtualized) guest, makes use of otherwise unutilized ("fallow") memory to create and manage pools of pages that can be accessed from the guest either as "ephemeral" pages or as "persistent" pages. In either case, the pages are not directly addressible by the guest, only copied to and fro via the tmem interface. Ephemeral pages are a nice place for a guest to put recently evicted clean pages that it might need again; these pages can be reclaimed synchronously by Xen for other guests or other uses. Persistent pages are a nice place for a guest to put "swap" pages to avoid sending them to disk. These pages retain data as long as the guest lives, but count against the guest memory allocation. Tmem pages may optionally be compressed and, in certain cases, can be shared between guests. Tmem also handles concurrency nicely and provides limited QoS settings to combat malicious DoS attempts. Save/restore and live migration support is not yet provided. Tmem is primarily targeted for an x86 64-bit hypervisor. On a 32-bit x86 hypervisor, it has limited functionality and testing due to limitations of the xen heap. Nearly all of tmem is architecture-independent; three routines remain to be ported to ia64 and it should work on that architecture too. It is also structured to be portable to non-Xen environments. Tmem defaults off (for now) and must be enabled with a "tmem" xen boot option (and does nothing unless a tmem-capable guest is running). The "tmem_compress" boot option enables compression which takes about 10x more CPU but approximately doubles the number of pages that can be stored. Tmem can be controlled via several "xm" commands and many interesting tmem statistics can be obtained. A README and internal specification will follow, but lots of useful prose about tmem, as well as Linux patches, can be found at http://oss.oracle.com/projects/tmem . Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* xen public: make mmuext_op's vcpumask field constKeir Fraser2009-05-141-2/+2
| | | | | | | | | Linux started to pass around pointers to 'const cpumask_t' a while ago, and passing such a pointer to set_xen_guest_handle() requires that the field be a handle for a constant type in order to avoid compiler warnings. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Page offline support in Xen sideKeir Fraser2009-03-061-0/+3
| | | | | | | | | | | | This patch add support to offline a page. The basical idea is, when a page is assigned, it will be marked offline pending and be moved out of buddy when freed, when a page is free, it will be moved out of buddy directly. One notice after this change is, now the page->count_info is not always 0, especially for shadow page, since the PGC_offlining bit may be set. Signed-off-by: Wang, Shane <shane.wang@intel.com> Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
* x86-64: guest directed placement of initial p->m mapKeir Fraser2009-01-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | By adding another ELF note, the kernel can now direct the hypervisor (for Dom0) and in the future also the tools (for DomU-s) to place the initial phys->mach translation table at other than an address immediately above the kernel/initrd images. This eliminates the size restriction imposed on this table by Linux (the kernel loads above the -2Gb boundary, and hence the entire initial mapping cannot reach or even exceed 2Gb). There are a few items in this patch I'm not particularly happy with, but couldn't think of a better solution: - there is a hidden assumption that pages allocated for the domain are put on the domain's page list sequentially - the way backward compatibility is maintained is placing requirements on the kernel side that make the code somewhat convoluted (because it needs to check where the map is actually placed in quite a few places) - code is there to use 1Gb mappings for the hypervisor created table, but lacking a machine with 512G+ memory for immediate testing I can't verify this works; I know that 2Mb mappings work, and hence imply that 1Gb ones would too (of course, if the kernel replaces the table - like Linux does -, it cannot use 2Mb/1Gb mappings or even try to re-use the page table entries, but I don't consider this a problem) Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: highmem handling assistance hypercallsKeir Fraser2008-10-271-1/+13
| | | | | | | | | | | | | | | | | While looking at the origin of very frequently executed hypercalls I realized that the high page accessor functions in Linux would be good candidates to handle in the hypervisor - clearing or copying to/from a high page is a pretty frequent operation (provided there's enough memory in the domain). While prior to the first submission I only measured kernel builds (where the results are not hinting at a meaningful improvement), I now found time to do a more specific analysis: page clearing is being improved by about 20%, page copying doesn't seem to significantly benefit (though that may be an effect of the simplistic copy_page() implementation Xen currently uses) - nevertheless I would think that if one function is supported by the hypervisor, then the other should also be. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Move xen-pm options from dom0 cmdline option to start info.Keir Fraser2008-07-281-0/+1
| | | | | | | Thus to avoid xen-pm being manually enforced by end user in dom0 cmdline but without enabling them in xen. signed-off-by: Wei Gang <gang.wei@intel.com>