Commit Graph
6402 Commits
Author SHA1 Message Date
Keir Fraser 85715f4bc7 MSI 5/6: add MSI support to passthrough HVM domain
Currently it only inercept access to MSI config space, no MSI-x support.

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
2008-05-01 10:33:03 +01:00
Keir Fraser 46ac8f31a0 MSI 4/6: remove io_mem permission for MSI-X, since MSI-X
facilities are allocted through and located in PCI BAR.

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
2008-05-01 10:32:10 +01:00
Keir Fraser ca0074e519 MSI 2/6: change the pirq to be per-domain
Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
2008-05-01 10:30:22 +01:00
Keir Fraser 84aaf4530b xemnstored: Fix xenstored abort when connection dropped.
If a connection is dropped with pending input and output data then the
connection will be dereferenced by both handle_input and handle_output
resulting in a double free when the main loop dereferences the
connection.

Fix this issue by taking/releasing a reference over the calls to
handle_input and handle_output separately and checking the result of
talloc_free to see if the connection went away.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2008-05-01 10:00:00 +01:00
Keir Fraser a2f23ae851 [Xend/ACM] Provide explicit initialization function for bootloader class
This patch refactors the initialization code for the bootloader class
and puts it into an explicit initialization function that is called
from another class.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-05-01 09:55:45 +01:00
Keir Fraser f0dc96dc71 [Xend/ACM] Embed the policy schema in the python file
This patch embeds the ACM policy's schema in the python file where the
schema is being accessed for verifying the policy XML. This way also
programs that cannot access a protected directory where the schema may
be located in can use this class.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-05-01 09:55:06 +01:00
Keir Fraser 65bdbfa43a VT-d: Separate VT-d page table from P2M table
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2008-05-01 09:53:26 +01:00
Keir Fraser 2023e7a5c4 Fix xend config typos
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-01 09:50:58 +01:00
Keir Fraser 0f26d15c7b Add SSL/TLS support to relocation
* SSL/TLS support is disabled by default, as other server did.

 * If "xend-relocation-server-ssl-key-file" and
   "xend-relocation-server-ssl-cert-file" exist, SSL/TLS is enabled
   automatically.

 * "xend-relocation-tls" is used by relocation client only.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-01 09:50:16 +01:00
Keir Fraser 5f14a87ceb x86, hvm: Guest CPUID configuration.
CPUID's replies are now pre-calculated in libxc and given to the
hypervisor via a new domctl.

There are two parts to this feature:
   - We can overwrite cpuid's replies.
   - We can check that a vm is compatible with a host's processor.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-25 13:44:45 +01:00
Keir Fraser 9fb02748d0 xm: Add a new option to xm dump-core
The option is -R|--reset.  A guest domain is reset after saving
a core dump of the guest domain when specified the option.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-04-25 13:40:39 +01:00
Keir Fraser 17da362de7 xm: Fix cmdHelp() for xm reset
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-04-25 13:40:05 +01:00
Keir Fraser d5a22fa12f vmx: Fix address of EPT identity-map pagetable that is passed from the
domain builder down to the hypervisor.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-24 14:33:42 +01:00
Keir Fraser 88bc5163bc ioemu: Save PCI device INTx line states.
Otherwise, ioemu can be out of sync with the hypervisor after
restoring guest state, if INTx lines were asserted when the state was
saved. This prevents ioemu from setting the line to zero in Xen
(because it thinks the line is already zero). This can allow th eguest
to enter an endless IRQ loop and hang.

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-24 10:14:43 +01:00
Keir Fraser 0501e7a2ab ia64: fix domain builder
Windows on ia64 can't boot since cset 17397:61a3e041ea12.
The memory for video RAM must be added as the x86 does.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-04-24 10:01:27 +01:00
Keir Fraser f3814331c7 xenbaked: Fix access to trace buffer after xentrace changes
Signed-off-by: Naoki Nishiguchi <nisiguti@jp.fujitsu.com>
2008-04-24 09:59:57 +01:00
Keir Fraser defe5e9a30 blktap: Automatically start tapdisk-ioemu on demand
When a domain wants to use a tap:ioemu disk but has no device model,
start a tapdisk-ioemu instance as provider. Also, move the creation
and removal of communication pipes to xend so that qemu-dm doesn't
need the unwanted SIGHUP handler anymore.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
2008-04-23 16:57:23 +01:00
Keir Fraser a7f2eeb898 ACM: Put hash of XML policy into binary policy to tie them together
This patch extends the ACM binary policy format with an embedded hash
of the corresponding XML policy in order to tie them together. This
allows xend to determine whether it has the correct XML policy in its
repository and react appropriately if it does not have it.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-04-23 13:29:09 +01:00
Keir Fraser 8318d7d63d Revert 17499:451ae3b8e5c8
Breaks HVM guest creation (bugzilla #1221).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-23 13:30:24 +01:00
Keir Fraser 3b64ad17ca blktap: Automatically start tapdisk-ioemu on demand
When a domain wants to use a tap:ioemu disk but has no device model,
start a tapdisk-ioemu instance as provider. Also, move the creation
and removal of communication pipes to xend so that qemu-dm doesn't
need the unwanted SIGHUP handler anymore.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
2008-04-22 14:39:33 +01:00
Keir Fraser dfff66aee9 x86_emulate: Support CMPXCHG16B.
Also clean up cmpxchg() callback handling so we can get rid of teh
specific cmpxchg8b handler.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-22 14:34:16 +01:00
Keir Fraser fd6c8de67e console: Provide option to stall the inter-domain console ring rather
than discard characters in the console daemon buffers.

New option: -o, --overflow-data=discard|keep

This option changes the behaviour when dealing with data that overflow
the max capacity of the buffer. If overflow-data is set to discard
(the default), the current behaviour is used: we discard some data in
the middle of the buffer.

If overflow-data is set to keep, we stop listening to the ring until
we free some space in the buffer. This can cause the ring to fill up
and the guest kernel internal buffer to fill up as well. When this
happens the guest kernel stops reading characters from the console
device so the application generating data hangs. When xenconsoled
resumes reading from the ring, the guest kernel will be able to resume
reading from the console device as well. At that point the guest
application will be allowed to continue.

The risk of making this behaviour the default is that existing kernel
drivers may assume they can rely on timely ring updates by the console
daemon and thus themselves block on the ring being emptied.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2008-04-22 10:34:55 +01:00
Keir Fraser 978e9bef8c hotplug scripts: Fix sharing check for blktap
Run check_blktap_sharing() only when a disk is added to guest with blktap.
A check_blktap_sharing() doesn't have to be run when a disk is removed.

Signed-off-by: Hirofumi Tsujimura <tsujimura.hirof@jp.fujitsu.com>
Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
2008-04-22 10:29:32 +01:00
Keir Fraser bd5b777ef9 xm: Add a new command: xm reset
If a hang-up of a guest OS occurs, we will restart the guest OS by
using
the following commands.
 1. xm destroy
 2. xm create or xm start

To reduce the number of xm commands to use, this patch adds a new
command.  The command is "xm reset".  The command executes destruction
of a domain, and then creation of the domain.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-04-22 10:18:13 +01:00
Keir Fraser 4b9fd1bad1 ioemu: Fix cross-build of tapdisk-ioemu
changeset e1962ac0fb1c breaks cross-builds because it assumes the
system strip tool applies to the generated binaries.  This assumption
isn't made anywhere else in the xen tools build.

Signed-off-by: Aron Griffis <aron@hp.com>
2008-04-18 11:08:10 +01:00
Keir Fraser a6836b4fdd x86_emulate: Implement a more dynamic interface for handling FPU
exceptions, which will allow emulation stubs to be built dynamically
in a future patch.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-16 16:10:41 +01:00
Keir Fraser a6a8223242 x86, hvm: Lots of MTRR/PAT emulation cleanup.
- Move MTRR MSR initialisation into hvmloader.
 - Simplify initialisation logic by overlaying UC on default WB rather
   than vice versa.
 - Clean up hypervisor HVM MTRR/PAE code's interface with rest of
   hypervisor.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-16 13:36:44 +01:00
Keir Fraser 5539f61f5b stubdom: make use of PVFB resize event
which with the offset support also permits to expose the VGA vram and
non-shared vram throught PVFB at the same time, switching between both
as appropriate.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-04-16 10:21:08 +01:00
Keir Fraser 426747a871 ioemu: drop reschedule of handle_buffered_io on I/O reqs
Rescheduling the call to handle_buffered_io costs the system call to
qemu_get_clock(), which is very expensive considering the the latency
we would like to achieve for I/O reqs, so we should avoid it.

That means that handle_buffered_io may be called as often as every
0.1s, but that's not so costly.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-04-16 10:07:49 +01:00
Keir Fraser 28baa78877 stubdom: sparse application's BSS by linking it separately first, put
markers at its beginning and end, and then link with mini-os.
That permits to stick a bit more to upstream qemu.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-04-16 10:05:57 +01:00
Keir Fraser bb475a64ea [LIBFSIMAGE] Support 256 byte inodes on ext3
Patch taken from Debian grub package version 0.97-32.
See http://bugs.debian.org/463236 & http://bugs.debian.org/463123

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2008-04-16 09:45:44 +01:00
Keir Fraser b42f8b07d1 hvmloader: Explicitly revert to text section after declaring bss fields.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-15 18:11:44 +01:00
Keir Fraser 1eaea3f0b6 hvmloader: Framework for multiprocessor initialisation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-15 16:39:00 +01:00
Keir Fraser 98892a5e57 tools: Build fixes for *BSD.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-15 16:07:30 +01:00
Keir Fraser fb6dd9a130 ioemu: COW driver flush method should return an int.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-15 16:04:30 +01:00
Keir Fraser ef3c86eb81 xend/acm: Fixes to labelling of resources.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-04-15 10:24:55 +01:00
Keir Fraser f541851c79 hvmloader: Small cleanups.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-14 14:10:11 +01:00
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 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 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 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 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 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 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