aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* .gitignore: Add vim swap filesJulien Grall2013-05-102-0/+2
| | | | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> [ ijc -- corrected .hgignore regex syntax ]
* MAINTAINERS: Change tmem maintainerKonrad Rzeszutek Wilk2013-05-101-1/+1
| | | | | | | | Konrad has graduated to becoming an maintainer in the Xen hypervisor. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* x86/mm/shadow: remove dead code for avoiding Xen entries on 32-bit tables.Tim Deegan2013-05-091-28/+21
| | | | | | | | | | | | | | | All non-external-mode (==PV) guests have 4-level pagetables now that the PAE build of Xen is gone. This patch should have no effect, since the condition it removes could never be true anyway: the l2 offset of HYPERVISOR_VIRT_START on 64-bit Xen is much higher than any l2 offset we could have seen in the tables (and indeed bigger than the 'int' type, which clang was complaining about). Actual compat PV guest xen entries are handled by the equivalent test in the 64-bit SHADOW_FOREACH_L2E() below. Reported-by: Julien Grall <julien.grall@linaro.org> Signed-off-by: Tim Deegan <tim@xen.org>
* xen/arm: handle the runstate_memory_areaStefano Stabellini2013-05-081-6/+16
| | | | | | | | Support VCPUOP_register_runstate_memory_area on ARM. Update_runstate_area on context switch. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen: move VCPUOP_register_runstate_memory_area to common codeStefano Stabellini2013-05-082-28/+28
| | | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* xen/arm: initialize vtimer offset to CNTPCTStefano Stabellini2013-05-081-2/+1
| | | | | | | | | | | Currently we initialize the vtimer offset to CNTVCT + CNTVOFF = CNTPCT - CNTVOFF + CNTVOFF = CNTPCT Simply initialize vtimer offset to CNTPCT. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: clear pending irq queues on do_psci_cpu_onStefano Stabellini2013-05-084-2/+31
| | | | | | | | | | | Don't inject irqs to vcpus that are down. Also when (re)activating a vcpu, clear the vgic and gic irq queues: we don't want to inject any irqs that couldn't be handled by the vcpu right before going offline. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: initialize virt_timer and phys_timer with the same values on all vcpusStefano Stabellini2013-05-084-17/+35
| | | | | | | | | | | | | Introduce a domain wide vtimer initialization function to initialize the phys_timer and the virt_timer offsets. Use the domain phys_timer and virt_timer offsets throughout the vtimer code instead of the per-vcpu offsets. Remove the per-vcpu offsets from struct vtimer altogether. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: run the vtimer Xen timers on the pcpu the vcpu is running onStefano Stabellini2013-05-081-2/+4
| | | | | | | | | | | | The Xen physical timer emulator and virtual timer driver use two internal Xen timers: initialize them on the pcpu the vcpu is running on, rather than the processor that it's creating the vcpu. On vcpu restore migrate the phys_timer and the virt_timer to the pcpu the vcpu is running on. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: send IPIs to inject irqs into guest vcpus running on different pcpusStefano Stabellini2013-05-081-0/+4
| | | | | | | | | | | If we need to inject an irq into a VCPU that is running on a different processor, we shouldn't just enqueue the irq into the lr_pending and inflight lists and wait for something to interrupt the guest execution. Send an IPI to the target pcpu so that Xen can inject the new interrupt returning to guest. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: support VCPUOP_register_vcpu_info.Stefano Stabellini2013-05-083-0/+21
| | | | | | | | | | | | We don't want to support the full vcpu_op hypercall interface, just VCPUOP_register_vcpu_info: introduce an internal ARM-only do_arm_vcpu_op function to filter out the vcpu_op hypercalls that we don't want to support. Call do_arm_vcpu_op instead of do_vcpu_op from traps.c. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen: move VCPUOP_register_vcpu_info to common codeStefano Stabellini2013-05-085-116/+117
| | | | | | | | | | | | | | | | Move the implementation of VCPUOP_register_vcpu_info from x86 specific to commmon code. Move vcpu_info_mfn from an arch specific vcpu sub-field to the common vcpu struct. Move the initialization of vcpu_info_mfn to common code. Move unmap_vcpu_info and the call to unmap_vcpu_info at domain destruction time to common code. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* Remove traces of IA-64 architecture supportDaniel Kiper2013-05-082-2/+2
| | | | | | Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Remove tools/libaio/src/syscall-ia64.h fileDaniel Kiper2013-05-081-45/+0
| | | | | | | There is no support for IA-64 architecture in Xen. Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Silently ignore rm and include errors during make distcleanDaniel Kiper2013-05-083-4/+3
| | | | | Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* docs: Remove tmp files during make cleanDaniel Kiper2013-05-081-1/+1
| | | | | Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* stubdom/vtpm: Silently ignore rm errors during make cleanDaniel Kiper2013-05-081-1/+1
| | | | | | Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
* stubdom: Do not create dangling linksDaniel Kiper2013-05-081-5/+0
| | | | | | | | There is not architecture dependent files in libxc hence do not create dangling links. Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* stubdom: Remove xenstore directory during make crosscleanDaniel Kiper2013-05-081-1/+1
| | | | | Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* stubdom: Clean extras/mini-os directory during make cleanDaniel Kiper2013-05-081-0/+1
| | | | | Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* tools/xenstat/libxenstat: Remove src/libxenstat.a file during make cleanDaniel Kiper2013-05-081-1/+1
| | | | | Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/xenmon: Fix typo in MakefileDaniel Kiper2013-05-081-1/+1
| | | | | Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/debugger/kdd: Remove dependencies files during make cleanDaniel Kiper2013-05-081-1/+1
| | | | | | | Remove dependencies files during make clean. Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: don't write physical-device node for driver domain disksRoger Pau Monne2013-05-081-1/+2
| | | | | | | | | This will be handled by the driver domain itself, since the toolstack does not have access to the physical device because it is in a different domain. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: don't execute hotplug scripts if device is on a driver domainRoger Pau Monne2013-05-081-0/+7
| | | | | | | | Prevent hotplug script execution from libxl if device is on a different domain. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: correctly parse storage devices on driver domainsRoger Pau Monne2013-05-081-0/+6
| | | | | | | | | | | | | | Don't try to check physical devices if they belong to a domain different than the one where the toolstack is running. This prevents the following error when trying to use storage driver domains: libxl: debug: libxl_create.c:1246:do_domain_create: ao 0x1819240: create: how=(nil) callback=(nil) poller=0x1818fa0 libxl: debug: libxl_device.c:235:libxl__device_disk_set_backend: Disk vdev=xvda spec.backend=phy libxl: debug: libxl_device.c:175:disk_try_backend: Disk vdev=xvda, backend phy unsuitable as phys path not a block device libxl: error: libxl_device.c:278:libxl__device_disk_set_backend: no suitable backend for disk xvda Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* docs: canonicalize representation of boolean type in xl.cfgWei Liu2013-05-081-14/+16
| | | | | | | | | The representations of boolean type in xl docs are inconsistent. This patch replaces occurences of "1", "0", "[Tt]rue" and "[Ff]alse" with "[Tt]rue (1)" and "[Ff]alse (0)". Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* hotplug/Linux: add iscsi block hotplug scriptRoger Pau Monne2013-05-082-0/+155
| | | | | | | | | | This hotplug script has been tested with IET and NetBSD iSCSI targets, without authentication. This hotplug script will only work with PV guests not using pygrub. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xen/gic: EOI irqs on the right pcpuStefano Stabellini2013-05-083-1/+24
| | | | | | | | | | | | | | We need to write the irq number to GICC_DIR on the physical cpu that previously received the interrupt, but currently we are doing it on the pcpu that received the maintenance interrupt. As a consequence if a vcpu is migrated to a different pcpu, the irq is going to be EOI'ed on the wrong pcpu. This covers the case where dom0 vcpu0 is running on pcpu1 for example (you can test this scenario by using xl vcpu-pin). Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: implement smp_call_functionJulien Grall2013-05-088-90/+134
| | | | | | | | Move smp_call_function and on_selected_cpus to common code. Signed-off-by: Julien Grall <julien.grall@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* xen/arm: implement map_domain_page_global and unmap_domain_page_globalStefano Stabellini2013-05-081-0/+11
| | | | | | | The implementation uses vmap and vunmap. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: compile and initialize vmapStefano Stabellini2013-05-086-13/+112
| | | | | | | | | | | | | | | | | 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>
* xen/arm: implement arch_vmap_virt_endStefano Stabellini2013-05-081-8/+17
| | | | | | | | | | | | Move virt_start out of ioremap and rename it to early_vmap_start. Implement arch_vmap_virt_end by returning early_vmap_start. Allocate virtual addresses in early_ioremap from top to bottom so that later on when we initialize vmap, we can return the end of the vmap address space (the last address allocated by early_ioremap). Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: support for guest SGIStefano Stabellini2013-05-082-10/+78
| | | | | | | | Trap writes to GICD_SGIR, parse the requests, inject SGIs into the right guest vcpu. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen: move for_each_set_bit to xen/bitops.hStefano Stabellini2013-05-0811-20/+20
| | | | | | | | Move for_each_set_bit from asm-x86/bitops.h to xen/bitops.h. Replace #include <asm/bitops.h> with #include <xen/bitops.h> everywhere. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* xen/arm: allocate secondaries dom0 vcpusStefano Stabellini2013-05-081-1/+11
| | | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: basic PSCI support, implement cpu_on and cpu_offStefano Stabellini2013-05-086-1/+149
| | | | | | | | Implement support for ARM Power State Coordination Interface, PSCI in short. Support only HVC calls. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: trap SMC instructions and inject an UND exceptionIan Campbell2013-05-084-2/+67
| | | | | | | | Currently only handles 32 bit guests. The 64-bit exception model is considerably different. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xen/arm: trap guest WFIStefano Stabellini2013-05-085-11/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | Trap guest WFI, block the guest VCPU unless it has pending interrupts (WFI should return if any interrupts arrive even if interrupts are disabled). Awake the guest vcpu when a new interrupt for it arrives. Introduce gic_events_need_delivery: it checks whether the current vcpu has any interrupts that need to be delivered either on the lrs or in lr_pending. Properly implement local_events_need_delivery: check if the guest disabled interrupts, if they aren't disabled, return positive if gic_events_need_delivery returns positive. Otherwise we still need to check whether evtchn_upcall_pending is set but no VGIC_IRQ_EVTCHN_CALLBACK irqs are in flight: it could be the race described by commit db453468d92369e7182663fb13e14d83ec4ce456 "arm: vgic: fix race between evtchn upcall and evtchnop_send". If that is the case it means that an event needs to be injected. If all these tests are negative then no events need to be delivered. Implement local_event_delivery_enable by clearing PSR_IRQ_MASK. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* x86: Fix efi directory cleanupDaniel Kiper2013-05-072-5/+2
| | | | | | | | clean target is never called from xen/arch/x86/efi/Makefile. Move all needed stuff to xen/arch/x86/Makefile and additionally remove efi.lds. Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
* netif: define XEN_NETIF_NR_SLOTS_MIN in public headerWei Liu2013-05-071-0/+18
| | | | | | | | | | Xen network protocol has implicit dependency on MAX_SKB_FRAGS. In order to remove dependency on MAX_SKB_FRAGS, we derive a constant from historical MAX_SKB_FRAGS for future reference. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* netif: define XEN_NETIF_MAX_TX_SIZE in public headerWei Liu2013-05-071-0/+1
| | | | | | | | | This is the maximum supported size of a packet. It comes from the size of netif_tx_request.size. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* rename IS_PRIV to is_hardware_domainDaniel De Graaf2013-05-076-26/+42
| | | | | | | | | | | Since the remaining uses of IS_PRIV are actually concerned with the domain having control of the hardware (i.e. being the initial domain), clarify this by renaming IS_PRIV to is_hardware_domain. This also removes IS_PRIV_FOR since the only remaining user was xsm/dummy.h. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> (for 4.3 release) Acked-by: Keir Fraser <keir@xen.org>
* common: remove rcu_lock_target_domain_by_idDaniel De Graaf2013-05-072-48/+0
| | | | | | | | | | This function (and rcu_lock_remote_target_domain_by_id) has no remaining users, having been replaced with XSM hooks and the other rcu_lock_* functions. Remove it. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> (for 4.3 release) Acked-by: Keir Fraser <keir@xen.org>
* arm: remove rcu_lock_target_domain_by_id usersDaniel De Graaf2013-05-075-8/+47
| | | | | | | | | | This function has been replaced with rcu_lock_domain_by_any_id and an XSM check. Two callers already had an XSM check; add a check to the third. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> (for 4.3 release) Acked-by: Ian Campbell <ian.campbell@citrix.com> (for thae ARM bits)
* xsm: add hooks for claimDaniel De Graaf2013-05-077-9/+51
| | | | | | | | | | | Adds XSM hooks for the recently introduced XENMEM_claim_pages and XENMEM_get_outstanding_pages operations, and adds FLASK access vectors for them. This makes the access control decisions for these operations match those in the rest of the hypervisor. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> (for 4.3 release) Acked-by: Keir Fraser <keir@xen.org>
* x86: handle paged gfn in wrmsr_hypervisor_regsOlaf Hering2013-05-073-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If xenpaging is started very early for a guest the gfn for the hypercall page may be paged-out already. This leads to a guest crash: ... (XEN) HVM10: Allocated Xen hypercall page at 169ff000 (XEN) traps.c:654:d10 Bad GMFN 169ff (MFN 3e900000000) to MSR 40000000 (XEN) HVM10: Detected Xen v4.3 (XEN) io.c:201:d10 MMIO emulation failed @ 0008:c2c2c2c2: 18 7c 55 6d 03 83 ff ff 10 7c (XEN) hvm.c:1253:d10 Triple fault on VCPU0 - invoking HVM shutdown action 1. (XEN) HVM11: HVM Loader ... Update return codes of wrmsr_hypervisor_regs, update callers to deal with the new return codes: 0: not handled 1: handled -EAGAIN: retry Currently wrmsr_hypervisor_regs will not return the following error, it will be added in a separate patch: -EINVAL: error during handling Also update the gdprintk to handle a page value of NULL to avoid printing a bogus MFN value. Update also computing of MSR value in gdprintk, the idx was always zero. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Keir Fraser <keir@xen.org>
* AMD IOMMU: fill msi_desc fields required by commit fe017c59Jan Beulich2013-05-071-3/+10
| | | | | | | | | Since the AMD IOMMU code relies on the x86 generic MSI code, it also needs to be updated to match "x86/MSI: cleanup to prepare for multi- vector MSI". Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Suravee Suthikulanit <suravee.suthikulpanit@amd.com>
* Config.mk: update QEMU_TAG and QEMU_UPSTREAM_REVISION for 4.3.0-rc14.3.0-rc1Ian Jackson2013-05-071-2/+2
| | | | Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* README: update version numberIan Jackson2013-05-071-10/+5
| | | | | | | | Updated the figlet version number to "Xen 4.3-rc". Also remove the paragraph touting the benefits of Xen 4.2. At some point we should replace it with a paragraph touting the benefits of Xen 4.3. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>