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>
Keir Fraser [Mon, 1 Oct 2007 05:34:40 +0000 (06:34 +0100)]
vt-d: Allocate iommu pages from domheap rather than xenheap.
xenheap size is 9M on x86/32 xen, it's not enough to setup 1:1 mapping
page table for dom0. It causes dom0 cannot boot successfully. Instead
of xenheap, this patch setup 1:1 mapping page tabel in domheap, and
use map_domain_page() to get temporary mappings when need them.
Signed-off-by: Weidong Han <weidong.han@intel.com>
Alex Williamson [Thu, 27 Sep 2007 22:29:43 +0000 (16:29 -0600)]
[IA64] Kexec: Implement elf_core_save_regs()
Implement elf_core_save_regs() by porting (un #ifdefing)
ia64_elf_core_copy_regs() from Linux.
This ommits the calls to ia64_get_user_rbs_end() and ia64_sync_user_rbs()
in do_copy_task_regs(). Supplying them would seem to involve a reasonably
involved ammount of porting. I'm really not sure that its neccessary.
Alex Williamson [Thu, 27 Sep 2007 22:26:34 +0000 (16:26 -0600)]
[IA64] Kexec: Zap VHPT in relocate_kernel
On XEN do_ia64_purge_tlb unpins the VHPT entry, so it seems
logical that relocate_kernel should do the same thing.
It seems to work, but is it correct?
Alex Williamson [Thu, 27 Sep 2007 22:24:02 +0000 (16:24 -0600)]
[IA64] Kexec: Fix ia64_do_tlb_purge so that it works with XEN
Fix ia64_do_tlb_purge, its broken in too many ways
1. Call SET_PER_CPU_DATA before making any calls to GET_THIS_PADDR
to ensure that per-cpu data is set up correctly.
2. Use the per_cpu variable to derive CURRENT_STACK_OFFSET rather
than reading it from a kernel register. See 1) for explanation
of why.
3. In the VHPT pruning code, don't use r25 as ia64_jump_to_sal,
which branches to ia64_do_tlb_purge expects r25 to be preserved.
There seems no reason not to use r2 as per the other purges
done in ia64_do_tlb_purge. Furthermore use r16 and r18 instead
of r20 and r24 for consistency reasons.
4. Move __va_ul(vcpu_vhpt_maddr(v)) comment outside of
#if VHPT_ENABLED as it also applies to code further down that
is outside the #if
Alex Williamson [Thu, 27 Sep 2007 21:35:02 +0000 (15:35 -0600)]
[IA64] Kexec: partial port of CPU_HOTPLUG
* Enable CONFIG_CPU_HOTPLUG
* Add #ifndef CONFIG_XEN as appropriate around portions that are not
needed for kexec - it is used to take down cpus on SMP systems
before kexecing.
* Port various xen-specific bits as neccessary
- This has mainly been done in the existing kexec-related files,
as kexex is currently the only user of this code. If a full
port of CPU_HOTPLUG was done then this code would either disapear
or be relocated elsewhere.
Alex Williamson [Thu, 27 Sep 2007 21:12:58 +0000 (15:12 -0600)]
[IA64] Kexec: Add kexec_disable_iosapic
Ported from Linux, this shuts down iosapic before preforming kexec.
This resolves a problem whereby the serial port on an HP RX2620
(which uses IOSAPIC) was not able to accept input. It probably
resolves a bunch of other as yet unseen problems too.
Thanks to Takebe-san for working out the solution to this puzzle.
Cc: Akio Takebe <takebe_akio@jp.fujitsu.com> Signed-off-by: Simon Horman <horms@verge.net.au>