Commit Graph
15155 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain ecc82ca3e6 blktap: Fix compile errors
When compiling the various blktap drivers with warnings cranked up, I
get errors that return values are not checked.

Signed-off-by: Charles Coffing <ccoffing@novell.com>
2007-05-24 14:07:40 +01:00
kfraser@localhost.localdomain 1c77b7cb9f xend: Tear down domain if device hotplug fails during startup
If creating an unmanaged guest (eg xm create), if device hotplug fails
during the startup of the guest, then the guest will be torn down
again. If creating and starting a managed guest (eg xm new && xm
start), then if device hotplug fails, the still born guest gets left
in 'paused' state. This confuses users no end, who go an unpause and
then get all upset when it shortly crashes (due to lack of disk or
network devices).

The attached patch fixes XenDomain.py's domain_start() method so that
if waitForDevices() fails, then the entire domain is torn down. This
is the same approach used in xm create.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-05-24 14:05:58 +01:00
kfraser@localhost.localdomain 565f279e07 xend: Fix CPU affinity reset across save/restore.
Fixes bug #936.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-05-24 14:02:09 +01:00
kfraser@localhost.localdomain ff3ee91914 Console daemon - remove duplicate include.
Signed-off-by: Mats Petersson <mats.petersson@amd.com>
2007-05-24 13:58:01 +01:00
kfraser@localhost.localdomain 012be4bc30 svm: Replace call to svm_load_cr2 with conditional call to svm_trace_vmentry
Remove the call to svm_load_cr2 (which doesn't do anything useful).
The old svm_load_cr2 is now replaced with a svm_trace_vmentry. A call
to this function is done if "tb_init_done" is non-zero, so we don't call
this unless it's actually being used.

Signed-off-by: Mats Petersson <mats.petersson@amd.com>
2007-05-24 13:56:58 +01:00
kfraser@localhost.localdomain 8cc22ae8d1 xend: Fix scheduler parameters of rebooted domain
When I changed the scheduler parameters of a domain with
xm sched-credit, the information of xm sched-credit was changed.
But as for the information of xm list, the values of the domain
configuration definition were kept.
And, then I rebooted the domain. The information of xm list was
not changed. But as for the information of xm sched-credit, the
values of the domain configuration definition were returned.

# xm create /xen/PVdomain.1 cpu_cap=150 cpu_weight=512
Using config file "/xen/PVdomain.1".
Started domain PVdomain.1
# xm sched-credit -d PVdomain.1
Name                              ID Weight Cap
PVdomain.1                         1    512  150
# xm sched-credit -d PVdomain.1 -c 75 -w 384
# xm sched-credit -d PVdomain.1
Name                              ID Weight Cap
PVdomain.1                         1    384   75
# xm list --long PVdomain.1 | grep cpu_
    (cpu_weight 512)
    (cpu_cap 150)
    (cpu_time 29.353831745)
# xm reboot PVdomain.1
# xm sched-credit -d PVdomain.1
Name                              ID Weight Cap
PVdomain.1                         2    512  150
# xm list --long PVdomain.1 | grep cpu_
    (cpu_weight 512)
    (cpu_cap 150)
    (cpu_time 5.950247186)


If the scheduler parameters of the domain were changed with
xm sched-credit, I think that xm list should show the current
values about the scheduler parameters.
And, then if the domain is rebooted, I think that the rebooted
domain should keep the preceding values about the scheduler
parameters.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-05-24 13:45:47 +01:00
kfraser@localhost.localdomain 7ffb087b8c vmxassist: Fix some copy-and-paste mistakes in vmx_check_descriptor()
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2007-05-24 13:42:41 +01:00
kfraser@localhost.localdomain efe3f7fcb9 Cleanups to map_vcpu_info.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-24 13:42:16 +01:00
kfraser@localhost.localdomain d5fb8810c2 vnc: Fix Zenkaku_Hankaku and add deadkey keysyms
Signed-off-by: Pat Campbell <plc@novell.com>
2007-05-24 13:34:19 +01:00
Jeremy Fitzhardinge 5104a14358 merged 2007-05-24 13:32:03 +01:00
kfraser@localhost.localdomain fea68d9d91 svm: Handle MC4_MISC threshold register for guests
The threshold register has been introduced in AMD RevF CPUs along with
SVM (Actually this MCA/MCE msr register existed before, but had no
meaning). Therefore no need for additional cpuid checks.

On read access it reports the HVM guest the register has been locked
by the BIOS. This means, it is not available for OS use. Thus, write
accesses are simply ignored. This behaviour actually matches real HW,
so guests can deal with this.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-05-24 13:30:29 +01:00
Jeremy Fitzhardinge 11623a8d90 Unmap vcpu_info mapping in arch_domain_destroy.
We don't need to touch it in arch_vcpu_reset() because that's only used
to recover from a failed suspend, and the correct behaviour there is to
leave the mapping as-is.
2007-05-24 13:25:05 +01:00
kfraser@localhost.localdomain 55e8bb3f3f Clean up map_domain_page().
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-24 11:33:39 +01:00
kfraser@localhost.localdomain 541b4e900d blktap: Add one more error reason statement to blktapctrl
blktapctrl already prints out exits reasons for all goto's to
open_failed except of not finding a device number for blktap0
This patch adds just that message so the user will get more info than
just "Unable to start blktapctrl"
Common source of this issue is that blktap is missing/failed to
load/...

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
2007-05-24 10:50:07 +01:00
Jeremy Fitzhardinge b9cc5236c7 merged 2007-05-24 10:48:58 +01:00
Jeremy Fitzhardinge c58ae69360 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.

When changing the mapping of the vcpu info, there's no obvious way to
prevent the other vcpus from getting a stale pointer of the vcpu_info,
which could result in them accessing bad memory (stale pointers to the
shared_info page are not a problem, because its always valid).  To
avoid this, we prevent guests from changing the vcpu_info location
more than once, since there's no obvious need to allow them to do this
at this point.

(If we really want to allow guests to update the vcpu_info location
more than once, then some sort of RCU wait between updating the
pointer and performing the unmap may be the way to do it.)

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
2007-05-24 10:47:27 +01:00
kfraser@localhost.localdomain 99bf801eac linux: Fix mem= kernel parameter when it is smaller than initial memory allocation.
From: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-24 10:46:57 +01:00
Jeremy Fitzhardinge 8a981e0bf2 Make map_domain_page_global fail
When the global mapping cache runs out, make map_domain_page_global
return NULL on failure rather than fire an assertion failure.  This
also updates the callers to handle the error gracefully.

The only exception to this is the shadow pagetable code, which uses
map_domain_page_global to create a mapping for
v->arch.paging.shadow.guest_vtable; it's not clear this needs to be a
global mapping anyway.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
2007-05-24 10:45:03 +01:00
kfraser@localhost.localdomain c6e5b4c106 blktap: Do not install libs or headers with execute permissions.
rpmlint complains that various blktap files are installed with
unnecessary execute permissions:
E: xen-devel spurious-executable-perm (Badness: 100)
/usr/lib64/libblktap.a
E: xen-devel spurious-executable-perm (Badness: 100)
/usr/include/blktaplib.h

Signed-off-by: Charles Coffing <ccoffing@novell.com>
2007-05-24 10:44:01 +01:00
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