aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gnttab: drop unused GNTCOPY_can_fail4.3.0-rc4Jan Beulich2013-06-101-2/+0
| | | | | Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* Revert "irq: Add extra debugging to help track down why an assertion is failing"Jan Beulich2013-06-101-15/+1
| | | | | | | | | | | | | This reverts commits 2ae8b9173fb2388af6514c730d620ed5f450bc34 and 98e10364bde098e12104caa4f566b17d05f8b791. This was never reported to be hit, and we assume to have taken care of the problem by excluding legacy IRQs from the IRQ move cleanup logic. Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
* AMD/IOMMU: revert "SR56x0 Erratum 64 - Reset all head & tail pointers"Jan Beulich2013-06-051-19/+6
| | | | | | | | | | The code this patch added is redundant with already present code in set_iommu_{command_buffer,{event,ppr}_log}_control(). Just switch those ones from using writel() to writeq() for consistency. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
* x86/vtsc: update vcpu_time in hvm_set_guest_timeRoger Pau Monné2013-06-051-1/+13
| | | | | | | | | | | When using a vtsc, hvm_set_guest_time changes hvm_vcpu.stime_offset, which is used in the vcpu time structure to calculate the tsc_timestamp, so after updating stime_offset we need to propagate the change to vcpu_time in order for the guest to get the right time if using the PV clock. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
* x86: fix XCR0 handlingJan Beulich2013-06-049-55/+69
| | | | | | | | | | | | | | - both VMX and SVM ignored the ECX input to XSETBV - both SVM and VMX used the full 64-bit RAX when calculating the input mask to XSETBV - faults on XSETBV did not get recovered from Also consolidate the handling for PV and HVM into a single function, and make the per-CPU variable "xcr0" static to xstate.c. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
* x86: preserve FPU selectors for 32-bit guest codeJan Beulich2013-06-045-60/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doing {,F}X{SAVE,RSTOR} unconditionally with 64-bit operand size leads to the selector values associated with the last instruction/data pointers getting lost. This, besides being inconsistent and not compatible with native hardware behavior especially for 32-bit guests, leads to bug checks in 32-bit Windows when running with "Driver verifier" (see e.g. http://support.microsoft.com/kb/244617). In a first try I made the code figure out the current guest mode, but that has the disadvantage of only taking care of the issue when the guest executes in the mode for which the state currently is (i.e. namely not in the case of a 64-bit guest running a 32-bit application, but being in kernle [64-bit] mode). The solution presented here is to conditionally execute an auxiliary FNSTENV and use the selectors from there. In either case the determined word size gets stored in the last byte of the FPU/SSE save area, which is available for software use (and I verified is being cleared to zero by all versions of Xen, i.e. will not present a problem when migrating guests from older to newer hosts), and evaluated for determining the operand size {,F}XRSTOR is to be issued with. Note that I did check whether using a second FXSAVE or a partial second XSAVE would be faster than FNSTENV - neither on my Westmere (FXSAVE) nor on my Romley (XSAVE) they are. I was really tempted to use branches into the middle of instructions (i.e. past the REX64 prefixes) here, as that would have allowed to collapse the otherwise identical fault recovery blocks. I stayed away from doing so just because I expect others to dislike such slightly subtle/tricky code. Reported-by: Ben Guthro <Benjamin.Guthro@citrix.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
* x86/xsave: properly check guest input to XSETBVJan Beulich2013-06-041-0/+5
| | | | | | | | | | Other than the HVM emulation path, the PV case so far failed to check that YMM state requires SSE state to be enabled, allowing for a #GP to occur upon passing the inputs to XSETBV inside the hypervisor. This is CVE-2013-2078 / XSA-54. Signed-off-by: Jan Beulich <jbeulich@suse.com>
* x86/xsave: recover from faults on XRSTORJan Beulich2013-06-042-5/+20
| | | | | | | | | | | | | | Just like FXRSTOR, XRSTOR can raise #GP if bad content is being passed to it in the memory block (i.e. aspects not under the control of the hypervisor, other than e.g. proper alignment of the block). Also correct the comment explaining why FXRSTOR needs exception recovery code to not wrongly state that this can only be a result of the control tools passing a bad image. This is CVE-2013-2077 / XSA-53. Signed-off-by: Jan Beulich <jbeulich@suse.com>
* x86/xsave: fix information leak on AMD CPUsJan Beulich2013-06-041-0/+15
| | | | | | | | | | | | | | | | | | | | | | | Just like for FXSAVE/FXRSTOR, XSAVE/XRSTOR also don't save/restore the last instruction and operand pointers as well as the last opcode if there's no pending unmasked exception (see CVE-2006-1056 and commit 9747:4d667a139318). While the FXSR solution sits in the save path, I prefer to have this in the restore path because there the handling is simpler (namely in the context of the pending changes to properly save the selector values for 32-bit guest code). Also this is using FFREE instead of EMMS, as it doesn't seem unlikely that in the future we may see CPUs with x87 and SSE/AVX but no MMX support. The goal here anyway is just to avoid an FPU stack overflow. I would have preferred to use FFREEP instead of FFREE (freeing two stack slots at once), but AMD doesn't document that instruction. This is CVE-2013-2076 / XSA-52. Signed-off-by: Jan Beulich <jbeulich@suse.com> Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
* x86/MCE: disable if MCE banks are not presentAravindh Puthiyaparambil2013-06-031-1/+8
| | | | | | | | | | | | | | | | | When booting Xen on VMware ESX 5.1 and Workstation 9, you hit a GPF during MCE initialization. The culprit is line 631 in set_poll_bankmask(): bitmap_copy(mb->bank_map, mca_allbanks->bank_map, nr_mce_banks); What is happening is that in mca_cap_init(), nr_mce_banks is being set to 0. This causes the allocation of bank_map to be set to ZERO_BLOCK_PTR which is the return value for zero-size allocation by xzalloc_array()/_xmalloc(). This results in the bitmap_copy() to fail disastrously. The following patch fixes this issue. Signed-off-by: Aravindh Puthiyaparambil <aravindp@cisco.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Christoph Egger <chegger@amazon.de>
* tools/libxl: fix array subscript has type 'char'Christoph Egger2013-05-311-1/+1
| | | | Signed-off-by: Christoph Egger <chegger@amazon.de>
* blkif.h: Document the physical-sector-size extensionStefan Bader2013-05-311-4/+10
| | | | Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
* Currently only a few Intel models have VPMU workaround turned on. ItBoris Ostrovsky2013-05-311-11/+5
| | | | | | | | | | appears, however, that this issue exists on more models than what is covered by check_pmc_quirk(). Since we don't know exactly which cpus are affected we should turn this workaround on for all family 6 processors. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Sort-of-Acked-by: "Auld, Will" <will.auld@intel.com>
* Revert "x86: debugging code for platform timer wrap problem"Jan Beulich2013-05-311-49/+9
| | | | | | This reverts commit bd9be94eb2280e8e662e75f1e5fea7c12eb2589c. Signed-off-by: Jan Beulich <jbeulich@suse.com>
* x86: fix ordering of operations in destroy_irq()Jan Beulich2013-05-311-23/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix for XSA-36, switching the default of vector map management to be per-device, exposed more readily a problem with the cleanup of these vector maps: dynamic_irq_cleanup() clearing desc->arch.used_vectors keeps the subsequently invoked clear_irq_vector() from clearing the bits for both the in-use and a possibly still outstanding old vector. Fix this by folding dynamic_irq_cleanup() into destroy_irq(), which was its only caller, deferring the clearing of the vector map pointer until after clear_irq_vector(). Once at it, also defer resetting of desc->handler until after the loop around smp_mb() checking for IRQ_INPROGRESS to be clear, fixing a (mostly theoretical) issue with the intercation with do_IRQ(): If we don't defer the pointer reset, do_IRQ() could, for non-guest IRQs, call ->ack() and ->end() with different ->handler pointers, potentially leading to an IRQ remaining un-acked. The issue is mostly theoretical because non-guest IRQs are subject to destroy_irq() only on (boot time) error paths. As to the changed locking: Invoking clear_irq_vector() with desc->lock held is okay because vector_lock already nests inside desc->lock (proven by set_desc_affinity(), which takes vector_lock and gets called from various desc->handler->ack implementations, getting invoked with desc->lock held). Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
* arm: Fix after 54353cae096c "xen/arm: check string format for early_printk"Julien Grall2013-05-301-4/+5
| | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* xenballoond: remove as it is now obsolete + unsupported codeIan Campbell2013-05-305-655/+0
| | | | | | | | | Dan, the author, states: > this code is five years old, is distro dependent, and is now > completely unsupported. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* libxl: Remove qxl support for the 4.3 releaseGeorge Dunlap2013-05-305-41/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The qxl drivers for Windows and Linux end up calling instructions that cannot be used for MMIO at the moment. Just for the 4.3 release, remove qxl support. This patch should be reverted as soon as the 4.4 development window opens. The issue in question: (XEN) emulate.c:88:d18 bad mmio size 16 (XEN) io.c:201:d18 MMIO emulation failed @ 0033:7fd2de390430: f3 0f 6f 19 41 83 e8 403 The instruction in question is "movdqu (%rcx),%xmm3". Xen knows how to emulate it, but unfortunately %xmm3 is 16 bytes long, and the interface between Xen and qemu at the moment would appear to only allow MMIO accesses of 8 bytes. It's too late in the release cycle to find a fix or a workaround. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Fix qemu-xen command line for vcpus numbers.Anthony PERARD2013-05-301-2/+2
| | | | | | | | On the qemu-xen command line, the number of vcpus initially online and the number of maximum available vcpus are inverted. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xl: Update example xl.conf with correct name for default script optionGeorge Dunlap2013-05-301-3/+3
| | | | | | | | | | We've changed the config option from "vifscript" to "vif.default.script". This was changed in the manpage but not in the example xl.conf. Also move the option down to be with the other vif options. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* gcov: update documentation on coverage.Frediano Ziglio2013-05-301-8/+58
| | | | | | | | Fix some spelling. Add documentation for new xencov_split utility. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* gcov: Add script to split coverage informations.Frediano Ziglio2013-05-302-1/+190
| | | | | | | | | Split coverage informations extracted from xencov utility. This script accept coverage blob either as file or from input and extract into files compatible with gcc format (gcda). Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: use Linux-compatible names for sse4 cpuid featuresGeorge Dunlap2013-05-302-1/+4
| | | | | | | | | | | Linux uses sse4_1 and sse4_2, but at the moment libxl uses '.' instead of '_'. This makes it confusing for people looking in Linux's /proc/cpuinfo to disable features. Add the Linux feature names, keeping the old ones for compatability. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.camppbell@citrix.com>
* arm/early-printk: add Calxeda Midway UART supportAndre Przywara2013-05-302-0/+6
| | | | | | | | | | | | | With the help of the previous patches add a stanza to xen/arch/arm/Rules.mk to specify the UART configuration of the Calxeda Midway machine. The information has been taken from the Linux kernel's .dts file. This can be enabled by adding "CONFIG_EARLY_PRINTK=midway" to Config.mk. Signed-off-by: Andre Przywara <andre.przywara@calxeda.com> Reviewed-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* arm/early-printk: add support for ARM FastmodelAndre Przywara2013-05-302-0/+7
| | | | | | | | | | | Though the ARM Fastmodel software emulator mimics a Versatile Express board, the boot process is different compared to the real hardware, so the early printk differs slightly. Create a new early-printk target to model this correctly. Signed-off-by: Andre Przywara <andre.przywara@calxeda.com> Reviewed-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* arm/early-printk: move UART base address to Rules.mkAndre Przywara2013-05-305-8/+4
| | | | | | | | | | | | The UART memory mapped base address is currently hardcoded in the early-printk UART driver, which denies the driver to be used by two machines with a different mapping. Move this definition out to xen/arch/arm/Rules.mk, allowing easier user access and later sharing of the driver. Signed-off-by: Andre Przywara <andre.przywara@calxeda.com> Reviewed-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* arm/early-printk: allow skipping of UART initAndre Przywara2013-05-304-0/+10
| | | | | | | | | | | | | While it seems obvious to initialize the UART before using it, chances are that some firmware code or the bootloader already did this. So it may actually be a good idea to skip the initialization, in fact this fixes early printk on my TC2 Versatile Express. So provide an option in xen/arch/arm/Rules.mk to only initialize the UART when needed. Signed-off-by: Andre Przywara <andre.przywara@calxeda.com> Reviewed-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* arm/early-printk: calculate baud rate divisor from user provided valueAndre Przywara2013-05-305-6/+12
| | | | | | | | | | | For early-printk the used baud rate was hardcoded in the code, using precalculated divisor values. Let the calculation of these values be done by the preprocessor and use a human readable value in xen/arch/arm/Rules.mk to drive this. Signed-off-by: Andre Przywara <andre.przywara@calxeda.com> Reviewed-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: check string format for early_printkJulien Grall2013-05-301-4/+10
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: avoid lost characters with early_printkJulien Grall2013-05-303-0/+21
| | | | | | | | | | | | | | | Introduce the function early_flush to wait until the UART has finished to transfer the character. When early printk is enabled, it's possible to loose the last characters if: - the UART is initialized by the UART driver - Xen hang This is result to a truncated message. To be sure that the message is fully transfered by early_printk, add a call to early_flush. This will avoid lost characters. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xl: Return an error if an empty file is passed to cd-insertGeorge Dunlap2013-05-301-5/+24
| | | | | | | | | | | | | | Two changes: * Stat the file before calling libxl_cdrom_insert() * Return an error if anything fails (including libxl_cdrom_insert) This is in part to work around the fact that the RAW disk type is used for things that aren't actually files; so we can't call stat in libxl_device.c:libxl__device_disk_set_backend() because it may be going over a remote protocol. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* stubdom: Make stubdom buildsystem consistent with tools buildsystemChristoph Egger2013-05-304-59/+117
| | | | | | | | | | | Use FETCHER for stubdom, too. This makes stubdom buildsystem more consistent with tools buildsystem. Fixes toplevel configure failure if wget is not found independent if we are going to build stubdom or not. Signed-off-by: Christoph Egger <chegger@amazon.de> Reviewed-by: Matt Wilson <msw@amazon.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xl, e820_host, PV passthrough: Fix guests crashing when memory == maxmemKonrad Rzeszutek Wilk2013-05-301-1/+1
| | | | | | | | | | | | | | | | The code had an obvious bug where it would assume that the balloon amount would always be _something_ and add an E820_RAM entry at the end of the E820 array. The added E820_RAM would contain the balloon amount plus the delta of memory that had to be subtracted b/c of the various E820 entries. That assumption is certainly true when maxmem != mem, but if guest config has maxmem = memory that is incorrect (as balloon value is zero). The end result is that the E820 that is constructed is missing a swath of "delta" memory and in most cases ends up with only one E820_RAM entry that is of 512MB size on many Intel systems. Reported-by: Christian Holpert <christian@holpert.de> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* libxc: limit cpu values when setting vcpu affinity4.3.0-rc3Ian Jackson2013-05-291-0/+12
| | | | | | | | | | | | | When support for pinning more than 64 cpus was added, check for cpu out-of-range values was removed. This can lead to subsequent out-of-bounds cpumap array accesses in case the cpu number is higher than the actual count. This patch returns the check. This is CVE-2013-2072 / XSA-56 Signed-off-by: Petr Matousek <pmatouse@redhat.com>
* x86: re-enable VCPUOP_register_vcpu_time_memory_areaJan Beulich2013-05-274-8/+8
| | | | | | | | | | By moving the call to update_vcpu_system_time() out of schedule() into arch-specific context switch code, the original problem of the function accessing the wrong domain's address space goes away (obvious even from patch context, as update_runstate_area() does similar copying). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* Merge branch 'staging' of ssh://xenbits.xen.org/home/xen/git/xen into stagingIan Campbell2013-05-232-3/+5
|\
| * x86/EFI: fix boot for pre-UEFI systemsEric Shelton2013-05-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | efi/boot.c makes a call to QueryVariableInfo on all systems. However, as it is only promised for UEFI 2.0+ systems, pre-UEFI systems can hang or crash on this call. The below patch adds a version check, a technique used in other parts of the Xen EFI codebase. Signed-off-by: Eric Shelton <eshelton@pobox.com> Check runtime services version instead of EFI version (while generally they would be in sync, nothing requires them to be). Signed-off-by: Jan Beulich <jbeulich@suse.com>
| * x86: fix boot time APIC mode detectionJan Beulich2013-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | current_cpu_data becomes valid only relatively late in the boot process, so looking there for a particular feature early in the game would generally give the appearance of the feature being unavailable. Getting this wrong means that at kexec time the system would get returned to xAPIC mode, causing disconnect_bsp_APIC() to try to access the APIC page, which on systems with x2APIC pre-enabled will never get set up. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
* | drivers/exynos4210: Return -ENOMEM when ioremap has failedJulien Grall2013-05-231-0/+1
| | | | | | | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* | xen/arm: Disable interrupts for the entire duration of the context switchJaeyong Yoo2013-05-232-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | Not just while saving state. Otherwise there is a race between interrupts arriving and updating the LR state and gic_restore_state overwriting them with the saved state. With this change we no longer need to disable interrupts in gic_restore_state. Signed-off-by: Jaeyong Yoo <jaeyong.yoo@samsung.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> [ ijc -- rewrote commit message ]
* | hotplug/Linux: xendomains compatibility with xlIan Murray2013-05-231-1/+3
| | | | | | | | | | | | | | | | | | The xl save file uses a different header string to the xm one. Teach the xendomains script about it. Signed-off-by: Ian MURRAY <murrayie@yahoo.co.uk> Acked-by: Ian Campbell <ian.campbell@citrix.com> [ ijc -- rewrote commit message ]
* | xen/arm: Remove leading +1 when hypervisor compat property is createdJulien Grall2013-05-231-1/+1
|/ | | | | | | | | | | When a static array with string is created, the size of this array contains the \0. This error was raised with gcc 4.7 because, the local variables are not always initialized to 0. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* netif: document feature-split-event-channelWei Liu2013-05-221-0/+12
| | | | | | | | | This is a new feature to separate TX and RX notification. Document it in canonical header for future reference. For reference implementation, please see Xen network driver in Linux kernel. Signed-off-by: Wei Liu <wei.liu2@citrix.com>
* AMD/iommu: SR56x0 Erratum 64 - Reset all head & tail pointersAndrew Cooper2013-05-221-0/+13
| | | | | | | | | | | | | | | | Reference at time of patch: http://support.amd.com/us/ChipsetMotherboard_TechDocs/46303.pdf Erratum 64 states that the head and tail pointers for the Command buffer and Event log are only reset on a cold boot, not a warm boot. While the erratum is limited to systems using SR56xx chipsets (such as Family 10h CPUs), resetting the pointers is a sensible action in all cases, including the PPR log for consistency. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
* x86: Use explicit widths for MMIO read/write, and add 64bit variantsAndrew Cooper2013-05-221-6/+8
| | | | | Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* QEMU_TAG updateIan Jackson2013-05-211-3/+3
|
* QEMU_TAG updateIan Jackson2013-05-211-3/+3
|
* fix XSA-46 regression with xend/xmJan Beulich2013-05-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hypervisor side changes for XSA-46 require the tool stack to now always map the guest pIRQ before granting access permission to the underlying host IRQ (GSI). This in particular requires that pciif.py no longer can skip this step (assuming qemu would do it) for HVM guests. This in turn exposes, however, an inconsistency between xend and qemu: The former wants to always establish 1:1 mappings between pIRQ and host IRQ (for non-MSI only of course), while the latter always wants to allocate an arbitrary mapping. Since the whole tool stack obviously should always agree on the mapping model, make libxc enforce the 1:1 mapping as the more natural one (as well as being the one that allows for easier debugging, since there no need to find out the extra mapping). Users of libxc that want to establish a particular (rather than an allocated) mapping are still free to do so, as well as tool stacks not based on libxc wanting to implement an allocation based model (which is why it's not the hypervisor that's being changed to enforce either model). Since libxl, like xend, already uses a 1:1 model, it's unaffected by the libxc change (and it being unaffected by the original hypervisor side changes is - afaict - simply due to qemu getting spawned at a later point in time compared to the xend event flow). Signed-off-by: Jan Beulich <jbeulich@suse.com> Tested-by: Andreas Falck <falck.andreas.lists@gmail.com> (on 4.1) Tested-by: Gordan Bobic <gordan@bobich.net> (on 4.2) Acked-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
* tools: fix dependency file generationJan Beulich2013-05-211-1/+1
| | | | | | | | | | | | | | | There is a small set of places where files in subdirectories get compiled from the parent directory. Dependency file wise this is no problem as long as the files use names distinct without regard to the directories they sit in, and tools/console/ violates this (in having two main.c files). Hence we need to avoid losing the directory name, both to ensure the two compiler instances don't simultaneously write to the same file (happening of which is what triggered me looking into this) and to guarantee dependencies for all files will be seen by make on an incremental rebuild. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* x86/HVM: RTC code must be in line with WAET flags passed by hvmloaderJan Beulich2013-05-212-8/+23
| | | | | | | | | | | | With hvmloader telling the guest that it may skip REG_C reads during the processing of RTC interrupts, the emulation code must not depend upon these reads to occur. Introduce two modes of operation for the emulation code, and short of a HVM parameter (too late to be introduced for 4.3) hard code the mode determination to always assume that Windows-conforming one for the time being. Signed-off-by: Jan Beulich <jbeulich@suse.com> Tested-by: Roger Pau Monné <roger.pau@citrix.com> (FreeBSD guest)