Keir Fraser [Thu, 20 Mar 2008 12:25:35 +0000 (12:25 +0000)]
svm: Reported SS.DPL must equal CPL, as this is assumed by generic HVM
code despite the fact that AMD processors do not always maintain this
invariant.
Based on a bug report and proposed patch by Ben Guthro and Robert
Phillips of Virtual Iron.
Keir Fraser [Thu, 20 Mar 2008 12:24:10 +0000 (12:24 +0000)]
domain_shutdown() needs to vcpu_pause_nosync() rather than directly
incrementing the pause_count field. The latter ensures that the VCPU
gets descheduled --- synchronously in the case of the
currently-running VCPU.
Based on a bug report and proposed patch by Ben Guthro and Robert
Phillips of Virtual Iron.
Keir Fraser [Thu, 20 Mar 2008 12:23:14 +0000 (12:23 +0000)]
SVM: handle page faults in emulated instruction fetches
Deal with failures in hvm_copy_from_guest_virt when fetching
instructions in the various SVM emulation paths. Since we know that
the instruction was fetchable by the hardware, we can usually just
return from the VMEXIT and try again; whatever caused us to fail will
cause the hardware to fail next time and we'll get the correct exit
code.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset: 17202:8325f200e19414d998b7625f2e3cf786a6d3d3a3
xen-unstable date: Mon Mar 17 11:39:50 2008 +0000
Keir Fraser [Wed, 5 Mar 2008 16:45:30 +0000 (16:45 +0000)]
x86_emulate: INS/OUTS need Mov attribute to force writeback (since
dst.orig_val is not initialised). Also, Mov attribute on cmpxchg is
not necessary -- when destination is memory (i.e., successful cmpxchg)
then dst.orig_val is already correctly filled in. In case that
dst.orig_val == dst.val then the instruction linearises at the point
we first read the destination (and initialised dst.orig_val). Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset: 17174:c89f6ed5635179695c92810a9c9eec205e5d0d78
xen-unstable date: Mon Mar 03 11:47:40 2008 +0000
Keir Fraser [Wed, 5 Mar 2008 16:45:06 +0000 (16:45 +0000)]
Fix xm vcpu-pin for inactive managed domains
We cannot currently change cpu affinity definitions of inactive
managed domains by xm vcpu-pin command. This patch enables changing
cpu affinity definitions of inactive managed domains. However, we
cannot change cpu affinity definitions to each vcpu because we cannot
currently define cpu affinity definitions to each vcpu to domain
configuration definitions. Therefore, we need to specify 'all' to
VCPU argument of xm vcpu-pin command.
Keir Fraser [Wed, 5 Mar 2008 10:04:00 +0000 (10:04 +0000)]
x86: make show_page_walk() more robust. Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset: 16879:1a2f557448cf5de825d40e550140637961d2eb46
xen-unstable date: Thu Jan 24 18:11:44 2008 +0000
Keir Fraser [Mon, 3 Mar 2008 13:41:34 +0000 (13:41 +0000)]
Fix restore of saved image containing rtc_timeoffset
Saved images contain rtc_timeoffset as a string value, resulting in a
TypeError exception when calling xc.domain_set_time_offset() on
restore. Cast rtc_timeoffset to int before calling
xc.domain_set_time_offset().
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
xen-unstable changeset: 17113:9dd235d6174d1944caf53798a07ecf509678eead
xen-unstable date: Tue Feb 26 14:35:39 2008 +0000
Keir Fraser [Sat, 1 Mar 2008 09:29:28 +0000 (09:29 +0000)]
xen: Fix PV resume race against another back-to-back suspend request.
Previously the next suspend request was being dropped on the floor. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
linux-2.6.18-xen changeset: 451:49ffe9ef67d420bde98e7ead29c9b9bfc5b026ba
linux-2.6.18-xen date: Fri Feb 29 10:29:13 2008 +0000
Keir Fraser [Sat, 1 Mar 2008 09:27:10 +0000 (09:27 +0000)]
Avoid using a separate watch thread due to uninitialised watch->flags.
The xenbus_dev code isn't setup to handle the case where
XBWF_new_thread is set so there is a potetial crash if this flag is
erroneously set. Therefore initialise flags to zero by using kzalloc
rather than kmalloc.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
linux-2.6.18-xen changeset: 440:43de9d7c3c63adaac7e334621f763c94acbbc178
linux-2.6.18-xen date: Tue Feb 26 17:59:18 2008 +0000
Keir Fraser [Tue, 26 Feb 2008 15:06:42 +0000 (15:06 +0000)]
ioemu: IDE flush on O_DIRECT with drive caching off.
Long ago Xen added code to the device model to basically do an fsync()
after every data write if the user in the guest specified that IDE
write caching should be disabled. This works fine, except in the case
where you are doing O_DIRECT writes inside the guest (ala dd
if=/dev/zero of=/dev/hdb oflag=direct). This is because you can get
out of ide_write_dma_cb() in the middle of the loop without going
through the logic to sync. This simple patch makes sure that you
always check (and sync) inside the write callback.
Signed-off-by: Chris Lalancette <clalance@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Keir Fraser [Thu, 21 Feb 2008 15:15:02 +0000 (15:15 +0000)]
xm: Fix xm vcpu-pin to complain for CPU numbers out of range. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
xen-unstable changeset: 17092:511ab2b89ced1e190c6c76139b60049b69be69ef
xen-unstable date: Wed Feb 20 17:42:12 2008 +0000
Keir Fraser [Mon, 18 Feb 2008 14:33:57 +0000 (14:33 +0000)]
Xen dom0 arbitrarily assigns APIC ID x to CPU ID x. Make dom0 also
assign the APIC ID to ACPI ID mapping in the same way. Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
linux-2.6.18-xen changeset: 419:0034d9389130969f9452b76370f76394e10238b8
linux-2.6.18-xen date: Fri Feb 15 10:01:06 2008 +0000
Keir Fraser [Mon, 18 Feb 2008 14:29:50 +0000 (14:29 +0000)]
fbfront: Clear ring contents on save/restore. Otherwise in some cases
a restored domain loses mouse and keyboard. Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
linux-2.6.18-xen changeset: 415:90fbf541d772e9df4e7a4be3ed667d9bac5412c0
linux-2.6.18-xen date: Mon Feb 11 10:19:25 2008 +0000
Keir Fraser [Mon, 18 Feb 2008 14:26:38 +0000 (14:26 +0000)]
x86: Fix mod_l3_entry() for PAE-on-64 guests. The adjustment of
_PAGE_RW and _PAGE_USER cannot happen before get_page_from_l3e().
Original patch by Manuel Bouyer <bouyer@netbsd.org>. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset: 17061:9d29141a5e527d13c10b592c5b7807af73750a19
xen-unstable date: Mon Feb 18 13:50:25 2008 +0000
Keir Fraser [Mon, 18 Feb 2008 14:24:54 +0000 (14:24 +0000)]
x86/64: Make BIOS call to declare our intention to enter long mode. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset: 17051:55ae3b66b1b6e9039f13d9eec0b98864ca87ba6f
xen-unstable date: Thu Feb 14 11:24:49 2008 +0000
Keir Fraser [Mon, 18 Feb 2008 14:19:42 +0000 (14:19 +0000)]
xm reboot: Fix wait option of xm reboot command
When I rebooted a domain by xm reboot command with wait option,
I saw the following message. But, rebooting the domain succeeded.
Domain vm1 destroyed for failed in rebooting
The cause why the message was shown is the domain is destroyed
temporarily by processing of xm reboot command. The domain
information is not gotten from Xend by server.xend.domains()
function till recreating the domain is completed.
This patch fixes processing of xm reboot command in Xm side.
It waits just a bit till recreating the domain is completed,
then it measures the success or failure of the reboot of the
domain.
Keir Fraser [Mon, 4 Feb 2008 14:32:26 +0000 (14:32 +0000)]
ebtables: don't compute gap until we know we have an ebt_entry
Original upstream Linux patch by Chuck Ebbert. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
linux-2.6.18-xen changeset: 405:369b676a32439c947a604323b5b3db6007ffedd2
linux-2.6.18-xen date: Mon Feb 04 14:29:03 2008 +0000
Keir Fraser [Mon, 4 Feb 2008 14:24:57 +0000 (14:24 +0000)]
Do not allocate vcpu_guest_context on the stack when initialising a
new VCPU. It is too big for 4kB stacks.
Original patch by Donald Dutile <ddutile@redhat.com> backported from
upstream pv_ops work. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
linux-2.6.18-xen changeset: 402:687ef5a4fcb7c6a0c8fe90ab25ce58a465c1cb4b
linux-2.6.18-xen date: Fri Feb 01 11:11:12 2008 +0000
Keir Fraser [Mon, 4 Feb 2008 14:22:33 +0000 (14:22 +0000)]
xend: Fix grow of the LEGACY_UNSUPPORTED_BY_XENAPI_CFG list each time
we instantiate a new XendConfig. Signed-off-by: Pascal Bouchareine <pascal@gandi.net>
xen-unstable changeset: 16965:b1b93caa7d8e2414af06f06c3a9734675f715bad
xen-unstable date: Sat Feb 02 10:53:24 2008 +0000
Keir Fraser [Mon, 4 Feb 2008 14:22:17 +0000 (14:22 +0000)]
Fix save/restore failure cleanup
The save failure cleanup introduced in 13543:207523704fb1 is
incorrect: if we didn't get as far as actually suspending the domain,
then the guest domain will not be expecting the devices to be removed
(seen on both Linux and Solaris, which don't expect a 'Closing' state
when they hold the device open). Only re-jig devices if we definitely
shut the domain down.
Signed-off-by: John Levon <john.levon@sun.com>
xen-unstable changeset: 16964:5d84464dc1fc013110c25dc0ff1f99585e699fa3
xen-unstable date: Sat Feb 02 10:51:54 2008 +0000
Keir Fraser [Mon, 4 Feb 2008 14:20:07 +0000 (14:20 +0000)]
libxc: Fix the third argument of bitmap_64_to_byte in
xc_tbuf_set_cpu_mask Signed-off-by: Eric Liu <eric.e.liu@intel.com>
xen-unstable changeset: 16951:475f4323b86a9c15e81e31ba9a25d19c5fa51eb5
xen-unstable date: Thu Jan 31 09:39:44 2008 +0000
Keir Fraser [Mon, 28 Jan 2008 10:37:48 +0000 (10:37 +0000)]
Fix losetup -r flag when we specify 'w!' for the disk mode.
From: Zhigang Wang <zhigang.x.wang@oracle.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset: 16880:78a29cf8476b6e6720edbfb4c89c3809be227ffe
xen-unstable date: Fri Jan 25 13:22:52 2008 +0000
Keir Fraser [Thu, 24 Jan 2008 14:58:25 +0000 (14:58 +0000)]
tools/examples/block better use of losetup -r
Use losetup -r when the vbd is specified to be readonly, but only if
-r is supported (rather than always creating a writeable losetup
mapping if possible).
This was inspired by (but not derived from) a diff from the Fedora 8
patchset which uses -r iff the vbd is specified as readonly. We need
to be cleverer upstream because not all systems have losetup -r.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset: 16642:643ab64d12d5ce57e5f1e08f85ab4bb7fbc136ae
xen-unstable date: Wed Dec 19 15:05:15 2007 +0000
Keir Fraser [Thu, 24 Jan 2008 14:57:57 +0000 (14:57 +0000)]
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>
xen-unstable changeset: 16330:fbe7ed173314723f80f105e7e60fddd0bed77e5b
xen-unstable date: Wed Nov 07 09:22:31 2007 +0000
Keir Fraser [Tue, 22 Jan 2008 11:33:40 +0000 (11:33 +0000)]
blkback/blktap: Check for kthread_should_stop() in inner loop,
mdelaay() should be msleep(), and these changes belong in blktap as
well as blkback.
Based on comments and patches from Jan Beulich and Steven Smith. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
linux-2.6.18-xen changeset: 392:7070d34f251c3e0c411022a5d365aea9804114a7
linux-2.6.18-xen date: Mon Jan 21 11:43:31 2008 +0000
blkback: Request-processing loop is unbounded and hence requires a
yield point. Also, bad request type is a good cause to sleep for a
short while as the frontend has probably gone mad.
Patch by Steven Smith <steven.smith@eu.citrix.com>
Keir Fraser [Tue, 22 Jan 2008 11:32:23 +0000 (11:32 +0000)]
Avoid allocations causing swap activity on the resume path by allowing
such allocations to access the emergency pools otherwise a
save/restore/migration of a guest which is low on memory can
deadlock.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
linux-2.6.18-xen changeset: 377:e8b49cfbdac0c5ee680cd9ec3d693ed0e2d42432
linux-2.6.18-xen date: Mon Jan 14 15:52:23 2008 +0000
Keir Fraser [Tue, 22 Jan 2008 11:27:43 +0000 (11:27 +0000)]
xend: On block-attach, remove device information when VmError occurs.
I tested xm block-attach command with a wrong
parameter(file:). Naturally a command error occurred. Then I retested
xm block-attach command with a correct parameter(phy:). But a command
error occurred again. The second command error occurred because Xend
did not remove device information from self.info when the first
command error occurred.
Keir Fraser [Tue, 22 Jan 2008 11:27:18 +0000 (11:27 +0000)]
hvm, ioemu: Fix the ide/cdrom emulation error on FC7 guest.
The new libata-eh in the Linux kernel is throwing a fit over the QEMU
cdrom device for two reasons:
1) DRQ can be set with ERR_STAT set. This is a violation of the ATAPI
state machine.
2) After a TEST_UNIT_READY ATAPI command is sent ERR_STAT is getting
set
which is correct. But, when the OS issues another ATAPI command
ERR_STAT is still set. Which is bad since the next expected command
from the OS is REQUEST_SENSE to find out why ERR_STAT is set.
bug this fixes: https://bugzilla.novell.com/show_bug.cgi?id=3D291775
Signed-off-by: Brandon Philips <bphilips@suse.de>
Porting this qemu fix to xen.
Keir Fraser [Fri, 18 Jan 2008 13:54:11 +0000 (13:54 +0000)]
hvm: Allocate an unmapped guard page to separate ordinary low RAM
from special pages (ioreq, xenstore, etc). This will stop some probe
functions (e.g., embedded in memtest) from stomping on the special
pages. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset: 16728:be960a84e492c1baa0a2dfa76b1a770d0df5e433
xen-unstable date: Thu Jan 17 12:59:10 2008 +0000
Keir Fraser [Fri, 18 Jan 2008 13:53:38 +0000 (13:53 +0000)]
libxen: Fix function prototype. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset: 16721:b953c358d0adc75f77cfa1991b5fc15da2b5b0a2
xen-unstable date: Tue Jan 15 18:48:32 2008 +0000
Keir Fraser [Thu, 17 Jan 2008 14:00:54 +0000 (14:00 +0000)]
x86: Remove broken and unnecessary numa code from smpboot.c.
This was trampling on random memory when node==NUMA_NO_NODE. Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset: 15246:4eb223694d0aa8dc6266621ead1eb590f1aa29cc
xen-unstable date: Sun Jun 10 18:07:58 2007 +0100
Keir Fraser [Tue, 15 Jan 2008 11:19:14 +0000 (11:19 +0000)]
Cleanup xenstore after console device teardown
After the changes in 13616:b111908dd70b, DevController was leaking
xenstore entries every time we took down a console device, as there
was no equivalent to 'xenstore-rm -t' used in the hotplug scripts for
"real" devices. Implement the moral equivalent whenever removal is
forced.