aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/shadow.h
Commit message (Collapse)AuthorAgeFilesLines
* 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
* x86/mm: revert 26399:b0e618cb0233 (multiple vram areas)Tim Deegan2013-01-171-0/+6
| | | | | | | | Although this passed my smoke-tests at commit time, I'm now seeing screen corruption on 32-bit WinXP guests. Reverting for now. :( Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* x86/mm: Provide support for multiple frame buffers in HVM guests.Robert Phillips2013-01-171-6/+0
| | | | | | | | | | | | | | | | | | | | | | Support is provided for both shadow and hardware assisted paging (HAP) modes. This code bookkeeps the set of video frame buffers (vram), detects when the guest has modified any of those buffers and, upon request, returns a bitmap of the modified pages. This lets other software components re-paint the portions of the monitor (or monitors) that have changed. Each monitor has a frame buffer of some size at some position in guest physical memory. The set of frame buffers being tracked can change over time as monitors are plugged and unplugged. Signed-off-by: Robert Phillips <robert.phillips@citrix.com> Acked-by: Tim Deegan <tim@xen.org> Removed a stray #include and a few hard tabs. Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* xen: replace XEN_GUEST_HANDLE with XEN_GUEST_HANDLE_PARAM when appropriateStefano Stabellini2012-10-171-1/+1
| | | | | | | | | | | | Note: these changes don't make any difference on x86. Replace XEN_GUEST_HANDLE with XEN_GUEST_HANDLE_PARAM when it is used as an hypercall argument. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xen: remove extern function declarations from C files.Tim Deegan2011-05-261-0/+3
| | | | | | | | Move all extern declarations into appropriate header files. This also fixes up a few places where the caller and the definition had different signatures. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* Per-domain switch to disable oos shadow page tablesKeir Fraser2009-10-191-1/+1
| | | | Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
* Remove guest_physmap_max_mem_pages(), which is no longer usefullyKeir Fraser2008-09-031-2/+0
| | | | | | defined in any architecture. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* shadow: track video RAM dirty bitsKeir Fraser2008-05-021-0/+6
| | | | | | | | | | This adds a new HVM op that enables tracking dirty bits of a range of video RAM. The idea is to optimize just for the most common case (only one guest mapping, with sometimes some temporary other mappings), which permits to keep the overhead on shadow as low as possible. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* [XEN] Make common log-dirty paging code and add HAP log-dirty support.Tim Deegan2007-06-111-10/+8
| | | | Signed-off-by: Wei Huang <wei.huang2@amd.com>
* hvm: Take care when checking ->is_compat flag now that HVM as well askfraser@localhost.localdomain2007-04-261-10/+0
| | | | | PV guests can assert it. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Add arch hook for max_mem domctl.Hollis Blanchard2007-03-011-0/+2
| | | | | | | | | | | | This patch introduces an arch hook in the MAX_MEM hcall. In particular, PowerPC will use this hook to create/update a p2m mapping array. This patch introduces the hook only and should compile away on all arches. Signed-off-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> --HG-- extra : transplant_source : %BD%0B%97%A5i%FE%9F%5C%99%C2%01S%80%B6%C0%F0%82_l%A3
* [XEN] Allow log-dirty mode to be enabled on already-shadowed domains.Tim Deegan2007-02-261-2/+3
| | | | | and catch a few missing mark_dirty() calls Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] New paging-assistance interface.Tim Deegan2007-02-141-359/+18
| | | | | | | | | | | Adds paging_* functions, wrapping the existing shadow_* ones, so that later hardware paging assistance can be hooked in at this level. Separates p2m maintenance code into its own files. Adjusts shadow code to comply with the new interfaces. Changes all callers in arch/x86 to use the new interfaces. Signed-off-by: Wei Huang <Wei.Huang2@amd.com> Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] When removing pages, drop shadow refs before complaining about refcount.Tim Deegan2007-02-081-2/+3
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* Preliminary, likely incomplete and/or wrong, adjustments to shadow code.Emmanuel Ackaouy2007-01-051-0/+8
| | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Enable compatibility mode operation for HYPERVISOR_domctl. Also add logicEmmanuel Ackaouy2007-01-051-1/+1
| | | | | | | to switch a domain to/from compatibility mode (supposed to happen early after domain creation only). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* [XEN] Update comments to reflect cset 13059:6cbed96fedacTim Deegan2006-12-211-5/+3
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] Clean up the shadow interfaceTim Deegan2006-12-201-345/+123
| | | | | | Remove a lot of unneccesary things from shadow.h, and move the shadow lock entirely inside the shadow code. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] Skip shadowing of guest PTE writes when known to be safeTim Deegan2006-12-201-1/+2
| | | | | That is, when the guest replaces a not-present pte with another one Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] Better diagnostics of recursive shadow faultsTim Deegan2006-12-201-3/+3
| | | | | Give a trace of the recursive fault instead of BUG()ing in the shadow handler. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] The shadow FAST_FAULT_PATH optimisation assumes that pages neverssmith@localhost.localdomain2006-12-111-0/+3
| | | | | | | | | | transition between mmio and RAM-backed. This isn't true after a an add_to_physmap memory op. Fix this by just blowing the shadow tables after every such operation; they're rare enough that the performance hit is not a concern. Signed-off-by: Steven Smith <sos22@cam.ac.uk> Acked-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Cache segment-register contents during PTE-update emulations.kfraser@localhost.localdomain2006-12-011-4/+4
| | | | | | Also clean up page-fault propagation to inject the correct error code and CR2 value. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Remove valid_mfn().Tim Deegan2006-11-281-6/+0
| | | | | Since cset 12568 removed VALID_MFN(), valid_mfn() is just confusing. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] Remove VALID_MFN(); replace uses with mfn_valid().kfraser@localhost.localdomain2006-11-271-2/+2
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Pin l3 shadows of older x86_64 linux guests.Tim Deegan2006-11-231-19/+2
| | | | | | | | Older x86_64 linux kernels use one l4 table per cpu and context switch by changing an l4 entry pointing to an l3 table. If we're shadowing them we need to pin l3 shadows to stop them being torn down on every context switch. (But don't do this for normal 64bit guests). Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] Don't call domain_crash_synchronous() with shadow lock held.Tim Deegan2006-11-231-5/+0
| | | | | Call domain_crash() and propagate an error to the caller instead. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] Simplify the shadow hash table.Tim Deegan2006-11-231-18/+0
| | | | | | | Chain hash buckets through the shadow page_info structs instead of in separately allocated structures. This lets us get rid of some xenheap allocations and a domain_crash_synchronous() call. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] Use a separate struct shadow_page_info for shadow pagesTim Deegan2006-11-231-26/+0
| | | | | and move the definitions of shadow types etc out of public headers. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] Track high-water-mark of p2m mapTim Deegan2006-11-151-7/+50
| | | | | | and so avoid some unnecessary __copy_from_user faults. Also tidy the p2m functions generally. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] Fix shadow-lock macro backslash alignments.kfraser@localhost.localdomain2006-11-031-17/+17
| | | | Signed-off-by: Xin Li <xin.b.li@intel.com>
* [HVM] Move shadow initialisation into domain-creation hypercall.kfraser@localhost.localdomain2006-11-011-0/+3
| | | | | | | | | | | Allocate HVM guest memory in the libxc builder function rather than in xend. Clean up fall out from these changes. Todo: Fix ia64. Move PV builder to same model (it should allocate the memory rather than xend doing so -- then it can avoid using xc_get_pfn_list()). Signed-off-by: Keir Fraser <keir@xensource.com>
* [HVM] HVM is now a flag parameter to domain-creation hypercall.kfraser@localhost.localdomain2006-11-011-2/+2
| | | | | | This cleans up HVM start-of-day in Xen and means that the HVM status of a domain is maintained from cradle to grave. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Prefetch multiple shadow entries per pagefaultTim Deegan2006-11-011-1/+3
| | | | | | | Also, clean up the shadow *_propagate/fault routines. This allows us to quickly dispatch some guest-not-present faults and most MMIO accesses without taking the shadow lock. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Use correct types for guest physical addressesTim Deegan2006-10-311-17/+6
| | | | | | Guest physical addresses are not guaranteed to fit in either a pointer or an unsigned long int; use paddr_t for them. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] Don't keep shadows of PAE guest l3 tables.Tim Deegan2006-10-171-3/+0
| | | | | | | | | | | Holding pages readonly that have guest PAE l3 tables in them means a performance hit and potential bug if the guest puts other datastructures on the same page as an l3 table. Instead of shadowing them, treat PAE guests as if they had four CR3 registers, and load all four top-level entries when we handle a CR3 write. This also cuts about 500 lines of special-case refcounting and re-copying code. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] Don't kill shadowed guest for writing bogus PTEs.Tim Deegan2006-10-171-2/+2
| | | | | | | | If a guest writes a "bad" pagetable entry and we fail to unshadow the page, don't kill the guest. This makes the behaviour the same as if the bad PTE were already in place when we shadowed the page. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] Support lightweight shadow-translate PV guests, for paravirt-ops.Tim Deegan2006-09-281-2/+80
| | | | | This is a modified subset of Michael Fetterman's shadow-translate work. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] Fix interaction between tlbflush timestamp and shadow flagsTim Deegan2006-09-281-0/+5
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] Shadow mode no longer obtains page type references.kfraser@localhost.localdomain2006-09-211-9/+4
| | | | | | | | | | | | | This allows the shadow destructor hook in free_page_type() to work properly. Also, move mark_dirty() back to alloc/free_page_type(). It doesn't matter that this happens before the type count is modified -- bitmap is extracted by the tools with the domain paused, so these non-blocking paths are atomic from p.o.v of the tools. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Clean up mark_dirty() usage in mm.c some more.kfraser@localhost.localdomain2006-09-201-4/+9
| | | | | | Add clarifying comments. Move mark_dirty() in alloc_page_type() to end of the function (more correct). Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Rename shadow2 to shadow and move the various sourcekaf24@localhost.localdomain2006-08-281-14/+598
| | | | | files into a sensible directory hierarchy. Signed-off-by: Keir Fraser <keir@xensource.com>
* Replace shadow pagetable code with shadow2.tdeegan@york.uk.xensource.com2006-08-161-1773/+18
|
* Whitespace clean-ups. shand@kneesaa.uk.xensource.com2006-08-161-4/+4
| | | | | Signed-off-by: Steven Hand <steven@xensource.com>
* [HVM] Make copy_{to,from}_guest work for HVM domains.kfraser@localhost.localdomain2006-08-031-0/+7
| | | | | Signed-off-by: Steven Smith <ssmith@xensource.com>
* [HVM][VMX][PAE] Enable PAE VMX guest on PAE host.kaf24@firebug.cl.cam.ac.uk2006-06-191-6/+38
| | | | | | | | The PAE VMX guest supports NX bit and can do kernel build successfully. Signed-off-by: Jun Nakajima <jun.nakajima@intel.com> Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
* [HVM] Fix set_guest_back_ptr to ignore empty PTEs.kfraser@dhcp93.uk.xensource.com2006-06-011-16/+19
| | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [HVM] Fix shadow mode to not corrupt frame 0's page_info struct.kaf24@firebug.cl.cam.ac.uk2006-05-311-3/+9
| | | | | Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
* Revert accidental commit.emellor@leeni.uk.xensource.com2006-03-291-44/+0
| | | | | Signed-off-by: Ewan Mellor <ewan@xensource.com>
* Merged.emellor@leeni.uk.xensource.com2006-03-291-0/+44
|
* Free shadows of any pages which are released by a domain back to Xen.cl349@firebug.cl.cam.ac.uk2006-03-291-0/+3
| | | | | | | | This should fix the "Assertion '! IS_INVALID_M2P_ENTRY(gpfn)'"-crash in free_shadow_page on domain destruction. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>