Commit Graph
5921 Commits
Author SHA1 Message Date
Keir Fraser 9ca64ff194 pvfb: PVFB SDL backend chokes on bogus screen updates
Bogus screen update requests from buggy or malicous frontend make SDL
crash.  The VNC backend silently ignores them.  Catch and log them.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
2007-11-16 16:53:43 +00:00
Keir Fraser e4d4fa0670 xend: host.get_log() close fd
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-11-16 16:43:57 +00:00
Keir Fraser 6eed158eb9 xend, xenapi: Strip characters from logs that XMLRPC layer cannot handle.
From: Ian Jackson <ian.jackson@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2007-11-16 14:45:35 +00:00
Keir Fraser cdad5edb46 xend: readDomTxn() and friends use dompath, not vmpath.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2007-11-15 22:14:13 +00:00
Keir Fraser 3192c29b6a Fix non-portable grep usage. Solaris doesn't have -q option.
Signed-off-by: John Levon <john.levon@sun.com>
2007-11-13 19:26:55 +00:00
Keir Fraser ad703ba167 tools: Avoid -nostdlib argument to $(LD).
This interacts badly with GNU ld on Solaris.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-11-13 17:57:22 +00:00
Keir Fraser 1e76993878 libxc: Consistently print errno on write() error in domain_save code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-11-11 18:28:57 +00:00
Keir Fraser c316590403 libxc: Consolidate read()/write() syscall wrappers to read/write an
exact number of bytes. The consolidated versions are more watertight
than the various versions previously distributed around the library
source code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-11-11 18:22:33 +00:00
Keir Fraser bbceef66ea solaris, xend: Fix FMRI for Solaris SMF.
Update the FMRI for SMF to reflect reality (again).

Signed-off-by: John Levon <john.levon@sun.com>
2007-11-10 10:55:27 +00:00
Keir Fraser b1a8a810f7 xend: Fix appending policy module to end of grub's config file
This patch fixes the case where a module line is supposed to be added
to the very end of the file but the file does not end in with a new
line. Also fixes a problem that in some cases the module line would
not be properly be removed.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-11-10 10:54:32 +00:00
Alex Williamson 66bb99644d merge with xen-unstable.hg (staging) 2007-11-08 09:37:06 -07:00
Keir Fraser 2f3f6d2092 Fix xend startup after 16344:0ebac857649591.
Signed-off-by: Keir Fraser <keir.fraser@eu.citrix.com>
2007-11-08 16:27:03 +00:00
Keir Fraser 5ac841d232 xend: Allow for non-existent xen-python-path binary.
On Solaris, xen-python-path is unnecessary.

Signed-off-by: John Levon <john.levon@sun.com>
2007-11-08 15:32:14 +00:00
Keir Fraser 86c60bb2d5 hvm: Clean up buf_ioreq handling.
Also, disable stdvga caching on hvm save/restore, as the shadow vga
state is not preserved.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-11-08 14:50:01 +00:00
Keir Fraser 940897106a xm: Fix long options of xm sched-credit
Long options of xm sched-credit command are ignored (--domain,
--weight, --cap). This patch fixes it.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-11-08 10:23:22 +00:00
Alex Williamson 406724ba5a [IA64] Fix breakage from upstream and remove duplicate code
- Get rid of PAGE_SIZE usage in arch-ia64.h when building tools.
- Now that more of xen_init_fv is identical to x86 code, share the
  code rather than duplicate it.
- Change a few things that came over from the ia64 tree to use the
  XC_* macros as already done upstream.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-11-07 15:11:44 -07:00
Alex Williamson 1e349b81ce merge with xen-unstable.hg (staging) 2007-11-07 14:48:48 -07:00
Alex Williamson 46c2db9a22 [IA64] vti save-restore: ia64 qemu-dm boot clean up.
Use xc_get_hvm_param()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-11-07 10:41:43 -07:00
Alex Williamson f0ed01dec3 [IA64] vti save-restore: ia64 hvm builder clean up with respect to hvm params.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-11-07 10:34:09 -07:00
Keir Fraser 93aac49128 network-bridge: Make detection of gateway device more robust.
Signed-off-by: Guillaume Rousse <Guillaume.Rousse@inria.fr>
2007-11-07 16:55:13 +00:00
Keir Fraser 5cd7a86251 ioemu: Do not use PAGE_SHIFT/PAGE_SIZE/PAGE_MASK macros. Use the libxc
provided versions.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-11-07 16:51:08 +00:00
Keir Fraser b2f3f8e649 Enable loopback disk image files on readonly nfs filesystem.
When we losetup a file on readonly nfs filesystem, it fails with:
# losetup /dev/loop7 /data/vm/xen_el5_i386_para/system.raw
/data/vm/xen_el5_i386_para/system.raw: Permission denied

New version of losetup has add a "-r" option for readonly loop, which
Linux kernel has supported for a long time. Some distribution (EL5
update, Fedora 8, etc.) have shipped it. This patch benefit this
option while doesn't break the old versions of losetup.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2007-11-07 09:22:31 +00:00
Keir Fraser 78a146f3c3 HVM device passthru: Correct PCI_EXP_DEVCTL_FLR
This patch corrects PCI_EXP_DEVCTL_FLR so that function level reset
will be really executed, and also replaces some magic numbers with
macros.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
2007-11-07 09:21:16 +00:00
Keir Fraser 5051eb04ca xentrace: Add missing xentrace format entries for HVM guests.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-11-06 16:04:13 +00:00
Keir Fraser e02df44279 xenstored: Recover from corrupt tdb on reboot
Xen cannot work when xenstored's tdb is corrupt.  When that happens
somehow (and we've seen it happen), even reboot doesn't recover from
it.  It could: there is no state in tdb that needs to be persisted
across reboots.

This patch arranges that tdb is removed before xenstored is started,
provided it doesn't already run.  This is safe, because:

* xenstored cannot be restarted.  If it dies, Xen's screwed until
  reboot.

* /usr/sbin/xend always starts xenstored anyway.

* xenstored locks its pid-file (see write_pidfile() in
  tools/xenstore/xenstored_core.c), and refuses to start when it
  can't.

* My patch makes /usr/sbin/xend remove tdb iff it can lock the
  pid-file.  In other words, it removes tdb only when xenstored is not
  running, and locks it out until it is done.

  Bonus fix: it also removes stale copies of the tdb xenstored tends
  to leave behind when it exits uncleanly.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
2007-11-06 09:40:44 +00:00
Keir Fraser fca749bf8d xend: Fix startup crash for some network configurations.
From: Guillaume Rousse <Guillaume.Rousse@inria.fr>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-11-06 09:39:25 +00:00
Keir Fraser 7b7bd4b677 ioemu: Clean up compile warnings.
Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-11-05 13:23:55 +00:00
Keir Fraser bb768314f2 xm: fix "xm labels type=any" command error
Signed-off-by: Syunsuke HAYASHI <syunsuke@jp.fujitsu.com>
2007-11-05 13:15:56 +00:00
Keir Fraser bc0389d051 solaris: Fix Solaris tools build.
Signed-off-by: John Levon <john.levon@sun.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-11-02 10:16:37 +00:00
Keir Fraser fceab33784 ioemu: Remove dependency on linux/input.h
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-11-02 09:44:45 +00:00
Keir Fraser 13d791e278 Merge with ia64/xen-unstable.hg 2007-11-02 09:16:57 +00:00
Keir Fraser ed8c66a1f6 Fix use-after-free in xenconsoled.
shutdown_domain() MUST NOT call cleanup_domain(), just flagging them
as dead is enough.  cleanup_domains() for dead domains is called by
the main loop in handle_io() in a safe way already.

shutdown_domain() calling cleanup_domain() too leads struct domain
being accessed after freeing and to a double-free.

Fixed by simply dropping the cleanup_domain() call and by making the
functions called by the main loop in handle_io() ignore dead domains.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2007-11-01 16:34:43 +00:00
Keir Fraser 50c994308a ioemu: ioemu portion of buffered-io fix.
Signed-off-by: Robert Phillips <rphillips@virtualiron.com>
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
2007-11-01 16:34:20 +00:00
Alex Williamson 647e3a6211 merge with xen-unstable.hg (staging) 2007-11-01 09:07:16 -06:00
Keir Fraser 1d405b7498 acm, xend: Follow linked files.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-11-01 09:37:47 +00:00
Keir Fraser 4ce3209eae xend: Fix missing boolean xend config options
If a boolean option was missing in the SCF database, we weren't
processing the default value correctly.

Signed-off-by: John Levon <john.levon@sun.com>
2007-11-01 09:36:46 +00:00
Keir Fraser ad2485afd0 xenperf: Fix typo in mlock() invocation.
Signed-off-by: Stephen Wilson <stephen.wilson@amd.com>
2007-10-31 16:21:18 +00:00
Alex Williamson 2046651198 merge with xen-unstable.hg (staging) 2007-10-30 15:34:44 -06:00
Alex Williamson ab0879ce18 [IA64] xenitp: typo fix
Signed-off-by: Tristan Gingold <tgingold@free.fr>
2007-10-30 11:15:23 -06:00
Keir Fraser cb9e907b6f acm, xm: Propagate error codes.
Fix propagation of error codes to the shell in some of the security
related xm commands.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-10-30 09:33:49 +00:00
Keir Fraser 818a831762 qemu vnc auth 4/4: XenD config for VNC TLS protocol
This patch adds support to XenD for configuring the previously added
TLS encryption and x509 certificate validation. At this time I have
only enabled this config to be done system-wide via
/etc/xen/xend-config.sxp. Since it requires the admin to add
certificates on the local FS, there's not much point in making it per
VM. The x509 certificates are located in /etc/xen/vnc. Since this
requires a special VNC client program (GTK-VNC,
virt-viewer/virt-manager or VeNCrypt viewer) the use of TLS is
disabled by default. Admins can enable it if they are using a suitable
client.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-10-30 09:32:10 +00:00
Keir Fraser 02b1dc06bf qemu vnc auth 3/4: Add VNC auth support from upstream QEMU
This patch adds in the upstream QEMU VNC authentication code. This
spports the previous VNC password auth scheme, as well as the VeNCrypt
protocol extension. The latter allows for performing a TLS handshake,
and client verification of the server identify using x509
certificates. It is also possible for the server to request a client
certificate and validate that as a simple auth scheme. The code
depends on GNU TLS for SSL APIs, and the configure script will
auto-detect this.

The image.py code is changed to  deal with the new syntax for the -vnc
option.  In particular password authentication is now enabled by
giving the 'password' flag,

eg -vnc 0.0.0:1,password

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-10-30 09:30:49 +00:00
Keir Fraser 7891d8064f qemu vnc auth 2/4: Revert current VNC auth support
This patch reverts the current Xen specific implementation of VNC
authentication from the QEMU code. This is basically reverting
11840:02506a744315. The idea here is to get the VNC code back to more
closely match upstream QEMU, before applying the upstream auth
patches.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-10-30 09:24:17 +00:00
Keir Fraser 5b52d6724c qemu vnc auth 1/4: QEMU event handler bug fix
This patch pulls in an upstream QEMU fix for dealing with a problem in
the event dispatcher where a write callback gets unregistered while a
write event is pending from poll. Without this the QEMU process with
deference a NULL pointer and crash.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-10-30 09:22:27 +00:00
Keir Fraser 27d2e52b7c xend: Reduce xenstore transactions when listing domains
In summary, this allows a xenstore transaction object to be passed
around the various device controllers, so that they don't have to do
lots of singleton transactions. Transactions have very heavy I/O
impact from xenstored so reducing their number is important.

When running 3 guests, this patch reduces the impact of 'xm list
--long' from 176 transactions, scaling O(n) with guests, to 26
transactions with O(1) scaling.

I have previously attempted to also address the same issue with 'xm
create' but that's much harder since the device front/back handshake
requires that XenD use a number of small transactions. So i've not
changed anything here.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-10-30 09:19:43 +00:00
Keir Fraser 14012a15e8 xenconsoled: Rate-limit activity caused by each domU.
Allow each domU to fire its event channel at most 30 times every 200ms.
Signed-off by: Daniel P. Berrange <berrange@redhat.com>
2007-10-29 14:43:19 +00:00
Keir Fraser ee41f1c835 Allow incremental access to hypervisor console log.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-29 12:56:27 +00:00
Keir Fraser 5ef7bed4e4 xend, acm: Trigger a script when a resource's label changes
This patch triggers a script when a resource's label changes. The xend
config file should provide a variable 'resource-label-change-script'
that can then be launched.

Signed-off-by; Stefan Berger <stefanb@us.ibm.com>
2007-10-29 08:46:34 +00:00
Keir Fraser a99192d1d7 xend, acm: Fix bad indentation
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-10-29 08:45:58 +00:00
Keir Fraser 5305e6b3be Fix PVFB device initialization
The final series of patches I sent out lost 2 hunks in the big
refactoring patches I did thanks to a messed up rebase/rediff :-( This
patch fixes the device nodename initialization so that watches work
correctly.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-10-26 17:16:14 +01:00