]> xenbits.xensource.com Git - xen.git/log
xen.git
17 years agoxend, acm: small fixes
Keir Fraser [Thu, 25 Oct 2007 08:25:03 +0000 (09:25 +0100)]
xend, acm: small fixes

Check that the policy is of type ACM and return an error if it is not.
Reworked the way the label of a domain is read.

Signed-off-by; Stefan Berger <stefanb@us.ibm.com>

17 years agoxend, acm: Put the __UNLABELED__ label into the mapfile if policy specifies it
Keir Fraser [Thu, 25 Oct 2007 08:24:28 +0000 (09:24 +0100)]
xend, acm: Put the __UNLABELED__ label into the mapfile if policy specifies it

Put the __UNLABELED__ label into the mapfile if policy specifies this
label rather than keeping the NULL_LABEL there. Also lock the map file
when it's rewritten and propagate the return code from compiling the
policy to callers.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agoxend: Reworked initialization of XSPolicy administration class
Keir Fraser [Thu, 25 Oct 2007 08:23:27 +0000 (09:23 +0100)]
xend: Reworked initialization of XSPolicy administration class

Rather than picking up the current policy from the managed policies
file the hypervisor is asked for the name of the current policy.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agoxm-test: various fixes
Keir Fraser [Thu, 25 Oct 2007 08:22:28 +0000 (09:22 +0100)]
xm-test: various fixes
- recently I added an other_config field to the VTPM record which now
needs to be accounted for otherwise the test determines a bad key
- the dry-run command was throwing a different type of exception
(ACMError) than what was caught (XSMError)
- the tests based on the raw Xen-API need to build the PV_args
parameters from the old 'root' and 'extra' parameters.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agox86: Remove dependency on stdbool.h.
Keir Fraser [Wed, 24 Oct 2007 16:21:17 +0000 (17:21 +0100)]
x86: Remove dependency on stdbool.h.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86: Remove CALLBACKTYPE_sysexit.
Keir Fraser [Wed, 24 Oct 2007 16:15:54 +0000 (17:15 +0100)]
x86: Remove CALLBACKTYPE_sysexit.

Looking at the Linux patch as an example, it adds more code and
complexity than it removes, for no obvious performance benefit.

Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86-64: syscall/sysenter support for 32-bit apps for both 32-bit apps
Keir Fraser [Wed, 24 Oct 2007 14:22:57 +0000 (15:22 +0100)]
x86-64: syscall/sysenter support for 32-bit apps for both 32-bit apps
in 64-bit pv guests and 32on64.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agominios: xenbus wait fixup
Keir Fraser [Wed, 24 Oct 2007 13:36:18 +0000 (14:36 +0100)]
minios: xenbus wait fixup
From: Samuel Thibault <samuel.thibault@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agominios: Make NSEC_TO_USEC/NSEC_TO_SEC macros expression safe.
Keir Fraser [Wed, 24 Oct 2007 13:35:19 +0000 (14:35 +0100)]
minios: Make NSEC_TO_USEC/NSEC_TO_SEC macros expression safe.
From: Samuel Thibault <samuel.thibault@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86/64: Fix the build.
Keir Fraser [Wed, 24 Oct 2007 13:10:01 +0000 (14:10 +0100)]
x86/64: Fix the build.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86, dom0: Allow get idle time stats by mask.
Keir Fraser [Wed, 24 Oct 2007 09:49:03 +0000 (10:49 +0100)]
x86, dom0: Allow get idle time stats by mask.
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
17 years agox86, cpufreq: Allow dom0 kernel to govern cpufreq via the Intel
Keir Fraser [Wed, 24 Oct 2007 09:20:03 +0000 (10:20 +0100)]
x86, cpufreq: Allow dom0 kernel to govern cpufreq via the Intel
Enahanced SpeedStep MSR.
From: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agomerge with xen-unstable.hg (staging)
Alex Williamson [Tue, 23 Oct 2007 17:27:56 +0000 (11:27 -0600)]
merge with xen-unstable.hg (staging)

17 years ago[IA64] Prevent softlock when destroying VTi domain
Alex Williamson [Tue, 23 Oct 2007 16:21:31 +0000 (10:21 -0600)]
[IA64] Prevent softlock when destroying VTi domain

Prevent softlock up when VTi domain destruction by making
relinquish_memory() continuable.  It was assumed that
mm_teardown() frees most of page_list so that the list which
is passed to relinquish_memory() is short.  However the
assumption isn't true for VTi domain case because qemu-dm
maps all the domain pages.  To avoid softlock up message,
make relinquish_memory() continuable.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years agoAdd definitions for machine check MSRs introduced in AMD Family 0x10 (Barcelona).
Keir Fraser [Tue, 23 Oct 2007 15:12:14 +0000 (16:12 +0100)]
Add definitions for machine check MSRs introduced in AMD Family 0x10 (Barcelona).
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agoxentop: build fix for *bsd.
Keir Fraser [Tue, 23 Oct 2007 13:42:50 +0000 (14:42 +0100)]
xentop: build fix for *bsd.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agolibxc: check length on string copy (strcpy -> strncpy).
Keir Fraser [Tue, 23 Oct 2007 13:42:06 +0000 (14:42 +0100)]
libxc: check length on string copy (strcpy -> strncpy).
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agohvm, vt-d: Add memory cache-attribute pinning domctl for HVM
Keir Fraser [Tue, 23 Oct 2007 13:38:47 +0000 (14:38 +0100)]
hvm, vt-d: Add memory cache-attribute pinning domctl for HVM
guests. Use this to pin virtual framebuffer VRAM as attribute WB, even
if guest tries to map with other attributes.
Signed-off-by: Disheng Su <disheng.su@intel.com>
17 years agoUse $(SHELL) to find shell to run get-fields.sh script.
Keir Fraser [Tue, 23 Oct 2007 12:47:01 +0000 (13:47 +0100)]
Use $(SHELL) to find shell to run get-fields.sh script.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86: Fix xentrace of hypercalls in debug builds of Xen.
Keir Fraser [Tue, 23 Oct 2007 08:41:06 +0000 (09:41 +0100)]
x86: Fix xentrace of hypercalls in debug builds of Xen.

Based on a patch by Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agovt-d: Fix a bug in pmr register disabling code.
Keir Fraser [Tue, 23 Oct 2007 08:31:03 +0000 (09:31 +0100)]
vt-d: Fix a bug in pmr register disabling code.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
17 years agoxenmon: Fix security vulnerability CVE-2007-3919.
Keir Fraser [Tue, 23 Oct 2007 08:26:43 +0000 (09:26 +0100)]
xenmon: Fix security vulnerability CVE-2007-3919.

The xenbaked daemon and xenmon utility communicate via a mmap'ed
shared file. Since this file is located in /tmp, unprivileged users
can cause arbitrary files to be truncated by creating a symlink from
the well-known /tmp filename to e.g., /etc/passwd.

The fix is to place the shared file in a directory to which only root
should have access (in this case /var/run/).

This bug was reported, and the fix suggested, by Steve Kemp
<skx@debian.org>. Thanks!

Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86: small boot-time changes:
Keir Fraser [Mon, 22 Oct 2007 20:06:11 +0000 (21:06 +0100)]
x86: small boot-time changes:
 * use memory 0x8c000-0x90000 to avoid trampling the area above
 0x90000 -- some bootloaders may leave droppings in that region
 * reserve 2kB for vga mode table -- limit of 128 VESA modes could
 overflow the original 1kB allocation
 * remove unnecessary alignment of trampoline GDT

17 years agomerge with xen-unstable.hg (staging)
Alex Williamson [Mon, 22 Oct 2007 19:57:08 +0000 (13:57 -0600)]
merge with xen-unstable.hg (staging)

17 years ago[IA64] Fix MMIO readb operation
Alex Williamson [Mon, 22 Oct 2007 18:30:17 +0000 (12:30 -0600)]
[IA64] Fix MMIO readb operation

We should do clean before read operation.  Otherwise, read one byte
data may get garbage data sometimes.

Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
17 years ago[IA64] Don't share privregs with hvm domain
Alex Williamson [Mon, 22 Oct 2007 18:26:53 +0000 (12:26 -0600)]
[IA64] Don't share privregs with hvm domain

Don't share privregs with hvm domain and twist IA64 xen dump core format
slightly.  Xen shares privregs pages with IA64 HVM domain for xm dump-core
to dump the pages.  However sharing the page allows hvm guest domain
peek/destroy the page contents that might cause xen crash.  And the xen
dump core file doesn't need privregs page because cpu context should be
obtained from vcpu context in case of IA64 HVM domain.

Although this patch modify xen dump core format, current crash utility
(at least crash 4.0-4.7) doesn't look into .xen_ia64_mmapped_regs section
and I don't know any other tools to understand xen dump core file.
So this format modification doesn't cause incompatibility issue.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] Kdump: 64-bit aligned access to elf-note data
Alex Williamson [Mon, 22 Oct 2007 18:19:42 +0000 (12:19 -0600)]
[IA64] Kdump: 64-bit aligned access to elf-note data

xen_core_regs, as passed by kexec_crash_save_info(), is 32-bit aligned as
it is the data section of an ELF-note. In order to ensure 64-bit aligned
access when xen_core_regs is filled in, shift it a bit and then memmove()
the data back into the 32-bit aligned location after the values have been
written.

Without this change kdump panics on an unaligned-access.

Signed-off-by: Simon Horman <horms@verge.net.au>
17 years agovt-d: Fix PCI=device parsing.
Keir Fraser [Mon, 22 Oct 2007 13:26:45 +0000 (14:26 +0100)]
vt-d: Fix PCI=device parsing.
Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agoA few small fixes for xenstored:
Keir Fraser [Mon, 22 Oct 2007 13:22:39 +0000 (14:22 +0100)]
A few small fixes for xenstored:
 - Proper sizeof parameter to snprintf
 - Return proper xs_domain_dev for netbsd.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agoia64: Fix ia64 PV domain creation with new vhpt-size parameter.
Keir Fraser [Mon, 22 Oct 2007 13:21:13 +0000 (14:21 +0100)]
ia64: Fix ia64 PV domain creation with new vhpt-size parameter.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
17 years agohvm/x86: MTRR/PAT virtualisation.
Keir Fraser [Mon, 22 Oct 2007 13:19:22 +0000 (14:19 +0100)]
hvm/x86: MTRR/PAT virtualisation.
Signed-off-by: Disheng Su <disheng.su@intel.com>
17 years agox86: Allow NMI callback CS to be specified via set_trap_table()
Keir Fraser [Mon, 22 Oct 2007 12:04:32 +0000 (13:04 +0100)]
x86: Allow NMI callback CS to be specified via set_trap_table()
hypercall.
Based on a patch by Jan Beulich.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoAllow a guest to send NMIs to its VCPUs.
Keir Fraser [Mon, 22 Oct 2007 10:11:04 +0000 (11:11 +0100)]
Allow a guest to send NMIs to its VCPUs.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoia64: make buffered pio aware of save/restore.
Keir Fraser [Mon, 22 Oct 2007 08:42:49 +0000 (09:42 +0100)]
ia64: make buffered pio aware of save/restore.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years agoia64: Add HVM_PARAM_BUFPIOREQ_PFN constant.
Keir Fraser [Mon, 22 Oct 2007 08:41:25 +0000 (09:41 +0100)]
ia64: Add HVM_PARAM_BUFPIOREQ_PFN constant.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years agox86: Allow BOOT_TRAMPOLINE to be changed without needing manual
Keir Fraser [Mon, 22 Oct 2007 06:44:25 +0000 (07:44 +0100)]
x86: Allow BOOT_TRAMPOLINE to be changed without needing manual
modification of the trampoline GDT. Adjust trampoline base to
0x94000.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years ago[IA64] Enable switch to PHY_D mmu mode
Alex Williamson [Sun, 21 Oct 2007 21:58:00 +0000 (15:58 -0600)]
[IA64] Enable switch to PHY_D mmu mode

Last patch for PHY_D mmu mode

Signed-off-by: Tristan Gingold <tgingold@free.fr>
17 years ago[IA64] phy_d mode in thash_vhpt_insert
Alex Williamson [Sun, 21 Oct 2007 21:56:36 +0000 (15:56 -0600)]
[IA64] phy_d mode in thash_vhpt_insert

Handle PHY_D mode in thash_vhpt_insert
Indentation.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
17 years ago[IA64] Handle phy_d mode in vmx_hpw_miss
Alex Williamson [Sun, 21 Oct 2007 21:55:10 +0000 (15:55 -0600)]
[IA64] Handle phy_d mode in vmx_hpw_miss

Handle PHY_D mmu mode.
Indentation.
Avoid code duplication in vmx_hpw_miss.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
17 years ago[IA64] New features for xenitp
Alex Williamson [Sun, 21 Oct 2007 21:52:25 +0000 (15:52 -0600)]
[IA64] New features for xenitp

Add auto-repeat feature
(Just press enter to re-execute the last go/sstep/cb/disass command).
Do not flush stdout in the signal handler.
Single step over a breakpoint.
Can quit with domain paused (quit paused)
'disp db' now displays watchpoint.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
17 years ago[IA64] vti domain save/restore: libxc: implement vti domain save/restore
Alex Williamson [Sun, 21 Oct 2007 20:57:13 +0000 (14:57 -0600)]
[IA64] vti domain save/restore: libxc: implement vti domain save/restore

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] ti domain save/restore: libxc: add support set/get_hvmcontext support
Alex Williamson [Sun, 21 Oct 2007 20:45:20 +0000 (14:45 -0600)]
[IA64] ti domain save/restore: libxc: add support set/get_hvmcontext support

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] vti domain save/restore: implement hvm_save/load. work in progress.
Alex Williamson [Sun, 21 Oct 2007 20:39:07 +0000 (14:39 -0600)]
[IA64] vti domain save/restore: implement hvm_save/load. work in progress.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] vti domain save/restore: implement arch_get/set_info_guest() more
Alex Williamson [Sun, 21 Oct 2007 19:38:57 +0000 (13:38 -0600)]
[IA64] vti domain save/restore: implement arch_get/set_info_guest() more

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] vti domain save/restore: clean up vti break fault handler
Alex Williamson [Sun, 21 Oct 2007 19:38:05 +0000 (13:38 -0600)]
[IA64] vti domain save/restore: clean up vti break fault handler

It isn't necessary to set pUStk and pKStk like other VTi fault handlers.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years agomerge with xen-unstable.hg
Alex Williamson [Sun, 21 Oct 2007 18:10:25 +0000 (12:10 -0600)]
merge with xen-unstable.hg

17 years agohvm: Fix PCI-passthru string parsing.
Keir Fraser [Sat, 20 Oct 2007 08:30:00 +0000 (09:30 +0100)]
hvm: Fix PCI-passthru string parsing.
Fixes crash of xend during HVM domain ccreation.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoReplace sysctl.physinfo.sockets_per_node with more directly useful
Keir Fraser [Fri, 19 Oct 2007 17:00:10 +0000 (18:00 +0100)]
Replace sysctl.physinfo.sockets_per_node with more directly useful
sysctl.physinfo.nr_cpus. This also avoids miscalculation of
sockets_per_node by Xen where the number of CPUs in the system is
clipped.
From: Elizabeth Kon <eak@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoAvoid passing uninitialised ACPI tables to dom0 when checksums fail.
Keir Fraser [Fri, 19 Oct 2007 16:47:12 +0000 (17:47 +0100)]
Avoid passing uninitialised ACPI tables to dom0 when checksums fail.

If during boot, ACPI checksum failures disable ACPI support in Xen,
pass 'acpi=off' to the domain 0 kernel to avoid a fatal page fault
as domain 0 attempts to access the uninitialized ACPI tables.

Signed-off-by: David Lively <dlively@virtualiron.com>
Signed-off-by: Steve Ofsthun <sofsthun@virtualiron.com>
17 years agox86: Fix EFLAGS adjustment for emulated instructions.
Keir Fraser [Fri, 19 Oct 2007 16:44:20 +0000 (17:44 +0100)]
x86: Fix EFLAGS adjustment for emulated instructions.
Issue flagged by David Lively <dlively@virtualiron.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoFix x86/64 build for *BSD.
Keir Fraser [Fri, 19 Oct 2007 13:49:08 +0000 (14:49 +0100)]
Fix x86/64 build for *BSD.
 - Config.mk: uname -m prints "amd64". Deal with this.
 - do not assume python is always in /usr/bin
 - get-fields.sh: make it portable and non-bash specific
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agox86: Fix get_page_from_l1e() and avoid host crash on 'xm save'.
Keir Fraser [Fri, 19 Oct 2007 13:30:10 +0000 (14:30 +0100)]
x86: Fix get_page_from_l1e() and avoid host crash on 'xm save'.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86: Remove io_apic fake-vector style of IRQ acknowledgement. Not
Keir Fraser [Fri, 19 Oct 2007 10:32:18 +0000 (11:32 +0100)]
x86: Remove io_apic fake-vector style of IRQ acknowledgement. Not
needed now that pass-through IRQs can use the 'new' ack method.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agovt-d: Allow pass-through of shared interrupts.
Keir Fraser [Fri, 19 Oct 2007 10:26:58 +0000 (11:26 +0100)]
vt-d: Allow pass-through of shared interrupts.
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
17 years agovt-d: Detect and report failure to assign a pass-thru PCI device.
Keir Fraser [Fri, 19 Oct 2007 08:31:03 +0000 (09:31 +0100)]
vt-d: Detect and report failure to assign a pass-thru PCI device.
Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agoia64: configure VHPT size per domain: ia64 part
Keir Fraser [Fri, 19 Oct 2007 08:28:21 +0000 (09:28 +0100)]
ia64: configure VHPT size per domain: ia64 part
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
17 years agoia64: configure VHPT size per domain: common part
Keir Fraser [Fri, 19 Oct 2007 08:27:55 +0000 (09:27 +0100)]
ia64: configure VHPT size per domain: common part
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
17 years agoxen, xsm: Remove private function prototype from public header.
Keir Fraser [Thu, 18 Oct 2007 15:17:53 +0000 (16:17 +0100)]
xen, xsm: Remove private function prototype from public header.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agotools: Remove bogus external uses of xc_private.h. Clean up libflask.
Keir Fraser [Thu, 18 Oct 2007 14:12:03 +0000 (15:12 +0100)]
tools: Remove bogus external uses of xc_private.h. Clean up libflask.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agohvm: Split save.c into arch generic/specific part.
Keir Fraser [Thu, 18 Oct 2007 10:11:40 +0000 (11:11 +0100)]
hvm: Split save.c into arch generic/specific part.

struct hvm_save_header is arch specific so that arch specific part of
hvm_save()/hvm_load() are moved into arch_hvm_save()/acrh_hvm_load()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years agoSplit xen/include/public/hvm/save.h into common part and x86 specific part.
Keir Fraser [Thu, 18 Oct 2007 09:58:36 +0000 (10:58 +0100)]
Split xen/include/public/hvm/save.h into common part and x86 specific part.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years agoSplit asm-x86/hvm/support into arch generic part and x86 specific part.
Keir Fraser [Thu, 18 Oct 2007 09:55:26 +0000 (10:55 +0100)]
Split asm-x86/hvm/support into arch generic part and x86 specific part.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years agox86, vt-d: Fail PCI device assignment if device already assigned.
Keir Fraser [Thu, 18 Oct 2007 09:24:50 +0000 (10:24 +0100)]
x86, vt-d: Fail PCI device assignment if device already assigned.
Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agox86: Fix writable-pagetable cmpxchg path to properly adjust PTE (i.e.,
Keir Fraser [Thu, 18 Oct 2007 08:59:20 +0000 (09:59 +0100)]
x86: Fix writable-pagetable cmpxchg path to properly adjust PTE (i.e.,
set _PAGE_GLOBAL for x86/64 guest user mappings).
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years ago[IA64] Backup/restore ACPI tables
Alex Williamson [Wed, 17 Oct 2007 16:36:31 +0000 (10:36 -0600)]
[IA64] Backup/restore ACPI tables

We modify some of the ACPI tables for dom0 (limiting available CPUs,
modifying id/eid, and hiding SLIT/SRAT tables).  This causes problems
when we try to kexec with different dom0 CPU counts or from Xen to
Linux.  This introduces a mechanism to save ACPI tables before
modification and restoring them before kexec.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Acked-by: Simon Horman <horms@verge.net.au>
17 years ago[IA64] Cleanup: remove unused definitions.
Alex Williamson [Wed, 17 Oct 2007 16:29:31 +0000 (10:29 -0600)]
[IA64] Cleanup: remove unused definitions.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
17 years ago[IA64] Declare field x of M28 (fc vs fc.i).
Alex Williamson [Wed, 17 Oct 2007 16:28:04 +0000 (10:28 -0600)]
[IA64] Declare field x of M28 (fc vs fc.i).

Signed-off-by: Tristan Gingold <tgingold@free.fr>
17 years ago[IA64] Don't warn for EOI-ing an edge triggered interrupt.
Alex Williamson [Wed, 17 Oct 2007 16:25:18 +0000 (10:25 -0600)]
[IA64] Don't warn for EOI-ing an edge triggered interrupt.

Edge triggered interrupts don't need an EOI but EOI-ing them is harmless
according to the IOSAPIC documentation.  Do not emit a warning in such case.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
17 years agox86: add option to display last exception records during register dumps
Keir Fraser [Wed, 17 Oct 2007 14:37:36 +0000 (15:37 +0100)]
x86: add option to display last exception records during register dumps
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agovmx: last branch recording MSR emulation
Keir Fraser [Wed, 17 Oct 2007 14:19:05 +0000 (15:19 +0100)]
vmx: last branch recording MSR emulation

This required adding infrastructure to make use of VMX' MSR save/
restore feature as well as making the MSR intercept bitmap per-VM.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86: Tighten handling of page-type attributes and make
Keir Fraser [Wed, 17 Oct 2007 13:38:19 +0000 (14:38 +0100)]
x86: Tighten handling of page-type attributes and make
map_pages_to_xen() smarter and safer.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agohvm: Fix one-shot timers. Do not disable until the interrupt has been
Keir Fraser [Wed, 17 Oct 2007 12:12:03 +0000 (13:12 +0100)]
hvm: Fix one-shot timers. Do not disable until the interrupt has been
latched by the target VCPU.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86: Reduce logging about get_page_type() failures.
Keir Fraser [Wed, 17 Oct 2007 10:17:53 +0000 (11:17 +0100)]
x86: Reduce logging about get_page_type() failures.

We shouldn't log if the cause could be a recursive-mapping attempt --
we expect a get_page_type() failure in that case.

Based on a patch maintained for NetBSD.

Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86: Remove invlpg_works_ok and invlpg only single-page regions.
Keir Fraser [Wed, 17 Oct 2007 10:12:32 +0000 (11:12 +0100)]
x86: Remove invlpg_works_ok and invlpg only single-page regions.

The flush_area_local() interface was unclear about whether a
multi-page region (2M/4M/1G) had to be mapped by a superpage, and
indeed some callers (map_pages_to_xen()) already would specify
FLUSH_LEVEL(2) for a region actually mapped by 4kB PTEs.

The safest fix is to relax the interface and do a full TLB flush in
these cases. My suspicion is that these cases are rare enough that the
cost of INVLPG versus full flush will be unimportant.

Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoFix xenstore unwatch with node name starting with "@"
Keir Fraser [Wed, 17 Oct 2007 09:02:49 +0000 (10:02 +0100)]
Fix xenstore unwatch with node name starting with "@"
Watch node starting with "@" should not be canonicalized.
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
17 years agohvm: TCGBIOS fixes
Keir Fraser [Wed, 17 Oct 2007 09:00:27 +0000 (10:00 +0100)]
hvm: TCGBIOS fixes

Fix IPL measurement of El Torito CD boot and some eventlog formats.

The TCG BIOS extensions are described here:
https://www.trustedcomputinggroup.org/specs/PCClient/TCG_PCClientImplementationforBIOS_1-20_1-00.pdf

- fix cdrom (El Torito) boot (8.2.5.6 El Torito, p63)
   tcpa_ipl() is modified to support various boot devices.
   move some measurement code into cdrom_boot() function.
- fix EV_IPL (0Dh) event (10.4.1 Event Types, p76)
   eventfield size should be zero
- fix EV_SEPARATOR event (3.2.2 Integrity Collection and Reporting,
   p32)
   change eventfield to -1 (0xFFFFFFFF)  from  "---------------"
- add "Returned INT 19h" event (8.2.3 Logging of Boot Events, p59)
   actually, tcgbios does not call int19h, but we extend this
   tentatively

Signed-off-by: Seiji Munetoh <seiji.munetoh@gmail.com>
17 years agoxend: xenapi: Suspended domain causes fault if vif.get_all_records() is called
Keir Fraser [Tue, 16 Oct 2007 16:41:33 +0000 (17:41 +0100)]
xend: xenapi: Suspended domain causes fault if vif.get_all_records() is called

A single suspended domain on the system causes a fault when
vif.get_all_records() is called since this returns an ErrorDescription
and no 'Value' in the 'v' dictionary. This patch now returns a 'None'
as Value which might not be optimal but better than faulting.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agox86: Initialise INVLPG support to PTEs only for all CPUs, not just BP.
Keir Fraser [Tue, 16 Oct 2007 16:40:22 +0000 (17:40 +0100)]
x86: Initialise INVLPG support to PTEs only for all CPUs, not just BP.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoClean up a little bit after the TLB/cache-flush changes.
Keir Fraser [Tue, 16 Oct 2007 16:36:28 +0000 (17:36 +0100)]
Clean up a little bit after the TLB/cache-flush changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86: consolidate/enhance TLB flushing interface
Keir Fraser [Tue, 16 Oct 2007 16:31:37 +0000 (17:31 +0100)]
x86: consolidate/enhance TLB flushing interface

Folding into a single local handler and a single SMP multiplexor as
well as adding capability to also flush caches through the same
interfaces (a subsequent patch will make use of this).

Once at changing cpuinfo_x86, this patch also removes several unused
fields apparently inherited from Linux.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoxend: Clean up hvm_build Python wrapper. Python code can get/set hvm
Keir Fraser [Tue, 16 Oct 2007 09:27:55 +0000 (10:27 +0100)]
xend: Clean up hvm_build Python wrapper. Python code can get/set hvm
params directly.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoioemu: Allow xvd* to co-exist with hd*.
Keir Fraser [Tue, 16 Oct 2007 08:40:08 +0000 (09:40 +0100)]
ioemu: Allow xvd* to co-exist with hd*.
 - Whether hdN is defined first is checked.
 - If hdN is defined, xvdN is not replaced with hdN.

Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
17 years agominios: Fix get_current() inline asm.
Keir Fraser [Tue, 16 Oct 2007 08:30:20 +0000 (09:30 +0100)]
minios: Fix get_current() inline asm.
From: Samuel Thibault <samuel.thibault@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years ago[IA64] Cleanup of hypercall leave path.
Alex Williamson [Mon, 15 Oct 2007 17:41:28 +0000 (11:41 -0600)]
[IA64] Cleanup of hypercall leave path.

p9 is set, but not used.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] Support console_timestamps on IA64
Alex Williamson [Mon, 15 Oct 2007 17:39:30 +0000 (11:39 -0600)]
[IA64] Support console_timestamps on IA64

This patch intends to support console_timestamps on IA64.
At this moment, EFIRTC is used for start time.

If we support synchronize HV time to Dom0 system time for long period,
Dom0 sys_settimeofday and sys_adjtimex functions should implement
Dom0-HV time sync functionality.

Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
17 years ago[IA64] Correctly decode imm fields in mmio.c
Alex Williamson [Mon, 15 Oct 2007 17:31:29 +0000 (11:31 -0600)]
[IA64] Correctly decode imm fields in mmio.c

Immediate field of ia64 instructions are 2's complement coded.

Instructions whose imm field was negative were not
correctly emulated in mmio.c

Signed-off-by: Tristan Gingold <tgingold@free.fr>
17 years agoioemu: Add keymap definitions to the Dutch Belgium keymap file.
Keir Fraser [Mon, 15 Oct 2007 13:03:08 +0000 (14:03 +0100)]
ioemu: Add keymap definitions to the Dutch Belgium keymap file.
Signed-off-by: Pat Campbell <plc@novell.com>
17 years agoioemu: Allow blktap to be able to be booted as system volume for PV-on-HVM
Keir Fraser [Mon, 15 Oct 2007 11:24:35 +0000 (12:24 +0100)]
ioemu: Allow blktap to be able to be booted as system volume for PV-on-HVM

 - All xvdN disk is looked like hdN.
 - All tap disks are checked.(tap:aio, tap:sync, tap:vmdk, etc.)

Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
17 years agolibxc: Avoid overflow in xc_domain_dumpcore_via_callback().
Keir Fraser [Mon, 15 Oct 2007 11:20:43 +0000 (12:20 +0100)]
libxc: Avoid overflow in xc_domain_dumpcore_via_callback().
nr_pages*PAGE_SIZE can overflow a 32-bit long.
From: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86/64: Do not clobber %r11 (user rflags) on syscall from guest
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>
17 years agoPV guests don't require order-non-zero pages for shadowing, hence lift
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.

Has seen little testing only so far.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agovt-d: disable protected memory registers after vt-d is enabled.
Keir Fraser [Sat, 13 Oct 2007 07:44:06 +0000 (08:44 +0100)]
vt-d: disable protected memory registers after vt-d is enabled.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
17 years ago[IA64] Fix MCA error handler problems
Alex Williamson [Fri, 12 Oct 2007 21:02:06 +0000 (15:02 -0600)]
[IA64] Fix MCA error handler problems

Fixing MCA issues related to changes from kexec patch series...

[From "Kexec: Fix ia64_do_tlb_purge so that it works with XEN"]

> 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.

I added the same code in Reload DTR for stack part and also added a
code to avoid overlapping with kernel TR.

> 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.

The r25 kept the value of __va_ul(vcpu_vhpt_maddr(v)), and it was
referred to by the following lines.

468     // r25 = __va_ul(vcpu_vhpt_maddr(v));
469     dep r20=0,r25,0,IA64_GRANULE_SHIFT
470     movl r26=PAGE_KERNEL
471     ;;
472     mov r21=IA64_TR_VHPT
473     dep r22=0,r20,60,4              // physical address of

I defined GET_VA_VCPU_VHPT_MADDR() macro to re-calculate the value of
__va_ul(vcpu_vhpt_maddr(v)) in each part.
And I renamed the register names for same reasons.

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
17 years ago[IA64] Fix TLB insertion for subpaging
Alex Williamson [Fri, 12 Oct 2007 20:49:37 +0000 (14:49 -0600)]
[IA64] Fix TLB insertion for subpaging

Without this patch, Longhorn is sure to hang up.  .NET application
might hit this bug.  itc.i instruction is repeated forever, because
TLB entry with smaller page size is volatile.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
17 years ago[IA64] vti domain save/restore: make vmx_vcpu_set_rr() accept non-current
Alex Williamson [Fri, 12 Oct 2007 20:36:37 +0000 (14:36 -0600)]
[IA64] vti domain save/restore: make vmx_vcpu_set_rr() accept non-current

make vmx_vcpu_set_rr accept non-current vcpu for setting vcpu context.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] vti domain save/restore: add unwind directive to break fault handler
Alex Williamson [Fri, 12 Oct 2007 20:30:30 +0000 (14:30 -0600)]
[IA64] vti domain save/restore: add unwind directive to break fault handler

add unwind directive to fast_hypercall path.
While fast_hypercall path calls function (hypercall, do_softirq()) and
might be blocked, it doesn't have unwind infomation.
So stack unwinding fails. Add necessary unwind directive.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] vti domain save/restore: fix stack unwinder
Alex Williamson [Fri, 12 Oct 2007 20:27:51 +0000 (14:27 -0600)]
[IA64] vti domain save/restore: fix stack unwinder

fix stack unwinder.
- fix find_save_locs() and unw_unwind().
  instruction pointer check should be suite for xen.
- fix unw_unwind_to_user()
  VTi domain fault handler doesn't always updatevcpu->on_stack so that
  the pUStk check fails. Add more checking to stop winding.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] vti domain save/restore: add show_stack() prototype
Alex Williamson [Fri, 12 Oct 2007 20:23:38 +0000 (14:23 -0600)]
[IA64] vti domain save/restore: add show_stack() prototype

add show_stack() prototype which will be used later.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] hvm domain builder clean up. use xc_vcpu_setcontext().
Alex Williamson [Fri, 12 Oct 2007 20:17:00 +0000 (14:17 -0600)]
[IA64] hvm domain builder clean up. use xc_vcpu_setcontext().

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] vmx_setup_platform() may fail. make it return error value.
Alex Williamson [Fri, 12 Oct 2007 20:14:13 +0000 (14:14 -0600)]
[IA64] vmx_setup_platform() may fail. make it return error value.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>