aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch
Commit message (Collapse)AuthorAgeFilesLines
...
* x86/microcode: Scan the initramfs payload for microcode blobKonrad Rzeszutek Wilk2013-09-271-15/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Linux kernel is able to update the microcode during early bootup via inspection of the initramfs blob to see if there is an cpio image with certain microcode files. Linux is able to function with two (or more) cpio archives in the initrd b/c it unpacks all of the cpio archives. The format of the early initramfs is nicely documented in Linux's Documentation/x86/early-microcode.txt: Early load microcode ==================== By Fenghua Yu <fenghua.yu@intel.com> Kernel can update microcode in early phase of boot time. Loading microcode early can fix CPU issues before they are observed during kernel boot time. Microcode is stored in an initrd file. The microcode is read from the initrd file and loaded to CPUs during boot time. The format of the combined initrd image is microcode in cpio format followed by the initrd image (maybe compressed). Kernel parses the combined initrd image during boot time. The microcode file in cpio name space is: kernel/x86/microcode/GenuineIntel.bin During BSP boot (before SMP starts), if the kernel finds the microcode file in the initrd file, it parses the microcode and saves matching microcode in memory. If matching microcode is found, it will be uploaded in BSP and later on in all APs. The cached microcode patch is applied when CPUs resume from a sleep state. There are two legacy user space interfaces to load microcode, either through /dev/cpu/microcode or through /sys/devices/system/cpu/microcode/reload file in sysfs. In addition to these two legacy methods, the early loading method described here is the third method with which microcode can be uploaded to a system's CPUs. The following example script shows how to generate a new combined initrd file in /boot/initrd-3.5.0.ucode.img with original microcode microcode.bin and original initrd image /boot/initrd-3.5.0.img. mkdir initrd cd initrd mkdir kernel mkdir kernel/x86 mkdir kernel/x86/microcode cp ../microcode.bin kernel/x86/microcode/GenuineIntel.bin find .|cpio -oc >../ucode.cpio cd .. cat ucode.cpio /boot/initrd-3.5.0.img >/boot/initrd-3.5.0.ucode.img As such this code inspects the initrd to see if the microcode signatures are present and if so updates the hypervisor. The option to turn this scan on/off is gated by the 'ucode' parameter. The options are now: 'scan' Scan for the microcode in any multiboot payload. <index> Attempt to load microcode blob (not the cpio archive format) from the multiboot payload number. This option alters slightly the 'ucode' parameter by only allowing either parameter: ucode=[<index>|scan] Implementation wise the ucode_blob is defined as __initdata. That is OK from the viewpoint of suspend/resume as the the underlaying architecture microcode (microcode_intel or microcode_amd) end up saving the blob in 'struct ucode_cpu_info' which is a per-cpu data structure (see ucode_cpu_info). They end up saving it when doing the pre-SMP (for CPU0) and SMP (for the rest) microcode loading. Naturally if one does a hypercall to update the microcode and it is newer, then the old per-cpu data is replaced. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Keir Fraser <keir@xen.org>
* xen/arm: print the location of the Xen heap on 32 bitIan Campbell2013-09-261-2/+4
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Julien Grall <julien.grall@linaro.org> Acked-by: Tim Deegan <tim@xen.org>
* xen/arm: rename boot misc region to boot reloc now it has a single purposeIan Campbell2013-09-261-2/+2
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Julien Grall <julien.grall@linaro.org> Acked-by: Tim Deegan <tim@xen.org>
* xen/arm: Support dtb /memreserve/ regionsIan Campbell2013-09-264-7/+72
| | | | | | | | | | | | | This requires a mapping of the DTB during setup_mm. Previously this was in the BOOT_MISC slot, which is clobbered by setup_pagetables. Split it out into its own slot which can be preserved. Also handle these regions as part of consider_modules() and when adding pages to the heaps to ensure we do not locate any part of Xen or the heaps over them. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen/arm: cope with modules outside of "visible" RAMIan Campbell2013-09-261-0/+6
| | | | | | | | | This can happen if modules are in a bank which we can't cope with e.g. due to being non-contiguous. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Julien Grall <julien.grall@linaro.org> Acked-by: Tim Deegan <tim@xen.org>
* xen/arm: do not relocate Xen outside of visible RAMIan Campbell2013-09-261-1/+9
| | | | | | | | | Since we do not handle non-contiguous banks of memory lets avoid relocating Xen into such a bank. Avoids issues such as free_init_memory releasing pages which are outside of the frametable. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen/arm: Reserve FDT via early module mechanismIan Campbell2013-09-261-1/+2
| | | | | | | | | | This will stop us putting any heaps or relocating Xen itself over the FDT. The devicetree will be copied to allocated memory in setup_mm and the original copy will be freed by discard_initial_modules. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen/arm: ensure the xenheap is 32MB alignedIan Campbell2013-09-261-1/+2
| | | | | | | | | | | | My patch 08693f5948d8 "xen: arm: reduce the size of the xen heap to max 1/8 RAM size" unintentionally violated the constraint that the xenheap must be 32MB aligned, since we only explicitly align the end of the heap and xenheap_pages was not a multiple of 32 pages. Round xenheap pages up to a 32MB boundary. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen/arm: Don't dump stack when the VCPU is offlineJulien Grall2013-09-261-0/+6
| | | | | | | | When a VCPU is not yet online, the registers contain garbagge. This will result to call randomly BUG() in show_guest_stack. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen: arm: use new 64-bit zImage magic numbers for Xen binaryIan Campbell2013-09-261-0/+8
| | | | | | | | | | | | | Upstream commit 4370eec05a88 "arm64: Expand arm64 image header" ended up changing the zImage magic (which was actually the initial branch instructio encoding!). The new header has a proper magic number at a fixed location. Switch Xen itself to using this format. Neither the bootwrapper nor the models care about this header themselves and real bootloaders are not widely used, so now is as good a time as any to switch (as upstream have proven) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: handle new 64-bit zImage magic numbersIan Campbell2013-09-261-3/+10
| | | | | | | | | Upstream commit 4370eec05a88 "arm64: Expand arm64 image header" ended up changing the zImage magic (which was actually the initial branch instruction encoding!). The new header has a proper magic number at a fixed location. Support that as well as the original magic. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen/arm: Use the hardware ID to boot correctly secondary cpusJulien Grall2013-09-261-5/+8
| | | | | | | | | Secondary CPUs will spin in head.S until their MPIDR[23:0] correspond to the smp_up_cpu. Actually Xen will set the value with the logical CPU ID which is wrong. Use the cpu_logical_map to get the correct CPU ID. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Dissociate logical and hardware CPU IDJulien Grall2013-09-262-1/+115
| | | | | | | | | | | Introduce cpu_logical_map to associate a logical CPU ID to an hardware CPU ID. This map will be filled during Xen boot via the device tree. Each CPU node contains a "reg" property which contains the hardware ID (ie MPIDR[0:23]). Also move /cpus parsing later so we can use the dt_* API. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Fix assert in send_SGI_oneJulien Grall2013-09-261-1/+1
| | | | | | | The GIC can handle maximum 8 cpus (0...7). The CPU id 7 is still valid. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: gic: Use the correct CPU IDJulien Grall2013-09-261-8/+37
| | | | | | | | | | | | | The GIC mapping of CPU interfaces does not necessarily match the logical CPU numbering. When Xen wants to send an SGI to specific CPU, it needs to use the GIC CPU ID. It can be retrieved from ITARGETSR0, in fact when this field is read, the GIC will return a value that corresponds only to the processor reading the register. So Xen can use the PPI 0 to initialize the mapping. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Initialize correctly IRQ routingJulien Grall2013-09-261-1/+2
| | | | | | | | | | | | When Xen initialize the GIC distributor, we need to route all the IRQs to the boot CPU. The CPU ID can differ between Xen and the GIC. When ITARGETSR0 is read, each field will return a value that corresponds only to the processor reading the register. So Xen can use the PPI 0 to initialize correctly the routing. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: use cpumask_t to describe cpu mask in gic_route_dt_irqJulien Grall2013-09-262-11/+15
| | | | | | | Replace by cpumask_t to take advantage of cpumask_* helpers. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Introduce init_info structureJulien Grall2013-09-265-5/+17
| | | | | | | | This structure will gather all information to boot a secondary cpus. For now it just contains the initial stack. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* x86: fix compat guest handling of XENPF_enter_acpi_sleepJan Beulich2013-09-261-11/+7
| | | | | | | | | | | | | Rather than blindly defining the native name to the compat one, when we want to pass the compat structure to a native function we ought to verify that their layouts match. With a respective xlat.lst entry there's then also no need anymore to do such aliasing. While cleaaning up that file I also noticed that the Cx and Px interface handling here has quite a few unnecessary #define-s - delete them. Signed-off-by: Jan Beulich <jbeulich@suse.com>
* x86/crash: Indicate how well nmi_shootdown_cpus() managed to doAndrew Cooper2013-09-261-4/+15
| | | | | | | | | | | | | | Having nmi_shootdown_cpus() report which pcpus failed to be shot down is a useful debugging hint as to what possibly went wrong (especially when the crash logs seem to indicate that an NMI timeout occurred while waiting for one of the problematic pcpus to perform an action). This is achieved by swapping an atomic_t count of unreported pcpus with a cpumask. In the case that the 1 second timeout occurs, use the cpumask to identify the problematic pcpus. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/hap: Remove bogus assertion in hap_free_p2m_page()Andrew Cooper2013-09-251-1/+0
| | | | | | | | | | | | | Coverity ID: 1055622 Coverity correctly points out that this ASSERT() is unconditionally true as an unsigned integer is always >= 0. Judging from the shadow counterpart and p2m callsites, there is nothing invalid about freeing the final p2m page. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* x86/xsave: initialize extended register state when guests enable itJan Beulich2013-09-251-0/+15
| | | | | | | | | | | | Till now, when setting previously unset bits in XCR0 we wouldn't touch the active register state, thus leaving in the newly enabled registers whatever a prior user of it left there, i.e. potentially leaking information between guests. This is CVE-2013-1442 / XSA-62. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
* VMX: also use proper instruction mnemonic for VMREADJan Beulich2013-09-236-148/+233
| | | | | | | | | | | ... when assembler supports it, following commit cfd54835 ("VMX: use proper instruction mnemonics if assembler supports them"). This merely got split off from the earlier change becase of the significant number of call sites needing to be changed. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Jun Nakajima <jun.nakajima@intel.com>
* x86/HVM: refuse doing string operations in certain situationsJan Beulich2013-09-231-0/+14
| | | | | | | | | | We shouldn't do any acceleration for - "rep movs" when either side is passed through MMIO or when both sides are handled by qemu - "rep ins" and "rep outs" when the memory operand is any kind of MMIO Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/HVM: linear address must be canonical for the whole accessed rangeJan Beulich2013-09-231-12/+13
| | | | | | | | | | | | ... rather than just for the first byte. While at it, also - make the real mode case at least dpo a wrap around check - drop the mis-named "gpf" label (we're not generating faults here) and use in-place returns instead Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86_emulate: fix wrap around handling for repeated string instructionsJan Beulich2013-09-231-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | For one, repeat count clipping for MOVS must be done taking into consideration both source and destination addresses. And then we should allow a wrap on the final iteration only if either the wrap is a precise one (i.e. the access itself doesn't wrap, just the resulting index register value would) or if there is just one iteration. In all other cases we should do a bulk operation first without hitting the wrap, and then issue an individual iteration. If we don't do it that way, - the last iteration not completing successfully will cause the whole operation to fail (i.e. registers not get updated to the failure point) - hvmemul_virtual_to_linear() may needlessly enforce non-repeated operation Additionally with the prior implementation there was a case (df=1, ea=~0, reps=~0, bytes_per_rep=1) where we'd end up passing zero reps back to the caller, yet various places assume that there's at least on iteration. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* ns16550: make usable on ARMIan Campbell2013-09-211-0/+1
| | | | | | | | | | | | | | There are several aspects to this: - Correctly conditionalise use of PCI - Correctly conditionalise use of IO ports - Add discovery via device tree - Support different registers shift/stride and widths - Add vuart hooks. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Frser <keir@xen.org> Reviewed-by: Jan Beulich <jbeulich@suse.com> Cc: PranavkumarSawargaonkar<pranavkumar@linaro.org>
* xen/arm: replace io{read,write}{l,b} with {read,write}{l,b}Ian Campbell2013-09-214-13/+17
| | | | | | | | | | | | | | | | | | | | We appear to have invented the io versions ourselves for Xen on ARM, while x86 has the plain read/write. (and so does Linux FWIW) read/write are used in common driver code (specifically ns16550) so instead of keeping our own variant around lets replace it with the more standard ones. At the same time resync with Linux making the "based on" comment in both sets of io.h somewhat true (they don't look to have been very based on before...). Our io.h is now consistent with Linux v3.11. Note that iowrite and write take their arguments in the opposite order. Also make asm-arm/io.h useful and include it where necessary instead of picking up the include from mm.h. Remove the include from mm.h Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Julien Grall <julien.grall@linaro.org>
* xen/arm: Implement ioremap.Ian Campbell2013-09-211-0/+5
| | | | | | | Common code uses this, it expects an uncached mapping. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Julien Grall <julien.grall@linaro.org>
* xen: arm: rework placement of fdt in initial dom0 memory mapIan Campbell2013-09-212-11/+39
| | | | | | | | | | | | | | | | The 32-bit Linux kernel uses its lowmem direct mapping to access the FDT. The lowmem mapping is around 0.75GiB but varies depending on the kernel's .config. Our current scheme of loading the FDT as high as 4GB therefore fails with larger amounts of dom0 RAM. The upstream documentation has recently been update to provide more guidance <http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7824/1>. In accordance with this load the kernel just below 128MiB (aligned to 2MB) and the FDT just above, or if there is less RAM available then as high as possible. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Julien Grall <julien.grall@linaro.org>
* xen: arm: improve VMID allocation.Ian Campbell2013-09-212-4/+69
| | | | | | | | | | | | The VMID field is 8 bits. Rather than allowing only up to 256 VMs per host reboot before things start "acting strange" instead maintain a simple bitmap of used VMIDs and allocate them statically to guests upon creation. This limits us to 256 concurrent VMs which is a reasonable improvement. Eventually we will want a proper scheme to allocate VMIDs on context switch. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Julien Grall <julien.grall@linaro.org>
* x86_emulate: fold wide readsJan Beulich2013-09-201-13/+5
| | | | | | | | | | | | | With HVM's MMIO operand handling now being capable of splitting large reads, there's no need to issue at most machine word size reads when we really need wider operands. Not that this is not done everywhere - there are a couple of cases where keeping the reads separate is more natural (and folding them would complicate the code rather than simplifying it). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86_emulate: fix flag setting for 8-bit signed multiplicationJan Beulich2013-09-201-39/+17
| | | | | | | | | | | | | | | We really need to check for a signed overflow of 8 bits, while the previous check compared the sign-extended 8-bit result with the zero-extended 16-bit one (which was wrong for all negative results). Once at it - also adjust the 16-bit comparison for symmetry - improve the 8-bit multiplication (no need to zero-extend to 32-bits the sign-extended to 16 bits original 8-bit value) - fold both signed multiplication variants Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86_emulate: PUSH <mem> must read source operand just onceJan Beulich2013-09-201-46/+48
| | | | | | | | | | | ... for the case of accessing MMIO. Rather than doing the early operand type adjustment for just for that case, do it for all of the 0xF6, 0xF7, and 0xFF groups (allowing some other code to be dropped instead). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86_emulate: MOVSXD must read source operand just onceJan Beulich2013-09-201-10/+21
| | | | | | | | | | | | ... for the case of accessing MMIO. Also streamline the ARPL emulation a little, and add tests for both instructions (the MOVSXD one requires a few other adjustments, as we now need to run in a mode where the emulator's mode_64bit() returns true). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/HVM: properly handle MMIO reads and writes wider than a machine wordJan Beulich2013-09-201-20/+95
| | | | | | | | | Just like real hardware we ought to split such accesses transparently to the caller. With little extra effort we can at once even handle page crossing accesses correctly. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* VMX: fix failure path in construct_vmcsGeorge Dunlap2013-09-181-0/+3
| | | | | | | | | If the allocation fails, make sure to call vmx_vmcs_exit(). This is a candidate for backport. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
* x86/HVM: fix failure path in hvm_vcpu_initialiseGeorge Dunlap2013-09-181-1/+1
| | | | | | | | | | | | | | It looks like one of the failure cases in hvm_vcpu_initialise jumps to the wrong label; this could lead to slow leaks if something isn't cleaned up properly. I will probably change these labels in a future patch, but I figured it was better to have this fix separately. This is also a candidate for backport. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
* ARM: parse separate DT properties for different commandlinesAndre Przywara2013-09-171-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we use the chosen/bootargs property as the Xen commandline and rely on xen,dom0-bootargs for Dom0. However this brings issues with bootloaders, which usually build bootargs by bootscripts for a Linux kernel - and not for the entirely different Xen hypervisor. Introduce a new possible device tree property "xen,xen-bootargs" explicitly for the Xen hypervisor and make the selection of which to use more fine grained: - If xen,xen-bootargs is present, it will be used for Xen. - If xen,dom0-bootargs is present, it will be used for Dom0. - If xen,xen-bootargs is _not_ present, but xen,dom0-bootargs is, bootargs will be used for Xen. Like the current situation. - If no Xen specific properties are present, bootargs is for Dom0. - If xen,xen-bootargs is present, but xen,dom0-bootargs is missing, bootargs will be used for Dom0. The aim is to allow common bootscripts to boot both Xen and native Linux with the same device tree blob. If needed, one could hard-code the Xen commandline into the DTB, leaving bootargs for Dom0 to be set by the (non Xen-aware) bootloader. I will send out a appropriate u-boot patch, which writes the content of the "xen_bootargs" environment variable into the xen,xen-bootargs dtb property. Signed-off-by: Andre Przywara <andre.przywara@linaro.org> Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Check if the device is available before using itJulien Grall2013-09-171-0/+3
| | | | | | | | | | | It's possible to have a device description in the DTS but the device is not wired. device_init must check if the device is available before doing anything with it. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: exynos5: Blacklist MCT deviceJulien Grall2013-09-171-0/+11
| | | | | | | | | | The Multi Core Timer (MCT) is a Samsung specific device. This device tries to route IRQ in non-boot CPU which is not yet handled by Xen. The user will see randomly dom0 hang, but I'm not sure that is the real reason. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: vexpress: Blacklist a list of board specific devicesJulien Grall2013-09-171-0/+17
| | | | | | | | | | | | On Versatile there are a bunch of devices which must not be pass-through to any guest (power management and cache coherency devices). This commit also blacklists the HDLCD device because Xen is unable to correctly map the framebuffer into dom0. Therefore, when Linux will try to access to the framebuffer, Xen will receive a non-handled data access. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Remove devices used by Xen from dom0 device treeJulien Grall2013-09-171-4/+3
| | | | | | | | | Devices used by Xen should not be pass-through to dom0. If the device is really usefull for dom0 (for instance the timer and the GIC), it will recreate the node. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add new platform specific callback device_is_blacklistJulien Grall2013-09-172-1/+12
| | | | | | | | | | | | | | | | Each platform code will list the device that must not pass-through to a guest. Theses devices are used for: power management, timer,... When theses devices are given to DOM0, it can controls the hardware and then break the whole platform. This callback is enough until we will start to care about power performance. For this purpose, we may need to extend this interface to implement per-device MMIO filtering to allow dom0 to continue to control devices which it owns which happen to share e.g. a clock controller with Xen. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Create a fake timer node in dom0 device treeJulien Grall2013-09-171-0/+66
| | | | | | | Recreate the timer node and remove hypervisor specific interrupt. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Create a fake GIC node in dom0 device treeJulien Grall2013-09-171-0/+78
| | | | | | | | Recreate the GIC node and remove hypervisor specific ranges (vgic and hypervisor controls). Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Create a fake cpus node in dom0 device treeJulien Grall2013-09-171-0/+92
| | | | | | | | | | The number of cpus in dom0 can be different compare to the real number of physical cpus. For the moment, Xen assumes that the cpus are identical. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Create a fake PSCI node in dom0 device treeJulien Grall2013-09-171-0/+38
| | | | | | | Xen uses PSCI to bring up secondary cpus for the guest. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Don't map disabled device in DOM0Julien Grall2013-09-171-1/+5
| | | | | | | Linux should cope with 'status = "disabled"' in the Device Tree. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Build DOM0 FDT by browsing the device tree structureJulien Grall2013-09-171-165/+162
| | | | | | | | | Remove the usage of the FDT in benefit of the device tree structure. The latter is easier to use and can embedded meta-data for Xen (ie: is the device is used by Xen...). Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>