Commit Graph
19961 Commits
Author SHA1 Message Date
Keir Fraser e60c0b8f66 x86: make show_page_walk() more robust
Also add in a missing line in x86-64's do_page_walk().

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-07-20 10:10:15 +01:00
Keir Fraser bd9dfffdcb xend: modify sort() for Python 2.3
Python 2.3 does not support the sort(cmp, key, reverse) style.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-07-20 10:09:00 +01:00
Keir Fraser be8cd315f1 blktap2: Remove set() for Python 2.3
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-07-20 10:08:12 +01:00
Keir Fraser ee91a88190 ia64: Define paging_mode_external(), now needed by grant_table.c
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-20 10:07:28 +01:00
Keir Fraser 55c8a1407c Use git smart server protocol for qemu tree by default
xenbits supports the git protocol now, which is much faster (and
produces less noise in the build log too).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-07-20 10:02:50 +01:00
Keir Fraser c7b525bb3c xend: Restore scheduling parameters
Scheduling parameters are reset to default values when I restore
or migrate a domain.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-07-16 10:32:55 +01:00
Keir Fraser 016a8a4a48 hvmloader: Add new test for MSR_SHADOW_GS_BASE validity after SWAPGS instruction.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-16 10:30:50 +01:00
Keir Fraser b0ed77bd2f vmx: Fix handling of FS/GS base MSRs.
Firstly, these MSRs are always accessible if the CPU supports them --
we should not check for EFER.LMA.

Secondly, we should not use teh cached value of shadow_gs while the
VCPU is running. It can be stale if the guest has executed SWAPGS
(which we cannot trap). Hence always access the underlying host MSR
when emulating guest accesses.

The latter bug was found and a patch proposed by <leonid@3tera.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-16 10:26:55 +01:00
Keir Fraser a32e1cc859 tmem: No noise when disabled and not configured
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-16 08:30:23 +01:00
Keir Fraser dacf09d460 x86 svm: Disable intercepting CR3 writes when nested paging is enabled
This patch disables intercepting CR3 writes when nested paging is
enabled. For applications which cause excessive CR3 accesses, the
patch can increase their performance.

Signed-off-by: Wei Huang <wei.huang2@amd.com>
2009-07-16 08:26:29 +01:00
Keir Fraser b84689836a x86: extend some of Intel's recent MCE work to also support AMD
At least the MSR handling for guests can easily be made shared between
the two vendors; likely a lot of the other code in mce_intel.c could
also be made common. The goal here, however, is to eliminate the
annoying guest-tried-to-modify-msr messages that result from enabling
the MCE code on the Linux side.

Additionally (in order for not having to make the same change twice to
basically identical code) the patch also merges
amd_{fam10,k8}_mcheck_init(), enables the former to also be used for
Fam11 (I'd suppose that Fam12 would also need to go here, but I have
no data to confirm that), and does some minor (mostly coding style for
the code moved around) adjustments.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-07-15 16:21:12 +01:00
Keir Fraser 0afa130b1f tools/check: We do need a default for ${PYTHON} as called from
install.sh with PYTHON possibly undefined in the environment.

So we make PYTHON=python the sensible default.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-15 15:33:05 +01:00
Keir Fraser c8d0c0aba3 tools/check: No need to check for ${PYTHON} existence.
It must exist as otherwise the build will fail since we reference
$(PYTHON) all over the place. Furthermore the fallback of
'/usr/bin/env python' actually runs Python, it doesn't get the path to
it. So that wouldn't work very well.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-15 14:53:01 +01:00
Keir Fraser 0df83ebb36 i386: eliminate unsupported CPUs' MCA handling code
Neither Intel P5 nor Winchip are supported by Xen (due to
-march=i686 being passed to the compiler), so there is no point in
having code for handling their (rudimentary) MCA capabilities.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-07-15 14:35:34 +01:00
Keir Fraser 2e08ff6c7c Rename for_each_cpu() to for_each_possible_cpu()
... to be more precise in naming, and also to match Linux.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-07-15 13:15:50 +01:00
Keir Fraser dad74b0f9e i386: fix handling of Xen entries in final L2 page table
Running Xen on top of KVM exposed an issue that latently also exists
on real hardware: So far, updating any L3 entry resulted in the Xen
owned part of the L2 table referenced by the final L3 one to be re-
initialized. This was not only unnecessary, it actually resulted in
Xen relying on the TLB entry which maps the L2 page that's being
updated not going away intermediately, since as a first step the full
range of Xen owned entries in the L2 were replaced by the respective
ones from the idle page table, and only then the per-domain entries
got re- written to their intended values.

This part of the initialization really is sufficient to be done once,
when the page becomes an L2-with-Xen-entries (PGT_pae_xen_l2) one,
i.e. can be moved to alloc_l2_table(). Only the linear page table
setup has to remain where it always was.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-07-15 13:07:30 +01:00
Keir Fraser 172805bb4b stubdom: make -> $(MAKE)
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-15 10:31:50 +01:00
Keir Fraser 8449b7b053 Fix a couple of comment typos.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-15 10:30:59 +01:00
Keir Fraser 7b18165a5e x86: Fix an oversight of c/s 19927 - per-CPU data accesses must
not be iterated over using NR_CPUS bound loops.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-07-15 09:14:19 +01:00
Keir Fraser 64a78577fb stubdom: don't leak include dir on distclean
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-15 09:11:40 +01:00
Keir Fraser 0df54d9807 minios: switch to C99 integer types
This is a necessary step to make minios build on NetBSD.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-15 09:09:48 +01:00
Keir Fraser 4a493bdc5c debug=y default during development
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-14 21:25:24 +01:00
Keir Fraser c55d78193f stubdom: fix stubdom-dm error path
Exit the shell and not a subshell.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-14 14:46:04 +01:00
Keir Fraser 063aa7f823 python: Remove tab indents.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-14 14:43:19 +01:00
Keir Fraser 55eb5c4259 pass-through: use vdevn in xm_pci_attach()
Use vdevfn in xm_pci_attach() for non-zero functions,
the vslot element of dev dictionaries no longer exists.

Signed-off-by: Simon Horman <horms@verge.net.au>
2009-07-14 14:38:56 +01:00
Keir Fraser 0d9d127b27 docs/xenapi: Update examples section reflecting the current behaviour.
Signed-off-by: Andreas Florath <xen@flonatel.org>
2009-07-14 14:37:53 +01:00
Keir Fraser 71d2c144a7 stubdom: Install and use stubdompath.sh
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-13 16:50:53 +01:00
Keir Fraser 700ac7a490 x86-64: reduce symbol table size
With all of Xen's symbols sitting within a 2Gb range on x86-64, they
can be referred to by the kallsyms-like offset table using 4- instead
of 8-byte slots.

The marker table can use 4-byte slots in all cases, just like the
table entry counts can (though that's only a minor improvement).

If ia64's PERCPU_ADDR got moved down to (KERNEL_START + 2Gb -
PERCPU_PAGE_SIZE), it could also utilize the more compact form.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-07-13 16:49:50 +01:00
Keir Fraser b37d30c8fc Mapping grant references into HVM guests, take 2
After some discussion, here's a second version of the patch I posted a
couple of weeks back to map grant references into HVM guests.  As
before, this is done by modifying the P2M map, but this time there's
no new hypercall to do it.  Instead, the existing GNTTABOP_map is
overloaded to perform a P2M mapping if called from a shadow mode
translate guest.  This matches the IA64 API.

Signed-off-by: Steven Smith <steven.smith@citrix.com>
Acked-by: Tim Deegan <tim.deegan@citrix.com>
CC: Bhaskar Jayaraman <Bhaskar.Jayaraman@lsi.com>
2009-07-13 12:35:34 +01:00
Keir Fraser 1c4e651d3f Eliminate grant_table_op restriction
Eliminate the hard-coded, arbitrarily chosen limit of 512 grant table
ops a domain may submit at a time, and instead check for necessary
preemption after each individual element got processed, invoking the
hypercall continuation logic when necessary.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-07-13 12:18:04 +01:00
Keir Fraser d785a52854 Allow XENMEM_exchange to support exchange on foreign domains.
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
2009-07-13 12:17:05 +01:00
Keir Fraser fbaf0db4fc VT-d: fix assertion fault in pci passthrough code
Remove ASSERT(spin_is_locked(&pcidevs_lock)) in
pci_get_pdev_by_domain() to allow caller the flexibility to not hold
the lock if it does not care if the device is hot removed between the
time it got the pdev and the time it is used to get the corresponding
vt-d engine.  In the new RHSA use case, we just wanted to get the vt-d
engine of any device passthrough in the domain. Also, rename RHSA
field "domain" to "proximity domain" to avoid overloading the term
"domain" in virtualization context.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
2009-07-13 11:52:49 +01:00
Keir Fraser e1b075eaf1 x86: merge final linking scripts
While unrelated to the previous four patches, I realized that the two
scripts are nearly identical when coding those earlier patches, and
this patch depends on them in order to apply cleanly.

As an extra measure, it also adjusts the (unused) space freed at the
end of the per-CPU area to include all alignment space needed before
the first actual constituent of the .bss section (up to 7 pages on
x86-64).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-07-13 11:51:07 +01:00
Keir Fraser 716ffa3e1d Move cpu_{sibling,core}_map into per-CPU space
These cpu maps get read from all CPUs, so apart from addressing the
square(nr_cpus) growth of these objects, they also get moved into the
previously introduced read-mostly sub-section of the per-CPU section,
in order to not need to waste a full cacheline in order to align (and
properly pad) them, which would be undue overhead on systems with low
NR_CPUS.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-07-13 11:45:31 +01:00
Keir Fraser cfbf17ffbb Introduce and use a per-CPU read-mostly sub-section
Since mixing data that only gets setup once and then (perhaps
frequently) gets read by remote CPUs with data that the local CPU may
modify (again, perhaps frequently) still causes undesirable cache
protocol related bus traffic, separate the former class of objects
from the latter.

These objects converted here are just picked based on their write-once
(or write-very-rarely) properties; perhaps some more adjustments may
be desirable subsequently. The primary users of the new sub-section
will result from the next patch.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-07-13 11:32:41 +01:00
Keir Fraser 749182393c x86: move ucode_cpu_info into per-CPU space
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-07-13 11:31:34 +01:00
Keir Fraser 0e20e0e1c7 x86: move init_tss into per-CPU space
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-07-13 11:31:08 +01:00
Keir Fraser 0759ea7379 ia64: consolidate final linking step
This basically makes the final linking stage identical to x86's (with
the sole difference being that ia64 has the linker generate a map
file, while x86 doesn't), so would generally allow moving the final
linking rule into xen/Rules.mk.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-07-13 11:19:31 +01:00
Keir Fraser 2e2e8763c2 i386: fix boot
Since the Xen heap pages (which are the only ones mapped at this
point) don't get passed to init_boot_pages(), it has no place to store
the bootmem regions without faulting. Hence, a mapped page must be
passed to that function as the very first thing.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-07-13 11:18:57 +01:00
Keir Fraser 7ace84ccbc stubdom: Fix stubdom-dm after c/s 19818
19818 added the following line to stubdom-dm:
  . ./stubdompath.sh
and replaced many paths with variables.  However the path to
stubdompath.sh is obviously wrong and stubdompath.sh is nowhere to be
found anyway.  For the moment I am dropping . ./stubdompath.sh and
hardcoding the values of the variables.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-07-10 18:12:13 +01:00
Keir Fraser e7a00028f9 netbsd: remove qemu-ifup-nbsd, now that it is in the right place
(ioemu c/s 5cc34ea27f1cbd1a0560cfca91fb89ccd6d5726f)

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-09 17:06:40 +01:00
Keir Fraser df65440f41 Make python check scripts use of $(PYTHON) make variable.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-09 17:05:07 +01:00
Keir Fraser 75577f42e0 tools: python -> $(PYTHON)
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-09 16:06:52 +01:00
Keir Fraser b4f3b1640a Update QEMU_TAG to 5cc34ea27f1cbd1a0560cfca91fb89ccd6d5726f 2009-07-09 16:06:01 +01:00
Keir Fraser 3e3897953d Use $(PYTHON) Makefile variable when building the hypervisor.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-09 15:26:24 +01:00
Keir Fraser 6edab9fe64 x86_64: Fix Xen relocation size -- there is no longer an allocation
bitmap to account for.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-09 08:52:31 +01:00
Keir Fraser 0409e29e2b Replace boot-time free-pages bitmap with a region list.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-08 22:08:31 +01:00
Keir Fraser 4d5b3e46f1 Do not use bitmap allocator after boot time.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-08 16:47:58 +01:00
Keir Fraser 3e4d0322b7 x86 hvm: Use 'x' as parameter name for macros converting between
{vcpu,domain} and {vlapic,vpic,vrtc,hpet}. Completely avoids
accidental aliasing.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-08 14:22:00 +01:00
Keir Fraser ab7dec0345 blktap2: Fix compile warning with gcc4.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-08 11:00:23 +01:00