aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* minios: add tpmfront, tpm_tis, and tpmback driversMatthew Fioravante2012-11-139-0/+3399
| | | | | | | | | | | | | | | | | | | | This patch adds 3 new drivers to mini-os. tpmfront - paravirtualized tpm frontend driver tpmback - paravirtualized tpm backend driver tpm_tis - hardware tpm driver Unfortunately these drivers were derived from GPL licensed linux kernel drivers so they must carry the GPL license. However, since mini-os now supports conditional compilation, hopefully these drivers can be included into the xen tree and conditionally removed from non-gpl projects. By default they are disabled in the makefile. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* minios: add xenbus_read_uuidMatthew Fioravante2012-11-132-0/+31
| | | | | | | | | Similar to xenbus_read_integer, this function reads a xenstore path and parses it as a uuid. See include/xenbus.h for details. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* minios: Disable -DGNT_DEBUG and -DGNTMAP_DEBUGMatthew Fioravante2012-11-131-2/+2
| | | | | | | | | Disabling the above flags in default mini-os build. They generate a lot of spam. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* fix xenctl_cpumap_to_cpumask() buffer size checkMatthew Daley2012-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | xenctl_cpumap_to_cpumask incorrectly uses sizeof when checking whether bits should be masked off from the input cpumap bitmap or not. Fix by using the correct cpumask buffer size in place of sizeof. Signed-off-by: Matthew Daley <mattjd@gmail.com> Compare against copy_bytes instead, and use equality rather than less- or-equal. Further, this issue (introduced with c/s 23991:a7ccbc79fc17) is not security relevant (i.e. the bug could not cause memory corruption): _xmalloc() never returns chunks of data smaller than the size of a pointer, i.e. even if sizeof(void*) > guest_bytes > copy_bytes, the piece of memory erroneously written to would still be inside the allocation done at the top of the function. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Jan Beulich <jbeulich@suse.com>
* pygrub: Fix command line argument error handlingMatthew Daley2012-11-123-4/+4
| | | | | | | | | | | | | pygrub's individual config file parsers do not correctly check the amount of command line arguments given to them. In addition, the LILO config parser would report an incorrect message. Use len() to correctly check the amount of arguments, and fix the LILO error message. Signed-off-by: Matthew Daley <mattjd@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: fix reboot failure of migrated domainKouya Shimura2012-11-121-1/+1
| | | | | | | | | The same problem was once fixed by c/s 23878:59c7213b5949 but c/s 25344:0f3b1e13d6af broke it. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: Synchronize privcmd header constantsAndres Lagar-Cavilla2012-11-123-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Since Linux's git commit ceb90fa0a8008059ecbbf9114cb89dc71a730bb6, the privcmd.h interface between Linux and libxc specifies two new constants, PRIVCMD_MMAPBATCH_MFN_ERROR and PRIVCMD_MMAPBATCH_PAGED_ERROR. These constants represent the error codes encoded in the top nibble of an mfn slot passed to the legacy MMAPBATCH ioctl. In particular, libxenctrl checks for the equivalent of the latter constant when dealing with paged out frames that might be the target of a foreign map. Previously, the relevant constant was defined in the domctl hypervisor interface header (XEN_DOMCTL_PFINFO_PAGEDTAB). Because this top-nibble encoding is a contract between the dom0 kernel and libxc, a domctl.h definition is misplaced. - Sync the privcmd.h header to that now available in upstream Linux - Update libxc appropriately - Remove the unnecessary constant in domctl.h Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Ian Campbell <ian.campbelL@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: Make restore work properly with PV superpage flagDave McCracken2012-11-121-29/+101
| | | | | | | | | | | | | | For PV guests, the superpage flag means to unconditionally allocate all pages as superpages, which is required for Linux hugepages to work. Support for this on restore was not supported. This patch adds proper support for the superpage flag on restore. For HVM guests, the superpage flag has been used to mean attempt to allocate superpages if possible on restore. This functionality has been preserved. Signed-off-by: Dave McCracken <dave.mccracken@oracle.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* x86/mm x86 shadow: Fix typo in sh_invlpg sl3 page presence checkMatthew Daley2012-11-121-1/+1
| | | | | | Signed-off-by: Matthew Daley <mattjd@gmail.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* IOMMU: don't immediately disable bus mastering on faultsJan Beulich2012-11-125-20/+49
| | | | | | | | | | Instead, give the owning domain at least a small opportunity of fixing things up, and allow for rare faults to not bring down the device at all. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Dario Faggioli <dario.faggioli@citrix.com>
* tmem: Prevent NULL dereference on error caseMatthew Daley2012-11-121-1/+3
| | | | | | | | | | If the client / pool IDs given to tmemc_save_get_next_page are invalid, the calculation of pagesize will dereference NULL. Fix this by moving the calculation below the appropriate NULL check. Signed-off-by: Matthew Daley <mattjd@gmail.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* x86/x2apic: properly implement cluster modeJan Beulich2012-11-081-15/+127
| | | | | | | | | | So far, cluster mode was just an alternative implementation of physical mode: Allowing only single CPU interrupt targets, and sending IPIs to each target CPU separately. Take advantage of what cluster mode really can do in that regard. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: make cpu_2_logical_apicid private to x2apic codeJan Beulich2012-11-086-40/+5
| | | | | | | | ... as it in fact is only being used there. While moving it, also make it a per-CPU variable rather than a NR_CPUS-sized array. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/ACPI: invalidate BGRT if necessaryJan Beulich2012-11-083-0/+582
| | | | | | | | | | | | | | | | | | | | | | Since the image pointed to may live in boot services memory (which we add to the global memory pool long before ACPI tables get looked at), we should prevent Dom0 from trying to retrieve the image data in that case. The alternatives would be to - not add boot services memory to the global pool at all, or - defer adding boot services memory until Dom0 indicates it is safe to do so, or - find and parse the BGRT table in xen/arch/x86/efi/boot.c, and avoid adding that specific region to the E820 table. None of these are really attractive, and as Xen commonly prints to the video console anyway (without trying to avoid any regions on the screen), the invalidation would need to be done conditionally anyway. (xen/include/acpi/actbl3.h is a verbatim copy from Linux 3.7-rc4) Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/emul: only emulate possibly operand sizes for POPAJan Beulich2012-11-081-7/+4
| | | | | | | | | This opcode neither supports 1-byte operands, nor does it support 8-byte ones (since the opcode is undefined in 64-bit mode). Simplify the code accordingly. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* IOMMU: keep disabled until iommu_setup() is calledJan Beulich2012-11-027-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The iommu is enabled by default when xen is booting and later disabled in iommu_setup() when no iommu is present. But under some circumstances iommu code can be called before iommu_setup() is processed. If there is no iommu available xen crashes. This can happen for example when panic(...) is called as introduced with the patch "x86-64: detect processors subject to AMD erratum #121 and refuse to boot" since xen 4.1.3, resulting in find_iommu_for_device() to be called in the context of disable_IO_APIC() / __stop_this_cpu(). This patch fixes this by keeping the iommu disabled until iommu_setup() is entered. Originally-by: Ronny Hegewald <ronny.hegewald@online.de> In order for iommu_enable to be off initially, iommu_supports_eim() must not depend on it anymore, nor must acpi_parse_dmar(). The former in turn requires that iommu_intremap gets uncoupled from iommu_enabled (in particular, failure during IOMMU setup should no longer result in iommu_intremap getting cleared by generic code; IOMMU specific code can still do so provided in can live with the consequences). This could have the nice side effect of allowing to use "iommu=off" even when x2APIC was pre-enabled by the BIOS (in which case interrupt remapping is a requirement, but DMA translation [obviously] isn't), but that doesn't currently work (and hence x2apic_bsp_setup() forces the IOMMU on rather than just interrupt remapping). For consistency with VT-d, make the AMD IOMMU code also skip all ACPI table parsing when neither iommu_enable nor iommu_intremap are set. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Xiantao Zhang <xiantao.zhang@intel.com> Acked-by: "Huang2, Wei" <Wei.Huang2@amd.com>
* x86/mwait-idle: enable Ivy Bridge Xeon supportJan Beulich2012-11-021-0/+1
| | | | | | | Matching a similar change in Linux 3.7-rc. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* ACPI/cpuidle: remove unused "power" field from Cx state dataJan Beulich2012-11-023-4/+0
| | | | | | | | It has never been used for anything, and Linux 3.7 doesn't propagate this information anymore. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* autoconf: add file missing from 26123:f6d5b3bf74a8Ian Jackson2012-10-301-0/+14
| | | | | | This file was in 26123:f6d5b3bf74a8 as submitted but I failed to add it. Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* autoconf: check for wget and ftpRoger Pau Monne2012-10-305-3/+111
| | | | | | | | | | | | | Some OSes don't come with wget by default, so ftp should be choosen on those. Add an autoconf check to check for wget and ftp, and replace the usage of hardcoded wget in tools. [ Stubdom builds still use wget unconditionally. -iwj ] Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86: save/restore only partial register state where possibleJan Beulich2012-10-3011-34/+158
| | | | | | | | | | | | | | | | | | | | | | | | ... and make restore conditional not only upon having saved the state, but also upon whether saved state was actually modified (and register values are known to have been preserved). Note that RBP is unconditionally considered a volatile register (i.e. irrespective of CONFIG_FRAME_POINTER), since the RBP handling would become overly complicated due to the need to save/restore it on the compat mode hypercall path [6th argument]. Note further that for compat mode code paths, saving/restoring R8...R15 is entirely unnecessary - we don't allow those guests to enter 64-bit mode, and hence they have no way of seeing these registers' contents (and there consequently also is no information leak, except if the context saving domctl would be considered such). Finally, note that this may not properly deal with gdbstub's needs, yet (but if so, I can't really suggest adjustments, as I don't know that code). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: use MOV instead of PUSH/POP when saving/restoring register stateJan Beulich2012-10-303-50/+53
| | | | | Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* docs: document persistent grantsRoger Pau Monne2012-10-301-0/+29
| | | | | | | | Document the new persistent grants block-device feature. Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* MCE: remove unused MCA_MCE_HANDLERChristoph Egger2012-10-292-2/+0
| | | | | | | Remove unused MCA_MCE_HANDLER. MCA_MCE_SCAN is used everywhere instead. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* x86/MCE: merge AMD quirksChristoph Egger2012-10-293-77/+59
| | | | | | | merge mce_amd_quirks.c into mce_amd.c Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* x86/MCE: remove K7 supportChristoph Egger2012-10-2910-116/+5
| | | | | | | Remove K7 support from MCE. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* x86/MCE: consolidate AMD initializationChristoph Egger2012-10-294-28/+31
| | | | | | | Move AMD specific initialization to AMD files. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* libxc: builder: limit maximum size of kernel/ramdisk.Ian Jackson2012-10-264-9/+154
| | | | | | | | | | | | | | | | | | | | | | Allowing user supplied kernels of arbitrary sizes, especially during decompression, can swallow up dom0 memory leading to either virtual address space exhaustion in the builder process or allocation failures/OOM killing of both toolstack and unrelated processes. We disable these checks when building in a stub domain for pvgrub since this uses the guest's own memory and is isolated. Decompression of gzip compressed kernels and ramdisks has been safe since 14954:58205257517d (Xen 3.1.0 onwards). This is XSA-25 / CVE-2012-4544. Also make explicit checks for buffer overflows in various decompression routines. These were already ruled out due to other properties of the code but check them as a belt-and-braces measure. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* pygrub: Add option to list grub entriesCharles Arnold2012-10-261-4/+20
| | | | | | | | | | | | | | | | The argument to "--entry" allows 2 syntaxes, either directly the entry number in menu.lst, or the whole string behind the "title" key word. This poses the following issue: From Dom0 there is no way to guess the number and, or the complete title string because this string contains the kernel version, which will change with a kernel update. This patch adds [-l|--list-entries] as an argument to pygrub. Signed-off-by: Charles Arnold <carnold@suse.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl: Do not leak events when a domain exits.Ian Campbell2012-10-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The goto in both of these places misses the event free which would normally clean up. ==8655== 80 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==8655== at 0x4024370: calloc (vg_replace_malloc.c:593) ==8655== by 0x406EAAE: libxl__zalloc (libxl_internal.c:83) ==8655== by 0x4078173: libxl__event_new (libxl_event.c:1167) ==8655== by 0x4056373: domain_death_occurred (libxl.c:958) ==8655== by 0x4058D06: domain_death_xswatch_callback (libxl.c:1038) ==8655== by 0x4078EB5: watchfd_callback (libxl_event.c:458) ==8655== by 0x407839E: afterpoll_internal (libxl_event.c:949) ==8655== by 0x4079142: eventloop_iteration (libxl_event.c:1371) ==8655== by 0x40799BB: libxl_event_wait (libxl_event.c:1396) ==8655== by 0x805CC67: create_domain (xl_cmdimpl.c:1698) ==8655== by 0x805E001: main_create (xl_cmdimpl.c:3986) ==8655== by 0x804D43D: main (xl.c:285) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Revert 26109:6ccfe4d29f95Ian Jackson2012-10-265-134/+9
| | | | | | | This changeset was contaminated by changes hanging around in my working tree. Sorry :-(. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: NetBSD PCI passthrough supportChristoph Egger2012-10-252-3/+14
| | | | | | | Add PCI passthrough support for HVM guests. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Use libxl__realloc in a couple of places in libxl_events.cIan Campbell2012-10-251-2/+3
| | | | | | | | This avoids us having to think about the error handling on failure. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl: Do not leak events when a domain exits.Ian Campbell2012-10-255-9/+134
| | | | | | | | | | | | | | | | | | | | | | | | The goto in both of these places misses the event free which would normally clean up. ==8655== 80 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==8655== at 0x4024370: calloc (vg_replace_malloc.c:593) ==8655== by 0x406EAAE: libxl__zalloc (libxl_internal.c:83) ==8655== by 0x4078173: libxl__event_new (libxl_event.c:1167) ==8655== by 0x4056373: domain_death_occurred (libxl.c:958) ==8655== by 0x4058D06: domain_death_xswatch_callback (libxl.c:1038) ==8655== by 0x4078EB5: watchfd_callback (libxl_event.c:458) ==8655== by 0x407839E: afterpoll_internal (libxl_event.c:949) ==8655== by 0x4079142: eventloop_iteration (libxl_event.c:1371) ==8655== by 0x40799BB: libxl_event_wait (libxl_event.c:1396) ==8655== by 0x805CC67: create_domain (xl_cmdimpl.c:1698) ==8655== by 0x805E001: main_create (xl_cmdimpl.c:3986) ==8655== by 0x804D43D: main (xl.c:285) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* hvmloader: Reserve FE700000-FE800000 in physical memory map for guest use.Keir Fraser2012-10-252-11/+22
| | | | | | | | | | | Xen platform promises never to use this physical address region, and will always mark it as reserved in the physical memory map presented to the OS (preventing its use by generic OS services such as BAR remapping). Linux will use this region for mapping the shared-info page. Signed-off-by: Keir Fraser <keir@xen.org>
* xl: Fix accidently waiting for domains to shutdown without --wait optionSander Eikelenboom2012-10-251-1/+3
| | | | | | | | Introduced by changeset 26091: "xl: Add --wait and --all to xl reboot." Signed-off-by: Sander Eikelenboom <linux@eikelenboom> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86/MCE: Implement clearbank callback for AMDChristoph Egger2012-10-256-42/+60
| | | | | | | | | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Move initialization of mce_clear_banks into common code (would not get initialized on AMD CPUs otherwise). Mark per-CPU struct mce_bank pointers read-mostly. Signed-off-by: Jan Beulich <jbeulich@suse.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* x86/HPET: cache MSI message last writtenJan Beulich2012-10-251-10/+11
| | | | | | | | | | | | | Rather than spending measurable amounts of time reading back the most recently written message, cache it in space previously unused, and thus accelerate the CPU's entering of the intended C-state. hpet_msi_read() ends up being unused after this change, but rather than removing the function, it's being marked "unused" in order - that way it can easily get used again should a new need for it arise. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* compiler.h adjustmentsJan Beulich2012-10-253-20/+17
| | | | | | | | | | | | - replace __attribute_used__ with just __used - add __maybe_unused and explain the difference between the two - remove gcc 3.x specifics (as we don't support building with it anymore; really for quite some time we didn't even support building with the checked for minor versions) - remove left over __setup() from init.h (rather than adjusting it) Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* xl: avoid shadowing reboot(2)Christoph Egger2012-10-251-2/+2
| | | | | | | | | On NetBSD <unistd.h> mistakenly exposes reboot(2). Work around this. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86: don't special case first IO-APICJan Beulich2012-10-241-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has always been puzzling me why the first IO-APIC gets special cased in two places, and finally Xen got run on a system where this breaks: (XEN) ACPI: IOAPIC (id[0x10] address[0xfecff000] gsi_base[0]) (XEN) IOAPIC[0]: apic_id 16, version 17, address 0xfecff000, GSI 0-2 (XEN) ACPI: IOAPIC (id[0x0f] address[0xfec00000] gsi_base[3]) (XEN) IOAPIC[1]: apic_id 15, version 17, address 0xfec00000, GSI 3-38 (XEN) ACPI: IOAPIC (id[0x0e] address[0xfec01000] gsi_base[39]) (XEN) IOAPIC[2]: apic_id 14, version 17, address 0xfec01000, GSI 39-74 (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 1 global_irq 4 dfl dfl) (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 5 dfl dfl) (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 3 global_irq 6 dfl dfl) (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 4 global_irq 7 dfl dfl) (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 6 global_irq 9 dfl dfl) (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 7 global_irq 10 dfl dfl) (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 8 global_irq 11 low edge) (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 12 dfl dfl) (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 12 global_irq 15 dfl dfl) (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 13 global_irq 16 dfl dfl) (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 14 global_irq 17 low edge) (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 15 global_irq 18 dfl dfl) i.e. all legacy IRQs (apart from the timer one, but the firmware passed data doesn't look right for that case anyway, as both Xen and native Linux are falling back to use the virtual wire setup for IRQ0, apparently rather using pin 2 of the first IO-APIC) are being handled by the second IO-APIC. This at once eliminates the possibility of an unmasked RTE getting written without having got a vector put in place (in setup_IO_APIC_irqs()). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* xen: sched_sedf: remove an unused stat in SEDFDario Faggioli2012-10-231-5/+2
| | | | | | | | Namely, `short_cont' which is not updated anywhere in the code. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* xen: sched: introduce a couple of counters in credit2 and SEDFDario Faggioli2012-10-232-0/+9
| | | | | | | | | | Mainly for consistency with credit, at least for the events that are general enough, like vCPU initialization/destruction and calls to the specific scheduling function. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* xen: sched: generalize scheduling related perfcounter macrosDario Faggioli2012-10-234-74/+82
| | | | | | | | | | | | | | Moving some of them from sched_credit.c to generic scheduler code. This also allows the other schedulers to use perf counters equally easy. This change is mainly preparatory work for what stated above. In fact, it mostly does s/CSCHED_STAT/SCHED_STAT/, and, in general, it implies no functional changes. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* xen: fix build when 'perfc=y'Dario Faggioli2012-10-231-0/+2
| | | | | | | | | | | | | | | | | | | | Which was failing with this: viridian.c: In function ‘wrmsr_viridian_regs’: viridian.c:254:1: error: ‘PERFC_mshv_wrmsr_apic_msr’ undeclared (first use in this function) viridian.c:254:1: note: each undeclared identifier is reported only once for each function it appears in viridian.c: In function ‘rdmsr_viridian_regs’: viridian.c:305:1: error: ‘PERFC_mshv_rdmsr_apic_msr’ undeclared (first use in this function) as a consequence of 17b754cab7b0 using but not defining the counters. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* vMCE: Implement AMD MSRsChristoph Egger2012-10-231-16/+35
| | | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Committed-by: Keir Fraser <keir@xen.org>
* nestedsvm: fix VMEXIT emulationChristoph Egger2012-10-231-6/+11
| | | | | | | | | Values in regs can be newer than those in the shadow vmcb (e.g. due to an instruction emulation right before). So use the values from regs. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Jan Beulich <jbeulich@suse.com>
* nestedsvm: fix memory leak on shutdown/crashChristoph Egger2012-10-231-0/+9
| | | | | | | | | Fix memory leak of l1 vmcb page when destroying a vcpu while l2 guest is running. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Jan Beulich <jbeulich@suse.com>
* p2m: rename p2m_is_magic to p2m_is_podOlaf Hering2012-10-224-5/+5
| | | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* hvm: handle PoD and grant pages in HVMOP_get_mem_typeOlaf Hering2012-10-191-0/+4
| | | | | | | | | | | | During kexec in a ballooned PVonHVM guest the new kernel needs to check each pfn if its backed by a mfn to find ballooned pages. Currently all PoD and grant pages will appear as HVMMEM_mmio_dm, so the new kernel has to assume they are ballooned. This is wrong: PoD pages may turn into real RAM at runtime, grant pages are also RAM. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>