Commit Graph
15136 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain d5ab9f9089 x86: Prevent an infinite series of traps
In some cases, we can end up in a vicious cycle of fatal_trap()s
within fatal_trap()s. Panic after a certain number of attempts.

Signed-off-by: Nils Nieuwejaar <nils.nieuwejaar@sun.com>

Use a per-cpu depth variable.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-24 10:39:28 +01:00
kfraser@localhost.localdomain fab51b46ae [ACM] Simpler interface to hypercalls
Implement a simpler interface for the hypercalls to ACM. I put the
parameters to all hypercalls into a union. On top of this I have
implemented a shim layer for enabling ACM hypercalls on PPC.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-05-24 10:18:55 +01:00
kfraser@localhost.localdomain 903fb0f33d blktap: Small changes to blktap + add a hook to clear ptes on implicit release of VMAs.
* free memory on release
 * invalidate p2m entry when unmapping grants
 * check for alloc failure of idx_map
 * add DONTCOPY vma flag
 * hook for clearing ptes when a vma is freed by the kernel

From: Geoffrey Lefebvre <geoffrey@cs.ubc.ca>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-24 10:14:05 +01:00
kfraser@localhost.localdomain d5cd127e3b ia64: nvram setup.
From: "Zhang, Xing Z" <xing.z.zhang@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-24 09:54:03 +01:00
Ian Campbell 6b64aaa35a merge 2007-05-24 09:15:58 +01:00
Ian Campbell 65fd68d6d0 LINUX/x86_64: Ensure that the initial page tables allow userspace
mappings of the vsyscall page. This matches native behaviour by
setting the U bit on the L2-L4 page table entries and controlling
access using the L1 entries.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-05-24 09:14:43 +01:00
kfraser@localhost.localdomain 8f058e2bff Revert 15127:98cf6c05c32a59ad3f4fcd505ca60348589e6096
Breaks 64-bit build.
2007-05-24 09:10:43 +01:00
Steven Hand 1a46ed999b This patch fixes the issue with waiting for devices to disconnect during the end
stage of migration in Xend. The problem was cause by a deletion of the VM domain
ID which is used by testDevicecompleComplete ->deviceIDs->backendRoot() to get
the virtual backend device path. The virtual backend device path is used to
check if a device still exists in xenstore.

Signed-off-by: Yung Giang <yung.giang@gmail.com>
2007-05-22 15:32:50 +01:00
Jeremy Fitzhardinge 5f7304ca64 Implement VCPUOP_register_vcpu_info
This change implements the VCPUOP_register_vcpu_info vcpu_op.  This
allows a guest to choose where each VCPU's vcpu_info structure is
placed within its address space, allowing it to put it somewhere which
is easily accessible via some per-cpu data access mechanism.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
2007-05-22 14:48:56 +01:00
kfraser@localhost.localdomain 09bf75fb8a Merge with xen-ia64-unstable.hg 2007-05-22 06:43:05 +01:00
Keir Fraser cbf6afa30d vmxassist: Include terminating 0xff byte in TSS I/O bitmap.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-20 19:05:10 +01:00
Jake Wires 9ae5c53e34 [BLKTAP] Ensure blktap doesn't try to re-create extant sysfs entries
Signed-off-by: Jake Wires <jwires@xensource.com>
2007-05-19 10:54:01 -07:00
kfraser@localhost.localdomain aee276299a Added tag 3.1.0-branched for changeset d2ef85c6bf84cc619ca2d42c2edfc6229e70a6ad 2007-05-18 17:01:20 +01:00
Tom Wilkie 6bc7665374 Fix default return value for VM_Metrics.get_state
signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2007-05-17 11:42:46 +01:00
Tom Wilkie 61b5419d95 Fix recent XenRT Failure re: xm block-list via XenAPI
signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2007-05-17 11:18:58 +01:00
Ewan Mellor 1b0a8bb57e Added xeninfo.pl, a script for collecting statistics from Xen hosts using the
Xen-API.  This also serves as a good example of the use of XML::RPC::Client
with the Xen-API.

By Ingard Mevåg <ingard [at] mevaag [dot] no>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2007-05-16 23:12:16 +01:00
Alex Williamson 8ffb0fb8fe [IA64] Update struct checker for ia64 changes
This makes use of the union support to work with our new
vcpu_guest_context struct.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-05-16 11:38:48 -06:00
Alex Williamson ea87d1815f [IA64] Fix trivial compiler warning
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-05-16 11:37:19 -06:00
Alex Williamson f6cf01ff27 merge with xen-unstable.hg 2007-05-16 10:59:01 -06:00
Alex Williamson 5435198443 [IA64] Fix deadlock of ptc.ga emulation
ptc_ga_remote_func() might be invoked by IPI with a schedule_lock
that is acquired. (e.g., inside of vcpu_migrate())
It will cause a deadlock.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2007-05-16 10:42:07 -06:00
kfraser@localhost.localdomain 5db09f22cb linux: Un-__init a couple of kexec vars that are accessed after init time.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-16 09:57:29 +01:00
Simon Horman f82571ca1b static, __init and __initdata symbols in machine_kexec.c
Some symbols in machine_kexec.c really ought to be static and,
marked __init or __initdata.

Signed-off-by: Simon Horman <horms@verge.net.au>
2007-05-16 09:15:54 +01:00
Alex Williamson c770486748 [IA64] Optimizations for windows
Windows use region 4 and region 5 for identity mapping.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2007-05-15 15:32:23 -06:00
Ian Campbell 6fc1e1272c [XEND] Write the default ABI to the xenstore entry for each frontend
device.

This allows to run older kernels in a 32on64 mixed environment.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-05-15 19:00:48 +01:00
Ian Campbell f32a69e588 [BUILDER] Propagate the native protocol ABI for a guest out of the
domain builder and in to python code.

This knowledge will be useful to allow us to pre-seed the protocol
field in a VBD entry in xenstore which will allow us to run older
kernels in a 32on64 mixed environment.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-05-15 17:54:48 +01:00
Tom Wilkie b794da2ef6 Add some fields from XenAPI docs to implementation.
Add stefan's patch to swap mtu and mac, so they're correct.

signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2007-05-15 17:01:57 +01:00
kfraser@localhost.localdomain 322a078ab1 [HVM][SVM] Reintroduce ASIDs.
ASIDs partition the physical TLB for SVM.  In the current implementation
ASIDs are used to reduce the number of TLB flushes.  Each time the
guest's virtual address space changes (e.g. due to an INVLPG,
MOV-TO-{CR3, CR4} operation), instead of flushing the TLB, a new ASID is
assigned.  This reduces the number of TLB flushes to at most 1/#ASIDs
(currently 1/64).  The biggest advantage is that hot parts of the
hypervisor's code and data remain in the TLB.

From: Sebastian Biemueller <Sebastian.Biemueller@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-15 15:14:02 +01:00
kfraser@localhost.localdomain 07f8d1fdbf Fix TPM support in HVM domains
Signed-off-by:  Joseph Cihula <joseph.cihula@intel.com>
Signed-off-by:  Peter Yang <peisen.yang@intel.com>
2007-05-15 10:50:09 +01:00
kfraser@localhost.localdomain 59f97292fa xenapi: Small fix to the host.get_name_description call
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-05-15 10:49:10 +01:00
kfraser@localhost.localdomain 396211ae01 x86/hvm: HVM_DBG_LOG() cleanup
- make log levels used consistent in a few places
- remove trailing newlines, dots, and commas
- remove explictly specified function names from message text

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-05-15 10:46:43 +01:00
kfraser@localhost.localdomain 12a056ebf3 vmx: remove CSTAR save/restore on VMX
CSTAR is an unused MSR in 64-bit mode on Intel's EM64T, hence there's
no need to save/restore this MSR during context switches. Mimic real
hardware by retaining the value written for eventual guest OS reads.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-05-15 10:46:03 +01:00
kfraser@localhost.localdomain 89130c31e5 x86/hvm: add logging for hypercalls
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-05-15 10:43:59 +01:00
kfraser@localhost.localdomain f1bd686887 x86: fix EFER handling
Introduce a per-CPU shadow of what is currently in EFER, as context
switch code must re-write this MSR so that all guests run with
appropriate EFER.SCE and EFER.NX settings. Remove EFER from the set of
MSRs that VMX deals with in a generic fashion.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-05-15 10:43:18 +01:00
kfraser@localhost.localdomain 71adf3c9eb x86/hvm: hypercall adjustments
- share more code between 32- and 64-bit variants
- properly handle continuations for 32-bit guests on 64-bit hv
- properly handle preemption (this must *not* rely on regs->eip, as
- other code may overwrite the value there by calling
- hvm_store_cpu_guest_regs()
- deny hypercall access when called from guest in vm86 mode, which
  requires that ???_guest_x86_mode() make real and vm86 modes distinguishable

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-05-15 10:28:28 +01:00
kfraser@localhost.localdomain f78175be51 x86-64/hvm: pio result storing
Don't clear upper 32 bits on 8- and 16-bit PIO reads.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-05-15 10:13:11 +01:00
kfraser@localhost.localdomain 76328d5bec x86: ptwr adjustments
Make sure MFN read from pte is valid before accessing the page info
structure associated with it. Drop guest-to-machine-physical
translation from ptwr code.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-05-15 10:12:02 +01:00
kfraser@localhost.localdomain 3490d2804a x86: replace some intpte_t * casts
Don't cast values when other (type safe) mechanisms are available to =
achieve the same effect.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-05-15 10:08:20 +01:00
kfraser@localhost.localdomain f95c4d2e4a x86: kill unused local variable sh_mapcache
Apparently a leaf-over from pre-3.0.3.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-05-15 10:03:58 +01:00
kfraser@localhost.localdomain 4fcd011a83 tools: check for curl-devel and libxml2-devel
when they are required for LIBXENAPI_BINDINGS.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-05-15 10:03:14 +01:00
kfraser@localhost.localdomain 67770ae5ab tools: check for libvncserver dependency libraries
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-05-15 10:01:14 +01:00
kfraser@localhost.localdomain b4a663b87d 64-bit hvm on 32-bit dom0 - ioemu adjustments
Don't mask off data bits when running 64-bit hvm guests on 32-bit dom0.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-05-15 09:59:51 +01:00
kfraser@localhost.localdomain ddb76c5b25 x86: suppress SYSCALL feature for 32on64 guests
since Xen cannot handle it.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-05-15 09:54:27 +01:00
kfraser@localhost.localdomain cb16c56482 x86: invalidate_shadow_ldt() should be static
Since invalidate_shadow_ldt() depends on process_deferred_ops() to be
called, it shouldn't be visible outside xen/arch/x86/mm.c.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-05-15 09:50:36 +01:00
Alex Williamson 8a9d7de961 [IA64] White space cleanup in regionreg.h
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-05-14 12:54:26 -06:00
Alex Williamson 8522e94583 [IA64] Fix ptc.ga emulation
cset14829(c42ae7839750) was incomplete.

The region register 0 will be clobbered as follows.

time    pcpu0   pcpu1   pcpu2
 |      vcpu0   vcpu1   idle  // assignment of vcpu
 V
        1.vcpu0 issues ptc.ga
        2.vcpu0 sends IPI to vcpu1(pcpu1)
                3.vcpu1 migrates from pcpu1 to pcpu2
                4.pcpu1 receives IPI of 2 and exec ptc_ga_remote_func()
                5.pcpu1 saves and modifies vrr[0]
                        6.vcpu1(pcpu2) modifies vrr[0]
                7.pcpu1 restores vrr[0]         // vrr[0] of 6 is lost

Windows will crash due to this issue.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2007-05-14 11:52:01 -06:00
Alex Williamson f1bfaa9e03 [IA64] Compilation fix with CRASH_DEBUG defined.
Update for guest_mode()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-05-14 11:13:24 -06:00
Steven Hand 415b7c6f46 Fix HVM save/restore after upgrade to 0.90.
Signed-off-by: Steven Hand <steven@xensource.com>
2007-05-14 15:19:46 +01:00
Steven Hand f0c155875d HVM save/restore: handle larger domain ids.
Signed-off-by: Steven Hand <steven@xensource.com>
2007-05-14 15:16:32 +01:00
Keir Fraser 45138b4b05 hvm qemu: Fix for masking 64-bit operands broke 32-bit operands with
32-bit qemu. Issue spotted and initial fix provided by Dexuan Cui.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-13 10:04:34 +01:00
Keir Fraser 2c4aacf734 svm: Simplify asm stub for vmentry/vmexit.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-12 19:22:24 +01:00