Commit Graph
19351 Commits
Author SHA1 Message Date
Keir Fraser b8fb8d5f77 minios: allow to allocate machine contiguous pages
This is a port of XenLinux xen_alloc_contig_memory() to mini-os. A
sufficiently privileged mini-os guest can exchange a small number of
its pages with machine contiguous pages.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
2009-03-13 07:37:24 +00:00
Keir Fraser cde518aa71 blktap: Move error signaling to blktapctrl
Until now the udev script for blktap devices needs to decide if to
signal success or failure to xend. As this script runs completely
independent of blktapctrl and tapdisk/ioemu which do the real work,
the udev script can't even theoretically know if tapdisk is happy.

This patch removes the udev script and replaces its checks by new
ones in libblktap.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
2009-03-12 18:48:09 +00:00
Keir Fraser 3dc413c7bd blktapctrl: Fix too early close of pipes
Connections to ioemu have single_handler set, so they are closed as
soon as all images of a certain type are closed. This is wrong with
ioemu: All images that belong to the same domain are handled by the
same backend process (usually qemu-dm, but also tapdisk-ioemu for
domains without device model), regardless of the image type.

This patch checks for the same-domain condition for ioemu connections.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
2009-03-12 18:46:26 +00:00
Keir Fraser 57871f919d blktap: Export disk type constants for ioemu
Currently all disk types that are supported are defined in a header
file private to blktapctrl and tapdisk. When restoring ioemu as a
backend for blktap these constants are needed by ioemu, so move them
to a more public header file.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
2009-03-12 18:42:59 +00:00
Keir Fraser 8b173f5236 blktapctrl: Select backend by prefix
This patch adds support for specifying the backend (tapdisk or ioemu)
to blktapctrl. Images can be specified e.g. as tap:tapdisk:aio,
tap:ioemu:qcow2 or tap:vmdk. When omitting the backend, a default is
chosen based on the image type (currently always tapdisk because ioemu
as a backend is broken until a follow-up patch series against qemu-xen
is applied)

Signed-off-by: Kevin Wolf <kwolf@suse.de>
2009-03-12 18:42:31 +00:00
Keir Fraser 6dde5f55da xend: fix regression in c/s 19330
attached patch fixes a regression in c/s 19330 which
prevents to start guests on a Linux Dom0.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-03-12 15:40:52 +00:00
Keir Fraser 0ef0dcc006 Add debug code to catch count_info errors in page_alloc.c
This patch is temporary.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-12 15:37:12 +00:00
Keir Fraser 793c836898 Code cleanups after page offline patch.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-12 15:31:36 +00:00
Keir Fraser 0aef8a0311 xend: Fix removing /vm/UUID/device paths when device cannot be disconnected
This is a corrected version of a patch commited as c/s 19250 and
reverted by c/s 19314. Thanks to "trap sigerr ERR" in
xen-hotplug-common.sh the xen-hotplug-cleanup would exit when reading
/local/domain/ID/vm fails thus skipping all the xenstore-rm lines in
the rest of the script.

Change deviceDestroy behavior to remove /vm/UUID/device/...
path only when force was used (as it already does so for both frontend
and backend) and do the removing from xen-hotplug-cleanup script when
we are sure the device is really not attached to the guest any more.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2009-03-12 15:08:08 +00:00
Keir Fraser 677a041f1f xentrace: error handling on non-existent formats file
Attached patch does proper error handling when specified
formats file doesn't exist.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-03-12 15:07:20 +00:00
Keir Fraser 7caeec9358 xend: Use parse_hex() in XendPPCI.py
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-12 11:33:35 +00:00
Keir Fraser 0dc8a04b2b xend: Do not create XendNetwork instance of tmpbridge
This patch prevents xend from creating a XendNetwork instance of
tmpbridge (a temporary bridge used in network-bridge script).

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-12 11:33:06 +00:00
Keir Fraser f777559395 x86: Fix a typo in vpmu_core2.c
When the HVM guest which is xenoprof's passive domain, is going to
shutdown, the Hypervisor panics because of typo in vpmu_core2.c

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
2009-03-12 11:26:32 +00:00
Keir Fraser b41dfb227d PV-on-HVM: Add a compatibility linux/scatterlist.h for kernels before 2.6.12
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2009-03-12 11:25:40 +00:00
Keir Fraser 670741eb94 Fix Makefile portability: head -n -1 isn't portable.
Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:24:25 +00:00
Keir Fraser 0ca8557b71 x86: Fix APIC 0x40 error when CPU online and Host s3 resume
disable_APIC_timer actually is not useful here. Actually it will
trigger a local APIC error when masking the LVT entry when vector is
zero (before timer is inited) on Intel P6 family. This APIC error(40)
appears when online the offlined CPU and Host S3 resume.

Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Gang Wei <gang.wei@intel.com>
2009-03-12 11:16:54 +00:00
Keir Fraser 2ab3db9aae Fix xenstore permissions for Solaris domUs.
Solaris domUs use hvmpv/ and guest/ frontend xenstore directories.

Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:14:22 +00:00
Keir Fraser d188e4cc7e rombios: __STRING() is Linux-specific
Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:12:43 +00:00
Keir Fraser 2b9e3c9a48 pygrub: Detect NetWare PV in pygrub
Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:10:22 +00:00
Keir Fraser fb0a30b839 Domain core-dumping fixes
The code was attempting to use the domain's current number of pages
(info.nr_pages) as a maximum index.  We then walk the memory map and
can easily over-write past the end of the nr_pages-sized array, if the
domain has more pages mapped in than earlier (live dump).  Restrict
ourselves to the current number of pages.

Also fix the dump core method in xend to actually implement the crash
and live options.  In particular this means that xend clients other
than xm now get non-live dumps by default.

Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:09:57 +00:00
Keir Fraser 51494c8651 xend: Skip tap pipe creation on Solaris
Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:08:45 +00:00
Keir Fraser d88a38225c xend: Crash the domain if qemu-dm stops running
The comment about the lack of restart prevention is not accurate.

Bump the minimum restart time to 60 seconds.

Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:07:34 +00:00
Keir Fraser 43a12c170e Fix qemu spawn for Solaris
On Solaris, xend runs in a 'process contract' such that all children
are killed when the service is restarted.  Spawn qemu processes in a
new contract to avoid this.

Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:07:00 +00:00
Keir Fraser eb10d0f954 xend: Allow replacement of a cdrom device on a device_add
When adding a device, allow a cd to replace another if the device is a
cdrom.

Signed-off by: Ryan Scott <ryan.scott@sun.com>
2009-03-12 11:01:25 +00:00
Keir Fraser e36d0b0d06 xend: Time-out if guest fails to suspend
If a guest fails to re-write control/shutdown node within a minute,
fail the suspend operation.

Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:00:52 +00:00
Keir Fraser f87a6848fc xend: Allow off-line NIC removal
Match a MAC address so device_destroy can remove off-line NICs.

Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 10:59:53 +00:00
Keir Fraser 7865c25877 xend: Correctly catch invalid domain lookups
If a client asks about a non-existent domain, report the error back
properly instead of just backtracing within xend.

Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 10:59:19 +00:00
Keir Fraser 4696ce5d87 libfsimage: Support for zfs version 14.
Signed-off-by: Susan Kamm-Worrell <susan.kamm-worrell@sun.com>
2009-03-12 10:58:47 +00:00
Keir Fraser dc350ed2b5 pygrub: Workaround for Solaris CR 1143256.
The Solaris curses library has a broken timeout() function: after a
first timeout() call with a positive value for an argument, subsequent
calls will fail to reset it. So, getch() always times out, confusing
the pygrub timer in the main loop. Add an extra check to avoid exiting
prematurely.

Signed-off-by: Frank van der Linden <frank.vanderlinden@sun.com>
2009-03-12 10:58:21 +00:00
Keir Fraser 75c9ba7911 xend: Add support for cpuinfo data on Solaris
Signed-off-by: Russell Blaine <russell.blaine@sun.com>
2009-03-12 10:57:44 +00:00
Keir Fraser 1f7a575203 tools: Make some code compile only on Linux
Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 10:57:19 +00:00
Keir Fraser 275c6ccdc9 xenconsole: Solaris ptys have different semantics.
Make sure that tty semantics are active for Solaris ptys, or if they
aren't (and not needed) to not do tcget/setattr on the filedescriptor
in Python code.

Also work around a bug in the Solaris ptm streams driver, which will
cause a write error on the master side of a pty (because of e.g. a
missing slave) to persist forever.

Signed-off-by: Frank van der Linden <frank.vanderlinden@sun.com>
2009-03-12 10:56:55 +00:00
Keir Fraser 08dade96d9 Fix solaris xc_map_foreign_ranges()
Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 10:56:08 +00:00
Keir Fraser 8a5396dda1 x86 shadow: fix vram tracking
Check for writable mappings in ptes before assuming that the type
count in the page has changed.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
2009-03-12 10:55:43 +00:00
Keir Fraser c3eca72600 passthrough: fix alignment of bind.u.msi.gtable
use uint64_aligned_t gtable instead of uint64_t for 32/64 compatiblity

Signed-off-by: Qing He <qing.he@intel.com>
2009-03-12 08:35:12 +00:00
Keir Fraser a2de1cf0f8 libxc: Replace bzero() usage with memset().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-12 08:34:07 +00:00
Keir Fraser ff54f62e43 Revert c/s 19250, as it seems to be causing problems.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-12 08:32:30 +00:00
Keir Fraser 740ba63f2b x86 hvm: Fix hvmemul_read_msr().
Original patch by Christoph Egger <christoph.egger@amd.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-11 19:13:47 +00:00
Keir Fraser e57bcd97a3 vscsi: Fix changeset 19310.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-11 13:11:21 +00:00
Keir Fraser 650f4fcb17 cpuidle: remove BM_RLD access from idle entry path
Port below linux patch into xen to reduce overhead from idle entry path.

commit 31878dd86b7df9a147f5e6cc6e07092b4308782b
Author: Len Brown <len.brown@intel.com>
Date:   Wed Jan 28 18:28:09 2009 -0500

    ACPI: remove BM_RLD access from idle entry path

    It is true that BM_RLD needs to be set to enable
    bus master activity to wake an older chipset (eg PIIX4) from C3.

    This is contrary to the erroneous wording the ACPI 2.0, 3.0
    specifications that suggests that BM_RLD is an indicator
    rather than a control bit.

    ACPI 1.0's correct wording should be restored in ACPI 4.0:
    http://www.acpica.org/bugzilla/show_bug.cgi?id=3D689

    But the kernel should not have to clear BM_RLD
    when entering a non C3-type state just to set
    it again when entering a C3-type C-state.

    We should be able to set BM_RLD at boot time
    and leave it alone -- removing the overhead of
    accessing this IO register from the idle entry path.

    Signed-off-by: Len Brown <len.brown@intel.com>

Signed-off-by: Wei Gang <gang.wei@intel.com>
2009-03-11 10:15:06 +00:00
Keir Fraser ce205e72b5 xend: Discard error messages of lsscsi
In the case of a host OS without lsscsi command, the following
error message is recorded into xend-debug.log when xend is started.
The error message is recorded once certainly.  If SCSI devices are
connected to the host OS, it is recorded to the number of SCSI
devices.

  sh: lsscsi: command not found

This patch discards the error message to /dev/null.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-11 10:14:33 +00:00
Keir Fraser 0b384c185a xm: Sort pvSCSI devices information by virtual HCTL
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-11 10:13:46 +00:00
Keir Fraser ceafa45a04 Improve vcpu_migration_delay handling.
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
2009-03-11 10:12:14 +00:00
Keir Fraser 106e7dd3a9 xend: Test tap devices in testDeviceComplete()
XendDomainInfo.testDeviceComplete() should check block devices have
shutdown correctly but it only considers vbd class devices and ignores
tap devices. The attached patch changes testDeviceComplete() to wait
for both vbd and tap devices to be shutdown correctly.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2009-03-11 10:10:15 +00:00
Keir Fraser f6be8835a3 passthrough: fix some spinlock issues in vmsi
Apart from efficiency, I hasten to fix the assertion failure.

- acquire pcidevs_lock before calling pt_irq_xxx_bind_vtd
- allocate msixtbl_entry beforehand
- check return value from domain_spin_lock_irq_desc()
- typo: spin_unlock(&irq_desc->lock) ->
- spin_unlock_irq(&irq_desc->lock)
- acquire msixtbl_list_lock with irq_disabled

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2009-03-11 10:09:21 +00:00
Keir Fraser 5a039efe11 xenconsole: Compile fixes for console code on Solaris
Signed-off-by: John Levon <john.levon@sun.com>
2009-03-11 10:08:31 +00:00
Keir Fraser 408cf363fa xentrace: TRC_SCHED_DOM_REM is defined, but never used. Use it.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2009-03-11 10:07:06 +00:00
Keir Fraser 8c28e3d47d passthrough: allow pass-through devices to share virtual GSI
Allow multiple pass-through devices to use the same guest_gsi.

The motivation for this is:

* Allow multi-function devices to be passed through as multi-function
  devices
* Allow more than two pass-through devices.
  - This will place more contention on the GSI-space, and allocation
    becomes a lot simpler if GSI sharing is allowed.

Signed-off-by: Simon Horman <horms@verge.net.au>
2009-03-11 10:05:00 +00:00
Keir Fraser e8ebaf831c passthrough: pt_irq_time_out() should act on all machine_irq
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-03-11 10:03:54 +00:00
Keir Fraser 9c3f0a9659 xentrace: trace when we continue with the same task
Trace when the scheduler decides to continue running the same process.
This lets us see that this is happening for one; it also lets us see
domains in a trace which are actively running on pcpu but never
scheduled out.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2009-03-09 15:01:34 +00:00