aboutsummaryrefslogtreecommitdiffstats
path: root/xen
Commit message (Collapse)AuthorAgeFilesLines
* arm: introduce more hypercallsStefano Stabellini2012-03-144-0/+34
| | | | | | | | Implement xen_version, event_channel_op, memory_op sysctl and physdev_op hypercalls. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: handle dom0_max_vcpus=0 case properlyIan Campbell2012-03-141-5/+6
| | | | | | | | Also use xzalloc_array. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: fix inflight_irqs list priority orderingStefano Stabellini2012-03-141-2/+2
| | | | | | | | | Lower priority integers mean higher priority. Also when we are about to insert the lowest priority IRQ so far, add it at the end. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: rename link to inflightStefano Stabellini2012-03-143-8/+10
| | | | | | | | The link field in pending_irq has a confusing name so rename it to inflight and comment its behaviour. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: use r12 to pass the hypercall numberStefano Stabellini2012-03-132-11/+45
| | | | | | | | | | | | | | | | | | | ** This is a guest visible ABI change which requires an updated guest kernel ** Use r12 to pass the hypercall number and r0-r4 for the hypercall arguments. Use the ISS to pass an hypervisor specific tag. Remove passing unused registers to arm_hypercall_table: we don't have 6 arguments hypercalls and we never use 64 bit values as hypercall arguments, 64 bit values are only contained within structs passed as arguments. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> [ use #ifndef NDEBUG, fix coding style, expand calling convention comment slightly and added a big fat note about ABI change - ijc ] Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: Put the CPU into a sleep state in the idle loopTim Deegan2012-03-131-1/+5
| | | | | | | | | The ARM doesn't actually say that the WFI instruction will return immediately if CPSR.I is clear and an instruction is pending, but this seems to match up with how linux uses it. Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: Actually free __init/__initdata ranges on bootTim Deegan2012-03-134-26/+83
| | | | | Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: new hook for late MMU setup on secondary CPUsTim Deegan2012-03-133-0/+10
| | | | | | | | | The boot CPU turns on W^X in setup_pagetables(). Do the same for other CPUs after they boot. If we go to per-CPU pagetables, this is where that will happen. Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: Shutdown and rebootTim Deegan2012-03-132-5/+54
| | | | | | | | | Reboot runes grabbed from linux's SP810 reset function. Doesn't seem to work on the model, though. Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: SMP CPU shutdownTim Deegan2012-03-135-10/+71
| | | | | | | For completeness, also implelent the CPU shutdown path. Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: Boot secondary CPUs into CTim Deegan2012-03-136-19/+100
| | | | | | | | | Secondary CPUs come up directly onto the stack of the appropriate idle vcpu; the boot CPU starts on a statically allocated stack and switches over to the idle vcpu's one once the idle domain has been built. Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: start plumbing in SMP bringup in CTim Deegan2012-03-133-17/+36
| | | | | | | | Still a noop, but no longer just a dummy symbol. Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: per-cpu areasTim Deegan2012-03-136-5/+97
| | | | | | Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: More SMP bringupTim Deegan2012-03-135-36/+119
| | | | | | | | | | | | Bring non-boot CPUs up as far as running on the relocated pagetables, one at a time, before the non-relocated copy of Xen gets reused for general memory pools. Don't yet bring them up into C; that will happen later when stacks are allocated. Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: Add a comment explaining the GICD writes in the GICC init functionTim Deegan2012-03-131-1/+3
| | | | | Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: implement udelay()Tim Deegan2012-03-133-3/+11
| | | | | Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* x86/mm: drop gfn ref before calling handle_mmio()Tim Deegan2012-03-091-1/+3
| | | | | | | | Otherwise we get a deadlock between the p2m lock and the event lock, which handle_mmio() acquires. Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
* low-mem virq: Parentheses around ternary operator in check_low_mem_virq()Keir Fraser2012-03-091-1/+1
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* x86/mm: Fix mem event error message typosTim Deegan2012-03-081-3/+3
| | | | | | Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* x86/mm: Clean up mem event structures on domain destructionTim Deegan2012-03-085-2/+24
| | | | | | | | | Otherwise we wind up with zombie domains, still holding onto refs to the mem event ring pages. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* x86/mm: wire up sharing ringTim Deegan2012-03-083-1/+63
| | | | | | | | | Now that we have an interface close to finalizing, do the necessary plumbing to set up a ring for reporting failed allocations in the unshare path. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* Use a reserved pfn in the guest address space to store mem event ringsTim Deegan2012-03-084-29/+30
| | | | | | | | | | | | | | | | | | 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>
* x86/hvm: refactor calls to prepare and tear down a helper ringTim Deegan2012-03-082-12/+43
| | | | | | | | | These are currently used for the rings connecting Xen with qemu. Refactor them so the same code can be later used for mem event rings. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* Tools: Remove shared page from mem_event/access/paging interfacesTim Deegan2012-03-084-38/+5
| | | | | | | | | | | | | | | | | | | | | | 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>
* x86/cpuidle: improve data arrangementJan Beulich2012-03-081-3/+3
| | | | | | | .. to reduce the amount of holes (wasted space). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* XENPF_set_processor_pminfo XEN_PM_CX overflows states arrayEric Chanudet2012-03-082-41/+38
| | | | | | | | | | | | | | | | | | | | Calling XENPF_set_processor_pminfo with XEN_PM_CX could cause states array in "struct acpi_processor_power" to exceed its limit. The array used to be reset (by function cpuidle_init_cpu()) for each hypercall. The patch puts it back that way and adds an assertion to make it clear in case that happens again. Signed-off-by: Eric Chanudet <eric.chanudet@eu.citrix.com> - convert assertion to printk() & bail - eliminate struct acpi_processor_cx's valid member (not read anymore) - further adjustments to one-time-only vs each-time operations in cpuidle_init_cpu() - don't use ACPI_STATE_Cn as array index anymore Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* oprofile: don't pass around redundant, easily derived argumentsJan Beulich2012-03-087-41/+35
| | | | | | | | | | | Passing both a struct vcpu pointer and the corresponding struct domain one is simply pointless, especially when intermediate functions just forward it without themselves making use of the already obtained value. Also constify a few function parameters. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* ia64: fix build (once more)Jan Beulich2012-03-082-2/+3
| | | | Signed-off-by: Jan Beulich <jbeulich@suse.com>
* Revert 24987:42afd4d1669bKeir Fraser2012-03-081-4/+0
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* hvm: Print support/enable status of HAP superpage mappings.Keir Fraser2012-03-084-8/+13
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* NMI: Command line parameter for watchdog timeoutAndrew Cooper2012-03-083-6/+19
| | | | | | | | | | Introduce a command parameter to set the watchtog timeout. Manually specifying "watchdog_timeout=<seconds>" on the command line will also turn the watchdog on. For consistency, move opt_watchdog into nmi.c along with opt_watchdog_timeout. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* svm: Fake out the Bus Unit Config MSR on revF AMD CPUsGeorge Dunlap2012-03-082-0/+15
| | | | | | | | | | | Win2k8 x64 reads this MSR on revF chips, where it wasn't publically available; it uses a magic constant in %rdi as a password, which we don't have in rdmsr_safe(). Since we'll ignore the later writes, just use a plausible value here (the reset value from rev10h chips) if the real CPU didn't provide one. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* x86: Add more specific logging for get_page_from_l1e failuresGeorge Dunlap2012-03-081-0/+8
| | | | | | | | | | | This patch should clarify which of the two possible reasons cause the messages of the form "(XEN) mm.c:908:d1 Error getting mfn 29b2b (pfn 5555555555555555) from L1 entry 0000000029b2b067 for l1e_owner=1, pg_owner=1". Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* x86: Reduce severity of hvm_op warningsGeorge Dunlap2012-03-082-2/+2
| | | | | Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* x86: Make sure log-dirty is turned off before trying to dismantle itGeorge Dunlap2012-03-081-0/+4
| | | | | Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvm: Add command line option to enable ASID support -- on by defaultGeorge Dunlap2012-03-081-1/+5
| | | | | Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Signed-off-by: Keir Fraser <keir@xen.org>
* Low mem virq incremental adjustmentsAndres Lagar-Cavilla2012-03-081-2/+5
| | | | | | | | | | Consider tmem before firing the virq. Add .gitignore rune. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Committed-by: Keir Fraser <keir@xen.org>
* provide a single, common implementation for get_order_from_{bytes,pages}()Jan Beulich2012-03-074-55/+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>
* passthrough: fix domain ref leak after 24888:71159fb049f2Jan Beulich2012-03-071-0/+2
| | | | | | | As pointed out by Keir. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* Revert 24973:50a70b652b43 "x86: Use deep C states for off-lined CPUs"Keir Fraser2012-03-071-18/+0
| | | | | | applied already Signed-off-by: Keir Fraser <keir@xen.org>
* build: Don't remove user-supplied xen-version during make cleanGeorge Dunlap2012-03-071-1/+1
| | | | | | | | | | | | xen/Makefile is designed to allow the user to supply a file named xen/xen-include to change the format of xen version strings. Unfortunately, "make clean" removes xen/xen*, which will remove this file. Make the clean process more targeted. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* RTC: Add alarm supportYang Zhang2012-03-072-2/+216
| | | | | | | | Use a timer to emulate update cycle. The timer runs only when AIE is set. Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com> Committed-by: Keir Fraser <keir@xen.org>
* RTC: Add RTC update-ended interrupt supportYang Zhang2012-03-072-2/+107
| | | | | | | | Use a timer to emulate update cycle. When update cycle ended and UIE is set, raise an interrupt. The timer runs only when AF is cleared. Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com> Committed-by: Keir Fraser <keir@xen.org>
* RTC: Add UIP(update in progress) check logicYang Zhang2012-03-073-0/+28
| | | | | | | | The UIP(update in progress) is set when RTC is in updating. And the update cycle begins 244us later after UIP is set. Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com> Committed-by: Keir Fraser <keir@xen.org>
* RTC: fix 12-hour modeYang Zhang2012-03-071-4/+16
| | | | | | | Hours in 12-hour mode are in the 1-12 range, not 0-11. Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com> Committed-by: Keir Fraser <keir@xen.org>
* RTC: use offset to caculate rtc clockYang Zhang2012-03-072-165/+17
| | | | | | | | There has no need to run two periodic timer to update RTC time. Use the offset instead. Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com> Committed-by: Keir Fraser <keir@xen.org>
* x86: Use deep C states for off-lined CPUsBoris Ostrovsky2012-03-071-0/+18
| | | | | | | | | Currently when a core is taken off-line it is placed in C1 state (unless MONITOR/MWAIT is used). This patch allows a core to go to deeper C states resulting in significantly higher power savings. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com> Committed-by: Keir Fraser <keir@xen.org>
* Add gtags target for xen/Makefile. Also update .hgignore.Wei Liu2012-03-071-3/+8
| | | | | Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86/xenoprof: fix 32-bit guest stack handling after c/s 24537:3c0a533d3af0Jan Beulich2012-03-061-17/+24
| | | | | | | | | | | | 32-bit guests don't have 64-bit precudrure return addresses - both elements of struct frame_head_32bit should be 32 bits wide, not just the frame link pointer. Further, consolidate the whole handling here (also in the native size guest case) to properly use guest handles and guest memory accessors. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/cpuidle: deny access to the I/O port used for EM_SYSIOJan Beulich2012-03-061-0/+4
| | | | | | | Nothing, not even Dom0, should fiddle with this. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>