]> xenbits.xensource.com Git - xen.git/log
xen.git
17 years ago[xen, xencomm] preparetion for xencomm consolidation.
kfraser@localhost.localdomain [Tue, 14 Aug 2007 15:01:34 +0000 (16:01 +0100)]
[xen, xencomm] preparetion for xencomm consolidation.
Xen/powerpc runs in real mode so that it uses maddr interchangably
with vaddr. But it isn't the case in xen/ia64. It is necessary to
convert maddr to vaddr to access the page. maddr_to_virt() doesn't
convert on powerpc, so it should work on both archtechture.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[xen, xencomm] xencomm trivial bug fix
kfraser@localhost.localdomain [Tue, 14 Aug 2007 15:01:08 +0000 (16:01 +0100)]
[xen, xencomm] xencomm trivial bug fix
- fix return address of xencomm_copy_to_guest()
- fix xencomm_add_offset()
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years agoxen: Cache 'current' vcpu in physdev_op hcall implementation.
kfraser@localhost.localdomain [Tue, 14 Aug 2007 14:58:16 +0000 (15:58 +0100)]
xen: Cache 'current' vcpu in physdev_op hcall implementation.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agoxen: Do not accept DOMID_SELF as input to DOMCTL_getdomaininfo.
kfraser@localhost.localdomain [Tue, 14 Aug 2007 08:56:46 +0000 (09:56 +0100)]
xen: Do not accept DOMID_SELF as input to DOMCTL_getdomaininfo.
This was screwing up callers that loop on getdomaininfo(), if there
was a domain with domid DOMID_FIRST_RESERVED-1 (== DOMID_SELF-1).
They would see DOMID_SELF-1, then look up DOMID_SELF, which has domid
0 of course, and then start their domain-finding loop all over again!
Found by Kouya Shimura <kouya@jp.fujitsu.com>. Thanks!
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agolibxc: Various xc_evtchn_* functions must return signed integer type.
kfraser@localhost.localdomain [Tue, 14 Aug 2007 08:21:39 +0000 (09:21 +0100)]
libxc: Various xc_evtchn_* functions must return signed integer type.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agohvm: Cleanups to state-restore paths (including vmxassist world restore).
kfraser@localhost.localdomain [Mon, 13 Aug 2007 17:18:22 +0000 (18:18 +0100)]
hvm: Cleanups to state-restore paths (including vmxassist world restore).
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years ago[HVM] [TOOLS] Move device state save earlier in suspend path
Tim Deegan [Mon, 13 Aug 2007 15:47:11 +0000 (16:47 +0100)]
[HVM] [TOOLS] Move device state save earlier in suspend path
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
17 years ago[PV-on-HVM]: Add missing includes
kfraser@localhost.localdomain [Mon, 13 Aug 2007 15:41:04 +0000 (16:41 +0100)]
[PV-on-HVM]: Add missing includes

This patch adds missing includes that currently work through indirect
inclusions.  This cannot be relied on and indeed does break on older
kernels (2.4 for PV-on-HVM).

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years agox86-64: enable hypervisor output on VESA frame buffer
kfraser@localhost.localdomain [Mon, 13 Aug 2007 09:09:06 +0000 (10:09 +0100)]
x86-64: enable hypervisor output on VESA frame buffer

This is x86-64 only for now due to the virtual address space
constraints on x86-32.

New options 'vesa-ram', 'vesa-map', 'vesa-mtrr' are close equivalents
to the vesafb Linux options 'vtotal', 'vremap', 'mtrr'.

Also the font can be specified: font=8x{8,14,16}.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoxm-test: Allow dom0 network interface used in tests to be overriden
James Bulpin [Sun, 12 Aug 2007 15:09:13 +0000 (16:09 +0100)]
xm-test: Allow dom0 network interface used in tests to be overriden
  ./configure --with-dom0-intf=<intf>  (default vif0.0)

17 years agox86: Trivial clean up of debug output.
kfraser@localhost.localdomain [Fri, 10 Aug 2007 16:23:33 +0000 (17:23 +0100)]
x86: Trivial clean up of debug output.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86: Improved memcpy() asm implementation.
kfraser@localhost.localdomain [Fri, 10 Aug 2007 14:01:09 +0000 (15:01 +0100)]
x86: Improved memcpy() asm implementation.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoFix xm block/network-detach command.
kfraser@localhost.localdomain [Thu, 9 Aug 2007 15:21:41 +0000 (16:21 +0100)]
Fix xm block/network-detach command.

 - To remove device info, it waits for the backend path of the device
   to be removed.
 - It removes device info from domain info.
 - It saves domain info to the config.sxp of the managed domain.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
17 years agoacm: Some fixes to the Xend ACM management code
kfraser@localhost.localdomain [Thu, 9 Aug 2007 15:14:56 +0000 (16:14 +0100)]
acm: Some fixes to the Xend ACM management code

- prevent vlans from being relabeled when they are in use by the
  current policy
- fix problems when doing an update of the policy and the name of the
policy changes while doing that
- refactor code that has to take into consideration that unlabeled
domains may be defined using the label __UNLABELED__
- make 'xm list --label' show the complete label of a domain

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agox86-64: pv wrmsr emulation fix
kfraser@localhost.localdomain [Thu, 9 Aug 2007 15:02:33 +0000 (16:02 +0100)]
x86-64: pv wrmsr emulation fix

Make sure the upper 32 bits of RAX are disregarded during MSR write
emulation.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoEnsure multiboot modules are mapped when we copy them.
kfraser@localhost.localdomain [Thu, 9 Aug 2007 14:16:51 +0000 (15:16 +0100)]
Ensure multiboot modules are mapped when we copy them.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86: Always define both PAE and non-PAE address constants
kfraser@localhost.localdomain [Thu, 9 Aug 2007 09:14:38 +0000 (10:14 +0100)]
x86: Always define both PAE and non-PAE address constants

Solaris decides to run as PAE or not at runtime. Thus, make the
address constants for both cases always available in the public
headers.

Signed-off-by: John Levon <john.levon@sun.com>
17 years agoacm: Cleaner use of copy_from_guest().
kfraser@localhost.localdomain [Thu, 9 Aug 2007 09:03:59 +0000 (10:03 +0100)]
acm: Cleaner use of copy_from_guest().
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agoClean up usage of 'current' in do_iret() hypercall.
kfraser@localhost.localdomain [Thu, 9 Aug 2007 09:01:17 +0000 (10:01 +0100)]
Clean up usage of 'current' in do_iret() hypercall.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86: Do not print unbounded bogus FACS signature.
kfraser@localhost.localdomain [Wed, 8 Aug 2007 16:50:24 +0000 (17:50 +0100)]
x86: Do not print unbounded bogus FACS signature.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agohvm: Handle hw_cr[] array a bit more sanely.
kfraser@localhost.localdomain [Wed, 8 Aug 2007 16:28:13 +0000 (17:28 +0100)]
hvm: Handle hw_cr[] array a bit more sanely.
SVM for the most part does not need to use it at all, and this makes
the code clearer.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agohvm: Unify %cr0 handling.
kfraser@localhost.localdomain [Wed, 8 Aug 2007 15:09:17 +0000 (16:09 +0100)]
hvm: Unify %cr0 handling.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoDo not clobber new wallclock offset on restore.
Ian Campbell [Wed, 8 Aug 2007 14:03:40 +0000 (15:03 +0100)]
Do not clobber new wallclock offset on restore.

The new hypervisor will set shared_info->wc_* so do not clobber those
values with the saved versions from the old hypervisor.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
17 years agohvm: Fix %cr4 handling in HAP paging mode.
kfraser@localhost.localdomain [Wed, 8 Aug 2007 12:18:07 +0000 (13:18 +0100)]
hvm: Fix %cr4 handling in HAP paging mode.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoMerge
Tim Deegan [Wed, 8 Aug 2007 11:27:23 +0000 (12:27 +0100)]
Merge

17 years ago[TOOLS] Avoid unaligned accesses in libfsimage FAT16 code
Tim Deegan [Wed, 8 Aug 2007 11:26:21 +0000 (12:26 +0100)]
[TOOLS] Avoid unaligned accesses in libfsimage FAT16 code
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
17 years agohvm: More cleanups, particularly to %cr4 handling.
kfraser@localhost.localdomain [Wed, 8 Aug 2007 10:28:26 +0000 (11:28 +0100)]
hvm: More cleanups, particularly to %cr4 handling.
Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Xin Li <xin.b.li@intel.com>
17 years agohvm: More cleanups around paging interfaces.
kfraser@localhost.localdomain [Wed, 8 Aug 2007 09:34:03 +0000 (10:34 +0100)]
hvm: More cleanups around paging interfaces.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agohvm: Clean up control-register and EFER handling.
kfraser@localhost.localdomain [Tue, 7 Aug 2007 16:30:09 +0000 (17:30 +0100)]
hvm: Clean up control-register and EFER handling.
No semantic changes. :-)
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoxen: Clean up some paging files: no tab and trailing spaces.
kfraser@localhost.localdomain [Tue, 7 Aug 2007 08:07:29 +0000 (09:07 +0100)]
xen: Clean up some paging files: no tab and trailing spaces.
Signed-off-by: Xin Li <xin.b.li@intel.com>
17 years agoxentop: fix abnormal value cpu(%) when domain shutdown.
kfraser@localhost.localdomain [Tue, 7 Aug 2007 08:06:38 +0000 (09:06 +0100)]
xentop: fix abnormal value cpu(%) when domain shutdown.

If we test multiple domain create/shutdown many times.
sometimes abnormal values of cpu(%) are appeared.
This is because shutdown domain remove failure.
(in other words, memory corruption of struct )
This corruption makes abnormal cpu(%) values are shown xentop
sometimes.

Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
17 years ago[ACM] Explicitly cast byte arrays when used in copy_from_guest
kfraser@localhost.localdomain [Tue, 7 Aug 2007 08:04:44 +0000 (09:04 +0100)]
[ACM] Explicitly cast byte arrays when used in copy_from_guest

Explicitly cast the target array type to an array of 'u8' since the
number of bytes copied is calculated from the type of element in the
target array times the number of elements (3rd parameter).

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years ago[HVM] Store Etherboot ROM as hexdump, not binary
Tim Deegan [Mon, 6 Aug 2007 14:33:42 +0000 (15:33 +0100)]
[HVM] Store Etherboot ROM as hexdump, not binary
for ease of patch management
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
17 years agoxm: Fix control characters causing xm tests to fail.
kfraser@localhost.localdomain [Mon, 6 Aug 2007 12:42:15 +0000 (13:42 +0100)]
xm: Fix control characters causing xm tests to fail.

On my FC7 installation some of the test in the xm test suite fail for
no apparent reason. The problem is that the python 'readline' module
puts out control characters that confuse code that parses the output
of some of the xm commands that are being run. The readline module
dumps those characters upon import. The attached patch works around
this problem.

Here's what I get in out.txt when doing 'python 2>&1 | tee out.txt'
and 'import readline' on the python command line:

Python 2.5 (r25:51908, Apr 10 2007, 10:29:13)
[GCC 4.1.2 20070403 (Red Hat 4.1.2-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
[[?1034h>>> >>>

The characters before the '>>>' above are those printed by that
version of 'readline' and remain invisible on the screen but appear in
the file and confuse the xm test suite parser.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agoxm: pass --skipdtd parameter through to 'xm new'
kfraser@localhost.localdomain [Mon, 6 Aug 2007 12:39:20 +0000 (13:39 +0100)]
xm: pass --skipdtd parameter through to 'xm new'

Pass the command line parameter '--skipdtd|-s' through to the actual
'xm new' command.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years ago[32on64] Copy the right grant table status code back to the guest.
Ian Campbell [Mon, 6 Aug 2007 12:19:44 +0000 (13:19 +0100)]
[32on64] Copy the right grant table status code back to the guest.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
17 years agohvm: Fix PV-on-HVM drivers to not execuite hypercall page while it is
kfraser@localhost.localdomain [Mon, 6 Aug 2007 10:16:14 +0000 (11:16 +0100)]
hvm: Fix PV-on-HVM drivers to not execuite hypercall page while it is
being re-initialised.
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
17 years agohvm: Fix save/restore when callback_via line is routed through a PCI
kfraser@localhost.localdomain [Mon, 6 Aug 2007 10:08:57 +0000 (11:08 +0100)]
hvm: Fix save/restore when callback_via line is routed through a PCI
INTx wire.
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agopygrub: LiloConf.py supports root and read-only
kfraser@localhost.localdomain [Mon, 6 Aug 2007 09:13:34 +0000 (10:13 +0100)]
pygrub: LiloConf.py supports root and read-only

LiloConf.py ignores the following options: root and read-only.
This patch fixes the issue.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
17 years agoFix/cleanup destroyDevice code path in xend.
kfraser@localhost.localdomain [Mon, 6 Aug 2007 09:12:34 +0000 (10:12 +0100)]
Fix/cleanup destroyDevice code path in xend.

When calling destroyDevice code path (e.g. xm block-detach dom devid),
allow specifying an integer device id or a device name such as xvdN or
/dev/xvdN.  Allowing the /dev/xvdN form is useful when detaching
devices from dom0.  Bootloaders may do this to unmount a disk
previously mounted in dom0.

Move examination of device ID format into the DevController,
permitting device controllers to determine a valid device ID instead
of higher level code.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
17 years ago[ACM] Support for removing / replacing a policy
kfraser@localhost.localdomain [Mon, 6 Aug 2007 09:11:25 +0000 (10:11 +0100)]
[ACM] Support for removing / replacing a policy

Add support for removing/replacing a policy from the running
system. This operation is only successful if currently running VMs
would also be allowed to run under the new policy. Removing the
current policy means that the default policy is installed, which then
only has support for a single VM label and STE type (SystemManagement)
and is the same policy that the system starts up with when no policy
is chosen.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years ago[ACM] Support for running unlabeled domains alongside labeled ones
kfraser@localhost.localdomain [Mon, 6 Aug 2007 09:10:34 +0000 (10:10 +0100)]
[ACM] Support for running unlabeled domains alongside labeled ones

Add support for running unlabeled domains alongside labeled ones, if
the policy contains a VM label with name '__UNLABELED__' and an STE
type with the same name. The ezpolicy tool has been modified to
automatically suggest a policy under which unlabeled domains can
run. The user may delete this, if this is not desired.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agodomain builder: Zero start_info struct.
kfraser@localhost.localdomain [Fri, 3 Aug 2007 11:23:03 +0000 (12:23 +0100)]
domain builder: Zero start_info struct.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoOn debug builds, scrub pages with non-zero poison.
kfraser@localhost.localdomain [Fri, 3 Aug 2007 11:22:33 +0000 (12:22 +0100)]
On debug builds, scrub pages with non-zero poison.
Will flush out guests which are relying on zeroed memory.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years ago[HVM] Yet another MCA/MCE MSR.
Tim Deegan [Fri, 3 Aug 2007 11:10:35 +0000 (12:10 +0100)]
[HVM] Yet another MCA/MCE MSR.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
17 years agoes7000: Remove the bulk of the ES7000 specific code from Xen.
kfraser@localhost.localdomain [Fri, 3 Aug 2007 08:04:29 +0000 (09:04 +0100)]
es7000: Remove the bulk of the ES7000 specific code from Xen.

On the Unisys ES7000-One, Xen now uses the bigsmp APIC driver. This patch
has been tested on the ES7000 and a commodity box.

Signed-off-by: Raj Subrahmanian <raj.subrahmanian@unisys.com>
17 years agoMerge with ppc/xen-unstable.hg
kfraser@localhost.localdomain [Thu, 2 Aug 2007 15:03:35 +0000 (16:03 +0100)]
Merge with ppc/xen-unstable.hg

17 years agomerge with xen-unstable.hg
Hollis Blanchard [Thu, 2 Aug 2007 14:54:18 +0000 (09:54 -0500)]
merge with xen-unstable.hg

17 years ago[POWERPC][XEN] Commit missing multiboot files.
Hollis Blanchard [Thu, 2 Aug 2007 14:50:55 +0000 (09:50 -0500)]
[POWERPC][XEN] Commit missing multiboot files.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
17 years agolibelf: Clean up and fix up BSD symtab handling.
kfraser@localhost.localdomain [Thu, 2 Aug 2007 13:18:38 +0000 (14:18 +0100)]
libelf: Clean up and fix up BSD symtab handling.
Should now (hopefully) work for domU and dom0 builders.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoelfloader: Re-add break stmt I stupidly removed from elf parser.
kfraser@localhost.localdomain [Thu, 2 Aug 2007 09:05:14 +0000 (10:05 +0100)]
elfloader: Re-add break stmt I stupidly removed from elf parser.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agolibelf: Remove unneeded extra elf_set_verbose() invocation.
kfraser@localhost.localdomain [Thu, 2 Aug 2007 08:53:13 +0000 (09:53 +0100)]
libelf: Remove unneeded extra elf_set_verbose() invocation.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoMerge
Tim Deegan [Thu, 2 Aug 2007 08:02:26 +0000 (09:02 +0100)]
Merge

17 years ago[MINIOS] fix x86_64 p2m map and CFLAGS
Tim Deegan [Thu, 2 Aug 2007 08:02:08 +0000 (09:02 +0100)]
[MINIOS] fix x86_64 p2m map and CFLAGS
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
17 years agoxenstore: Redirect stdin/stdout/stderr to /dev/null.
kfraser@localhost.localdomain [Wed, 1 Aug 2007 18:34:56 +0000 (19:34 +0100)]
xenstore: Redirect stdin/stdout/stderr to /dev/null.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoxenstore: Do not assign to stdout/stderr/stdin - they are not
kfraser@localhost.localdomain [Wed, 1 Aug 2007 18:17:08 +0000 (19:17 +0100)]
xenstore: Do not assign to stdout/stderr/stdin - they are not
implemented as variables on all systems.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years ago[ELF] Load elf symbols when BSD_SYMTAB=yes.
kfraser@localhost.localdomain [Wed, 1 Aug 2007 14:47:54 +0000 (15:47 +0100)]
[ELF] Load elf symbols when BSD_SYMTAB=yes.

When a guest kernel specifies BSD_SYMTAB=yes, then Xen loads the ELF
symbols for it. This works with Xen 3.0.4, but not with Xen 3.1.
During the libelf work between Xen 3.0.4 and Xen 3.1 the loading got
broken in the way, that BSD_SYMTAB gets parsed but not handled.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agoxenstored: Do not write to stderr if we are daemonised!
kfraser@localhost.localdomain [Wed, 1 Aug 2007 11:55:10 +0000 (12:55 +0100)]
xenstored: Do not write to stderr if we are daemonised!
This fixes client reader-thread deaths in which a 'garbage string' was
being read instead of a well-formed message header.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoxenstored: Remove unused util code.
kfraser@localhost.localdomain [Wed, 1 Aug 2007 11:05:42 +0000 (12:05 +0100)]
xenstored: Remove unused util code.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoblktap: Fix unaligned access to blktap/tapdisk message payloads.
kfraser@localhost.localdomain [Wed, 1 Aug 2007 08:11:08 +0000 (09:11 +0100)]
blktap: Fix unaligned access to blktap/tapdisk message payloads.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoFix file descriptor leak in blktapctrl
kfraser@localhost.localdomain [Wed, 1 Aug 2007 08:04:20 +0000 (09:04 +0100)]
Fix file descriptor leak in blktapctrl

The blktapctrl process is responsible for spawning individual tapdisk
processes. It does this using the 'system' method, but unfortunately
none of its file descriptors have the close-on-exec flag set. The
parent blktapctl process opens a couple of unix domain sockets
per-tapdisk it spawns. So the first tapdisk get 2 FDs leaked to it,
the second gets 4 FDs leaked to it, the 3rd gets 6 and so on. The use
of 'system' also unneccessarily invokes the shell.

Replace system with fork/execvp, and explicitly close all file handles
up to _SC_OPEN_MAX.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
17 years agoMerge with ppc/xen-unstable.hg.
kfraser@localhost.localdomain [Wed, 1 Aug 2007 07:59:03 +0000 (08:59 +0100)]
Merge with ppc/xen-unstable.hg.

17 years ago[IA64] Fix tools build.
kfraser@localhost.localdomain [Wed, 1 Aug 2007 07:57:55 +0000 (08:57 +0100)]
[IA64] Fix tools build.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
17 years agohvm: Large-scale cleanups and fixes to event deliver logic.
kfraser@localhost.localdomain [Tue, 31 Jul 2007 17:59:00 +0000 (18:59 +0100)]
hvm: Large-scale cleanups and fixes to event deliver logic.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agohvmloader: Avoid bogus use of NULL pointer.
kfraser@localhost.localdomain [Tue, 31 Jul 2007 14:09:45 +0000 (15:09 +0100)]
hvmloader: Avoid bogus use of NULL pointer.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years ago[HVM] Inject #PF when mmio instruction fetch fails
Tim Deegan [Tue, 31 Jul 2007 10:37:27 +0000 (11:37 +0100)]
[HVM] Inject #PF when mmio instruction fetch fails
instead of crashing the guest.  This can happen if one vcpu pages out
another vcpu's kernel text page while the other is performing an mmio op.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
17 years agohvm: Define common (across VMX and SVM) set of event types.
kfraser@localhost.localdomain [Tue, 31 Jul 2007 09:11:47 +0000 (10:11 +0100)]
hvm: Define common (across VMX and SVM) set of event types.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agohvm: Fix CR0 handling, which I broke in 15652.
kfraser@localhost.localdomain [Tue, 31 Jul 2007 08:47:11 +0000 (09:47 +0100)]
hvm: Fix CR0 handling, which I broke in 15652.
Thanks to Eric Liu for spotting this.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agovmx: Simplify event-injection logic.
kfraser@localhost.localdomain [Tue, 31 Jul 2007 08:39:14 +0000 (09:39 +0100)]
vmx: Simplify event-injection logic.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years ago[POWERPC][XEN] Use multiboot2 data structures when present.
Hollis Blanchard [Mon, 30 Jul 2007 22:10:45 +0000 (17:10 -0500)]
[POWERPC][XEN] Use multiboot2 data structures when present.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
17 years ago[POWERPC][XEN] Deal with "shadow" -> "paging" fallout.
Hollis Blanchard [Mon, 30 Jul 2007 18:50:14 +0000 (13:50 -0500)]
[POWERPC][XEN] Deal with "shadow" -> "paging" fallout.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
17 years ago[POWERPC][XEN] Fix build by adding proper guards to asm/numa.h
Hollis Blanchard [Mon, 30 Jul 2007 18:47:02 +0000 (13:47 -0500)]
[POWERPC][XEN] Fix build by adding proper guards to asm/numa.h
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
17 years ago[ACM] Some more fixes
kfraser@localhost.localdomain [Mon, 30 Jul 2007 15:03:16 +0000 (16:03 +0100)]
[ACM] Some more fixes

 - don't reload the policy if it has been loaded
 - don't always load the policy in the test suite when the policy is
   already loaded
 - skip tests 07 and 09 when ACM is not enabled and xm is not using the
   Xen-API
 - fix a problem when trying to remove an invalid label

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years ago[IA64] Disable ACPI SRAT,SLIT table of dom0.
kfraser@localhost.localdomain [Mon, 30 Jul 2007 10:28:16 +0000 (11:28 +0100)]
[IA64] Disable ACPI SRAT,SLIT table of dom0.

  On some ia64 NUMA machine, we cannot boot dom0.
  This issue is caused by different infomation LSAPIC and SRAT.
  Xen-ia64 modify LSAPIC IDs of dom0, but it does not modify SRAT.
  So we decide disabling SRAT, SLIT of dom0 as first step of NUMA
  work.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
17 years agoAdd acpi_table_disable() into xen/drivers/acpi/tables.c
kfraser@localhost.localdomain [Mon, 30 Jul 2007 10:27:48 +0000 (11:27 +0100)]
Add acpi_table_disable() into xen/drivers/acpi/tables.c
This function can disable a ACPI table by updating the table header.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoMove generate_acpi_checksum() from ia64 code to common.
kfraser@localhost.localdomain [Mon, 30 Jul 2007 09:59:27 +0000 (10:59 +0100)]
Move generate_acpi_checksum() from ia64 code to common.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
17 years agohvm: Clean up CR0 handling.
kfraser@localhost.localdomain [Fri, 27 Jul 2007 08:43:07 +0000 (09:43 +0100)]
hvm: Clean up CR0 handling.

Upper 32 bits should #GP if set. Lower 32 bits should have reserved
bits silently cleared.

Check Intel VMX MSRs to check for compatibility with our CR0
requirements.

Signed-off-by: Eric E Liu <eric.e.liu@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoImplement Xen API method Console.set_other_config.
kfraser@localhost.localdomain [Fri, 27 Jul 2007 08:06:58 +0000 (09:06 +0100)]
Implement Xen API method Console.set_other_config.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
17 years agoImplement missing Xen API method Console.get_other_config.
kfraser@localhost.localdomain [Fri, 27 Jul 2007 08:06:30 +0000 (09:06 +0100)]
Implement missing Xen API method Console.get_other_config.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
17 years agoFix Xen API console methods that use undefined variables.
kfraser@localhost.localdomain [Fri, 27 Jul 2007 08:06:10 +0000 (09:06 +0100)]
Fix Xen API console methods that use undefined variables.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
17 years ago[Xend] Do network startup earlier.
kfraser@localhost.localdomain [Fri, 27 Jul 2007 08:04:35 +0000 (09:04 +0100)]
[Xend] Do network startup earlier.

Xend tries to rebuild the network configuration such as bridges and
vlan interfaces  (in those bridges) when starting. Unfortunately this
fails on the first startup since the network script has not run, yet,
and for example created peth0. When restarting xend it works due to
the peth0 being there then. This patch moves the initialization of the
network to an earlier time in the xend initialization process to
mitigate this problem.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years ago[XEND] Fix for creating VLANs using the Xen-API
kfraser@localhost.localdomain [Fri, 27 Jul 2007 08:03:35 +0000 (09:03 +0100)]
[XEND] Fix for creating VLANs using the Xen-API

Recent changes to the setup of the peth0 interface have resulted in a
change of its MAC address. Previously it seems to have had a MAC
address of 'fe:ff:ff:ff:ff:ff', but now it has the same MAC address as
eth0. As a consequence to this the Xen-API code to create VLANs
(PIF.create_VLAN("peth0",...)) does not work anymore, since peth0 can
not be identified according to this previous criteria of fake MAC
address. This patch fixes this issue by identifying it through the
prefix 'peth'.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years ago[ACM] Check a domain's authorization to run.
kfraser@localhost.localdomain [Fri, 27 Jul 2007 08:01:15 +0000 (09:01 +0100)]
[ACM] Check a domain's authorization to run.

A domain is only authorized to run if it has a superset of Simple Type
Enforcement Types in its VM label compared to that of Domain-0, which
itself may not have all STEs available in a policy. This patch adds a
check for this into Xend and the necessary code support into Xen.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years ago[HVM] Save/restore: don't leak shared-memory segments after HVM live-migrate.
Tim Deegan [Thu, 26 Jul 2007 11:00:32 +0000 (12:00 +0100)]
[HVM] Save/restore: don't leak shared-memory segments after HVM live-migrate.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
17 years agoxenstored: Fix socket-based connection teardown. Reading zero bytes
kfraser@localhost.localdomain [Wed, 25 Jul 2007 08:51:14 +0000 (09:51 +0100)]
xenstored: Fix socket-based connection teardown. Reading zero bytes
*should* in fact cause the connection to be destroyed. Fix this with a
little extra code in the readfd() handler.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoxenstore: Small cleanups and fixes.
kfraser@localhost.localdomain [Tue, 24 Jul 2007 17:28:48 +0000 (18:28 +0100)]
xenstore: Small cleanups and fixes.
 1. readfd/writefd account for EINTR/EAGAIN errno returns.
 2. Handle zero return from ->read() and ->write() handlers
    symmetrically.
 3. Fix some indentation issues (use hard tabs).
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoAdd domain name check and UUID check to 'xm new' command.
kfraser@localhost.localdomain [Tue, 24 Jul 2007 17:05:04 +0000 (18:05 +0100)]
Add domain name check and UUID check to 'xm new' command.

Add a domain name check and a UUID check to xm new command. The check
logic is as follows:

 - If the UUID is not specified
       - If a VM with same name exists
           => Update the config for that existing VM
       - Else no vm with same name exists
           => Define a brand new VM with auto-generated UUID
 - Else UUID is specified
       - If a VM with same UUID exists
             - If name is different
                   => Error
             - Else if name is same
                   => Update the config for that existing VM
       - Else no VM with same UUID exists
             - If name is different
                   => Define a branch new VM with that name
             - Else if name is same
                   => Error

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
17 years ago[HVM] Live-migration fixups after 15639:c585f993385c
Tim Deegan [Tue, 24 Jul 2007 14:47:36 +0000 (15:47 +0100)]
[HVM] Live-migration fixups after 15639:c585f993385c
Use the same xenstore area for log-dirty commands as for save/continue,
and avoid a race condition by acking the save command after the save.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
17 years agoMerge
Tim Deegan [Tue, 24 Jul 2007 13:53:06 +0000 (14:53 +0100)]
Merge

17 years ago[HVM] Control qemu's state-save via xenstore, instead of SIGUSR1
Tim Deegan [Tue, 24 Jul 2007 13:52:16 +0000 (14:52 +0100)]
[HVM] Control qemu's state-save via xenstore, instead of SIGUSR1
This lets us verify that qemu has indeed stopped processing before
we start saving guest memory.  Also allow qemu to continue processing
after the save has happened, instead of exiting immediately.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
17 years agoxenstored: Fairly round-robin schedule work across all connections.
kfraser@localhost.localdomain [Tue, 24 Jul 2007 13:50:50 +0000 (14:50 +0100)]
xenstored: Fairly round-robin schedule work across all connections.
Avoids total starvation under some workloads.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoxenstored: Guarantee to fire @releaseDomain watch when a domain is destructed.
kfraser@localhost.localdomain [Tue, 24 Jul 2007 13:50:05 +0000 (14:50 +0100)]
xenstored: Guarantee to fire @releaseDomain watch when a domain is destructed.
Previously this would be missed on some bail paths within xenstored
which would talloc_free() the connection.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years ago[HVM] Shadow: release shadow lock during emulation path
Tim Deegan [Tue, 24 Jul 2007 10:10:08 +0000 (11:10 +0100)]
[HVM] Shadow: release shadow lock during emulation path
and retake it only for the write-back at the end.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
17 years ago[PVFB] Fix shift key for graphical vnc display
kfraser@localhost.localdomain [Mon, 23 Jul 2007 09:03:17 +0000 (10:03 +0100)]
[PVFB] Fix shift key for graphical vnc display

There is a problem in the input of the key in the VNC connection on
the PV domain. When client's keyboard is not the same as the kind of
the keyboard of PVFB and GuestOS, it is not possible to input it correctly.

This patch handled the state of shift from the set keymap. When
client's keyboard is not same as the kind of PVFB/GuestOS, it is
possible to input it correctly. It was confirmed to input it correctly
mutually with this patch between en-us and ja.

Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
17 years ago[IOEMU] Fix shift key for graphical vnc display
kfraser@localhost.localdomain [Mon, 23 Jul 2007 09:02:37 +0000 (10:02 +0100)]
[IOEMU] Fix shift key for graphical vnc display

There is a problem in the input of the key in the VNC connection on
the HVM domain. When client's keyboard is not the same as the kind of
the keyboard of qemu-dm and GuestOS, it is not possible to input it
correctly.

   VNC client     qemu-dm & GuestOS
--------------+-----------------------
    ja             en-us               ==> NG
    en-us          en-us               ==> OK

Originally, the same keysym-code between client and qemu-dm is
transmitted. However, even if it is the same character, the state of
shift is different according to the kind of keyboard.

ex.
   "=" charactor
---------------------
en-us :  "="
ja    :  shift + "-"

Therefore, it is necessary to handle the state of the shift by setting
qemu-dm and GuestOS. There is information on whether shift is
necessary for each key for the keymap of qemu-dm.

ex.
 VNC client        : ja
 qemu-dm & GuestOS : en-us
 input key         : "="
 event client to qemu-dm :
  shift(push) >> "="(push) >> "="(release) >> shift(release)
 event qemu-dm to guest :
  shift(push) >> shift(release) >> "="(push) >> "="(release) >>
 shift(push) >>
shift(release)

This patch handled the state of shift from the set keymap.
When client's keyboard is not same as the kind of qemu-dm/GuestOS,
it is possible to input it correctly.
It was confirmed to input it correctly mutually with this patch
between en-us and ja.

Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
17 years ago[ACM] Check boundary conditions of passed parameters before accessing
kfraser@localhost.localdomain [Mon, 23 Jul 2007 08:56:49 +0000 (09:56 +0100)]
[ACM] Check boundary conditions of passed parameters before accessing
an array with them.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years ago[ACM] Coding style cleanups.
kfraser@localhost.localdomain [Mon, 23 Jul 2007 08:56:00 +0000 (09:56 +0100)]
[ACM] Coding style cleanups.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years ago[ACM] Allow the loadpolicy operation once
kfraser@localhost.localdomain [Mon, 23 Jul 2007 08:45:23 +0000 (09:45 +0100)]
[ACM] Allow the loadpolicy operation once

This patch allows the loadpolicy operation to only happen once, then
require an update until the default policy has been installed (again).

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agoFix IA64 build
Tim Deegan [Fri, 20 Jul 2007 13:10:40 +0000 (14:10 +0100)]
Fix IA64 build
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
17 years ago[HVM] HAP: mark domains as HAP-enabled, not shadow-enabled.
Tim Deegan [Fri, 20 Jul 2007 11:00:25 +0000 (12:00 +0100)]
[HVM] HAP: mark domains as HAP-enabled, not shadow-enabled.
Thanks to Wei Huang.
Signed-off-by: TIm Deegan <Tim.Deegan@xensource.com>