Commit Graph
16164 Commits
Author SHA1 Message Date
Keir Fraser 2eaec0bc67 xentop: build fix for *bsd.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-10-23 14:42:50 +01:00
Keir Fraser 093d6da712 libxc: check length on string copy (strcpy -> strncpy).
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-10-23 14:42:06 +01:00
Keir Fraser 907e0a6046 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>
2007-10-23 14:38:47 +01:00
Keir Fraser eab576f8d6 Use $(SHELL) to find shell to run get-fields.sh script.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-23 13:47:01 +01:00
Keir Fraser f767bbd028 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>
2007-10-23 09:41:06 +01:00
Keir Fraser 24852cb744 vt-d: Fix a bug in pmr register disabling code.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
2007-10-23 09:31:03 +01:00
Keir Fraser 86d019205b 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>
2007-10-23 09:26:43 +01:00
Keir Fraser 92c2f8054e 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
2007-10-22 21:06:11 +01:00
Keir Fraser de91f88afe vt-d: Fix PCI=device parsing.
Signed-off-by: Weidong Han <weidong.han@intel.com>
2007-10-22 14:26:45 +01:00
Keir Fraser bdeaa9684d 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>
2007-10-22 14:22:39 +01:00
Keir Fraser e38bd7ef8e ia64: Fix ia64 PV domain creation with new vhpt-size parameter.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2007-10-22 14:21:13 +01:00
Keir Fraser fedeb68b58 hvm/x86: MTRR/PAT virtualisation.
Signed-off-by: Disheng Su <disheng.su@intel.com>
2007-10-22 14:19:22 +01:00
Keir Fraser a2308fa704 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>
2007-10-22 13:04:32 +01:00
Keir Fraser d420576eb5 Allow a guest to send NMIs to its VCPUs.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-22 11:11:04 +01:00
Keir Fraser 808c9bd490 ia64: make buffered pio aware of save/restore.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-22 09:42:49 +01:00
Keir Fraser 1934a762f0 ia64: Add HVM_PARAM_BUFPIOREQ_PFN constant.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-22 09:41:25 +01:00
Keir Fraser f72027fbb2 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>
2007-10-22 07:44:25 +01:00
Keir Fraser 88561d3058 hvm: Fix PCI-passthru string parsing.
Fixes crash of xend during HVM domain ccreation.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-20 09:30:00 +01:00
Keir Fraser 07f557cb63 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>
2007-10-19 18:00:10 +01:00
Keir Fraser f475a034a7 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>
2007-10-19 17:47:12 +01:00
Keir Fraser a51497b069 x86: Fix EFLAGS adjustment for emulated instructions.
Issue flagged by David Lively <dlively@virtualiron.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-19 17:44:20 +01:00
Keir Fraser a9931381f9 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>
2007-10-19 14:49:08 +01:00
Keir Fraser 02ae00123e x86: Fix get_page_from_l1e() and avoid host crash on 'xm save'.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-19 14:30:10 +01:00
Keir Fraser e8676312a3 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>
2007-10-19 11:32:18 +01:00
Keir Fraser 0f843ba00c 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>
2007-10-19 11:26:58 +01:00
Keir Fraser 15f1e5e394 vt-d: Detect and report failure to assign a pass-thru PCI device.
Signed-off-by: Weidong Han <weidong.han@intel.com>
2007-10-19 09:31:03 +01:00
Keir Fraser 641eac0d67 ia64: configure VHPT size per domain: ia64 part
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2007-10-19 09:28:21 +01:00
Keir Fraser 753df0d608 ia64: configure VHPT size per domain: common part
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2007-10-19 09:27:55 +01:00
Keir Fraser c5b3b0a7f0 xen, xsm: Remove private function prototype from public header.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-18 16:17:53 +01:00
Keir Fraser cefbbff3f5 tools: Remove bogus external uses of xc_private.h. Clean up libflask.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-18 15:12:03 +01:00
Keir Fraser 5550335afc 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>
2007-10-18 11:11:40 +01:00
Keir Fraser 22cd551381 Split xen/include/public/hvm/save.h into common part and x86 specific part.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-18 10:58:36 +01:00
Keir Fraser 676f7c7b8a Split asm-x86/hvm/support into arch generic part and x86 specific part.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-18 10:55:26 +01:00
Keir Fraser 2a61b8af7e x86, vt-d: Fail PCI device assignment if device already assigned.
Signed-off-by: Weidong Han <weidong.han@intel.com>
2007-10-18 10:24:50 +01:00
Keir Fraser 4144e156c0 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>
2007-10-18 09:59:20 +01:00
Keir Fraser eb5916fb1f 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>
2007-10-17 15:37:36 +01:00
Keir Fraser 0ae9ef55ac 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>
2007-10-17 15:19:05 +01:00
Keir Fraser 3052b875c7 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>
2007-10-17 14:38:19 +01:00
Keir Fraser f69c1f0351 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>
2007-10-17 13:12:03 +01:00
Keir Fraser e3ca52c270 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>
2007-10-17 11:17:53 +01:00
Keir Fraser 9255c493f1 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>
2007-10-17 11:12:32 +01:00
Keir Fraser 3e43914aa8 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>
2007-10-17 10:02:49 +01:00
Keir Fraser d62f502aaa 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>
2007-10-17 10:00:27 +01:00
Keir Fraser d61d5e12e1 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>
2007-10-16 17:41:33 +01:00
Keir Fraser c68c6c6b18 x86: Initialise INVLPG support to PTEs only for all CPUs, not just BP.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-16 17:40:22 +01:00
Keir Fraser 842b395402 Clean up a little bit after the TLB/cache-flush changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-16 17:36:28 +01:00
Keir Fraser 19435c10ab 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>
2007-10-16 17:31:37 +01:00
Keir Fraser 43e55cbba8 xend: Clean up hvm_build Python wrapper. Python code can get/set hvm
params directly.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-16 10:27:55 +01:00
Keir Fraser a5ed18b7c4 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>
2007-10-16 09:40:08 +01:00
Keir Fraser c6553c4cde minios: Fix get_current() inline asm.
From: Samuel Thibault <samuel.thibault@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-16 09:30:20 +01:00