Keir Fraser [Mon, 15 Oct 2007 11:13:41 +0000 (12:13 +0100)]
x86/64: Do not clobber %r11 (user rflags) on syscall from guest
userspace to guest kernel. The flags are saved on the guest kernel
stack anyway, but some guests rely on %r11 instead. Signed-off-by: Keir Fraser <keir@xensource.com>
Tim Deegan [Mon, 15 Oct 2007 08:28:14 +0000 (09:28 +0100)]
PV guests don't require order-non-zero pages for shadowing, hence lift
the requirement on such being available for allocation when enabling
shadow mode, removing the potential for live migration to fail due to
fragmented memory.
Keir Fraser [Fri, 12 Oct 2007 13:30:41 +0000 (14:30 +0100)]
xend: Fix file resouce leak on resume of suspended managed domains.
When a suspended managed domain is resumed, the checkpoint file is
removed, but xend retains a reference to the removed file. This
represents a resource leak. Fixed by ensuring that the file reference
is closed correctly.
Signed-off-by: Gary Pennington <gary.pennington@sun.com>
Keir Fraser [Fri, 12 Oct 2007 10:55:41 +0000 (11:55 +0100)]
x86: propagate VESA capabilities to dom0
Linux has been using the VESA capabilities field for quite a while, so
Xen should also supply it. At once, in case needed in the future, also
propagate the mode attributes field.
Keir Fraser [Fri, 12 Oct 2007 10:42:56 +0000 (11:42 +0100)]
x86/hvm: miscellaneous CPUID handling changes
- use __clear_bit() rather than clear_bit()
- use switch statements instead of long series of if-s
- eliminate pointless casts
Keir Fraser [Thu, 11 Oct 2007 18:18:12 +0000 (19:18 +0100)]
x86: Fix emulation of DIV instruction. Never actually used currently,
but this will avoid a #DE in Xen. Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Thu, 11 Oct 2007 12:32:41 +0000 (13:32 +0100)]
Clean up SMP macros and always have IRQs disabled when executing an
'smp_call_function' callback function. Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Thu, 11 Oct 2007 09:20:45 +0000 (10:20 +0100)]
Shadow code printing adjustments.
Messages prior to BUG() should always be displayed, not just when
DEBUG_TRACE_DUMP is defined (which by default it isn't). Convert them
from SHADOW_PRINTK() to SHADOW_ERROR().
Keir Fraser [Thu, 11 Oct 2007 08:41:16 +0000 (09:41 +0100)]
[vTPM] Add set/get_other_config to Xen-API.
Add get_- and set_other_config methods to the vTPM class. Write the
parameters into the xenstore while the domain is running prefixing it
with 'oc_'. Also I add the methods to the C library as well as the
documentation.
Keir Fraser [Thu, 11 Oct 2007 07:14:11 +0000 (08:14 +0100)]
hvm: Fix migration of 64-bit guests by permitting EFER_LMA to be set
in restored VCPU context. Signed-off-by: David Lively <dlively@virtualiron.com> Signed-off-by: Robert Phillips <rphillips@virtualiron.com>
Keir Fraser [Mon, 8 Oct 2007 09:55:50 +0000 (10:55 +0100)]
xenconsoled: portability fixes:
- Use openpty(), which does the same as the sequence
of open(), grantpt(), unlockpt(), ptsname(), tcgetattr()
simplifies code
- Check return code from tcsetattr()
- sprintf() -> snprintf()
- OpenBSD lacks POSIX grantpt() and unlockpt()
requires use of openpty()
- Solaris lacks POSIX openpty() via feedback from SUN (John Levon)
implement openpty() for Solaris, tested and ok'd by SUN (John
Levon)
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Mon, 8 Oct 2007 09:46:45 +0000 (10:46 +0100)]
Fix domU reboot failure when using "pci=" option
The failure only happens on the second or later auto reboot.
See the following thread for a long discussion on this issue where
most problems were fixed.
Keir Fraser [Fri, 5 Oct 2007 09:31:25 +0000 (10:31 +0100)]
[NW scripts] Choose alternative interface if NFSroot is used.
Allow the network bridging setup script to choose an alternative
network interface if it is determined that the root is mounted using
NFS, which is assumed to be done over the NIC serving the default
gw. In this case the prefix of the device is used to find other
devices, i.e., if eth0 is the default device an alternative device may
be an other ones starting with 'eth'.
Keir Fraser [Thu, 4 Oct 2007 16:58:16 +0000 (17:58 +0100)]
xen: Changes to printk handling:
1. Command-line option 'console_timestamps' adds a timestamp prefix
to each line of Xen console output (x86 only, after CMOS has been
interrogated).
2. Clean up prefix handling and vanity banner info. Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Wed, 3 Oct 2007 15:33:23 +0000 (16:33 +0100)]
hvm: More changes to reduce size of domain structure.
It is now smaller than a page (4kB) on x86/32 and x86/64. Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Wed, 3 Oct 2007 14:47:47 +0000 (15:47 +0100)]
hvm: Do not include full hvm_hw_hpet in 'struct domain'. It is very
large due to the number of (unused) reserved registers. This
unnecessarily blots the size of the domain structure. Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Wed, 3 Oct 2007 13:41:28 +0000 (14:41 +0100)]
svm: Actually remove disabling of CR4-read-intercept when using NPT.
Should have been in the previosu changeset. Oops. Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Wed, 3 Oct 2007 13:06:06 +0000 (14:06 +0100)]
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.
Keir Fraser [Wed, 3 Oct 2007 13:04:51 +0000 (14:04 +0100)]
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.
Keir Fraser [Tue, 2 Oct 2007 15:59:07 +0000 (16:59 +0100)]
vtd: Dynamically allocate IRQ-tracking structures, only for those
domains that actually have PCI-passthru devices. Greatly reduces size
of 'struct domain'. Signed-off-by: Keir Fraser <keir@xensource.com>
Alex Williamson [Tue, 2 Oct 2007 15:31:45 +0000 (09:31 -0600)]
[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.
Keir Fraser [Tue, 2 Oct 2007 15:28:58 +0000 (16:28 +0100)]
x86/32: Re-factor mapcache data structure into per-domain and per-vcpu
components. Greatly reduces size of 'struct domain'. Signed-off-by: Keir Fraser <keir@xensource.com>
Alex Williamson [Mon, 1 Oct 2007 15:57:50 +0000 (09:57 -0600)]
[IA64] Fix wrong insertion of TLB entry in region 0
On PV domain with metaphysical mode, emulation of itc.d in region 0
doesn't work well and inserts an wrong TC entry.
Because set_one_rr() doesn't set the machine region register.
i.e. metaphyisical_rr0 is used instead of guest's rr[0].
This bug causes Dom0/U crash when an application uses region 0.
Actually I met the crash when I was building open GFW (java uses
region 0).
Keir Fraser [Mon, 1 Oct 2007 14:38:58 +0000 (15:38 +0100)]
x86: Rename math_state_restore() to more logical
do_device_not_available(), following naming convection for all other C
exception handlers. Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Mon, 1 Oct 2007 14:12:05 +0000 (15:12 +0100)]
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>