Commit Graph
5798 Commits
Author SHA1 Message Date
Keir Fraser 5d76b407ef Merge with ia64 tree. 2007-10-03 14:07:30 +01:00
Keir Fraser 905654ba54 xend: Check access to the privcmd interface before doing the call to
fetch the currently enforced policy. Assign 'INACCESSIBLE' to the
policy if it cannot be retrieved due to the user not being
privileged.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-10-03 14:06:06 +01:00
Keir Fraser 8950f5c6ba Extend 'xm dumppolicy' to support Xen-API
I am extending 'xm dumppolicy' to be used via the Xen-API. For this
there are two new functions in the ACM policy class:
 - get the currently enforced policy including statistical data from
   the hypervisor
- get the ACM 'ssidref' of a Domain. Since this may be a ACM-specific
  variable or type (int) I put it into the ACM class.

I extended the Xen-API documentation with the two new functions.

Signed-off-by: Stefan Berger <Stefanb@us.ibm.com>
2007-10-03 14:04:51 +01:00
Alex Williamson 3abc3aea3f merge with xen-unstable.hg (staging) 2007-10-02 11:31:55 -06:00
Alex Williamson 73b8b5f654 [IA64] xenitp improvements
Remove all the casts by using char * instead of unsigned char *.
The go command now accept a number.
The disass command can now accept a range.
Number of TRs is not hard-coded.
'-' (minus) can now be used in expressions.
'$iip' and '$b0' can be used in expressions.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
2007-10-02 09:31:45 -06:00
Alex Williamson c2d2f8a446 [IA64] xenitp: Display symbolic names of cr.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
2007-10-02 09:20:41 -06:00
Keir Fraser 9d6b92ef1a xentop: Flush batch output on SIGTERM or SIGINT.
Signed-off-by: INAKOSHI Hiroya <inakoshi.hiroya@jp.fujitsu.com>
2007-10-02 13:19:25 +01:00
Keir Fraser 01025319d1 xend: Fix name/uuid uniqueness checks.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-10-02 10:01:10 +01:00
Keir Fraser c3aaa708a8 Revert 15642:207582c8d88b532783da5c6f5839336187556f0a.
This patch is now bogus since 15168:a717cb2fac90 is reverted
by 15973:8817a53c030f.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-10-02 09:59:39 +01:00
Keir Fraser 36f49d79ff Fix external-device-migrate infinite loop.
For some (yet) unknown reason extern-device-migrate is called
twice, once with a missing domname argument.

The following invocation loops forever:
 external-device-migrate -domname
because "shift 2" never shifts ($# < 2) and $# is always 1.

From: Pascal Bouchareine <pascal@gandi.net>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-02 09:56:53 +01:00
Keir Fraser 0741e7c237 xenctx: Print EFLAGS for i386 and x86/64.
From: Peter Johnston <pjohnston@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-02 09:41:10 +01:00
Keir Fraser d17d80e847 xentrace: Fix xentrace_format for new file format.
Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
2007-10-02 09:31:40 +01:00
Keir Fraser bd1bd9290f xentrace: Fix man page (remove xentrace_cpuinfo(1)).
Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
2007-10-02 09:30:36 +01:00
Keir Fraser 925bd0e8f7 Fix ioemu compile on Solaris
Solaris doesn't have RLIMIT_RSS at least; don't try to set rlimits.
Signed-off-by: John Levon <john.levon@sun.com>
2007-10-02 09:29:23 +01:00
Keir Fraser c42a6bd3c8 Fix non-portabilities in libflask.
Signed-off-by: John Levon <john.levon@sun.com>
2007-10-02 09:29:00 +01:00
Keir Fraser ece8f4f259 xend: Fix refactoring done in CS 15938 in security.py.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-10-02 09:27:22 +01:00
Keir Fraser c624ac637e xm-test: Fix bugzilla #1051.
This is a patch to fix xm-test's network errors
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1051

From: Lukasz Szymanski <Lukasz.Szymanski@unisys.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-02 09:26:18 +01:00
Alex Williamson 3c78b60b94 merge with xen-unstable.hg 2007-10-01 13:59:37 -06:00
Alex Williamson ff051c2fbc [IA64] xenitp: correctly size vcpu_ctx array
vcpu_ctx[] array size should be MAX_VIRT_CPUS instead of 1.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-01 09:59:24 -06:00
Alex Williamson e26fbf7c55 [IA64] xenctx: fix rse arithmetic
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-01 09:53:48 -06:00
Keir Fraser 74f3e60d7c hvm: Avoid need for ugly setcpucontext() in HVM domain builder by
pre-setting the vcpu0 to runnable inside Xen, and have the builder
insert a JMP instruction to reach the hvmloader entry point from
address 0x0.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-01 15:12:05 +01:00
Keir Fraser 10dcd077d2 libxenctrl: Fix lock_pages()/unlock_pages() region-size calculation.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-01 13:18:19 +01:00
Keir Fraser eaaa8ec561 xm: Print xend config via 'xm info --config'.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2007-10-01 06:39:00 +01:00
Alex Williamson 265e5c6b08 merge with xen-unstable.hg (staging) 2007-09-27 12:22:16 -06:00
Keir Fraser 9f5581fda7 xend: Fix name uniqueness check (revert 15168:a717cb2fac90).
Changeset 15168:a717cb2fac90 altered check_name() in XendDomainInfo so
that it compares domain IDs instead of UUIDs. This breaks a number of
things

 - You can no longer use 'xm new' to define a persistent config file for
   a running guest. This breaks the key OS provisioning scenario where
   you boot a kenrel+initrd for the installer, and at the same time
   define a permanent config with pygrub.

 - It lets you define multiple inactive guests with different UUIDs, but
   the same name because all inactive guests have a domid of None. So
   you can now end up with multiple guests with same name, which is
   contrary to the goal implied by the patch which was name uniqueness.

It is unclear from the original commit logs just what scenario it was
trying to protect against, but the original checking of uniqueness
based on UUID was correct & is what was used in previous releases XenD.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-09-27 18:08:11 +01:00
Keir Fraser cd76c0a1ed xend: fix server/netif.py so that it respects type=None.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-09-27 17:44:03 +01:00
Keir Fraser 67c97dc9f7 ioemu: Fixes for BSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-27 16:36:23 +01:00
Keir Fraser a0d123d804 xend: Fix dummy security_policy_dir.
Changeset 15951:ad339d88639d split policy_dir_prefix into
security_dir_prefix and policy_dir_prefix in acm code.  I think this
needs to be reflected in the dummy module as well (otherwise we blowup
when bootloader.py tries to reference security.security_dir_prefix).
Fixed in below patch.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-09-27 15:22:29 +01:00
Keir Fraser aa6e10191d libaio: Fix for *BSD
- Remove unused linux specific header
  - Include <sys/time.h> needed for struct timespec
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-27 15:13:54 +01:00
Alex Williamson 85bf11c4a1 [IA64] clean up xenitp build warnings
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-09-26 12:43:41 -06:00
Keir Fraser 884ec5f334 xend: Slightly finesse allocation of vmpath in xenstore.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-26 17:11:07 +01:00
Keir Fraser 4d0cfe8f1b [xend,xenapi] Fix handling of scheduler params
When creating domains that specify scheduler parameters with XenAPI,
the specified parameters are not used when starting the domain. This
patch collapses cpu_weight and cpu_cap in XendConfig into the
vcpus_params dictionary. The patch has been tested using xm and
XenAPI on config with and without scheduler parameters.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2007-09-26 14:39:56 +01:00
Keir Fraser b85210e23c ioemu: security fixes for not-built or not-default-configured subsystems.
Patches originally proposed by S. Caglar Onur and cleaned up for
xen-unstable by Robert Buchholz <rbu@gentoo.org>.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-26 09:19:12 +01:00
Keir Fraser ebe41ed23d hvm: Improve tcgbios code for finding ACPI RSDP.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-09-26 09:14:33 +01:00
Keir Fraser f0acc4f6f1 xenapi: add xen_xspolicy.h to libxen includes file
Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2007-09-26 09:11:46 +01:00
Keir Fraser f3f2e4ef69 firmware: fix romimage generation for *bsd
- portability fix in Makefile: mkhex is not bash specific
 - GNU od separates column with one blank, BSD od uses eight blanks.
   Change sed to deal with this.
 - Add a fourth sed to fix a build error on NetBSD

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-26 09:10:41 +01:00
Keir Fraser 468eb4e36f xend: Fix VIF MAC address being lost across localhost migration.
VIF details in /vm/<uuid> directory in xenstore get deleted by old
domain dying.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-25 15:35:17 +01:00
Keir Fraser 05fcd427f8 Fix xend start after xsm:acm bootloader changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-25 10:40:38 +01:00
Keir Fraser e8d029002e Fix tools dependency-check scripts for *BSD.
zlib and crypto libs are part of the base system in *BSD.
So no need to check for them on *BSD. This conveniently avoids
executing a non-portable usage of ldconfig.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-25 10:21:07 +01:00
Keir Fraser adbda3b6da Fix security vulnerability CVE-2007-4993.
Protect pygrub from possible malicious content in guest grub
config file.  This fixes CVE-2007-4993.  Original patch from
Jeremy Katz, I updated to close 2 remaining issues pointed out
by Christian and Keir, and to use setattr(self, ...).

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2007-09-25 09:34:36 +01:00
Keir Fraser 44e7c3aa10 xend memory ballooning: do not bother if guest will not fit in
physical memory constraints.

If users require domain memory size larger than a physical memory
size, we do not need waiting for ballooning, and should cause
xm create command error right away.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-09-25 09:30:00 +01:00
Keir Fraser 66ea95096a [Xend/ACM] Automatic loading of policy after xend has started.
On systems where the grub bootloader is not available or active the
to-be-activated policy is written a simple textfile. Once xend has
started the contents can be read. Using 'xm setpolicy' the policy can
be activated and the Domain-0 label set (using 'xm addlabel').
I fixed some bugs in the grub bootloader handler on the way and
removed some dead functions.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-09-24 21:52:10 +01:00
Alex Williamson 928dd3c7dd [IA64] Add xenitp tool
Xenitp is a low-level debugger for ia64

Signed-off-by: Tristan Gingold <tgingold@free.fr>
2007-09-24 14:17:04 -06:00
Keir Fraser 98418f1c1e Missed files in previous changeset.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-24 15:41:20 +01:00
Keir Fraser d1729249ef xenstat/xenstore: NetBSD fixes.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-24 15:38:52 +01:00
Keir Fraser c6a041cfa4 Fix xentrace build.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-24 15:29:09 +01:00
Keir Fraser 3a0667d17e libxc: NetBSD-specific pieces.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-24 13:45:57 +01:00
Keir Fraser a62f71bad5 Xen tracing cleanups and fixes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-24 13:43:25 +01:00
Keir Fraser af8b404f2d XSM:FLASK support for domain management under Xen-API
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
2007-09-23 12:45:07 +01:00
Keir Fraser d6f6960a00 Fix libfsimage build on NetBSD.
Fixes a number of these errors:
 cc1: warnings being treated as errors
 fsys_fat.c: In function 'fat_dir':
 fsys_fat.c:304: warning: array subscript has type 'char'

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

These ugly casts are needed according to the ISO C spec.

Acked-by: Keir Fraser <keir@xensource.com>
2007-09-23 12:18:36 +01:00