Commit Graph
19396 Commits
Author SHA1 Message Date
Keir Fraser b21c09a4ff cpuidle and xenpm small cleanups.
Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
2009-03-19 10:10:31 +00:00
Keir Fraser cb4343bf2e xenpm: add timeout option to 'xenpm start' command.
Thus we can sample a fixed time of period without manual interruption.

Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
2009-03-19 10:09:59 +00:00
Keir Fraser 7dc1bc818a Fix a cpufreq userspace limitation bug
Fix a cpufreq userspace limitation bug, so that userspace freq can
return to correct freq when freq_limitation return to high value (like
ppc event)

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>=
2009-03-19 10:09:24 +00:00
Keir Fraser 93d17a53a3 xentrace: Add acpi pm tick output to idle tracing
The reason is that tsc stops and it causes the inaccuracy.
And later we can write some scripts based on this patch.

Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
2009-03-19 10:08:48 +00:00
Keir Fraser d532e54c26 x86, hvm: Fix double-free of vpmu->context
When `opcontrol --shutdown' is called after xenoprof is used on Dom0,
the vpmu owner becomes PMU_OWNER_NONE. So it is possible to acquire
the owner as PMU_OWNER_HVM and to allocate vpmu->context twice. As a
result, the hypervisor panics because of double-alloc/free of
vpmu->context.

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
2009-03-19 10:05:01 +00:00
Keir Fraser d046c2261f x86 dom builder: Allocate domU pages in batches.
Allows a 32-bit dom0 to create very large guests.

Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-19 10:04:15 +00:00
Keir Fraser 4b031bb5b7 ioemu-stubdom: Use xen-setup-stubdom rather than configure
xen-setup runs the upstream configure script, and ends up
autodetecting various properties of the host and then trying to use
them in stubdom, which works badly.

In commit c609854fe18aab3216f28e1e5291b75970d398d5 in
qemu-xen-unstable we provide a new `xen-setup-stubdom' script, which
hardcodes the relevant answers.

With these two changes, stubdom should compile again.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-03-18 17:30:13 +00:00
Keir Fraser ef940f08d5 libxc: Use write_exact() in lock_suspend_event().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-18 17:25:54 +00:00
Keir Fraser ecc2898567 Add PVUSB and PVSCSI interface headers.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-18 15:42:47 +00:00
Keir Fraser b832b2b46c fs-back: build fixes
Remove some unused variables and replaces read and write
to the pipe with read_exact and write_exact (these two functions are
implemented in libxc, that we have to link anyway).

This allows fs-backed to be compiled with -D_FORTIFY_SOURCE=2, hence
should fix the problems reported by Boris.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-03-18 13:25:25 +00:00
Keir Fraser 0629adfd80 Actually set a HVM domain's time offset when it sets the RTC
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2009-03-18 13:24:42 +00:00
Keir Fraser 655d4f2e58 fs-backend.c misses the unistd.h include for read() and write().
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2009-03-18 11:51:30 +00:00
Keir Fraser 9fdcb6ca93 x86: Change the mod_lx_entry to accept the vcpu parameter
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
2009-03-18 11:50:16 +00:00
Keir Fraser cce99fb132 Move the suspend event channel function to libxc, it will use the
/var/lib/xen/suspend_evtchn_lock.d to protect the access.

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
2009-03-18 11:49:26 +00:00
Keir Fraser 760f973171 xc_save: remove the dependency on the global si structure
Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
2009-03-18 11:48:48 +00:00
Keir Fraser fe9cfff52a vtd: Only enable some VT-d features if all VT-d engines support them.
By default, we enable snoop control, queued invalidation and interrupt
remapping if all VT-d engines support them, and for DMA passthrough we
don't enable it by default.

A user can use 'iommu=passthrough' to enable DMA passthrough (only
for Dom0). A user can use 'iommu=no-snoop,no-qinval,no-intremap' to
disable the 3 features.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>=
2009-03-18 11:46:32 +00:00
Keir Fraser 0456ddb432 Disable xen platform PCI device when xen_platform_pci=0 is specified
- Change guest firmware to use new fixed byte port 0x10.
 - Add "xen_platform_pci" option into guest config file and APIs.
    xen_platform_pci=0: Disable xen platform device.
    xen_platform_pci=1: Enable xen platform device. (default)
 - Add "disable_pf" entry into xenstore.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
2009-03-18 11:37:59 +00:00
Keir Fraser 84b150afdb xend: Fix vscsi assignment when XenAPI is available
When XenAPI is available, xm scsi-attach fails.  Also xm new and
xm create fail if a vscsi parameter is defined into domain
configuration files.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-18 11:34:20 +00:00
Keir Fraser 34bbd7a252 xend: Use vnc-listen setting specified in xend config file
If domU frame buffer configuration has no vnclisten attribute set, use
the global vnc-listen address specified in xend configuration file
when updating vfb location.  Currently the hardcoded value 'localhost'
is used.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2009-03-18 11:32:46 +00:00
Keir Fraser 40f73f9e5e x86: Assert non-zero refcount on entry to put_page().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-17 15:40:25 +00:00
Keir Fraser 95b81d6a80 Revert debugging patch c/s 19344.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-17 15:29:57 +00:00
Keir Fraser 11c121640c x86: Fix get_page() to not drop reference count if it wasn't incremented.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-17 15:29:20 +00:00
Keir Fraser 9bdaef991b x86 mcheck: Fix the build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-17 14:32:52 +00:00
Keir Fraser 7a54e4ba24 x86 shadow: Fix 2-on-3 mode.
Signed-off-by: Gianluca Guida <Gianluca.Guida@eu.citrix.com>
2009-03-17 14:30:15 +00:00
Keir Fraser 3ea6bace3b x86 shadow: Prevent in-sync L1s to become writable
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-17 14:29:26 +00:00
Keir Fraser a26e304487 fs-back: Fixes and cleanups
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-03-17 14:28:33 +00:00
Keir Fraser b44d50121f Add CPU status info and a status call to the CPU on/offline sysctls.
Signed-off-by: Frank van der Linden <frank.vanderlinden@sun.com>
2009-03-17 14:25:41 +00:00
Keir Fraser 6ea019bf65 x86 mcheck: Provide MCA "injection" hypervisor services.
Signed-off-by: Gavin Maltby <gavin.maltby@sun.com>
2009-03-17 14:24:08 +00:00
Keir Fraser e114bca753 x86 mcheck: Replace hypervisor MCA telemetry structures with something
more robust and designed to make terminal error telemetry available to
the dom0 panic flow for diagnosis on reboot.

Use common code for a lot of the AMD and Intel MCE handling code.

Signed-off-by: Gavin Maltby <gavin.maltby@sun.com>
Signed-off-by: Frank van der Linden <frank.vanderlinden@sun.com>
2009-03-17 14:22:50 +00:00
Keir Fraser 60158182b4 Make stubdom compile on systems with libvde installed
We need to disable libvde in the stubdom qemu-xen configuration.
Thanks to Jun Koi for the report and testing.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-03-17 14:21:18 +00:00
Keir Fraser dd3b3946f7 Fix MAX_EVTCHNS() definition.
Pointed out by Jan Beulich.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-17 13:21:46 +00:00
Keir Fraser 34c7288b6b x86, cpuidle: disable ARB_DISABLE access for latest intel platforms
ARB_DISABLE is a nop on all of the recent Intel platforms. Disable
ARB_DISABLE and attached c3_lock on C3 entry exit for such platforms.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
2009-03-17 10:50:16 +00:00
Keir Fraser 063dd0319a xend: Add s3_integrity attribute for XenAPI
When XenAPI is available, xm new and xm create fail.

# xm new vm1
Using config file "/etc/xen/vm1".
Attribute 's3_integrity' not declared
# xm create vm1
Using config file "/etc/xen/vm1".
Attribute 's3_integrity' not declared

This patch adds an s3_integrity into create.dtd.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-17 10:49:42 +00:00
Keir Fraser 57f692c8e9 hvmloader: Allow any unused PCI device to be used for PCI hotplug
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-03-17 10:48:52 +00:00
Keir Fraser 33548d1102 xend: Use AUTO_PHP_SLOT_STR=0xff rather than 0x0 for auto pci allocation
Rather than use "0x0" to signify that the hotplug slot should
be automatically selected by qemu-dm, define AUTO_PHP_SLOT_STR.

At the same time, change the magic value form 0x0 to 0xff,
in line with changes made to qemu-dm to allow any unused PCI
device to be used for hotplug.

Signed-off-by: Simon Horman <horms@verge.net.au>
2009-03-17 10:42:32 +00:00
Keir Fraser 27db6136ea xend: Accept udev events and update physical resource information
When a udev event is received, udevevent.py parses the udev data and
tells XendNode.py to update the physical resource information.
This patch also add a boolean parameter 'xend-udev-event-server', to
let users indicate whether we should enable this function or not.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-17 10:40:47 +00:00
Keir Fraser 4d4d14e8e8 Add udev rules to deliver hw events to xend
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-17 10:38:06 +00:00
Keir Fraser c48d2caadd xend: Add lock for lspci_info in pci.py
Add lspci_info_lock to protect lspci_info.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-17 10:37:12 +00:00
Keir Fraser 90797ec872 xend: Add lock for xen-api class instances in XendAPIStore.py
Add __classes_lock to protect __classes, since it can be modified by
the udev listener thread.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-17 10:36:51 +00:00
Keir Fraser c48f8a0105 xend: Implement DGRAM (connectionless) type socket listeners
Introduce SocketDgramListener and UnixDgramListener classes.
We already have STREAM (connection) type socket listener classes in
the source tree, but we need DGRAM (connectionless) type listeners to
receive udev events.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-17 10:36:20 +00:00
Keir Fraser 550686e4fd xenpm: Add CPU topology info (thread/core/socket)
CPU topology info is necessary for power management analysis. For
example, to analysis the effect of Px state coordination, Cx
package/core coordination,  the thread/core/socket topology
information is needed.

This patch add new command "get-cpu-topology" in xenpm to print the
CPU topology info:

Signed-off-by: Yu Ke <ke.yu@intel.com>
2009-03-13 10:09:25 +00:00
Keir Fraser 8eaca58a10 [SVM] Always read zero AMD C1E control MSR to allow cross-vendor migration
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-03-13 07:45:11 +00:00
Keir Fraser 23599a7fd9 [SVM] fix segment descriptors to allow migration to Intel VT systems
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-03-13 07:43:45 +00:00
Keir Fraser b82b238521 xend: Fix xm scsi-attach for host OS without lsscsi
In the case of a host OS without lsscsi command, xm scsi-attach
command fails even if you specify existing SCSI device.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-13 07:38:47 +00:00
Keir Fraser 5fedaf9ef7 xend: Fix domain core-dumping about reset option
This patch moves a call processing of a domain reset processing
from xm to xend.  Also, it adds a reset argument to do_dump() of
SrvDomain.py.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-13 07:38:05 +00:00
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