Commit Graph
19190 Commits
Author SHA1 Message Date
Keir Fraser 77de1e2709 blktap: Fix check_gcrypt
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2009-02-11 10:44:42 +00:00
Keir Fraser 4ce68a9d48 x86_64: Ensure enough space for allocator bitmap after relocated Xen image.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-11 10:41:45 +00:00
Keir Fraser e16fc5ba59 x86: mce: Provide extended physical CPU info.
Provide extended physial CPU info for the sake of dom0 MCE handling.
This information includes <cpu,core,thread> info for all logical CPUs,
cpuid information from all of them, and initial MSR values for a few
MSRs that are important to MCE handling.

Signed-off-by: Frank van der Linden <Frank.Vanderlinden@Sun.COM>
2009-02-10 05:51:00 +00:00
Keir Fraser ab620f29ef vtd: fix compilation error on ia64 for 19185:1eb6afcad849.
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2009-02-10 05:47:00 +00:00
Keir Fraser 8e73be0de8 vtd: adding support for multiple queued invalidation pages
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
2009-02-09 14:23:51 +00:00
Keir Fraser f58273a90c minios: fix p2m on x86
15675:bf85b467ee89 Fixed p2m on x86_64, but instead broke it on x86.

Signed-off-by: Samuel Thibault <samuel.thibaut@ens-lyon.org>
2009-02-09 14:22:07 +00:00
Keir Fraser c8c2116e93 [IA64] fix compilation error of iommu.c
This patch fixes the following compilation error on ia64
caused by 19178:4fcf4c9c9751.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-02-09 12:50:12 +00:00
Keir Fraser 8641c03db2 Revert 19178:4fcf4c9c9751ccb8ed
Breaks boot on every box under the sun it seems.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-09 12:46:26 +00:00
Keir Fraser 3a50e1966c [IA64] compilation fix of xentrace.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-02-06 11:18:45 +00:00
Keir Fraser 3f441c6c02 x86: Clean up page-mfn conversion macros to allow better override by shadow code.
Also fix is_xen_heap_mfn() to deal with invalid MFNs.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-06 11:15:28 +00:00
Keir Fraser 2b9a5bea15 xenctx: print x86_32 context on x86_64
Although x86_64 context covers x86_32, I think it's easy to watch.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2009-02-06 10:43:58 +00:00
Keir Fraser 81e91a22e4 Better separate IOAPIC management from interrupt vector management
Don't automatically update ioapic_irq array when allocating vectors.
Only do so when actually allocating IOAPIC irqs.  Also move some
IOAPIC specific defines to io_apic.c.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2009-02-06 10:42:26 +00:00
Keir Fraser 48a5350731 x86: Move interrupt vector management from io_apic.c to irq.c
Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2009-02-06 10:40:00 +00:00
Keir Fraser b67984ae8e x86: ->shutdown() in free_irq() should be passed vector, not irq.
Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2009-02-06 10:39:10 +00:00
Keir Fraser d4af292c82 Cleanup IOMMU interrupt setup
- Check for errors when allocating interrupt vectors
- Clean up if interrupt allocation failed
- Make sure that the allocated vector is not reused

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2009-02-06 10:36:23 +00:00
Keir Fraser 20eed172a7 libxenctrl: adds xc_domain_unbind_msi_irq to libxc.
The function is needed to unbind MSI/MSI-X on transition from D3hot
state to D0 state.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
2009-02-05 15:28:09 +00:00
Keir Fraser 686f69b6c1 Fix PCI passthrough for devices w/o iomem.
From: Manuel Bouyer <bouyer@netbsd.org>
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-02-05 15:08:53 +00:00
Keir Fraser e39b339789 x86: Use per-domain irq-to-vector array when mapping GSIs
Using the per-domain array enables single MSI vectors to be mapped.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2009-02-05 12:20:18 +00:00
Keir Fraser c8ff96bd9f xenctx support for 64-bit HVM guests
Now that we can easily find EFER.LMA, xenctx can detect 64-bit HVM
VCPUs

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2009-02-05 12:17:24 +00:00
Keir Fraser 2c3072a583 libxc support for the new partial-HVM-save domctl.
This includes making the pagetable walker in xc_pagetab.c behave
correctly for 32-bit and 64-bit HVM guests.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2009-02-05 12:17:08 +00:00
Keir Fraser 0c8eb5a51a Remove uses of DECLARE_BITMAP in the public HVM save format headers
and replace them with open-coded equivalents.  DECLARE_BITMAP is
not exported to user-space consumers of the Xen headers.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2009-02-05 12:16:53 +00:00
Keir Fraser 1bb7e0437b Add a new domctl to get a single record from the HVM save context
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2009-02-05 12:16:28 +00:00
Keir Fraser 38651997ed x86: recover pat value for bsp after S3 resume.
host pat is set to cover all memory types by Xen, which is
necessary to support guest mtrr/pat, especially when device
is passthroughed with VT-d. However pat on bsp is not=20
recovered which could make assigned device defunct after S3
resume

Signed-off-by Kevin Tian <kevin.tian@intel.com>
2009-02-05 12:14:09 +00:00
Keir Fraser 345dd80d93 x86: solve spinlock bug in s3 cpufreq path.
Signed-off-by Kevin Tian <kevin.tian@intel.com>
2009-02-05 12:13:25 +00:00
Keir Fraser 3e17f3c829 x86: EPT cleanups.
Signed-off-by: Xin, Xiaohui <xiaohui.xin@intel.com>
2009-02-05 12:12:34 +00:00
Keir Fraser 6dec681bb6 Add a page_info flag to indicate whether free pages need a TLB flush
on next use.

Apart from teh small performance gain of this, my primary motivation
is to avoid TLB flushes very early in boot, when the system is not yet
properly set up for cross-TLB shootdowns.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-05 12:09:10 +00:00
Keir Fraser e0cf17bba6 x86: Throw away .eh_frame exception-handling sections. Otherwise they
can fail the build by requiring linking against discarded .exit.*
sections.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-05 08:28:00 +00:00
Keir Fraser 96c071bf9c Remove cpumask for page_info struct.
This makes TLB flushing on page allocation more conservative, but the
flush clock should still save us most of the time (page freeing and
alloc'ing tends to happen in batches, and not necesasrily close
together). We could add some optimisations to the flush filter if this
does turn out to be a significant overhead for some (useful)
workloads.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-04 15:29:51 +00:00
Keir Fraser fe9e657ab6 x86: Clean up PV guest LDT handling.
1. Do not touch deferred_ops in invalidate_shadow_ldt(), as we may
 not always be in a context where deferred_ops is valid.
 2. Protected the shadow LDT with a lock, now that mmu updates are not
 protected by the per-domain lock.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-04 15:08:46 +00:00
Keir Fraser c1bba203a8 x86: Rename cached current from 'v' to 'curr' in a few places.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-04 14:46:47 +00:00
Keir Fraser 178c9c3991 x86: No need to flush TLBs on free_page_type() as we no longer trust
the linear pagetable mapping (we use it but we double check it).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-04 14:28:13 +00:00
Keir Fraser 38ab03b763 x86: Relocate Multiboot module command-line strings.
Missed this in the original patch.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-04 13:27:17 +00:00
Keir Fraser 149748770b xend: fix vncconsole option
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-04 12:43:11 +00:00
Keir Fraser e0d92ea91c Eliminate some special page list accessors
Since page_list_move_tail(), page_list_splice_init(), and
page_list_is_eol() are only used by relinquish_memory(), and that
function can easily be changed to use more generic accessors, just
eliminate them altogether.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-02-04 12:01:47 +00:00
Keir Fraser 6ecbae750b xend: Delay before SIGKILL qemu
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-02-04 12:01:05 +00:00
Keir Fraser 9a001710b4 vtd: Add a boot parameter option for snoop control capability for VT-d.
The default is to use snoop control.

Signed-off-by: Xin, Xiaohui <xiaohui.xin@intel.com>
2009-02-04 12:00:06 +00:00
Keir Fraser b526733e2f xm: Improve xm error if booted native
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2009-02-04 11:58:25 +00:00
Keir Fraser 2450e3575f docs: Add detach console note to xm man page
I've been asked too many times about a hint in xm man page on how to
'detach' from a guest console - aka Ctrl+]

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2009-02-04 11:57:47 +00:00
Keir Fraser 14e9431629 XendAPIStore - do not remove non-existent item
If list is searched and item not found, then don't attempt to delete
the item.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2009-02-04 11:57:17 +00:00
Keir Fraser 1d274df151 x86: avoid redundant TLB flushes
While in some places the guest requested flushes were already folded
into the deferred ops, this wasn't done consistently.

Also avoid using an uninitialized variable, even if doing so has no
correctness issue.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-02-03 18:14:19 +00:00
Keir Fraser b30f1137e5 x86: misc adjustments to acpi-cpufreq
Avoid the call to check_freq() by default, since that function may
spin up to 1ms on certain systems without indicating any kind of severe
failure. This matches similar behavior in Linux.

Avoid doing a cross processor call in get_cur_val() if the current CPU
has its bit set in the mask passed in. Also use the local variable
'cpu' consistently, allowing to remove another local variable.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-02-03 18:13:55 +00:00
Keir Fraser 7beb0a2feb cpufreq: attach __exit to the (unused) cpufreq governor exit handlers
... in order to make them disappear from the final image. Of course
they could as well be removed altogether, but I assumed that whoever
added them had a reason to do so.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-02-03 18:13:22 +00:00
Keir Fraser 77699d4240 Consolidate cpufreq cmdline handling
... by moving as much of the option processing into cpufreq code as is
possible, by folding the cpufreq_governor option into the cpufreq one
(the governor name, if any, must be specified as the first thing after
the separator following "cpufreq=xen"), and by allowing each
governor to have an option processing routine.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-02-03 18:12:51 +00:00
Keir Fraser 964fb3d636 x86: Relocate Multiboot structures where we know they will be
accessible. GRUB2 seems to like to stick them really high sometimes
(just below 4GB).

The 32-bit C code framework that this sets up can also be used for
other stuff in future:
 * early cmdline parsing
 * relocating multiboot modules so they too are guaranteed accessible

Its interaction with normal Xen start-of-day, and with the 16-bit
assembly trampoline, needs a bit of thought.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-03 18:11:03 +00:00
Keir Fraser 684e6b10cb ia64: fix compilation error
This patch fixes the following compilation error.
Since struct page_list_head is defined in mm.h, sched.h needs mm.h.
Other circular inclusions are sorted out.

> In file included from xen/include/asm-ia64/linux-xen/asm/smp.h:50,
>                  from xen/include/linux/smp.h:5,
>                  from xen/include/asm-ia64/linux/topology.h:33,
>                  from xen/include/asm-ia64/linux-xen/linux/gfp.h:6,
>                  from xen/include/asm/mm.h:11,
>                  from xen/include/xen/mm.h:90,
>                  from viosapic.c:35:
> xen/include/xen/sched.h:174: error: field page_list has incomplete
> type
> xen/include/xen/sched.h:175: error: field xenpage_list has
> incomplete type

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-02-03 14:06:51 +00:00
Keir Fraser 720a883c7f x86/shadow: struct page_info's type_info is now unsigned long,
hence local variables of type u32 (and the more such with misleading
names) must no longer be used.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-02-03 14:03:32 +00:00
Keir Fraser 4134c89049 Fix 'debug ?= y' to actually enable debug build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-02 09:21:04 +00:00
Keir Fraser 2090d39064 x86: page_info cleanups.
1. No reason for i386 not to use the same definitions as x64
 2. No need for shadow_page_info names to hang around.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-30 11:33:27 +00:00
Keir Fraser 8ddc017144 page_alloc: try to put heap control structures on the target node
This also neatly eliminates (in certain cases) the need to reserve a
page between nodes, as the heap control structures will never be freed
and thus can serve as the needed separator.

It also adds an additonal fallback attempting to make use of the
wasted tail of a (group of) page(s) used for the _heap array by putting the
avail array there if it fits.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-01-30 11:16:52 +00:00
Keir Fraser b93bffcc1a page_alloc: properly honor MAX_ORDER in init_heap_pages()
The previous check was flawed in that it checked
- for a single bit to be set instead of a range of bits to be clear
- a machine address against a mask supposed to be used on MFNs.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-01-30 11:14:23 +00:00