Commit Graph
17826 Commits
Author SHA1 Message Date
Keir Fraser cd6d8982db Push python-related make variable definitions into tools/misc.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-11 09:44:42 +01:00
Keir Fraser 9f88f46834 Have `make install' write the Python version number in the #!
The Xen tools contain a number of Python extensions written in C.  The
C API to Python, used by these extensions, is not stable from one
version of Python to the next.

Our build system uses whatever version of Python is the default on the
build system at that time to build these extensions.  However, the
actual scripts such as `xm' use  #!/usr/bin/env python  which uses
whichever version of Python is the default on the deployment system at
the time of invocation.

If for any reason these two versions of Python are not the same (eg,
because the system is built on one computer and executed on another,
or because the system's gains a more recent Python installation
alongside the original which changes the previous default), warnings
and failures occur.

In this patch I arrange for Python scripts to be installed via a
special wrapper around `install', which determines the build-time
Python version and path and then writes that into the #! line at the
point of `make install' (or `make dist').  (It can also be overridden
by setting PYTHON_PATH.)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-06-11 09:36:23 +01:00
Keir Fraser ba65563c1b minios: Fix >4GB machine addresses
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-10 16:59:24 +01:00
Keir Fraser 8c009bb8c8 x86/64: Fix build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-10 15:30:50 +01:00
Keir Fraser fa3226f8f3 xend: minor ballooning cleanup
In xend/balloon.py, there's only one place where dom0_start_alloc_mb
is used. Move its initialization to right before its usage.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-10 14:53:01 +01:00
Keir Fraser 4c8dd0578f x86: Default ACPI reboot method.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-10 14:51:00 +01:00
Keir Fraser aefef84f02 xenstore: Fix error path broken by c/s 17816
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-10 14:17:20 +01:00
Keir Fraser d8be3b59d1 xenstat: some cleanups
sprintf -> snprintf
 malloc(n * m) -> calloc(n, m)
 get rid of a cast

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-10 14:15:53 +01:00
Keir Fraser f4692e35f1 xm on xenapi: Add PVFB support in xenapi_create.py.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-06-10 13:50:31 +01:00
Keir Fraser df8a7719e5 xenstore: cleanups
Attached patch uses calloc() for hash allocation.
This makes sure, the allocated memory is always initialized.
Also cleanup error handling a bit.

On *BSD avoid conflicts with BSD list macros.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-10 13:49:54 +01:00
Keir Fraser deb3650245 libxc: Update for NetBSD
returns hypercall return value when ioctl was successful.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-10 13:49:02 +01:00
Keir Fraser c30c55b1bc Pull in ACPI table parsing code from Linux 2.6.26-rc4.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-10 13:45:29 +01:00
Keir Fraser 572d6c9581 libxenstat: Fix statistics for blktap disks on linux
Overview: update xenstat vbd statistics parsing from
/sys/devices/xen-backend to process blktap disks

Reason:
        -blktap devices (now referenced as tap rather than vbd in
        /sys) have statistics counters
        (e.g.,  rd_req, wr_req, oo_req) prepended by tap_
        -xenstat behavior did not previously account for this
        behavior, which resulted in 0 disks
        visible and similarly impacted disk statistics

To reproduce these conditions, make a domain with tap:aio backed disks
on 3.2.x, run xentop, and press B to view VBD stats (nothing will
appear for the domain using tap:aio)

Signed-off-by: steve.maresca@gmail.com
2008-06-10 09:27:01 +01:00
Keir Fraser bb4e3f0ec0 Fix the build with perfc=y.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-06-10 09:25:47 +01:00
Keir Fraser 4533ef7b28 x86: Fix the build after HVMTRACE changes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-10 09:24:47 +01:00
Keir Fraser d32efbebf6 tools/python/xen/lowlevel: some cleanups
Mainly:
 malloc(n * m) -> calloc(n, m)
 sprintf -> snprintf

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-10 09:17:55 +01:00
Keir Fraser 7139eef57f Allow older PAE Linux guests to access entire compat m2p.
Older PAE guests (prior to xen-unstable.hg 8924:229c602a075a, Feb
2006, this includes some vendor's kernel in the field) use a limit of
0xf6800000 on their code and data segments (i.e. up to the end of the
read-only m2p table).

Newer kernels use a limit of 4G and rely on the hypervisor to clamp to
the actual maximum allowed. 32on64 mode takes advantage of this to
allow a larger m2p than would fit in the PAEonPAE sized hole.

This means that PAE guests with the hardcoded low limit cannot run on
top of a 64 bit hypervisor on a host machine which has more than 16G
of RAM. Fix this by extending any code or data segment which ends
above the start of the hypervisor hole for that guest.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2008-06-09 17:18:27 +01:00
Keir Fraser e6d9351170 libfsimage: make pygrub work on ufs
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-09 15:06:26 +01:00
Keir Fraser 250c8bc01c ioemu: simplyfing vga_draw_text code
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2008-06-09 15:05:18 +01:00
Keir Fraser c68ffdc4fa minios: add proper shutdown facilities
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-09 13:26:30 +01:00
Keir Fraser 0ba222a6fd stubdom: fetch command line from start_info instead of xenstore
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-09 13:26:05 +01:00
Keir Fraser 7e4196ee73 libxc: Use vpath rather than VPATH, to avoid linking with hypervisor .o files.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-09 13:25:35 +01:00
Keir Fraser 4780a0ef28 stubdom: simplify xenfb resize handler
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-09 11:45:10 +01:00
Keir Fraser f0f278e1da When building from a tarball release use hardcoded path to
linux-2.6.18-xen.hg as a last resort when searching for a Linux source
tree.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2008-06-09 10:44:09 +01:00
Keir Fraser 3e28b1c5bb x86: Fix S3 resume after creating an HVM guest.
If we don't use PIT, we should disable it at boot time and at S3
resuming. In Xen this is done by disable_pit_irq(), but this function
is used by __initcall(). After bootstrap it will be discarded and may be
overwritten. This usually results in S3 resuming failure.

Signed-off-by: Huacai Chen <huacai.chen@intel.com>
Signed-off-by: Li Zhang <li.zhang@intel.com>
2008-06-09 09:51:14 +01:00
Keir Fraser fd153d12f2 xm on xenapi: Fixes for rfb console.
- set 'vncunused' param default to 1
 - add 'vncdisplay' param
 - handle the case when sdl=1

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-06-09 09:47:51 +01:00
Keir Fraser 1ece20c929 stubdom: document that pty usage should be disabled
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-09 09:47:00 +01:00
Keir Fraser c1ae1d9997 stubdom: make non-VNC + stdvga work
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-09 09:46:46 +01:00
Keir Fraser 2aba927207 stubdom: permit compilation without lwip
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-09 09:46:32 +01:00
Keir Fraser 2b888b8d42 minios: use inlines instead of macros for bswap*
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-09 09:46:16 +01:00
Keir Fraser 591e883912 xentrace: fix tracing for 64bit guests
Xen tracing some times ago used to put values of type 'long' into the
trace buffer. This has changed to uint32_t. Some trace points log
virtual addresses, which get cropped to 32bit in this case. There were
some inline functions to handle at least PF_XEN and VMEXIT, which
caused a lot of code duplication. The attached patch fixes several
issues:
1. fix and extend tools/xentrace/formats
2. Fix xentrace_format to handle up to 7 parameters
3. create convenience macros to properly log long values
4. remove the inline functions in hvm/trace.h and replace them by macros
5. Change the CPUID trace to work correctly
6. group HVM trace points enable mechanism

I used a similar approach as in PV tracing with bit 8 indicating 64bit
pointers.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
2008-06-09 09:45:38 +01:00
Keir Fraser 00093d732e AMD IOMMU: add support for PV guest
Assuming iommu_populate_page_table() is only used for PV guest, a new
check is added into assign_device() to avoid duplicating the work done
by amd_iommu_sync_p2m() for hvm guest.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
2008-06-09 09:44:21 +01:00
Keir Fraser 50cd7ffdad xend: Use get_config_string for 'keymap' and 'resource-label-change-script'.
Signed-off-by: Juergen Keil <jk@tools.de>
2008-06-09 09:42:51 +01:00
Keir Fraser bab287fed3 stubdom: prevent newlib from emiting cli/sti in longjmp
Also fix build dependencies and cleanup.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-09 09:42:14 +01:00
Keir Fraser 1f52665996 ioemu: cleaning DisplayState->dpy_resize interface
Bring the DisplayState dpy_resize interface back to how it is in qemu
mainstream, thus making the code easier to merge.
In order to support sharing the framebuffer, I am adding a new resize
interface called dpy_resize_shared that also has a depth and a pixels
parameters. As a consequence I could remove the dpy_colourdepth
callback and make the code cleaner and easier to read.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2008-06-09 09:39:15 +01:00
Keir Fraser a7cd0e3f91 acm: check for duplicate labels and types
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-06-09 09:37:56 +01:00
Keir Fraser 4c46d69b29 acm: Allow remove of labels from suspended domains.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-06-09 09:37:22 +01:00
Keir Fraser 3e22cc46bb xm: Set device_model option value default to None.
If device_model is set to '', xend will fail to execute the device
model.  If None, xend will detect it and set a sensible qemu-dm path
instead.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-06-09 09:36:27 +01:00
Keir Fraser b630504504 xm on xenapi: Enable more platform configurations
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-06-09 09:36:07 +01:00
Keir Fraser 85de27467f stubdom: .hgignore updates
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-05 13:04:07 +01:00
Keir Fraser 91c38bdedc stubdom: upgrade lwip to newer upstream version since it provides bugfixes
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-05 13:03:47 +01:00
Keir Fraser 226fe60191 minios: add a blkfront synchronous interface
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-05 13:03:31 +01:00
Keir Fraser 98b6c37cf6 32-on-64: Fix physaddr_bitsize computation when creating a 32b x86
compat domain.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-05 10:47:08 +01:00
Keir Fraser d9c0111451 x86, p2m: Fix typo in p2m_change_type_global().
From: Wei Huang <wei.huang2@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-05 10:42:37 +01:00
Keir Fraser 3f0cd2273c x86 hvm: Improve paging performance for 64b solaris guests
The following patch provides a 'fast-path' for sh_remove_write_access()
for 64 bit Solaris HVM guests. This provides a significant performance
boost for such guests; our testing shows a 200-400% improvement in
microbenchmarks such as fork(), exit(), etc...

From: Gary Pennington <Gary.Pennington@sun.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-05 10:36:19 +01:00
Keir Fraser 5ecfc3555d xen: build fix for NetBSD (test -x usage).
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-05 10:34:01 +01:00
Keir Fraser 5ad74c5fb2 libfsimage: Build fix for NetBSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-05 10:33:01 +01:00
Keir Fraser 72c4148247 xm: Fix formatting of xm block-list output.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-06-05 10:31:17 +01:00
Keir Fraser cea190c247 Fix blkif.py for virsh start
I defined a cdrom to a guest domain as follows.

  ",hdc:cdrom,r"

When the guest domain was created by using xm create command, uname
of the cdrom was ''.  Then creating the guest domain succeeded.

[2008-06-03 15:23:41 xend.XendDomainInfo 25956] DEBUG
(XendDomainInfo:200)
XendDomainInfo.create(['vm', ['name', 'rhel5.2ga_hvm_lvol1'],
<<snip>>
['device', ['vbd', ['uname', ''], ['dev', 'hdc:cdrom'], ['mode',
'r']]],
<<snip>>

But, when the guest domain was created by using virsh start command,
uname of the cdrom was None.  Then creating the guest domain failed.

[2008-06-03 15:22:10 xend.XendDomainInfo 25559] DEBUG
(XendDomainInfo:200)
XendDomainInfo.create(['vm', ['name', 'rhel5.2ga_hvm_lvol1'],
<<snip>>
['device', ['vbd', ['dev', 'hdc:cdrom'], ['mode', 'r']]],
<<snip>>

This patch fixes to be able to create guest domains by both xm create
command and virsh start command.

FYI:
"if uname is None:" --> "if uname == '':" --> "if not uname:"
   till CS#17625             current           by this patch

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-06-05 10:30:29 +01:00
Keir Fraser 5ede5271a4 Improve HPET comparator reprog to prevent intr-near-missing case
HPET intr-near-missing means if the current counter value is too close
to the comparator value to be reprogrammed the expected HPET intr may
be missing. Linux kernel uses a mininal 48-hpet-ticks(~3.5us) distance
to workaround this, but personal observation showed there is still
failure case while delta=3D0xba (~13.5us). So choosing 20us as the
MIN_DELTA_NS should be helpful to prevent near-missing from happening.

local_irq_save/restore were used to avoid disturbance. (+ 2) was used
as a final guard to avoid wrong judgement due to the real happened
near-missing case.

Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
2008-06-03 09:41:19 +01:00