Commit Graph
9747 Commits
Author SHA1 Message Date
kaf24@firebug.cl.cam.ac.uk b450304086 Make xen_features and force_evtchn_callback() non-GPL
symbols as they are used in a variety of ubiquitous
kernel macros.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-26 17:41:19 +01:00
yamahata@valinux.co.jp 078e1918d3 xenLinux/ia64 has its own dma_map_page(), dma_unmap_page(), and it needs
linux default implementations of dma_declare_coheremnt_memory() and its
families which is defined in include/linux/dma-mapping.h.
So those in pci-dma-xen.c are unnecessary. #ifdef out them.
PATCHNAME: pci-dma-xen-common

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-04-26 10:43:16 +01:00
kaf24@firebug.cl.cam.ac.uk b11a028b04 Need a little more serialisation in pciback_do_op().
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-25 18:22:11 +01:00
kaf24@firebug.cl.cam.ac.uk 93bb8669b3 Some of the Linux PCI functions called by the virtual configuration
space handlers were making calls into ACPI code which uses semaphores.
Since semaphores can not be locked while atomic (because they could
sleep), I changed the way the PCI backend responds to requests from the
frontend. Previously, the virtual configuration space handlers ran in
the same context as the event channel interrupt handler (which was often
atomic if not always atomic). Now the interrupt handler schedules a
callback function (a bottom half) in the system work queue (keventd)
that will get called in process context at a slightly later time. This
allows the handlers in the virtual configuration space to run in process
context and to call any core PCI function regardless of whether it will
sleep or not.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
2006-04-25 18:13:39 +01:00
kaf24@firebug.cl.cam.ac.uk 91046a739e Fix the -xen, -xen0 builds.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-25 16:08:11 +01:00
kaf24@firebug.cl.cam.ac.uk 4dacb4e7f1 While other aspects of the system configuration may still be
controlled by the outcome of the table scan, if apic= was given on the
command line its effect should not be overridden here.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-04-25 14:50:32 +01:00
kaf24@firebug.cl.cam.ac.uk c0b2433fa9 Change the xenbus_map_ring_valloc() interface and implementation so
that it is buildable as a module.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-04-25 14:20:08 +01:00
kaf24@firebug.cl.cam.ac.uk ba770381ca Update xen caps on x86_64 since we have hvm pae guests support now.
Signed-off-by: Xin Li <xin.b.li@intel.com>
2006-04-25 11:12:16 +01:00
kaf24@firebug.cl.cam.ac.uk e46dd6eea6 Add a return statement to the non-Xen version of skb_checksum_setup.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-04-25 09:02:53 +01:00
kaf24@firebug.cl.cam.ac.uk 2c97bbed1e This is a small fix for SMP PAE guest on x86-64.
Since part of the VMX guest initialization is running in the context of
dom0, so when we want to make sure the operation of shadow ops is
always done by vcpu0 of the guest VMX domain, we should make sure
the current vcpu0 is running in guest domain and not in the dom0.

Signed-off-by: Xiaohui Xin xiaohui.xin@intel.com
Signed-off-by: Xin Li <xin.b.li@intel.com>
2006-04-25 08:56:01 +01:00
kaf24@firebug.cl.cam.ac.uk 7a3a16a1ca Fix "make debug" in Xen subtree. Pointed out by Aravindh
at Unisys.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-25 08:54:36 +01:00
cl349@firebug.cl.cam.ac.uk 5796b1695e Remove \r characters.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-04-24 18:07:27 +01:00
cl349@firebug.cl.cam.ac.uk 3e4e48bbd5 Restore default KERNELS list.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-04-24 11:21:16 +01:00
smh22@firebug.cl.cam.ac.uk 2c04b08df9 Add new xml files for policy.
Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 11:01:41 +01:00
smh22@firebug.cl.cam.ac.uk 655ead6573 This patch updates the documentation and extends the 'xm' man page with
the integrated access control management commands. The man page is a 
good place to start exploring these commands.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:59:57 +01:00
smh22@firebug.cl.cam.ac.uk 5ab002b998 This patch integrates the new access control management tools into 'xm'
and 'xend' and supports label/ssid translation support for 
migration/life-migration/resume.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:59:17 +01:00
smh22@firebug.cl.cam.ac.uk e7f4f3a1de This patch adds new python access control management scripts, which
integrate into Xen Management and which support the new access control 
labels (labels replace the ssidref numbers at the management user 
interface).

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:58:25 +01:00
smh22@firebug.cl.cam.ac.uk 2d59e34fc2 This patch deletes the old shell-based security tools.
Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:54:47 +01:00
smh22@firebug.cl.cam.ac.uk 1f11fdecb1 This patch adds support for managing and creating the simplified
policies to the policy generation tools.

Signed-off by: Thomas Lendacky <toml@us.ibm.com>
Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:52:19 +01:00
smh22@firebug.cl.cam.ac.uk 30476c8dba This patch adds support in the hypervisor for the policy name attribute
introduced into security policies. It also fixes a minor problem related 
to handling unsupported boot policies.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:51:50 +01:00
smh22@firebug.cl.cam.ac.uk 87d52008e4 This patch adds support in the hypervisor for the policy name attribute
introduced into security policies. It also fixes a minor problem related 
to handling unsupported boot policies.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:51:20 +01:00
smh22@firebug.cl.cam.ac.uk c462e5c2f0 This patch adds a policy name to the policy definition. This policy name
must be unique and must change if the content of the file changes. The 
policy name is used to ensure that the XM tools and the hypervisor work 
on the same policy, i.e., interpret the security information on domains 
consistently. This patch also simplifies the policy management by moving 
policy and labels into a single file.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:50:38 +01:00
kaf24@firebug.cl.cam.ac.uk 830cb9cdcc Remove annoying pit debug info when booting smp guest.
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
2006-04-23 09:20:31 +01:00
kaf24@firebug.cl.cam.ac.uk 65fbb3b646 The Xen checksum offload feature attempts to insert a TCP/UDP
checksums into already encrypted packets (esp4) in dom0.  Obviously,
it is not possible to insert a checksum into an already encrypted
packet, so this patch inserts the checksum prior to encrypting
packets in net/ipv4/xfrm4_output.c.

To do this cleanly, the TCP/UDP header pointers need to be pointed to
the correct spot, so this functionality has been abstracted into a new
function.

This patch fixes bug 143 (verified by Jim Dykman).  Earlier version
verified by Jon McCune.

Signed-off-by: James Dykman <dykman@us.ibm.com>
Signed-off-by: Jon Mason <jdmason@us.ibm.com>
2006-04-22 10:41:53 +01:00
kaf24@firebug.cl.cam.ac.uk ac9595600a Avoid spurious timer activations in migrate_timer().
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-22 10:37:24 +01:00
kaf24@firebug.cl.cam.ac.uk de4294617e Remove update_vcpu_system_time() call from the per-VCPU timer
callback function. It's unnecessary and in fact may occasionally
even run on the wrong CPU.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-22 10:26:28 +01:00
kaf24@firebug.cl.cam.ac.uk b149823741 Avoid flood of PIT interrupts while debugging an hvm guest.
This is rebased to the new PIT code now. It has the same logic as
earlier. PIT tries to catch up the missed timer ticks by injected all
the ticks one by one so that Guest time stays close to the wall clock.
But while debugging a hvm guest if you stop the guest by debugger and
then continue, the guest sees flood of interrupts compensating the
missed ticks for the stopped time. This patch just check if the guest is
being debugged, if yes then it does not try to catch up with the missed
ticks.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@.intel.com>
2006-04-22 10:14:11 +01:00
kaf24@firebug.cl.cam.ac.uk 83d83bb966 Fix VM_RESERVED check in vm_normal_page(). Pointed out by
Isaku Yamahata.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-22 09:45:45 +01:00
kaf24@firebug.cl.cam.ac.uk b07b5dcc56 Fix command-line parsing in a few respects -- be more
generous about what we accept, avoid stack overflow, and
print the command line during boot (rather useful!).

This should fix the 'lapic' and 'nolapic' boot options.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-21 18:09:32 +01:00
Ian.Campbell@xensource.com a3fd8815ef Don't BUG_ON() if we cannot register an NMI callback since it is not a fatal
problem.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-04-21 18:06:06 +01:00
kaf24@firebug.cl.cam.ac.uk 118fdd8526 Merged. 2006-04-21 17:51:30 +01:00
kaf24@firebug.cl.cam.ac.uk d36686d5b5 Demote scary IO-APIC REGSEL message to DPRINTK.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-21 17:50:19 +01:00
Ian.Campbell@xensource.com 7e360a9957 Rename TSS_sysenter_esp0 to SYSENTER_stack_esp0 to reflect the actual
usage since the TSS is not used under Xen.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-04-21 17:49:10 +01:00
kaf24@firebug.cl.cam.ac.uk ea608cc36d Pull the Linux percpu interface into Xen. Implemented for
x86 and used it to eliminate the percpu_ctxt struct from
arch/x86/domain.c.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-21 17:35:15 +01:00
Ian.Campbell@xensource.com dadf394db4 Linux support for sysenter/exit on x86_32.
This support is only active when supervisor_mode_kernel is enabled
in the Xen build (and when the hardware supports sysenter).

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-04-21 17:19:31 +01:00
Ian.Campbell@xensource.com 5db7a43ecc Xen support for sysenter/exit on x86_32 when supervisor_mode_kernel is
enabled.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-04-21 17:19:29 +01:00
Ian.Campbell@xensource.com 8adc4e5ce7 Remove CONFIG_X86_SYSENTER option.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-04-21 17:19:26 +01:00
Ian.Campbell@xensource.com 8c18405bb3 Merge nmi_op functionality with the callback_op hypercall.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-04-21 17:19:22 +01:00
Ian.Campbell@xensource.com 77d02076f9 Add include/xen/nmi.h and update files which #include <asm/nmi.h>.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-04-21 17:19:19 +01:00
Ian.Campbell@xensource.com 41d7f059c5 Use set_callbacks hypercall if callback_op is not available.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-04-21 17:18:53 +01:00
kaf24@firebug.cl.cam.ac.uk c9bf3f8f19 Fix inverted BUG_ON().
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-21 14:03:07 +01:00
vhanquez@kneesa.uk.xensource.com 4a045cc278 Build blkdev_backend in the kernel.
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2006-04-21 12:48:58 +00:00
emellor@leeni.uk.xensource.com eb0cb70c38 This patch adds an entry to the xend-config.sxp man page about the
external device migration entry.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-04-21 11:58:25 +01:00
emellor@leeni.uk.xensource.com df0c8173e2 The attached patch replaces the current numbers identifying the
individual steps of device migration with constants.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-04-21 11:57:34 +01:00
emellor@leeni.uk.xensource.com 3c4f089bd8 This patch adds a test case for local virtual machine migration with a
virtual TPM attached.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-04-21 11:56:40 +01:00
emellor@leeni.uk.xensource.com 23920c55d4 The attached patch allows external devices to migrate. The patch
contains code that allows to at least detect local migration of a
virtual machine and handles this for the virtual TPM (results in a no-op
for local migr.). If migration of a virtual machine with attached vTPM
to another machine is attempted, XenD will return an error.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-04-21 11:54:12 +01:00
kaf24@firebug.cl.cam.ac.uk e1a1180660 Propagate information about bad (or good) REGSEL register
of chipset IO-APICs to Xen. If REGSEL is bad (some old SiS
chipsets) then we have a slower read-modify-write routine.
Loosely based on an original patch from Jan Beulich.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-21 10:44:54 +01:00
kaf24@firebug.cl.cam.ac.uk 7d67a7ab23 Fix the "hda lost interrupt" issue when creating a VMX guest on a PAE
host.

Occasionally when injecting an IDE DMA interrupt into the guest, a
page fault occurs (e.g., because the IDT mapping is not present in
shadow pagetables).  This causes an immediate vmexit and, because it
occurred during event delivery, the original VM_ENTRY_INTR_INFO_FIELD
is kept in IDT_VECTORING_INFO_FIELD.

The current code copies IDT_VECTORING_INFO_FIELD back to
VM_ENTRY_INTR_INFO_FIELD, intending that the interrupt will be
injected again on next vmresume.

However, there is a corner case: if, before the next vmresume, a timer
interrupt happened then vmx_intr_assist may overwrite the information
on VM_ENTRY_INTR_INFO_FIELD, and the IDE DMA interrupt is effectively
lost.

This patch checks the IDT_VECTORING_INFO_FIELD in vmx_intr_assist and,
if it is set, copies it to VM_ENTRY_INTR_INFO_FIELD and returns.

Signed-off-by: Yunhong Jiang <Yunhong.jiang@intel.com>
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
2006-04-21 10:11:00 +01:00
kaf24@firebug.cl.cam.ac.uk c10f3d80c9 There are instances where we DO NOT want an hvm guest to run an
MP enabled kernel.  In such situations we should have a workaround to
guarantee hvm guests will not detect MP.

For example, in the absence of ACPI and MPS the installation code in some
linux distributions key off the presence of cpuid edx/HTT bit (indicating
the presence of Hyper-Threading Technology) to determine if another
logical processor is present and if so load an MP enabled kernel instead
of a uniprocessor kernel.  SMBIOS is also looked at for the same purpose
and presents a potential problem as well.  While both approaches for
selecting an MP kernel are debatable (since using MPS or ACPI have long
been the standard for MP detection), these approaches are something we
have to live and work around with because making a change in the fully
virtualized guest is not an option.

To solve the problem we need to hide all secondary processors from the hvm
guest.  Since the hvm does not surface MPS tables, we only need to deal
with ACPI, cpuid HTT, and possibly SMBIOS.   (I did not have time right
now to look closely at the hvm BIOS to know if SMBIOS is also going to be
a problem.)

Also fixes a logic problem the code path where apic=0 was not
being handled correctly (vmx path only).

Signed-off-by:  Clyde Griffin <cgriffin@novell.com>
2006-04-21 09:56:50 +01:00
kaf24@firebug.cl.cam.ac.uk 5cf78863a9 PAE pgd construction code should use clone_pgd_range().
Also fix the loop that allocates users pmds.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-21 09:37:22 +01:00