hvm svm: Avoid intercepts when accessing a number of architectural MSRs.
1. Removes intercept of guest-specific MSRs
MSR_IA32_SYSENTER_{CS,ESP,EIP}, MSR_{L,C,}STAR, MSR_SYSCALL_MASK,
MSR_SHADOW_GS_BASE.
2. Removes code to deal with those intercepts, as well as the
FS/GS-base. Since long_mode_do_msr_read now became essentially a
switch of a single case + default, I removed the entire function and
inlined the remaining single case-statement into the original
MSR-access function.
hvm: hvm_io_assist() doesn't preoperly make use of its vcpu
parameter. Remove it to make it obvious that it can only be called for
the currently-executing vcpu. Signed-off-by: Keir Fraser <keir@xensource.com>
Remove hvm_drain_io() hypercall, simplify qemu main loop and do not
pause the domain on reboot (not necessary and defeats new deferred
shutdown logic). Signed-off-by: Keir Fraser <keir@xensource.com>
[hvm] Keep track of time offset between domain time and dom0 time.
On each rtc time update from the hvm domain, we send an ioreq request
to qemu which then updates the time offset xenstore entry. The time
offset is preserved across reboot and can be set on domain creation
by setting the rtc_timeoffset variable in a config file.
From: Andrei Petrov <andrei.petrov@xensource.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
If a domain fails to restore, report back an error and close the
connection. This still leaves a confusing error from 'xm migrate' in
many cases, but it's much better than just sitting there.
hvm vmx: VMX MSR bitmap format and size is VMX-specific, so move its
allocation and initialisation into VMX-specific code. Signed-off-by: Keir Fraser <keir@xensource.com>
Force P2M top-level page table to be allocated below 4GB
memory space when Xen is running under PAE mode. Also remove
hap.p2m_freelists because hap mode does not have P2M batch
allocation. The backpointer parameter of hap_alloc() function is
removed since this parameter is unused.
Keir Fraser [Sat, 31 Mar 2007 18:02:09 +0000 (19:02 +0100)]
linux: Remove a few redundant config options. Build util.c for ia64
and ifdef out a couple of functions that are not yet fully generic. Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 31 Mar 2007 15:35:02 +0000 (16:35 +0100)]
xen x86: Fix double-fault handler stack overflow.
1. Shrink stack frame for __print_symbol() by introducing a lock and
making the big arrays static.
2. Double the size of the double-fault stack.
Keir Fraser [Sat, 31 Mar 2007 11:24:55 +0000 (12:24 +0100)]
blktap: Fix qcow2raw.
qcow2raw would hang the conversion just short of 100%, because the
final write queue was never being submitted. If a blktap drivers read
synchronously, then "submit_events" and "complete" variables are
checked before getting set, so the fact that reads have finished is
not noticed, so the final write queue was never submitted.
Note that I have also removed the variables write_complete and
read_complete. They were unused, and they were also not set correctly
in the synchronous case.
Signed-off-by: Charles Coffing <ccoffing@novell.com>
Keir Fraser [Fri, 30 Mar 2007 17:42:49 +0000 (18:42 +0100)]
hvm vmx: Fix MSR-intercept bitmap initialisation (two bitmap offsets
are documented the wrong way round in the current PRM Vol.3). Clear
bits in the bitmap only /after/ it has been initialised to
all-1s. Clean up start-of-day info printing. Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Fri, 30 Mar 2007 16:02:46 +0000 (17:02 +0100)]
hvm: Must increment RIP on INT3 instruction in SVM.
Also tighten up checking of valid exception intercepts -- we should
not vmexit on an exception we have not registered an interest in.
Signed-off-by Tom Woller <thomas.woller@amd.com>
Signed-off-by Thomas Friebel <thomas.friebel@amd.com> Signed-off-by: Keir Fraser <keir@xensource.com>
So far the ia64 p2m has the semantic similar to
(the x86 p2m) + (page reference count).
But the differece from the x86 p2m have caused the breakage and work around.
This patch make the ia64 p2m semantic same as x86 to solve it.
- get_page() only for grant table page mapping and foreign domain page
mapping.
- put_page() only for those pages.
- guest_physmap_remove_page() doesn't touch PGC_allocated bit.
Ewan Mellor [Mon, 26 Mar 2007 13:09:36 +0000 (14:09 +0100)]
Don't set memory_dynamic_max when xm mem-set is called. Save the VM
configuration unconditionally when either the max or the target memory values
are set.
Thanks to Masaki Kanno for pointing out the first problem.
Tim Deegan [Mon, 26 Mar 2007 09:13:03 +0000 (09:13 +0000)]
[HVM] Intercept ACPI pm-timer registers
Bring the PM1a_STS and PM1a_EN registers into Xen and use them to deliver
SCI to the guest before it sees the MSB of the pm-timer change.
Also correct some of the semantics of the registers. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Tim Deegan [Fri, 23 Mar 2007 10:46:39 +0000 (10:46 +0000)]
Remove xc_shadow tool
It predates the current shadow architecture and only performs an explicitly
invalid shadow operation (on itself). Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Ewan Mellor [Thu, 22 Mar 2007 18:41:15 +0000 (18:41 +0000)]
Fix the parsing of the is_a_template and auto_power_on flags. Don't try to
read the disk size on create -- just pass -1 instead -- as the filename may
be munged on the server-side.
Ewan Mellor [Thu, 22 Mar 2007 14:31:03 +0000 (14:31 +0000)]
Update VM's VCPU handling to match the documentation wrt VCPUs_max and
VCPUs_at_startup. Add VM.set_VCPUs_number_live, VM.add_to_VCPUs_params_live,
VM_metrics.VCPUs_{CPU,flags,params}.
Use these new calls to implement xm vcpu-list and xm sched-credit through
the Xen-API. Mark a number of other calls as unimplemented through that API.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com> Signed-off-by: Ewan Mellor <ewan@xensource.com>