Commit Graph
15939 Commits
Author SHA1 Message Date
Keir Fraser af8b404f2d XSM:FLASK support for domain management under Xen-API
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
2007-09-23 12:45:07 +01:00
Keir Fraser d6f6960a00 Fix libfsimage build on NetBSD.
Fixes a number of these errors:
 cc1: warnings being treated as errors
 fsys_fat.c: In function 'fat_dir':
 fsys_fat.c:304: warning: array subscript has type 'char'

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

These ugly casts are needed according to the ISO C spec.

Acked-by: Keir Fraser <keir@xensource.com>
2007-09-23 12:18:36 +01:00
Keir Fraser d68181c014 vmxassist: Emulate HLT.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-22 09:39:18 +01:00
Keir Fraser 807d262e0a libxc: improve error message when starting a domain and mmap() fails
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-21 17:23:35 +01:00
Keir Fraser 1106867cc9 network-bridge: default to eth0 if no default gateway.
From: Luke Szymanski <Lukasz.Szymanski@unisys.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-21 17:22:15 +01:00
Keir Fraser 0700c962ac Add AMD IOMMU support into hypervisor
Signed-off-by: Wei Wang <wei.wang2@amd.com>
2007-09-21 17:15:47 +01:00
Keir Fraser ed20abc6f0 Fix build after tracing changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-21 17:10:00 +01:00
George Dunlap a92facd683 [xen][hvm][tracing] Refine hvm tracing
This patch does two things:
 * Allows hvm traces to take advantage of the variable-size traces
 * Adds some hvm functionality

This includes tracing actions like clts and lmsw, values of {p,mm}io reads
and writes, and making different trace records for hvm domains running in
64-bit mode if the trace record includes a virtual address.
2007-09-21 15:33:37 +01:00
George Dunlap 2ec9f061dc [xen][tracing] Introduce variable-size trace records
This patch introduces variable-size trace records.  Each record consists of
a 32-bit "header", an optional cycle count, and up to seven more 32-bit words.

The header is packed with the following information:
 bits  0-27: The trace event.
 bits 28-30: The number of 32-bit "extra" words in the records
 bit     31: Does the trace include a 64-bit tsc?

This patch standardizes behavior wrt 32 and 64-bit hypervisors and dom0s.

Note that this patch requires a new version of the xentrace daemon running in
dom0.  The new daemon, instead of pre-pending the cpu to every record as it
writes it, inserts a "cpu change" record to the trace file that record the
cpu and the number of records it's about to write.

Signed-off-by: George Dunlap <gdunlap@xensource.com>
2007-09-21 15:26:07 +01:00
Keir Fraser 2aa818d3bb vmx: Fix VMCS state pretty printing.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-21 16:52:17 +01:00
Keir Fraser c11a94127d Fix tools/console to build on NetBSD.
- include headers needed to build on NetBSD
 - Remove unused pty.h
 - Initialize spty terminal before actually using it

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-20 16:02:22 +01:00
Keir Fraser b35124143b vtd: Fix init/destroy domain hooks.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-20 15:59:51 +01:00
Keir Fraser 5b9d7e4831 libelf: OpenBSD and NetBSD portability.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-20 15:52:29 +01:00
Keir Fraser 692ee9a0e8 vtd: cleanups to iommu code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-20 15:41:22 +01:00
Keir Fraser 407d514591 cpufreq: Support cpufreq updates on AMD hardware by dom0 kernel.
Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-20 14:15:45 +01:00
Keir Fraser 5c7379ebbe [XM-TEST] Fixes a parameter to the external tools used
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-09-20 13:30:14 +01:00
Tim Deegan 170e2f6f59 Merge 2007-09-20 10:55:24 +01:00
Tim Deegan 93e7d8905a [HVM] iommu p2m ops: check guest is translated, and maintain m2p consistency
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-09-20 10:54:52 +01:00
Keir Fraser d16f4f5f67 Fix typo in blktap script.
Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
2007-09-20 10:39:10 +01:00
Keir Fraser b2d6a8e862 vmx: Fix 64-bit asm stub for VM entry/exit.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-20 10:31:49 +01:00
Tim Deegan ce20889971 Merge 2007-09-20 10:13:25 +01:00
Keir Fraser 192c4dabc3 domctl and p2m changes for PCI passthru.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: Guy Zana <guy@neocleus.com>
2007-09-20 09:57:10 +01:00
Keir Fraser 0fb79e2748 VTD: Small fix to iommu initialisation.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: Guy Zana <guy@neocleus.com>
2007-09-20 09:42:01 +01:00
Keir Fraser 563517920c [VTD] dynamically determines whether to link with libpci or not in QEMU.
This patch to ioemu/Makefile.target dynamically decides whether to
link with libpci or not base on the existence of /usr/include/pci
directory.

If /usr/include/pci exists, PCI passthrough is enabled.  Otherwise, it
is disabled.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
2007-09-20 09:40:49 +01:00
Tim Deegan 120bafda14 [TOOLS] Make xc_domain_{save, restore} understand compat guests
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-09-19 17:44:23 +01:00
kfraser@localhost.localdomain 72f379b5b2 libxc portability fixes for NetBSD.
- use MAP_ANON, that is what both (BSD-)Unix and Linux have
 - change last_error handling to use pthreads
 - round mlock() parameters to page alignment
 - cleanup: No need to include <xen/sys/privcmd.h>
            a second time in xg_private.h

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-19 15:42:56 +01:00
kfraser@localhost.localdomain e3157936d4 ia64: Fix target for Linux image install.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-09-19 15:20:56 +01:00
kfraser@localhost.localdomain e798d5e867 vmx: Print VMCS state in a more helpful format.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-19 15:18:23 +01:00
kfraser@localhost.localdomain 9e2bd8634f hvm: Always keep canonical copy of RIP/RSP/RFLAGS in
guest_cpu_user_regs(). Reduces complexity at little or no performance
cost (except on really old Intel P4 hardware where VMREAD/VMWRITE are
silly expensive).
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-19 14:25:44 +01:00
Ian Campbell 71f7e668f0 Using "make install" causes a distro specific script
(/sbin/installkernel) to be called since linux-2.6.18-xen.hg
211:c1f5d027adf7.

Unfortunately on some distros this script is broken for non-root
use. Our needs are pretty simple anyway so just open code the
installation of the kernel.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-09-19 12:12:49 +01:00
George Dunlap f0ad89dd9d [shadow] Be smarter about what we check to avoid unnecessary brute-force searches
The old code checked only if the page was still a pagetable before
doing a brute-force search, rather than checking if it was still
shadowed as the type indicated.  This meant that if a page was shadowed
as two different types, it was guaranteed to do a full brute-force search
even if all references could be found by up-pointers.

This checks the proper thing so that it will only do a brute-force if
necessary.

It also re-orders the unshadows so that higher levels are done first.  In
many cases, lower-level shadows will be destroyed in the process of
higher-level shadows being destroyed, again saving brute-force searches.
2007-09-19 11:58:04 +01:00
George Dunlap c8822fb019 [SHADOW] Use fast-unshadow for early_unshadow heuristic. 2007-09-19 11:42:05 +01:00
kfraser@localhost.localdomain 3b375e9de0 hvm: hvm_{load,store}_cpu_guest_regs() does not touch segment
selectors. We have separate accessors for that now. It is now an
invariant that guest_cpu_user_regs()->{cs,ds,es,fs,gs,ss} are invalid
for an HVM guest.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-19 10:24:24 +01:00
kfraser@localhost.localdomain 92099a3c2d PCI passthru various Xen changes.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: Guy Zana <guy@neocleus.com>
2007-09-19 09:24:20 +01:00
kfraser@localhost.localdomain fbe487b996 PCI passthru: VT-d I/O hooks.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: Guy Zana <guy@neocleus.com>
2007-09-19 09:12:06 +01:00
kfraser@localhost.localdomain 7b3cb5e541 IRQ injection changes for HVM PCI passthru.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: Guy Zana <guy@neocleus.com>
2007-09-18 16:09:19 +01:00
kfraser@localhost.localdomain 2af556c077 Log an error when enabling shadow mode fails for live relocation.
Signed-off-by: Doug Merrill <dpmerrill@novell.com>
2007-09-18 15:11:39 +01:00
kfraser@localhost.localdomain d308f9ebc6 Evaluate XEN_GUEST_HANDLE_64 twice.
This fixes a build error for PV guests (OpenBSD, NetBSD) where the use
of XEN_GUEST_HANDLE_64(uint8_t) leads to a build error because uint8_t
is a #define and not a typedef.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-18 15:09:57 +01:00
kfraser@localhost.localdomain 5d942ff119 xm: Extend width of ID in 'xm list --label' to 5 digits
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-09-18 15:08:11 +01:00
kfraser@localhost.localdomain 3edb495707 [VTPM] VTPM manager -- Fix parameter check
If vtpm_managed is started with the same vtpm instance, the following
error occurs.

++++++++++++
 Loading NVM.
         Sending LoadNVM command
 INFO[VTSP]: Unbinding 256 bytes of data.
 ERROR in VTSP_Unbind at vtsp.c:719 code: TPM_BAD_PARAMETER.
 ERROR in envelope_decrypt at securestorage.c:156
 code:TPM_BAD_PARAMETER.
 ERROR[VTPM]: Failed to envelope decrypt data
 .ERROR in VTPM_Handle_Load_NVM at securestorage.c:284 code:
 TPM_BAD_PARAMETER.
 ERROR[VTPM]: Failed to load NVM
 .INFO[VTPM]: [VTPM Listener]: VTPM Listener waiting for messages.
         Reading LoadNVM header
++++++++++++

Signed-off-by: Kouichi YASAKI <yasaki.kouichi@jp.fujitsu.com>
2007-09-18 15:06:20 +01:00
kfraser@localhost.localdomain 4c66249d51 [VTPM] Fix vTPM function in HVM domain
In Windows on HVM domain, GetPubkey function and Seal function become
an error.

Signed-off-by: Kouichi YASAKI <yasaki.kouichi@jp.fujitsu.com>
2007-09-18 15:05:38 +01:00
Steven Hand b4aac452fc Intercept TS on SVM.
Signed-off-by: Steven Hand <steven@xensource.com>
2007-09-18 14:59:25 +01:00
kfraser@localhost.localdomain 6e793550f6 Revert 15826:447db1235adf1bc59bbd76c951716c3df7ee8843.
Re-enables NMI delivery in HVM guests now that hardware task switching
is emulated.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-18 13:43:30 +01:00
kfraser@localhost.localdomain 623e837167 hvm: Support hardware task switching.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-18 11:49:42 +01:00
kfraser@localhost.localdomain 15b866d372 hvm: New HVM function hvm_set_segment_register().
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-17 13:33:09 +01:00
Tim Deegan d105814c00 [XEN] p2m: internal p2m_set_entry() function uses types rather than
having callers decode them.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-09-17 10:38:59 +01:00
kfraser@localhost.localdomain ccfe4e0845 Intel vt-d specific changes in arch/x86/hvm/vmx/vtd.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: Guy Zana <guy@neocleus.com>
2007-09-14 16:40:49 +01:00
kfraser@localhost.localdomain 9e6ca368e2 PCI passthru: tools changes (generic and vt-d)
I have added CONFIG_PASSTHROUGH in ioemu/Makefile.target and
ioemu/hw/pc.c in attached vtd_tools2.patch.  This should turn off
libpci usage by default until user specifically enables it.

This can be safely check-in without breaking builds for people who do
not care about pass-through devices.  I will try to think of a better
way to enable this.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: Guy Zana <guy@neocleus.com>
2007-09-14 16:39:27 +01:00
kfraser@localhost.localdomain 221b43f357 x86: fix NUMA code for 32bit
I don't know how significant this is (most of the NUMA node data seems
unused at this point), but anyway: enable proper operation of NUMA
emulation and the fake NUMA node in case there's no SRAT table on
x86-32. This will at least make the "Faking node ..." message not
print confusing information anymore.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-09-14 16:10:08 +01:00
kfraser@localhost.localdomain d068e61167 qemu-dm: fix block-raw io debug print
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2007-09-14 16:08:39 +01:00