aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* update Xen version to 4.2.2-rc14.2.2-rc1Jan Beulich2013-03-202-3/+3
|
* x86/MSI: add mechanism to fully protect MSI-X table from PV guest accessesJan Beulich2013-03-125-69/+153
| | | | | | | | | | | | | | | | | | | | | This adds two new physdev operations for Dom0 to invoke when resource allocation for devices is known to be complete, so that the hypervisor can arrange for the respective MMIO ranges to be marked read-only before an eventual guest getting such a device assigned even gets started, such that it won't be able to set up writable mappings for these MMIO ranges before Xen has a chance to protect them. This also addresses another issue with the code being modified here, in that so far write protection for the address ranges in question got set up only once during the lifetime of a device (i.e. until either system shutdown or device hot removal), while teardown happened when the last interrupt was disposed of by the guest (which at least allowed the tables to be writable when the device got assigned to a second guest [instance] after the first terminated). Signed-off-by: Jan Beulich <jbeulich@suse.com> master changeset: 4245d331e0e75de8d1bddbbb518f3a8ce6d0bb7e master date: 2013-03-08 14:05:34 +0100
* fix domain unlocking in some xsm error pathsMatthew Daley2013-03-121-1/+1
| | | | | | | | | | | | A couple of xsm error/access-denied code paths in hypercalls neglect to unlock a previously locked domain. Fix by ensuring the domains are unlocked correctly. Signed-off-by: Matthew Daley <mattjd@gmail.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> master changeset: 9581c4f9a55372a21e759cd449cb676d0e8feddb master date: 2013-03-06 17:10:26 +0100
* xentrace: fix off-by-one in calculate_tbuf_sizeOlaf Hering2013-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Commit "xentrace: reduce trace buffer size to something mfn_offset can reach" contains an off-by-one bug. max_mfn_offset needs to be reduced by exactly the value of t_info_first_offset. If the system has two cpus and the number of requested trace pages is very large, the final number of trace pages + the offset will not fit into a short. As a result the variable offset in alloc_trace_bufs() will wrap while allocating buffers for the second cpu. Later share_xen_page_with_privileged_guests() will be called with a wrong page and the ASSERT in this function triggers. If the ASSERT is ignored by running a non-dbg hypervisor the asserts in xentrace itself trigger because "cons" is not aligned because the very last trace page for the second cpu is a random mfn. Thanks to Jan for the quick analysis. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> master changeset: d9fb28ae6d41c8201482948660e52889481830dd master date: 2013-03-04 13:42:17 +0100
* credit1: Use atomic bit operations for the flags structureGeorge Dunlap2013-03-121-13/+10
| | | | | | | | | | | | | | | | The flags structure is not protected by locks (or more precisely, it is protected using an inconsistent set of locks); we therefore need to make sure that all accesses are atomic-safe. This is particulary important in the case of the PARKED flag, which if clobbered while changing the YIELD bit will leave a vcpu wedged in an offline state. Using the atomic bitops also requires us to change the size of the "flags" element. Spotted-by: Igor Pavlikevich <ipavlikevich@gmail.com> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> master changeset: be6507509454adf3bb5a50b9406c88504e996d5a master date: 2013-03-04 13:37:39 +0100
* x86: defer processing events on the NMI exit pathJan Beulich2013-03-123-11/+44
| | | | | | | | | | | | | | Otherwise, we may end up in the scheduler, keeping NMIs masked for a possibly unbounded period of time (until whenever the next IRET gets executed). Enforce timely event processing by sending a self IPI. Of course it's open for discussion whether to always use the straight exit path from handle_ist_exception. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> master changeset: d463b005bbd6475ed930a302821efe239e1b2cf9 master date: 2013-03-04 10:19:34 +0100
* SEDF: avoid gathering vCPU-s on pCPU0Jan Beulich2013-03-122-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The introduction of vcpu_force_reschedule() in 14320:215b799fa181 was incompatible with the SEDF scheduler: Any vCPU using VCPUOP_stop_periodic_timer (e.g. any vCPU of half way modern PV Linux guests) ends up on pCPU0 after that call. Obviously, running all PV guests' (and namely Dom0's) vCPU-s on pCPU0 causes problems for those guests rather sooner than later. So the main thing that was clearly wrong (and bogus from the beginning) was the use of cpumask_first() in sedf_pick_cpu(). It is being replaced by a construct that prefers to put back the vCPU on the pCPU that it got launched on. However, there's one more glitch: When reducing the affinity of a vCPU temporarily, and then widening it again to a set that includes the pCPU that the vCPU was last running on, the generic scheduler code would not force a migration of that vCPU, and hence it would forever stay on the pCPU it last ran on. Since that can again create a load imbalance, the SEDF scheduler wants a migration to happen regardless of it being apparently unnecessary. Of course, an alternative to checking for SEDF explicitly in vcpu_set_affinity() would be to introduce a flags field in struct scheduler, and have SEDF set a "always-migrate-on-affinity-change" flag. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: make certain memory sub-ops return valid valuesJan Beulich2013-03-123-6/+12
| | | | | | | | | | | | | When a domain's shared info field "max_pfn" is zero, domain_get_maximum_gpfn() so far returned ULONG_MAX, which do_memory_op() in turn converted to -1 (i.e. -EPERM). Make the former always return a sensible number (i.e. zero if the field was zero) and have the latter no longer truncate return values. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Tim Deegan <tim@xen.org> master changeset: 7ffc9779aa5120c5098d938cb88f69a1dda9a0fe master date: 2013-03-04 10:16:04 +0100
* fix compat memory exchange op splittingJan Beulich2013-03-121-1/+1
| | | | | | | | | | | A shift with a negative count was erroneously used here, yielding undefined behavior. Reported-by: Xi Wang <xi@mit.edu> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> master changeset: 53decd322157e922cac2988e07da6d39538c8033 master date: 2013-03-01 16:59:49 +0100
* Avoid stale pointer when moving domain to another cpupoolJuergen Gross2013-03-121-6/+14
| | | | | | | | | | | | When a domain is moved to another cpupool the scheduler private data pointers in vcpu and domain structures must never point to an already freed memory area. While at it, simplify sched_init_vcpu() by using DOM2OP instead VCPU2OP. Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com> master changeset: 482300def7d08e773ccd2a0d978bcb9469fdd810 master date: 2013-02-28 14:56:45 +0000
* vmx: fix handling of NMI VMEXIT.Tim Deegan2013-03-124-2/+35
| | | | | | | | | | | | | | | | | | Call do_nmi() directly and explicitly re-enable NMIs rather than raising an NMI through the APIC. Since NMIs are disabled after the VMEXIT, the raised NMI would be blocked until the next IRET instruction (i.e. the next real interrupt, or after scheduling a PV guest) and in the meantime the guest will spin taking NMI VMEXITS. Also, handle NMIs before re-enabling interrupts, since if we handle an interrupt (and therefore IRET) before calling do_nmi(), we may end up running the NMI handler with NMIs enabled. Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com> master changeset: 7dd3b06ff031c9a8c727df16c5def2afb382101c master date: 2013-02-28 14:00:18 +0000
* QEMU_UPSTREAM_REVISION updateIan Jackson2013-03-081-1/+1
|
* x86/setup: don't relocate the VGA hole.Tim Deegan2013-03-081-5/+3
| | | | | | | | | | | | | | Copying the contents of the VGA hole is at best pointless and at worst dangerous. Booting Xen on Xen, it causes a very long delay as each byte is referred to qemu. Since we were already discarding the first 1MB of the relocated area, just avoid copying it in the first place. Reported-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com> Signed-off-by: Tim Deegan <tim@xen.org> master changeset: 0b76ce20de85ad7c23c47ee3275020859b91d46b master date: 2013-02-14 12:20:58 +0000
* x86: fix CMCI injectionJan Beulich2013-03-076-12/+18
| | | | | | | | | | | | | | | | | | This fixes the wrong use of literal vector 0xF7 with an "int" instruction (invalidated by 25113:14609be41f36) and the fact that doing the injection via a software interrupt was never valid anyway (because cmci_interrupt() acks the LAPIC, which does the wrong thing if the interrupt didn't get delivered though it). In order to do latter, the patch introduces send_IPI_self(), at once removing two opend coded uses of "genapic" in the IRQ handling code. Reported-by: Yongjie Ren <yongjie.ren@intel.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Tested-by: Yongjie Ren <yongjie.ren@intel.com> Acked-by: Keir Fraser <keir@xen.org> master changeset: 2f8c55ccefe49bb526df0eaf5fa9b7b788422208 master date: 2013-02-26 10:15:56 +0100
* IOMMU, AMD Family15h Model10-1Fh erratum 746 WorkaroundSuravee Suthikulpanit2013-03-071-0/+38
| | | | | | | | | | | | | | | | | The IOMMU may stop processing page translations due to a perceived lack of credits for writing upstream peripheral page service request (PPR) or event logs. If the L2B miscellaneous clock gating feature is enabled the IOMMU does not properly register credits after the log request has completed, leading to a potential system hang. BIOSes are supposed to disable L2B micellaneous clock gating by setting L2_L2B_CK_GATE_CONTROL[CKGateL2BMiscDisable](D0F2xF4_x90[2]) = 1b. This patch corrects that for those which do not enable this workaround. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> master changeset: 0f8adcb2a7183bea5063f6fffba7d7e1aa14fc84 master date: 2013-02-26 10:14:53 +0100
* x86: fix null pointer dereference in intel_get_extended_msrs()Xi Wang2013-03-071-1/+1
| | | | | | | | | `memset(&mc_ext, 0, ...)' leads to a buffer overflow and a subsequent null pointer dereference. Replace `&mc_ext' with `mc_ext'. Signed-off-by: Xi Wang <xi@mit.edu> master changeset: c40e24a8ef74f9d0ee59dd9b8ca890be08b0b874 master date: 2013-02-25 12:44:25 +0100
* honor ACPI v4 FADT flagsJan Beulich2013-03-076-6/+44
| | | | | | | | | | | | | | | | - force use of physical APIC mode if indicated so (as we don't support xAPIC cluster mode, the respective flag is taken to force physical mode too) - don't use MSI if indicated so (implies no IOMMU) Both can be overridden on the command line, for the MSI case this at once adds a new command line option allowing to turn off PCI MSI (IOMMU and HPET are unaffected by this). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> master changeset: 992fdf6f46252a459c6b1b8d971b2c71f01460f8 master date: 2013-02-22 11:56:54 +0100
* x86/nhvm: properly clean up after failure to set up all vCPU-sJan Beulich2013-03-072-4/+6
| | | | | | | | | | | | | | | | | | Otherwise we may leak memory when setting up nHVM fails half way. This implies that the individual destroy functions will have to remain capable (in the VMX case they first need to be made so, following 26486:7648ef657fe7 and 26489:83a3fa9c8434) of being called for a vCPU that the corresponding init function was never run on. Once at it, also remove a redundant check from the corresponding parameter validation code. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Tim Deegan <tim@xen.org> Tested-by: Olaf Hering <olaf@aepfle.de> master changeset: 17281aea1a9a10f1ee165c6e6a2921a67b7b1df2 master date: 2013-02-22 11:21:38 +0100
* x86/mm: Take the p2m lock even in shadow mode.Tim Deegan2013-03-071-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The reworking of p2m lookups to use get_gfn()/put_gfn() left the shadow code not taking the p2m lock, even in cases where the p2m would be updated (i.e. PoD). In many cases, shadow code doesn't need the exclusion that get_gfn()/put_gfn() provides, as it has its own interlocks against p2m updates, but this is taking things too far, and can lead to crashes in the PoD code. Now that most shadow-code p2m lookups are done with explicitly unlocked accessors, or with the get_page_from_gfn() accessor, which is often lock-free, we can just turn this locking on. The remaining locked lookups are in sh_page_fault() (in a path that's almost always already serializing on the paging lock), and in emulate_map_dest() (which can probably be updated to use get_page_from_gfn()). They're not addressed here but may be in a follow-up patch. Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> master changeset: a15d87475ed95840dba693ab0a56d0b48a215cbc master date: 2013-02-21 15:16:20 +0000
* tools/libxl: Improve videoram settingFabio Fantoni2013-03-043-11/+29
| | | | | | | | | | | | | | | | | | | - If videoram setting is less than 8 mb shows error and exit. - Added videoram setting for qemu upstream with cirrus (added in qemu 1.3). - Updated xl.cfg man. - Default and minimal videoram changed to 16 mb if stdvga is set and upstream qemu is being used. This is required by qemu 1.4 to avoid a xen memory error (qemu 1.3 doesn't complain about it, probably buggy). Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com> Cherry picked from xen-unstable 2e814a017155b885e4d4b5a88dc05e7367a9722a, backport as follows: Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Fix memset(&p,0,sizeof(p)) idiom in several places.Michael Young2013-02-286-6/+6
| | | | | | | | | | gcc 4.8 identifies several places where code of the form memset(x, 0, sizeof(x)); is used incorrectly, meaning that less memory is set to zero than required. Signed-off-by: Michael Young <m.a.young@durham.ac.uk> Committed-by: Keir Fraser <keir@xen.org> (cherry picked from commit d119301b5816b39b5ba722a2f8b301b37e8e34bd)
* x86_32: fix acpi_dmar_init()Jan Beulich2013-02-252-0/+17
| | | | | | | map_pages_to_xen() can't be used here on x86_32, need to use up to 2 newly introduced fixmap entries for this instead. Signed-off-by: Jan Beulich <jbeulich@suse.com>
* libxl: fix stale timeout event callback raceIan Jackson2013-02-222-77/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because there is not necessarily any lock held at the point the application (eg, libvirt) calls libxl_osevent_occurred_timeout, in a multithreaded program those calls may be arbitrarily delayed in relation to other activities within the program. Specifically this means when ->timeout_deregister returns, libxl does not know whether it can safely dispose of the for_libxl value or whether it needs to retain it in case of an in-progress call to _occurred_timeout. The interface could be fixed by requiring the application to make a new call into libxl to say that the deregistration was complete. However that new call would have to be threaded through the application's event loop; this is complicated and some application authors are likely not to implement it properly. Furthermore the easiest way to implement this facility in most event loops is to queue up a time event for "now". Shortcut all of this by having libxl always call timeout_modify setting abs={0,0} (ie, ASAP) instead of timeout_deregister. This will cause the application to call _occurred_timeout. When processing this calldown we see that we were no longer actually interested and simply throw it away. Additionally, there is a race between _occurred_timeout and ->timeout_modify. If libxl ever adjusts the deadline for a timeout the application may already be in the process of calling _occurred, in which case the situation with for_app's lifetime becomes very complicated. Therefore abolish libxl__ev_time_modify_{abs,rel} (which have no callers) and promise to the application only ever to call ->timeout_modify with abs=={0,0}. The application still needs to cope with ->timeout_modify racing with its internal function which calls _occurred_timeout. Document this. This is a forwards-compatible change for applications using the libxl API, and will hopefully eliminate these races in callback-supplying applications (such as libvirt) without the need for corresponding changes to the application. (It is possible that this might expose bugs in applications, though, as previously libxl would never call libxl_osevent_hooks->timeout_modify and now it never calls ->timeout_deregister). For clarity, fold the body of time_register_finite into its one remaining call site. This makes the semantics of ev->infinite slightly clearer. Cc: Bamvor Jian Zhang <bjzhang@suse.com> Cc: Ian Campbell <Ian.Campbell@citrix.com> Tested-by: Jim Fehlig <jfehlig@suse.com> Acked-by: Jim Fehlig <jfehlig@suse.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: fix stale fd event callback raceIan Jackson2013-02-222-29/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because there is not necessarily any lock held at the point the application (eg, libvirt) calls libxl_osevent_occurred_timeout and ..._fd, in a multithreaded program those calls may be arbitrarily delayed in relation to other activities within the program. libxl therefore needs to be prepared to receive very old event callbacks. Arrange for this to be the case for fd callbacks. This requires a new layer of indirection through a "hook nexus" struct which can outlive the libxl__ev_foo. Allocation and deallocation of these nexi is mostly handled in the OSEVENT macros which wrap up the application's callbacks. Document the problem and the solution in a comment in libxl_event.c just before the definition of struct libxl__osevent_hook_nexus. There is still a race relating to libxl__osevent_occurred_timeout; this will be addressed in the following patch. Reported-by: Bamvor Jian Zhang <bjzhang@suse.com> Cc: Bamvor Jian Zhang <bjzhang@suse.com> Cc: Ian Campbell <Ian.Campbell@citrix.com> Tested-by: Jim Fehlig <jfehlig@suse.com> Acked-by: Jim Fehlig <jfehlig@suse.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Backport-requested-by: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com> Backported-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: rename "abs" variables to "absolute"Ian Jackson2013-02-221-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | No functional change. The purpose is to make it easier to backport patches from Xen 4.3's libxl, as Xen 4.3's libxl has had this done: libxl: Enable -Wshadow. It was convenient to invent $(CFLAGS_LIBXL) to do this. Various renamings to avoid shadowing standard functions: - index(3) - listen(2) - link(2) - abort(3) - abs(3) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> In this patch we do not change the others, and we do not enable -Wshadow. We're just trying to bring 4.2's libxl textually closer to 4.3's. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* QEMU_UPSTREAM_REVISION updateIan Jackson2013-02-221-1/+1
|
* Revert "tools/libxc/xtl: fix logic error in stdiostream_progress"Ian Jackson2013-02-221-1/+1
| | | | | | | This reverts commit 67ef1d1fff26ce249dacbd44b756e56953b6599f. There is probably nothing wrong with this but I send it to 4.2 by mistake. Revert it for now until it has had a chance in unstable.
* tools/libxc/xtl: fix logic error in stdiostream_progressOlaf Hering2013-02-221-1/+1
| | | | | | Setting XTL_STDIOSTREAM_HIDE_PROGRESS should disable progress reporting. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* AMD IOMMU: don't BUG() when we don't have toJan Beulich2013-02-221-2/+2
| | | | | | | | | find_iommu_for_device() can easily return NULL instead, as all of its callers are prepared for that. Signed-off-by: Jan Beulich <jbeulich@suse.com> master changeset: f547d42ec0306cdceffb8f7603c7e6f8977cf398 master date: 2013-02-18 09:37:35 +0100
* xenoprof: avoid division by 0Tim Deegan2013-02-221-4/+7
| | | | | | | | Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> master changeset: 085f1f2d3aee1a35dfc7ca2f4423e51fa654010c master date: 2013-02-15 09:42:02 +0100
* gcc4.8 build fix: Add -Wno-unused-local-typedefs to CFLAGS.Keir Fraser2013-02-221-0/+1
| | | | | | | | Based on a patch by M A Young <m.a.young@durham.ac.uk> Signed-off-by: Keir Fraser <keir@xen.org> master changeset: 511278b4e239df00de7b33f7b42d8d5d7e52221b master date: 2013-02-13 17:03:31 +0000
* libxl: Allow migration with qemu-xen.Alex Bligh2013-02-191-17/+0
| | | | | | | | | | | Backport of xen-unstable patch: : HG changeset patch : User Anthony PERARD <anthony.perard@citrix.com> : Date 1349693136 -3600 : Node ID 0995890022391682a2499a202c3c8608e1d3780a : Parent 08fac5c2bf3dcbc493ce45091383f6ce1938f369 Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: libxl__qmp_save: Add filename as JSON parameter to ↵Alex Bligh2013-02-191-0/+1
| | | | | | xen-save-devices-state Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl_dom: Call the right switch logdirty for the right DM.Alex Bligh2013-02-191-3/+42
| | | | | | | | | | | | | | | | | This patch dispatch the switch logdirty call depending on which device model version is running. The call to qemu-xen right now is synchronous, not like the one to qemu-xen-traditional. Backport of xen-unstable patch: : HG changeset patch : User Anthony PERARD <anthony.perard@citrix.com> : Date 1349693136 -3600 : Node ID 08fac5c2bf3dcbc493ce45091383f6ce1938f369 : Parent d4aec9eff7e6d15c2805957af620c82555553b3e Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl_qmp: Introduce libxl__qmp_set_global_dirty_log.Alex Bligh2013-02-192-2/+12
| | | | | | | | | | | | | | This function will enable or disable the global dirty log on QEMU, used during a migration. Backport of xen-unstable patch: : HG changeset patch : User Anthony PERARD <anthony.perard@citrix.com> : Date 1349693135 -3600 : Node ID d4aec9eff7e6d15c2805957af620c82555553b3e : Parent f3890916496445c97d6778d6c986b0270ff707f2 Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl_qmp: Simplify run of single QMP commands.Alex Bligh2013-02-191-55/+22
| | | | | | | | | | | | | This new function connects to QEMU, sends the command and disconnects. Backport of xen-unstable patch: : HG changeset patch : User Anthony PERARD <anthony.perard@citrix.com> : Date 1349693134 -3600 : Node ID f3890916496445c97d6778d6c986b0270ff707f2 : Parent be5d014f91dfbd67afacc3385c265243794a246f Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl_qmp: Use qmp_parameters_* functions for param list of a QMP command.Alex Bligh2013-02-191-59/+30
| | | | | | | | | | | Backported from xen-unstable patch: : HG changeset patch : User Anthony PERARD <anthony.perard@citrix.com> : Date 1349693133 -3600 : Node ID be5d014f91dfbd67afacc3385c265243794a246f : Parent 6f7847729f0f42614de516d15257ede7243f995f Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl_qmp: Introduces helpers to create an argument list.Alex Bligh2013-02-191-0/+51
| | | | | | | | | | | | | | | | | | Those functions will be used to create a "list" of parameters that contain more than just strings. This list is converted by qmp_send to a string to be sent to QEMU. Those functions will be used in the next two patches, so right now there are not compiled. Backported from xen-unstable patch: : HG changeset patch : User Anthony PERARD <anthony.perard@citrix.com> : Date 1349693132 -3600 : Node ID 6f7847729f0f42614de516d15257ede7243f995f : Parent 74dee58cfc0d2d6594f388db3b4d2ce91d1bb204 Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl_json: Introduce libxl__json_object_to_yajl_gen.Alex Bligh2013-02-192-0/+64
| | | | | | | | | | | | | | | | | | | This function converts a libxl__json_object to yajl by calling every yajl_gen_* function on a preallocated yajl_gen hand. This helps to integrate a json_object into an already existing yajl_gen tree. This function is used in a later patch. Backported from xen-unstable patch: : HG changeset patch : User Anthony PERARD <anthony.perard@citrix.com> : Date 1349693132 -3600 : Node ID 74dee58cfc0d2d6594f388db3b4d2ce91d1bb204 : Parent 3f71aab0e2774ded0c5a03436c364fb031ba9aa0 Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl_json: Replace JSON_TRUE/FALSE by JSON_BOOL.Alex Bligh2013-02-193-5/+16
| | | | | | | | | | | | | | Those two JSON_TRUE and JSON_FALSE were types of node. But it's better to have a unique JSON_BOOL type. Backported from xen-unstable patch: : HG changeset patch : User Anthony PERARD <anthony.perard@citrix.com> : Date 1349693131 -3600 : Node ID 3f71aab0e2774ded0c5a03436c364fb031ba9aa0 : Parent 4a6d5d8cba4fc44f9bbda201188885868604b8e8 Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl_json: Remove JSON_ERROR from enum.Alex Bligh2013-02-191-1/+0
| | | | | | | | | | | | | This value from libxl__json_node_type is never used. Backported from xen-unstable patch: : HG changeset patch : User Anthony PERARD <anthony.perard@citrix.com> : Date 1349693130 -3600 : Node ID 4a6d5d8cba4fc44f9bbda201188885868604b8e8 : Parent c9b80c7f8db1a5d26906a2298c481bf7e87fda94 Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl_json: Export json_object related function.Alex Bligh2013-02-192-18/+28
| | | | | | | | | | | | | Export libxl__json_object_alloc and libxl__json_object_append_to to use them in a later patch. Backported from xen-unstable patch: : User Anthony PERARD <anthony.perard@citrix.com> : Date 1349693129 -3600 : Node ID c9b80c7f8db1a5d26906a2298c481bf7e87fda94 : Parent 93e3e6a33e0a1ec9f92fc575334caa35e6dbc757 Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* tools/ocaml: libxc bindings: Fix SBDF encodingAndrew Cooper2013-02-151-5/+4
| | | | | | | | | | | | | | | | | Changeset 23861:ec7c81fbe0de alters the SBDF encoding expected by the DOMCTL_{de,}assign_device hypercalls. While it updates libxl, libxc and the python bindings, the ocaml bindings got missed. As a result, any attempt to use PCI Passthrough with Xen-4.2 and later will fail. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com> xen-unstable changeset: 26373:56daf05bcf69 Backport-requested-by: Andrew Cooper <andrew.cooper3@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* AMD IOMMU: also spot missing IO-APIC entries in IVRS tableJan Beulich2013-02-151-14/+37
| | | | | | | | | | | | | | | | | | | | Apart from dealing duplicate conflicting entries, we also have to handle firmware omitting IO-APIC entries in IVRS altogether. Not doing so has resulted in c/s 26517:601139e2b0db to crash such systems during boot (whereas with the change here the IOMMU gets disabled just as is being done in the other cases, i.e. unless global tables are being used). Debugging this issue has also pointed out that the debug log output is pretty ugly to look at - consolidate the output, and add one extra item for the IVHD special entries, so that future issues are easier to analyze. Signed-off-by: Jan Beulich <jbeulich@suse.com> Tested-by: Sander Eikelenboom <linux@eikelenboom.it> Acked-by: Ian Campbell <ian.campbell@citrix.com> xen-unstable changeset: 26531:e68f14b9e739 xen-unstable date: Thu Feb 14 08:40:52 UTC 2013
* tools/ocaml: oxenstored: correctly handle a full ring.Ian Campbell2013-02-151-2/+2
| | | | | | | | | | | | | | | Change 26521:2c0fd406f02c (part of XSA-38 / CVE-2013-0215) incorrectly caused us to ignore rather than process a completely full ring. Check if producer and consumer are equal before masking to avoid this, since prod == cons + PAGE_SIZE after masking becomes prod == cons. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com> xen-unstable changeset: 26539:759574df84a6 Backport-requested-by: security@xen.org Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* unmodified_drivers: __devinit was removed in linux-3.8Olaf Hering2013-02-141-1/+10
| | | | | | | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Merge with __init handling. Signed-off-by: Jan Beulich <jbeulich@suse.com> xen-unstable changeset: 26526:a37aa55c3cbc xen-unstable date: Tue Feb 12 10:29:51 UTC 2013
* VMX: disable SMEP feature when guest is in non-paging modeDongxiao Xu2013-02-121-0/+7
| | | | | | | | | | | | | | | | | | | SMEP is disabled if CPU is in non-paging mode in hardware. However Xen always uses paging mode to emulate guest non-paging mode with HAP. To emulate this behavior, SMEP needs to be manually disabled when guest switches to non-paging mode. We met an issue that, SMP Linux guest with recent kernel (enable SMEP support, for example, 3.5.3) would crash with triple fault if setting unrestricted_guest=0 in grub. This is because Xen uses an identity mapping page table to emulate the non-paging mode, where the page table is set with USER flag. If SMEP is still enabled in this case, guest will meet unhandlable page fault and then crash. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> xen-unstable changeset: 26502:d1bf3b21f783 xen-unstable date: Wed Jan 30 17:17:30 UTC 2013
* vmx: Simplify cr0 update handling by deferring cr4 changes to the cr4 handler.Keir Fraser2013-02-121-10/+5
| | | | | | Signed-off-by: Keir Fraser <keir@xen.org> xen-unstable changeset: 26501:8201b6ec3564 xen-unstable date: Wed Jan 30 17:15:39 UTC 2013
* fix acpi_dmar_zap/reinstate() (fixes S3 regression)Tomasz Wroblewski2013-02-123-1/+63
| | | | | | | | | | | | | | | | | | | | | | | | Fix S3 regression introduced by cs 23013:65d26504e843 (ACPI: large cleanup). The dmar virtual pointer returned from acpi_get_table cannot be safely stored away and used later, as the underlying acpi_os_map_memory / __acpi_map_table functions overwrite the mapping causing it to point to different tables than dmar (last fetched table is used). This subsequently causes acpi_dmar_reinstate() and acpi_dmar_zap() to write data to wrong table, causing its corruption and problems with consecutive s3 resumes. Added a new function to fetch ACPI table physical address, and establishing separate static mapping for dmar_table pointer instead of using acpi_get_table(). Signed-off-by: Tomasz Wroblewski <tomasz.wroblewski@citrix.com> Added call to acpi_tb_verify_table(). Fixed page count passed to map_pages_to_xen(). Cosmetic changes. Signed-off-by: Jan Beulich <jbeulich@suse.com> xen-unstable changeset: 26443:9efe4c0bf9c8 xen-unstable date: Wed Jan 23 09:31:04 UTC 2013
* x86: restore (optional) forwarding of PCI SERR induced NMI to Dom0Jan Beulich2013-02-122-3/+20
| | | | | | | | | | | | | | | | | | c/s 22949:54fe1011f86b removed the forwarding of NMIs to Dom0 when they were caused by PCI SERR. NMI buttons as well as BMCs (like HP's iLO) may however want such events to be seen in Dom0 (e.g. to trigger a dump). Therefore restore most of the functionality which named c/s removed (adjusted for subsequent changes, and adjusting the public interface to use the modern term, retaining the old one for backwards compatibility). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Keir Fraser <keir@xen.org> xen-unstable changeset: 26440:5af4f2ab06f3 xen-unstable date: Tue Jan 22 08:33:10 UTC 2013