Commit Graph
17445 Commits
Author SHA1 Message Date
Keir Fraser 5ace6c1924 hvm: Add HVM_PARAM_DM_DOMAIN to let ioreq events go to a stub domain
instead of dom0.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-11 17:19:07 +01:00
Keir Fraser e9b5fb4377 Turn some simple softirqs into tasklets.
TRACE_SOFTIRQ does not appear to be necessary at all.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-11 15:55:42 +01:00
Keir Fraser 989a44571e Support tasklets in Xen as a more dynamic alternative to softirqs.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-11 15:37:48 +01:00
Keir Fraser 812471f0d1 x86: Emulate accesses to PCI window registers cf8/cfc to synchronise
with accesses by teh hypervisor itself. All users of cf8/cfc go
through new access functions which take the appropriate spinlock.

Based on a patch by Haitao Shan <haitao.shan@intel.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-11 13:19:55 +01:00
Keir Fraser aa3ca83fda tools: Make xend set time offset for all kinds of domains, so that
ioemu doesn't need to do it.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-04-11 09:14:03 +01:00
Keir Fraser 5bb8a6fad8 VT-d: DMAR device scope parse fixup
Previously applied sanity check fixup is incorrect.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-04-11 09:12:56 +01:00
Keir Fraser fd1527b4d2 x86/64 compat: Replace hypervisor BUG_ON() with a cleaner hypercall failure.
While trying to run a 32-bit PV domU on a 64-bit hypervisor, I
triggered an assert in the hypervisor.  The assert dealt with the
maximum number of grants that a domU can have.  I made the hypervisor
a bit more graceful by returning an error rather than asserting.

Signed-off-by: Michael Abd-El-Malek <mabdelmalek@cmu.edu>
2008-04-11 09:10:58 +01:00
Keir Fraser 8a7227082a libxenguest: Fix a typo.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-04-11 09:07:58 +01:00
Keir Fraser ffbb87b692 x86: disable PIT irq after S3 resume
Signed-off-by: Yu Ke <ke.yu@intel.com>
2008-04-11 09:06:11 +01:00
Keir Fraser c02f50263f hvm: Fix a typo in p2m.c.
Spotted by Xiao Wang <sirouni@yahoo.com.cn>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-10 16:17:28 +01:00
Keir Fraser ed8c5356ed x86, hvm: Fix up MTRR setup for extra magic page (IDENT_PT).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-10 11:17:50 +01:00
Keir Fraser 49fd7b4410 x86: Conditionally disable PIT 100HZ timer interrupt
100HZ PIT timer interrupt set a 10ms upper limit for C state
residency, which makes Xen not power friendly. This patch disable PIT
timer interrupt in the conditions:
 - CPU has APIC support, and
 - PIT is not used as platform time source

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-10 11:11:25 +01:00
Keir Fraser dacde68ff1 x86: Remove jiffies usage.
Jiffies will be obsolete in x86 after PIT timer interupt is disabled,
so this patch replace jiffies usage with NOW() API.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-10 10:12:04 +01:00
Keir Fraser 5f74ef6277 vmx: Enable live-migration with EPT
Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Xiaohui Xin <Xiaohui.xin@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-10 10:00:41 +01:00
Keir Fraser 1269742697 VT-d: Allocates page table pgd, root_entry, iremap and qinval from
domheap rather than xenheap, and get rid of structure page_info in
iommu.c.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2008-04-10 09:22:38 +01:00
Keir Fraser 4aad542894 VT-d: Share VT-d code between x86 and IA64
Declare arch-dependent functions in vtd.h, and implement them for x86.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2008-04-10 09:20:07 +01:00
Keir Fraser f342e8630c hvmloader: Fix build with gcc 4.1 and later.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-10 09:12:44 +01:00
Keir Fraser 1386e66a6e libxc: Move xg_memalign() into a proper source file, so that it
definitely does not leak out of tools/libxc. Return to the
ioemu/osdep.c way of checking for posix_memalign() as this works on
Solaris.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-09 17:49:25 +01:00
Keir Fraser 3cb6817ad5 libxc: Leave portability of xg_memalign() as in original patch, rather
than following ioemu/osdep.c. This unbreaks build of readnotes.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-09 16:54:44 +01:00
Keir Fraser 24561bd0a1 x86 hvm: Make sure that we correctly tear down the vlapic periodic
timer when the vlapic is destroyed or reset.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2008-04-09 16:32:51 +01:00
Keir Fraser 43650c346e save/restore: Use page-aligned allocations for hypercall args that are
mlock()ed across other hypercall invocations, to avoid aliasing with
other hypercall arguments, causing spurious unlocking.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2008-04-09 16:31:16 +01:00
Keir Fraser 9e4828ca8b x86 libxc: Fix mlock sizes in libxc around vcpu context hypercalls
backing off to the old behaviour if we fail.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2008-04-09 16:24:46 +01:00
Keir Fraser 2434aa5074 lsevtchn: Simple tool to list event channel states for a domain.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2008-04-09 16:11:34 +01:00
Keir Fraser fc7e83c464 x86: Suppress scary console message from sh_remove_shadows()
except in cases where the guest's behaviour is unrecoverable.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2008-04-09 16:04:10 +01:00
Keir Fraser b26eb8f848 ioemu: Fix rtl8139 emulation so that reboot works correctly in 64-bit
Windows VMs. Return an error if the guest OS tries to transmit a
packet with the transmitter disabled, so that it doesn't spin forever
waiting for it to complete.

Signed-off-by: Steven Smith <Steven.Smith@eu.citrix.com>
2008-04-09 16:03:40 +01:00
Keir Fraser 02cb043f47 xenstore: Place return statement in the correct place to fix the build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-09 16:02:49 +01:00
Keir Fraser 3d40548921 xenstore: fix canonicalize for metanodes
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2008-04-09 15:59:54 +01:00
Keir Fraser b8c7fc6368 hvm: Clean out save/restore debug tracing.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-09 15:57:31 +01:00
Keir Fraser be4ba13470 hvm: Allocate memory for hvm domains in batches.
Without this change, dom0 is unresponsive while the hvm domain's
physmap is populated in xen.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2008-04-09 15:25:16 +01:00
Keir Fraser 1a74322648 save/restore: Batch contiguous page-sized writes together during domain save.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2008-04-09 15:19:09 +01:00
Keir Fraser e2cf9bd6e0 x86, vmx: Enable VPID (Virtual Processor Identification)
Allows TLB entries to be retained across VM entry and VM exit, and Xen
can now identify distinct address spaces through a new
virtual-processor ID (VPID) field of the VMCS.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Xiaohui Xin <Xiaohui.xin@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-09 14:34:49 +01:00
Keir Fraser 279e0305e3 Revert 17409:a8ce3e934abd5d99 as it breaks the build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-09 14:10:32 +01:00
Keir Fraser 0691d7b911 Install missing ia64 hvm public headers.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-04-09 13:53:38 +01:00
Keir Fraser 656217ee9c hvmloader: Build with -Werror.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-09 13:52:52 +01:00
Keir Fraser 472f532c1d hvmloader: Fix parsing Etherboot roms to avoid an infinite loop.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-09 13:52:34 +01:00
Keir Fraser 42cad3d523 Share VT-d code between x86 and IA64
Declare arch-dependent functions in vtd.h, and implement them for x86.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2008-04-09 13:35:44 +01:00
Keir Fraser 1cdc9dd9e2 xenstore: fix Solaris compile with newer GCC versions
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-09 13:32:21 +01:00
Keir Fraser ad2d0860f3 xenstore: merge xenstore-ls into the multicall binary.
This is done separately from moving the other utilities into the
mutlicall since ls is slightly different and was already separate.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2008-04-09 13:31:19 +01:00
Keir Fraser 58b534c5d7 xenstore: make the xenstore clients a single multicall binary
rather than multiply compiled source.

This saves a bunch of space when statically compiling.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2008-04-09 13:30:37 +01:00
Keir Fraser dde3e02b70 xenstore: support building the xenstore clients statically.
This removes threading from libxenstore.a (but not libxenstore.so)
since pthreads is incompatible with static linking and none of the
command line clients require threads anyway.

It is now possible to build these utilities statically with a uclibc
toolchain which is useful for small userspace utility domains.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2008-04-09 13:27:33 +01:00
Keir Fraser e90bc46da3 x86, vmx: Enable EPT (Extended PageTable) support on new Intel processors.
We use the EPT page table as P2M (guest physical to machine
mapping), removing the linear page table when EPT is used for the
domain (see the new file p2m-ept.c). We did this by adding three
operations in the p2m_domain. If VT-d is enabled, the EPT page table
will be used as the VT-d page table as well (i.e. shared).

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Xiaohui Xin <Xiaohui.xin@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-09 11:30:32 +01:00
Keir Fraser e5523678d7 ioemu: Add tapdisk-ioemu tool
Currently, tap:ioemu can only be used for domains which have a device
model running. This isn't the case for all domains. The most important
of the missing domains is Dom0 which needs acces e.g. to extract the
kernel from the domain's image.

tapdisk-ioemu is a tool compiled from ioemu source plus a small
wrapper which handles tap:ioemu access for domains without device
model (currently Dom0). You must start tapdisk-ioemu manually before
trying to attach a tap:ioemu disk to Dom0 at the moment. A patch to
blktapctrl will follow to automatically start tapdisk-ioemu when
needed.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-08 11:41:27 +01:00
Keir Fraser 7c4dc2c627 xm: Fix xm shutdown for xendomains.
If xm shutdown command is passed the domain ID, it should still wait
for the shutdown completion of the domain if passed option --wait.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-04-08 09:57:37 +01:00
Keir Fraser 67b5d35497 x86_64: Be more careful in emulating 32-bit call gates.
An assertion could legitimately fire.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-08 09:46:57 +01:00
Keir Fraser 994068a534 xencomm: add support for log dirty mode
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-04-07 15:02:47 +01:00
Keir Fraser 54cdc383f1 Split the meaning of "dom0-min-mem = 0" to a new option.
I have written a patch to split the current meaning of
"dom0-min-mem = 0" to a new option "enable-dom0-ballooning".

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-07 15:01:26 +01:00
Keir Fraser 01d02daa5f xend: Don't allow dom0 memory to be ballooned below dom0-min-mem
configuration parameter.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-04-05 22:25:30 +01:00
Keir Fraser ded4af0862 ioemu: drop duplicate memory reservation
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-04-05 22:21:42 +01:00
Keir Fraser a17eacb099 stubdom: trivial warning fixup
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-04-05 22:21:01 +01:00
Keir Fraser aae7fe3fa4 stubdom: add asynchronous disk flush support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-04-05 22:20:25 +01:00