aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tools: drop ia64 supportIan Campbell2012-09-12103-32399/+31
| | | | | | | | | | | | | | | | | Removed support from libxc and mini-os. This also took me under xen/include/public via various symlinks. Dropped tools/debugger/xenitp entirely, it was described upon commit as: "Xenitp is a low-level debugger for ia64" and doesn't appear to be linked into the build anywhere. 99 files changed, 14 insertions(+), 32361 deletions(-) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* x86: Fix 32-bit stubdom build, libelf.h must support __i386__Keir Fraser2012-09-121-1/+1
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* x86: Remove unused 'sis_apic_bug' variable. It was only used on x86_32.Keir Fraser2012-09-123-23/+3
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* x86: We can assume CONFIG_PAGING_LEVELS==4.Keir Fraser2012-09-1221-788/+39
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* xen: Remove x86_32 build target.Keir Fraser2012-09-12127-7490/+73
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* Revert 25843:51090fe1ab97 (x86/HVM: assorted RTC emulation adjustments)Jan Beulich2012-09-123-67/+52
| | | | This was found to cause RHEL6 HVM guests to hang during shutdown.
* gnttab: cleanup of number-of-active-frames calculationsJan Beulich2012-09-122-42/+36
| | | | | | | | | | | | | max_nr_active_grant_frames() is merly is special case of num_act_frames_from_sha_frames(), so there's no need to have a special case implementation for it. Further, some of the related definitions (including the "struct active_grant_entry" definition itself) can (and hence should) really be private to grant_table.c. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: use only a single branch for upcall-pending exit path checksJan Beulich2012-09-123-14/+14
| | | | | | | | | This utilizes the fact that the two bytes of interest are adjacent to one another and that the resulting 16-bit values of interest are within a contiguous range of numbers. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86-64/EFI: allow chaining of config filesJan Beulich2012-09-122-1/+27
| | | | | | | | | | | | | | | | | | | Namely when making use the CONFIG_XEN_COMPAT_* options in the legacy Linux kernels, newer kernels may not be compatible with older hypervisors, so trying to boot such a combination makes little sense. Booting older kernels on newer hypervisors, however, has to always work. With the way xen.efi looks for its configuration file, allowing individual configuration files to refer only to compatible kernels, and referring from an older- to a newer-hypervisor one (the kernels of which will, as said, necessarily be compatible with the older hypervisor) allows to greatly reduce redundancy at least in development environments where one frequently wants multiple hypervisors and kernles to be installed in parallel. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: retrieve keyboard shift status flags from BIOSJan Beulich2012-09-124-0/+28
| | | | | | | | | | | Recent Linux tries to make use of this, and has no way of getting at these bits without Xen assisting it. There doesn't appear to be a way to obtain the same information from UEFI. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86-64: construct static, uniform parts of page tables at build timeJan Beulich2012-09-116-77/+91
| | | | | | | | ... rather than at boot time, removing unnecessary redundancy between EFI and legacy boot code. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: construct static part of 1:1 mapping at build timeJan Beulich2012-09-118-96/+78
| | | | | | | | ... rather than at boot time, removing unnecessary redundancy between EFI and legacy boot code. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* PCI: don't allow guest assignment of devices used by XenJan Beulich2012-09-117-5/+111
| | | | | | | | | | This covers the devices used for the console and the AMD IOMMU ones (as would be any others that might get passed to pci_ro_device()). Boot video device determination cloned from similar Linux logic. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* PCI: bus scan adjustmentsJan Beulich2012-09-112-2/+13
| | | | | | | | | | | As done elsewhere, the ns16550 code shouldn't look at non-zero functions of a device if that isn't multi-function. Also both there and in pass-through's _scan_pci_devices() skip looking at non-zero functions when the device at function zero doesn't exist. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* drop tx_fifo_sizeJan Beulich2012-09-115-47/+36
| | | | | | | | | | | | ... in favor of having what so far was called tx_empty() return the amount of space available. Note that in the pl011.c case, original code and comment disagreed, and I picked the conservative value for it's ->tx_ready() handler's return value. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* ns16550: command line parsing adjustmentsJan Beulich2012-09-112-29/+23
| | | | | | | | Allow intermediate parts of the command line options to be absent (expressed by two immediately succeeding commas). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* ns16550: PCI initialization adjustmentsJan Beulich2012-09-111-4/+10
| | | | | | | | | | | | | Besides single-port serial cards, also accept multi-port ones and such providing mixed functionality (e.g. also having a parallel port). Reading PCI_INTERRUPT_PIN before ACPI gets enabled generally produces an incorrect IRQ (below 16, whereas after enabling ACPI it frequently would end up at a higher one), so this is useful (almost) only when a system already boots in ACPI mode. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* ns16550: MMIO adjustmentsJan Beulich2012-09-112-8/+29
| | | | | | | | | | | On x86 ioremap() is not suitable here, set_fixmap() must be used instead. Also replace some literal numbers by their proper symbolic constants, making the code easier to understand. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* serial: avoid fully initializing unused consolesJan Beulich2012-09-113-17/+38
| | | | | | | | | Defer calling the drivers' post-IRQ initialization functions (generally doing allocation of transmit buffers) until it is known that the respective console is actually going to be used. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* console: add EHCI debug port based serial consoleJan Beulich2012-09-1110-3/+1644
| | | | | | | | | | | Low level hardware interface pieces adapted from Linux. For setup information, see Linux'es Documentation/x86/earlyprintk.txt and/or http://www.coreboot.org/EHCI_Debug_Port. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Keir Fraser <keir@xen.org>
* console: prepare for non-COMn port supportJan Beulich2012-09-114-12/+30
| | | | | | | | | | Widen SERHND_IDX (and use it where needed), introduce a flush low level driver method, and remove unnecessary peeking of the common code at the (driver specific) serial port identification string in the "console=" command line option value. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: allow early use of fixmapsJan Beulich2012-09-118-6/+65
| | | | | | | | | As a prerequisite for adding an EHCI debug port based console implementation, set up the page tables needed for (a sub-portion of) the fixmaps together with other boot time page table construction. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* tmem: cleanupJan Beulich2012-09-112-11/+11
| | | | | | | | | - one more case of checking for a specific rather than any error - drop no longer needed first parameter from cli_put_page() - drop a redundant cast Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* tmem: fixup 2010 cleanup patch that breaks tmem save/restoreDan Magenheimer2012-09-111-0/+2
| | | | | | | | | | | | | | | | | | 20918:a3fa6d444b25 "Fix domain reference leaks" (in Feb 2010, by Jan) does some cleanup in addition to the leak fixes. Unfortunately, that cleanup inadvertently resulted in an incorrect fallthrough in a switch statement which breaks tmem save/restore. That broken patch was apparently applied to 4.0-testing and 4.1-testing so those are broken as well. What is the process now for requesting back-patches to 4.0 and 4.1? (Side note: This does not by itself entirely fix save/restore in 4.2.) Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* tmem: reduce severity of log messagesJan Beulich2012-09-112-41/+50
| | | | | | | | Otherwise they can be used by a guest to spam the hypervisor log with all settings at their defaults. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
* tmem: properly drop lock on error path in do_tmem_op()Jan Beulich2012-09-111-1/+7
| | | | | | Reported-by: Tim Deegan <tim@xen.org> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* tmem: properly drop lock on error path in do_tmem_get()Jan Beulich2012-09-111-1/+2
| | | | | | | | Also remove a bogus assertion. Reported-by: Tim Deegan <tim@xen.org> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* tmem: detect arithmetic overflow in tmh_copy_{from,to}_client()Jan Beulich2012-09-112-16/+19
| | | | | | | | | This implies adjusting callers to deal with errors other than -EFAULT and removing some comments which would otherwise become stale. Reported-by: Tim Deegan <tim@xen.org> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* tmem: don't access guest memory without using the accessors intended for thisJan Beulich2012-09-113-75/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is not permitted, not even for buffers coming from Dom0 (and it would also break the moment Dom0 runs in HVM mode). An implication from the changes here is that tmh_copy_page() can't be used anymore for control operations calling tmh_copy_{from,to}_client() (as those pass the buffer by virtual address rather than MFN). Note that tmemc_save_get_next_page() previously didn't set the returned handle's pool_id field, while the new code does. It need to be confirmed that this is not a problem (otherwise the copy-out operation will require further tmh_...() abstractions to be added). Further note that the patch removes (rather than adjusts) an invalid call to unmap_domain_page() (no matching map_domain_page()) from tmh_compress_from_client() and adds a missing one to an error return path in tmh_copy_from_client(). Finally note that the patch adds a previously missing return statement to cli_get_page() (without which that function could de-reference a NULL pointer, triggerable from guest mode). This is part of XSA-15 / CVE-2012-3497. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* tmem: check for a valid client ("domain") in the save subopsIan Campbell2012-09-111-0/+8
| | | | | | | | | This is part of XSA-15 / CVE-2012-3497. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com> Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* tmem: check the pool_id is valid when destroying a tmem poolIan Campbell2012-09-111-0/+2
| | | | | | | This is part of XSA-15 / CVE-2012-3497. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* tmem: consistently make pool_id a uint32_tIan Campbell2012-09-111-3/+3
| | | | | | | | | | | Treating it as an int could allow a malicious guest to provide a negative pool_Id, by passing the MAX_POOLS_PER_DOMAIN limit check and allowing access to the negative offsets of the pool array. This is part of XSA-15 / CVE-2012-3497. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* tmem: only allow tmem control operations from privileged domainsIan Campbell2012-09-111-4/+2
| | | | | | | This is part of XSA-15 / CVE-2012-3497. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* amd iommu: remove unnecessary map/unmap for l1 page tablesWei Wang2012-09-111-15/+17
| | | | | Signed-off-by: Wei Wang <wei.wang2@amd.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* amd iommu: use next_level instead of recalculating itWei Wang2012-09-111-1/+3
| | | | | Signed-off-by: Wei Wang <wei.wang2@amd.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* amd iommu: add 2 helper functions: iommu_is_pte_present and iommu_next_levelWei Wang2012-09-113-27/+19
| | | | | Signed-off-by: Wei Wang <wei.wang2@amd.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* x86: refactor mce codeChristoph Egger2012-09-116-98/+127
| | | | | | | | Factor common mc code out of intel specific code and move it into common files. No functional changes. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* x86: make the dom0_max_vcpus option more flexibleDavid Vrabel2012-09-112-15/+58
| | | | | | | | | | | | | | | | | | | | | | | | The dom0_max_vcpus command line option only allows the exact number of VCPUs for dom0 to be set. It is not possible to say "up to N VCPUs but no more than the number physically present." Allow a range for the option to set a minimum number of VCPUs, and a maximum which does not exceed the number of PCPUs. For example, with "dom0_max_vcpus=4-8": PCPUs Dom0 VCPUs 2 4 4 4 6 6 8 8 10 8 Existing command lines with "dom0_max_vcpus=N" still work as before (and are equivalent to dom0_max_vcpus=N-N). Signed-off-by: David Vrabel <david.vrabel@citrix.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* powernow: Update P-state directly when _PSD's CoordType is ↵Boris Ostrovsky2012-09-111-37/+25
| | | | | | | | | | | | DOMAIN_COORD_TYPE_HW_ALL When _PSD's CoordType is DOMAIN_COORD_TYPE_HW_ALL (i.e. shared_type is CPUFREQ_SHARED_TYPE_HW) which most often is the case on servers, there is no reason to go into on_selected_cpus() code, we call call transition_pstate() directly. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* x86/HVM: assorted RTC emulation adjustmentsJan Beulich2012-09-113-52/+67
| | | | | | | | | | | | | | | | | | | | | | - don't look at RTC_PIE in rtc_timer_update(), and hence don't call the function on REG_B writes at all - only call alarm_timer_update() on REG_B writes when relevant bits change - only call check_update_timer() on REG_B writes when SET changes - instead properly handle AF and PF when the guest is not also setting AIE/PIE respectively (for UF this was already the case, only a comment was slightly inaccurate) - raise the RTC IRQ not only when UIE gets set while UF was already set, but generalize this to cover AIE and PIE as well - properly mask off bit 7 when retrieving the hour values in alarm_timer_update(), and properly use RTC_HOURS_ALARM's bit 7 when converting from 12- to 24-hour value - also handle the two other possible clock bases - use RTC_* names in a couple of places where literal numbers were used so far Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/hvm: don't give vector callback higher priority than NMI/MCEJan Beulich2012-09-101-4/+4
| | | | | | | | Those two should always be delivered first imo. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* docs: document "ucode=" hypervisor command line optionJan Beulich2012-09-101-0/+13
| | | | | | Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: correct formatting errors in xmdomain.cfgMatt Wilson2012-09-101-4/+2
| | | | | | | | | | | | | | | | | | This patch corrects the following errors produced by pod2man: Hey! The above document had some coding errors, which are explained below: Around line 301: You can't have =items (as at line 305) unless the first thing after the =over is an =item Around line 311: '=item' outside of any '=over' Signed-off-by: Matt Wilson <msw@amazon.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl.cfg: gfx_passthru documentation improvementsPasi Kärkkäinen2012-09-101-1/+38
| | | | | | | | | gfx_passthru: Document gfx_passthru makes the GPU become primary in the guest and other generic info about gfx_passthru. Signed-off-by: Pasi Kärkkäinen <pasik@iki.fi> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: fix error message in device_backend_callbackRoger Pau Monne2012-09-101-1/+2
| | | | | | | | | | device_backend_callback error path always says "unable to disconnect", but this can also happen during the connection of a device. Fix the error message using the information in aodev->action. Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* unmodified_drivers: handle IRQF_SAMPLE_RANDOMOlaf Hering2012-09-101-1/+5
| | | | | | | | | | The flag IRQF_SAMPLE_RANDOM was removed in 3.6-rc1. Add it only if it is defined. An additional call to add_interrupt_randomness is appearently not needed because its now called unconditionally in handle_irq_event_percpu(). Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Jan Beulich <jbeulich@suse.com>
* VT-d: split .ack and .disable DMA-MSI actorsJan Beulich2012-09-101-3/+8
| | | | | | | | | | | | | Calling irq_complete_move() from .disable is wrong, breaking S3 resume. Comparing with all other .ack actors, it was also missing a call to move_{native,masked}_irq(). As the actor is masking its interrupt anyway (albeit it's not immediately obvious why), the latter is the better choice. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by Xiantao Zhang <xiantao.zhang@intel.com>
* adjust a few RCU domain locking callsJan Beulich2012-09-073-91/+50
| | | | | | | | | | | | | | | | | | x86's do_physdev_op() had a case where the locking was entirely superfluous. Its physdev_map_pirq() further had a case where the lock was being obtained too early, needlessly complicating early exit paths. Grant table code had two open coded instances of rcu_lock_target_domain_by_id(), and a third code section could be consolidated by using the newly introduced helper function. The memory hypercall code had two more instances of open coding rcu_lock_target_domain_by_id(), but note that here this is not just cleanup, but also fixes an error return path in memory_exchange() to actually return an error. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/MSI: fix 2nd S3 resume with interrupt remapping enabledJan Beulich2012-09-071-1/+6
| | | | | | | | | | | The first resume from S3 was corrupting internal data structures (in that pci_restore_msi_state() updated the globally stored MSI message from traditional to interrupt remapped format, which would then be translated a second time during the second resume, breaking interrupt delivery). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/32-on-64: adjust Dom0 initial page table layoutJan Beulich2012-09-071-5/+11
| | | | | | | | | | Drop the unnecessary reservation of the L4 page for 32on64 Dom0, and allocate its L3 first (to match behavior when running identical bit- width hypervisor and Dom0 kernel). Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>