aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/mm.h
Commit message (Collapse)AuthorAgeFilesLines
* hypervisor/xen/tools: Remove the XENMEM_get_oustanding_pages and provide the ↵Konrad Rzeszutek Wilk2013-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | data via xc_phys_info During the review of the patches it was noticed that there exists a race wherein the 'free_memory' value consists of information from two hypercalls. That is the XEN_SYSCTL_physinfo and XENMEM_get_outstanding_pages. The free memory the host has available for guest is the difference between the 'free_pages' (from XEN_SYSCTL_physinfo) and 'outstanding_pages'. As they are two hypercalls many things can happen in between the execution of them. This patch resolves this by eliminating the XENMEM_get_outstanding_pages hypercall and providing the free_pages and outstanding_pages information via the xc_phys_info structure. It also removes the XSM hooks and adds locking as needed. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Reviewed-by: Tim Deegan <tim@xen.org> Acked-by: Keir Fraser <keir.xen@gmail.com>
* xen/arm: compile and initialize vmapStefano Stabellini2013-05-081-0/+7
| | | | | | | | | | | | | | | | | Rename EARLY_VMAP_VIRT_END and EARLY_VMAP_VIRT_START to VMAP_VIRT_END and VMAP_VIRT_START. Defining VMAP_VIRT_START triggers the compilation of common/vmap.c. Define PAGE_HYPERVISOR and MAP_SMALL_PAGES (unused on ARM, because we only support 4K pages so as a matter of fact it is always set). Implement map_pages_to_xen and destroy_xen_mappings. Call vm_init from start_xen. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* mmu: Introduce XENMEM_claim_pages (subop of memory ops)Dan Magenheimer2013-03-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When guests memory consumption is volatile (multiple guests ballooning up/down) we are presented with the problem of being able to determine exactly how much memory there is for allocation of new guests without negatively impacting existing guests. Note that the existing models (xapi, xend) drive the memory consumption from the tool-stack and assume that the guest will eventually hit the memory target. Other models, such as the dynamic memory utilized by tmem, do this differently - the guest drivers the memory consumption (up to the d->max_pages ceiling). With dynamic memory model, the guest frequently can balloon up and down as it sees fit. This presents the problem to the toolstack that it does not know atomically how much free memory there is (as the information gets stale the moment the d->tot_pages information is provided to the tool-stack), and hence when starting a guest can fail during the memory creation process. Especially if the process is done in parallel. In a nutshell what we need is a atomic value of all domains tot_pages during the allocation of guests. Naturally holding a lock for such a long time is unacceptable. Hence the goal of this hypercall is to attempt to atomically and very quickly determine if there are sufficient pages available in the system and, if so, "set aside" that quantity of pages for future allocations by that domain. Unlike an existing hypercall such as increase_reservation or populate_physmap, specific physical pageframes are not assigned to the domain because this cannot be done sufficiently quickly (especially for very large allocations in an arbitrarily fragmented system) and so the existing mechanisms result in classic time-of-check-time-of-use (TOCTOU) races. One can think of claiming as similar to a "lazy" allocation, but subsequent hypercalls are required to do the actual physical pageframe allocation. Note that one of effects of this hypercall is that from the perspective of other running guests - suddenly there is a new guest occupying X amount of pages. This means that when we try to balloon up they will hit the system-wide ceiling of available free memory (if the total sum of the existing d->max_pages >= host memory). This is OK - as that is part of the overcommit. What we DO NOT want to do is dictate their ceiling should be (d->max_pages) as that is risky and can lead to guests OOM-ing. It is something the guest needs to figure out. In order for a toolstack to "get" information about whether a domain has a claim and, if so, how large, and also for the toolstack to measure the total system-wide claim, a second subop has been added and exposed through domctl and libxl (see "xen: XENMEM_claim_pages: xc"). == Alternative solutions == There has been a variety of discussion whether the problem hypercall is solving can be done in user-space, such as: - For all the existing guest, set their d->max_pages temporarily to d->tot_pages and create the domain. This forces those domains to stay at their current consumption level (fyi, this is what the tmem freeze call is doing). The disadvantage of this is that needlessly forces the guests to stay at the memory usage instead of allowing it to decide the optimal target. - Account only using d->max_pages of how much free memory there is. This ignores ballooning changes and any over-commit scenario. This is similar to the scenario where the sum of all d->max_pages (and the one to be allocated now) on the host is smaller than the available free memory. As such it ignores the over-commit problem. - Provide a ring/FIFO along with event channel to notify an userspace daemon of guests memory consumption. This daemon can then provide up-to-date information to the toolstack of how much free memory there is. This duplicates what the hypervisor is already doing and introduced latency issues and catching breath for the toolstack as there might be millions of these updates on heavily used machine. There might not be any quiescent state ever and the toolstack will heavily consume CPU cycles and not ever provide up-to-date information. It has been noted that this claim mechanism solves the underlying problem (slow failure of domain creation) for a large class of domains but not all, specifically not handling (but also not making the problem worse for) PV domains that specify the "superpages" flag, and 32-bit PV domains on large RAM systems. These will be addressed at a later time. Code overview: Though the hypercall simply does arithmetic within locks, some of the semantics in the code may be a bit subtle. The key variables (d->unclaimed_pages and total_unclaimed_pages) starts at zero if no claim has yet been staked for any domain. (Perhaps a better name is "claimed_but_not_yet_possessed" but that's a bit unwieldy.) If no claim hypercalls are executed, there should be no impact on existing usage. When a claim is successfully staked by a domain, it is like a watermark but there is no record kept of the size of the claim. Instead, d->unclaimed_pages is set to the difference between d->tot_pages and the claim. When d->tot_pages increases or decreases, d->unclaimed_pages atomically decreases or increases. Once d->unclaimed_pages reaches zero, the claim is satisfied and d->unclaimed pages stays at zero -- unless a new claim is subsequently staked. The systemwide variable total_unclaimed_pages is always the sum of d->unclaimed_pages, across all domains. A non-domain- specific heap allocation will fail if total_unclaimed_pages exceeds free (plus, on tmem enabled systems, freeable) pages. Claim semantics could be modified by flags. The initial implementation had three flag, which discerns whether the caller would like tmem freeable pages to be considered in determining whether or not the claim can be successfully staked. This in later patches was removed and there are no flags. A claim can be cancelled by requesting a claim with the number of pages being zero. A second subop returns the total outstanding claimed pages systemwide. Note: Save/restore/migrate may need to be modified, else it can be documented that all claims are cancelled. This patch of the proposed XENMEM_claim_pages hypercall/subop, takes into account review feedback from Jan and Keir and IanC and Matthew Daley, plus some fixes found via runtime debugging. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Keir Fraser <keir@xen.org>
* x86: support up to 16TbJan Beulich2013-01-231-1/+2
| | | | | | | | | | | | | | This mainly involves adjusting the number of L4 entries needing copying between page tables (which is now different between PV and HVM/idle domains), and changing the cutoff point and method when more than the supported amount of memory is found in a system. Since TMEM doesn't currently cope with the full 1:1 map not always being visible, it gets forcefully disabled in that case. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* xen: centralize accounting for domain tot_pagesDan Magenheimer2012-12-101-0/+2
| | | | | | | | | | Provide and use a common function for all adjustments to a domain's tot_pages counter in anticipation of future and/or out-of-tree patches that must adjust related counters atomically. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Committed-by: Keir Fraser <keir@xen.org>
* xen: fix page_list_splice()Jan Beulich2012-06-061-1/+2
| | | | | | | | | | | | | | | | Other than in __list_splice(), the first element's prev pointer doesn't need adjustment here - it already is PAGE_LIST_NULL. Rather than fixing the assignment (to formally match __list_splice()), simply assert that this assignment is really unnecessary. Reported-by: Jisoo Yang <jisooy@gmail.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Also assert that the prev pointers are both PAGE_LIST_NULL. Signed-off-by: Keir Fraser <keir@xen.org> Committed-by: Keir Fraser <keir@xen.org>
* provide a single, common implementation for get_order_from_{bytes,pages}()Jan Beulich2012-03-071-0/+22
| | | | | | | | | All three per-architecture implementations were identical, and I cannot see how future architectures would need any sort of customization here (the only per-architecture aspect here is the actual PAGE_SHIFT value). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* Add the ability to poll stats about shared memory via the consoleAndres Lagar-Cavilla2012-01-261-0/+3
| | | | | | | Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Signed-off-by: Adin Scannell <adin@scannell.ca> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* x86/mm: Improve ring management for memory events. Do not lose guest eventsAndres Lagar-Cavilla2012-01-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is an amalgamation of the work done by Olaf Hering <olaf@aepfle.de> and our work. It combines logic changes to simplify the memory event API, as well as leveraging wait queues to deal with extreme conditions in which too many events are generated by a guest vcpu. In order to generate a new event, a slot in the ring is claimed. If a guest vcpu is generating the event and there is no space, it is put on a wait queue. If a foreign vcpu is generating the event and there is no space, the vcpu is expected to retry its operation. If an error happens later, the function returns the claimed slot via a cancel operation. Thus, the API has only four calls: claim slot, cancel claimed slot, put request in the ring, consume the response. With all these mechanisms, no guest events are lost. Our testing includes 1. ballooning down 512 MiBs; 2. using mem access n2rwx, in which every page access in a four-vCPU guest results in an event, with no vCPU pausing, and the four vCPUs touching all RAM. No guest events were lost in either case, and qemu-dm had no mapping problems. Signed-off-by: Adin Scannell <adin@scannell.ca> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* force inclusion of xen/config.h through compiler optionJan Beulich2012-01-131-1/+0
| | | | | | | | | | | | | As we expect all source files to include the header as the first thing anyway, stop doing this by repeating the inclusion in each and every source file (and in many headers), but rather enforce this uniformly through the compiler command line. As a first cleanup step, remove the explicit inclusion from all common headers. Further cleanup can be done incrementally. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* Add an exact-node request flag for mem allocations.Keir Fraser2010-07-051-0/+2
| | | | Signed-off-by : Dulloor <dulloor@gmail.com>
* x86: fix Dom0 booting time regressionKeir Fraser2010-05-041-0/+2
| | | | | | | | | | | | | | | | | Unfortunately the changes in c/s 21035 caused boot time to go up significantly on certain large systems. To rectify this without going back to the old behavior, introduce a new memory allocation flag so that Dom0 allocations can exhaust non-DMA memory before starting to consume DMA memory. For the latter, the behavior introduced in aforementioned c/s gets retained, while for the former we can now even try larger chunks first. This builds on the fact that alloc_chunk() gets called with non- increasing 'max_pages' arguments, end hence it can store locally the allocation order last used (as larger order allocations can't succeed during subsequent invocations if they failed once). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Host Numa information in dom0Keir Fraser2010-04-071-0/+1
| | | | | | | | | | 'xm info' command now also gives the cpu topology & host numa information. This will be later used to build guest numa support. The patch basically changes physinfo sysctl, and adds topology_info & numa_info sysctls, and also changes the python & libxc code accordingly. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
* Track free pages live rather than count pages in all nodes/zonesKeir Fraser2009-12-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Trying to fix a livelock condition in tmem that occurs only when the system is totally out of memory requires the ability to easily determine if all zones in all nodes are empty, and this must be checked at a fairly high frequency. So to avoid walking all the zones in all the nodes each time, I'd like a fast way to determine if "free_pages" is zero. This patch tracks the sum of the free pages in all nodes/zones. Since I think the value is modified only when heap_lock is held, it need not be atomic. I don't know this for sure, but suspect this will be useful in other future memory utilization code, e.g. page sharing. This has had limited testing, though I did drive free memory down to zero and up and down a few times with debug on and no asserts were triggered. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* x86-64: reduce range spanned by 1:1 mapping and frame table indexesKeir Fraser2009-09-221-13/+23
| | | | | | | | | | | | | | | | | Introduces a virtual space conserving transformation on the MFN thus far used to index 1:1 mapping and frame table, removing the largest range of contiguous bits (below the most significant one) which are zero for all valid MFNs from the MFN representation, to be used to index into those arrays, thereby cutting the virtual range these tables must cover approximately by half with each bit removed. Since this should account for hotpluggable memory (in order to not requiring a re-write when that gets supported), the determination of which bits are candidates for removal must not be based on the E820 information, but instead has to use the SRAT. That in turn requires a change to the ordering of steps done during early boot. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Replace magic number for NULL (~0) with PAGE_LIST_NULLKeir Fraser2009-09-151-7/+9
| | | | | | ...in the page_list_* functions. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* Replace boot-time free-pages bitmap with a region list.Keir Fraser2009-07-081-4/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Remove page-scrub lists and async scrubbing.Keir Fraser2009-07-021-15/+0
| | | | | | | | The original user for this was domain destruction. Now that this is preemptible all the way back up to dom0 userspace, asynchrony is better iontroduced at that level, if at all, imo. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Introduce page_list_move()Keir Fraser2009-06-181-1/+11
| | | | | | | | | | This not only allows to remove ia64's special implementation of page_list_splice_init(), but also fixes the latent issue with the direct list head assignment in the x86 code if that would ever get switched back to using normal list entries for linking together pages (i.e. whenever x86-64 is to support more tha 16Tb of memory). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Transcendent memory ("tmem") for Xen.Keir Fraser2009-05-261-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* vtd: boolean boot parameter to allow inclusive mapping of all memory below 4GBKeir Fraser2009-03-021-2/+6
| | | | Signed-off-by: Ross Philipson <ross.philipson@citrix.com>
* Eliminate some special page list accessorsKeir Fraser2009-02-041-29/+0
| | | | | | | | | Since page_list_move_tail(), page_list_splice_init(), and page_list_is_eol() are only used by relinquish_memory(), and that function can easily be changed to use more generic accessors, just eliminate them altogether. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86-64: use MFNs for linking together pages on listsKeir Fraser2009-01-301-8/+207
| | | | | | | | | | | | | Unless more than 16Tb are going to ever be supported in Xen, this will allow reducing the linked list entries in struct page_info from 16 to 8 bytes. This doesn't modify struct shadow_page_info, yet, so in order to meet the constraints of that 'mirror' structure the list entry gets artificially forced to be 16 bytes in size. That workaround will be removed in a subsequent patch. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Allow memflags to be specified to alloc_xenheap_pages().Keir Fraser2009-01-281-2/+2
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Rename memory_is_conventional_ram() to page_is_conventional_ram().Keir Fraser2009-01-251-2/+2
| | | | | | It now checks that a whole contiguous page is conventional RAM. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* PoD memory 7/9: Xen interfaceKeir Fraser2009-01-051-0/+2
| | | | | | | | | | | | | | | Implement Xen interface to PoD functionality. * Increase the number of MEMOP bits from 4 to 6 (increasing the number of available memory operations from 16 to 64). * Introduce XENMEMF_populate_on_demand, which will cause populate_physmap() to fill a range with PoD entries rather than backing it with ram * Introduce XENMEM_[sg]et_pod_target operation to the memory hypercall, to get and set PoD cache size. set_pod_target() should be called during domain creation, as well as after modifying the memory target of any domain which may have outstanding PoD entries. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* extract vmcoreinfo from /proc/vmcore for XenKeir Fraser2008-06-131-0/+2
| | | | | | | | | - the machine address and the size of the vmcoreinfo area is returned via the kexec_op(get_range) hypercall - fill the vmcoreinfo data when the kexec_op(crash load) hypercall is called Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
* xen: Allow NUMA node to be specific to alloc_domheap_pages() via a newKeir Fraser2008-04-041-4/+3
| | | | | | | MEMF_node() sub-flag type. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Remove unused function reserve_boot_memory() and alloc_boot_low_page().Keir Fraser2007-07-141-3/+0
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Add new domctl hypercall to expose current heap values. Thiskfraser@localhost.localdomain2007-07-111-0/+2
| | | | | | | | functionality is needed for probing how much memory is available in a given node prior to VM creation. Signed-off-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* xen: New vcpu_op commands for setting periodic and single-shot timers.kfraser@localhost.localdomain2007-03-091-0/+5
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* xen memory alloctor: remove bit width restrictionskfraser@localhost.localdomain2007-02-231-7/+3
| | | | | | | | Hide the (default or user specified) DMA width from anything outside the heap allocator. I/O-capable guests can now request any width for the memory they want exchanged/added. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* xen memory allocator: hide generic allocator routineskfraser@localhost.localdomain2007-02-231-10/+2
| | | | | | | | | This patch doesn't introduce functional changes, but simply moves code around to make the unused (outside of the page allocator) heap alloc functions taking an explicit zone parameter static without having to forward-prototype them in their source file. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* alloc_boot_pages() allocates downwards from high memory.kfraser@localhost.localdomain2007-02-221-2/+5
| | | | | | | | | | | This conserves low memory. Provide new function alloc_boot_low_pages() for those callers who actually require lowmem pages (e.g., below 4GB). Based on a patch by Chris Lalancette <clalance@redhat.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Kexec / Kdump: Generic codeIan Campbell2006-11-301-0/+1
| | | | | | | This patch implements the generic portion of the Kexec / Kdump port to Xen. Signed-Off-By: Magnus Damm <magnus@valinux.co.jp> Signed-Off-By: Simon Horman <horms@verge.net.au>
* Allow DMA address width to be overridden with boot parameters:kfraser@localhost.localdomain2006-11-281-0/+4
| | | | | | | In Xen: dma_bits=28 (for example) In Linux: swiotlb_bits=28 (for example) Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] NUMA-ify Xen heap and page allocatorkfraser@localhost.localdomain2006-10-251-1/+6
| | | | | | | | | | This patch adds a per-node bucket to the heap structure in Xen. During heap initialization the patch determines which bucket to place the memory. We reserve guard pages between node boundaries in the case that said boundary isn't already guarded by the MAX_ORDER boundary to prevent the buddy allocator from merging pages between nodes. Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
* [XEN] vga code cleanups and additions for other architectures.kfraser@localhost.localdomain2006-08-161-0/+3
| | | | | | Based on patches from Hollis Blanchard and Alex Williamson. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Remove batched writable pagetable logic.kfraser@localhost.localdomain2006-08-111-4/+0
| | | | | | | | | Benchmarks show it provides little or no benefit (except on synthetic benchmarks). Also it is complicated and likely to hinder efforts to reduce lockign granularity. Signed-off-by: Keir Fraser <keir@xensource.com>
* [BALLOON] Make the domain0 ballooning logic in xend aware of pages that are ↵kaf24@firebug.cl.cam.ac.uk2006-06-271-0/+1
| | | | | | | | | | | | | | on the page scrub list. This fixes the case where crashing/restarting a domain can cause dom0 to balloon more than necessary. I changed the physinfo dictionary in Python to be in KiB, rather than MiB, to avoid accumulating ugly rounding errors. I tried to avoid changing units anywhere else. Signed-off-by: Charles Coffing <ccoffing@novell.com>
* [XEN] New memory_op XENMEM_exchange. Allows atomickfraser@dhcp93.uk.xensource.com2006-06-161-2/+12
| | | | | | | exchange of one memory reservation for another of the same size, but with different properties. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Re-increase MAX_ORDER to 20 for the time being. Reducingkaf24@firebug.cl.cam.ac.uk2006-06-091-1/+1
| | | | | | breaks domain0 builder. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Reduce default maximum allocation order from 2^20 pages to 2^11.kaf24@firebug.cl.cam.ac.uk2006-06-081-2/+5
| | | | | | | On x86 this corresponds to a maximum aligned contiguous allocation of 8MB. This can be overridden by architectures if need be. Signed-off-by: Keir Fraser <keir@xensource.com>
* Fix build error with debug=y inxen/ia64 by movingkaf24@firebug.cl.cam.ac.uk2006-03-261-0/+3
| | | | | | | | MAX_ORDER definition has moved into a header file. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* Change the location of the shared_info page for auto_translated_physmap guests.cl349@firebug.cl.cam.ac.uk2006-03-091-0/+2
| | | | | | | | | | Instead of putting the page outside of the guests pseudo-physical address space, we put it next to the other pages filled by the domain builder, such that the page is already mapped in the initial pagetables and/or a lowmem-type memory mapping. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* Rename physical-address-related variables and functionskaf24@firebug.cl.cam.ac.uk2006-02-011-10/+36
| | | | | | | | | | | | | | | | to follow a new ocnsistent naming scheme. gpfn is a guest pseudophys frame number. gmfn is a machine frame number (from guest p.o.v.) mfn is a real bona fide machine number. pfn is an arbitrary frame number (used in general-purpose 'polymorphic' functions). pfn_info now called page_info. Signed-off-by: Keir Fraser <keir@xensource.com>
* Attached patch adds a DMA zone to xen, also modifies xen_contig_memory()kaf24@firebug.cl.cam.ac.uk2005-07-291-2/+5
| | | | | | to ask for DMA pages. Signed-off-by: srparish@us.ibm.com
* bitkeeper revision 1.1699.1.1 (42a85f6955KSFCuD5KSRtCwU-dzakQ)kaf24@firebug.cl.cam.ac.uk2005-06-091-10/+11
| | | | | | | | Clean up the page allocator interface a little. In particular physical addresses are now passed as physaddr_t rather than unsigned long (required for 32-bit pae mode). Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1628 (429dc9b7MTwsBkscbFS1sK8SbwJhdg)kaf24@firebug.cl.cam.ac.uk2005-06-011-0/+4
| | | | | | | | Fix domain shutdown so that the new status, and notification to domain0, occur *after* the domain is fully descheduled and its execution state synchronised. Signed-off-by: Keir Fraser <keir@xensource.com>