xen.git
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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

18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 years agox86: Fix acpi_parse_fadt()
Keir Fraser [Fri, 12 Oct 2007 14:37:13 +0000 (15:37 +0100)]
x86: Fix acpi_parse_fadt()

Prevent returning early, so that other information gathered in this
function will not occasionally be missing for the consumer(s).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoxend: Fix file resouce leak on resume of suspended managed domains.
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>
18 years agox86/64: Fix the build.
Keir Fraser [Fri, 12 Oct 2007 12:06:16 +0000 (13:06 +0100)]
x86/64: Fix the build.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoxentrace/x86: PV guest tracing extensions.
Keir Fraser [Fri, 12 Oct 2007 12:06:02 +0000 (13:06 +0100)]
xentrace/x86: PV guest tracing extensions.
From: George Dunlap <gdunlap@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agox86: propagate VESA capabilities to dom0
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.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agox86/hvm: miscellaneous CPUID handling changes
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

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agox86: Sync flag definitions in cpufeature.h with Linux.
Keir Fraser [Fri, 12 Oct 2007 10:20:28 +0000 (11:20 +0100)]
x86: Sync flag definitions in cpufeature.h with Linux.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agosvm: allow guest to use EFER.FFXSE
Keir Fraser [Fri, 12 Oct 2007 10:00:26 +0000 (11:00 +0100)]
svm: allow guest to use EFER.FFXSE
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agosvm: last branch recording MSR emulation
Keir Fraser [Fri, 12 Oct 2007 09:19:55 +0000 (10:19 +0100)]
svm: last branch recording MSR emulation
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agox86: Fix time-scale calculation to avoid #DE fault.
Keir Fraser [Thu, 11 Oct 2007 18:23:40 +0000 (19:23 +0100)]
x86: Fix time-scale calculation to avoid #DE fault.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agox86: Fix emulation of DIV instruction. Never actually used currently,
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>
18 years agohvm: Fix CR0.TS handling.
Keir Fraser [Thu, 11 Oct 2007 12:53:50 +0000 (13:53 +0100)]
hvm: Fix CR0.TS handling.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoClean up SMP macros and always have IRQs disabled when executing an
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>
18 years agox86: disable AMD's C1E mode.
Keir Fraser [Thu, 11 Oct 2007 12:27:38 +0000 (13:27 +0100)]
x86: disable AMD's C1E mode.

In C1E the APIC timer stops ticking, which Xen cannot tolerate.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agox86: AMD Fam10/11 adjustments
Keir Fraser [Thu, 11 Oct 2007 11:11:54 +0000 (12:11 +0100)]
x86: AMD Fam10/11 adjustments
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Sync up affected files with 2.6.23-rc9.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoAdd local header files to HDRS.
Keir Fraser [Thu, 11 Oct 2007 09:21:55 +0000 (10:21 +0100)]
Add local header files to HDRS.

Otherwise, changes to such headers do not trigger
re-compiles. (Powerpc already had this.)

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoMore static shadow functions.
Keir Fraser [Thu, 11 Oct 2007 09:21:08 +0000 (10:21 +0100)]
More static shadow functions.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoShadow code printing adjustments.
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().

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoDo not include compile.h directly -- use version.h indirection functions.
Keir Fraser [Thu, 11 Oct 2007 09:02:07 +0000 (10:02 +0100)]
Do not include compile.h directly -- use version.h indirection functions.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[vTPM] Add set/get_other_config to Xen-API.
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.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agohvm: Fix migration of 64-bit guests by permitting EFER_LMA to be set
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>
18 years agoia64: Fix help message of xenitp.
Keir Fraser [Wed, 10 Oct 2007 12:17:42 +0000 (13:17 +0100)]
ia64: Fix help message of xenitp.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
18 years agoFix printing month in printk prefix (1-12 rather than 0-11).
Keir Fraser [Wed, 10 Oct 2007 10:26:23 +0000 (11:26 +0100)]
Fix printing month in printk prefix (1-12 rather than 0-11).
Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
18 years agovt-d: Clean up iommu code.
Keir Fraser [Tue, 9 Oct 2007 15:42:42 +0000 (16:42 +0100)]
vt-d: Clean up iommu code.
Signed-off-by: Weidong Han <weidong.han@intel.com>
18 years agoMiniOS: no-stack-protector added to the cflags if needed,
Keir Fraser [Tue, 9 Oct 2007 15:06:50 +0000 (16:06 +0100)]
MiniOS: no-stack-protector added to the cflags if needed,
and the default domain config file fixed.

From: Grzegorz Milos <gm281@cam.ac.uk>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[IA64] Update for cset 16067:9f9f9b68cd08
Keir Fraser [Tue, 9 Oct 2007 15:05:43 +0000 (16:05 +0100)]
[IA64] Update for cset 16067:9f9f9b68cd08
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
18 years agoxend, xsm: Lock domain access while modifying policy.
Keir Fraser [Mon, 8 Oct 2007 12:43:17 +0000 (13:43 +0100)]
xend, xsm: Lock domain access while modifying policy.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agoxend: Remove unused xoptions.netback_type.
Keir Fraser [Mon, 8 Oct 2007 09:57:32 +0000 (10:57 +0100)]
xend: Remove unused xoptions.netback_type.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoxenconsoled: portability fixes:
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>
18 years agoRemove tabs from python scripts xenmon and xentrace_format.
Keir Fraser [Mon, 8 Oct 2007 09:47:58 +0000 (10:47 +0100)]
Remove tabs from python scripts xenmon and xentrace_format.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agoFix domU reboot failure when using "pci=" option
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.

http://lists.xensource.com/archives/html/xen-users/2006-05/msg00154.html

Signed-off-by: Charles Arnold <carnold@novell.com>
18 years ago[XEN] Shadow: fix locking in error path.
Tim Deegan [Mon, 8 Oct 2007 08:40:49 +0000 (09:40 +0100)]
[XEN] Shadow: fix locking in error path.
Signed-off-by: TIm Deegan <Tim.Deegan@xensource.com>
18 years agoInitialize last_error in libxc.
Keir Fraser [Fri, 5 Oct 2007 13:39:40 +0000 (14:39 +0100)]
Initialize last_error in libxc.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agoxenstore: sprintf->snprintf, and fix for OpenBSD.
Keir Fraser [Fri, 5 Oct 2007 13:11:36 +0000 (14:11 +0100)]
xenstore: sprintf->snprintf, and fix for OpenBSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
18 years agoentrace: Remove assertions to avoid system crashes on debug build xen.
Keir Fraser [Fri, 5 Oct 2007 09:38:52 +0000 (10:38 +0100)]
entrace: Remove assertions to avoid system crashes on debug build xen.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
18 years ago[NW scripts] Choose alternative interface if NFSroot is used.
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'.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agoxen: Changes to printk handling:
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>
18 years agoRevert 16065:671dcd08e806 and try again to fix the issue.
Keir Fraser [Thu, 4 Oct 2007 13:21:11 +0000 (14:21 +0100)]
Revert 16065:671dcd08e806 and try again to fix the issue.

Changing LINUX_VER causes us to clone the wrong repository so instead
use the kernel's "kernelrelease" target to figure out the correct
Linux version.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
18 years agoxsview: a xenstore viewer written in PyQT.
Keir Fraser [Thu, 4 Oct 2007 12:52:51 +0000 (13:52 +0100)]
xsview: a xenstore viewer written in PyQT.
From: Mark Williamson <mark.williamson@cl.cam.ac.uk>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoClean up grant-table code after recent changes.
Keir Fraser [Thu, 4 Oct 2007 09:31:44 +0000 (10:31 +0100)]
Clean up grant-table code after recent changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoAllow iomem permissions to be set up through grant table ops.
Keir Fraser [Thu, 4 Oct 2007 09:26:21 +0000 (10:26 +0100)]
Allow iomem permissions to be set up through grant table ops.
Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
18 years agoFix TLB flush on grant unmap.
Keir Fraser [Thu, 4 Oct 2007 09:25:35 +0000 (10:25 +0100)]
Fix TLB flush on grant unmap.
Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
18 years agoFix kernel version after linux-2.6.18-xen.hg 219:3e8752eb69dc which
Keir Fraser [Thu, 4 Oct 2007 09:03:04 +0000 (10:03 +0100)]
Fix kernel version after linux-2.6.18-xen.hg 219:3e8752eb69dc which
applied 2.6.18.8,

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>