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>
Jim Fehlig [Wed, 14 Mar 2007 00:13:11 +0000 (18:13 -0600)]
Managed HVM guests are not displayed by 'xm list' after restarting xend.
This patch prevents writing empty configuration items to the domain's
sexpr configuration file. Without the empty items, the sexpr is
parsed properly when xend is started.
acm: Provide the possibility to choose the VM label of domain-0 in the
kernel line in grub.conf. The format is
ssidref=<ssidref>:sHype:<policy name>:<vm label>. The name of the
policy specified here must be the same name as the in the policy
provided as a module during boot, otherwise the policy will not be
accepted and the system then starts without a policy. The user tool
for 'xm dumppolicy' has been adapted to show which entry in the binary
policy is used by domain-0.
hvm: Fix the assert on size in HVM MMIO flag-setting functions Signed-off-by: Xin Li <xin.b.li@intel.com> Signed-off-by: Keir Fraser <keir@xensource.com>
Tim Deegan [Thu, 29 Mar 2007 15:27:18 +0000 (15:27 +0000)]
[HVM] Save/restore: don't get guest size from "memory_static_min"
since it doesn't mean that any more. This is a sticking-plaster
to get HVM S/R working until the proper memory-map handling patch
is ready. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Ewan Mellor [Thu, 29 Mar 2007 14:46:30 +0000 (15:46 +0100)]
Added asynchronous event notification through the Xen-API. Added a new command,
xm event-monitor, a new test program for the C bindings, and new bindings
themselves.
xen: Split domain_flags into discrete first-class fields in the
domain structure. This makes them quicker to access, and simplifies
domain pause and checking of runnable status. Signed-off-by: Keir Fraser <keir@xensource.com>
hvm: Avoid separate nested-page-table control-register logic in SVM code.
Clean up VMX set_cr0() function a little to avoid unnecesasry diffs
with SVM version. Signed-off-by: Keir Fraser <keir@xensource.com>
hvm: Remove extremely verbose debugging from SVM code.
It would be too verbose to actually turn on to find any non-subtle
bugs, and severely bloats the vmexit handler (making it hard to find
the real code amongst the debugging code). Signed-off-by: Keir Fraser <keir@xensource.com>
hvm vmx: Better management of VMX control bitmaps.
Distinguish between 'nice to have' and 'must have' features. Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Wed, 28 Mar 2007 19:19:11 +0000 (20:19 +0100)]
pciback: Devices can lose config space info on D3->D0 transition, yet
they may not (and even if they try, can not) restore the BARs. Since
Linux does not do this for us, pciback must do it for itself manually.
Possible todo: Restore all first 64 bytes of the config space?
Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Wed, 28 Mar 2007 15:52:05 +0000 (16:52 +0100)]
hvm svm: Inject #UD exception if guest tries to execute any SVM-related
function (except VMMCALL). Signed-off-by: Mats Petersson <mats.petersson@amd.com>
Tim Deegan [Wed, 28 Mar 2007 15:02:54 +0000 (15:02 +0000)]
[SVM] Inject a "fake" interrupt if we delay an interrupt for an exception
(instead of just waiting for the next vmexit to inject the pending
interrupt, since that could be some arbitrary number of instructions later).
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
xen: Sync the list.h macros to Linux 2.6.18.
This also pulls in RCU-related functions, superceding a patch from Mike Day. Signed-off-by: Keir Fraser <keir@xensource.com>
[ACM] Allow version information to be embedded in the XML representation of
the ACM policy. The translation tool has been adapted to parse the
version found in the XML representation and put it into the binary
policy. Xen has been adapted to remember the version information and
report it when asked for the current policy.
Tim Deegan [Wed, 28 Mar 2007 08:40:42 +0000 (08:40 +0000)]
[HVM][HAP] Fix up some memory allocation bugs
The attached patch initializes count_info of newly allocated hap page
with 0, and removes unnecessary page deallcation when destroying monitor
table. Without this patch, destroying hap domain will fail.
Ewan Mellor [Tue, 27 Mar 2007 22:23:01 +0000 (23:23 +0100)]
Added HTTPS support to Xend. There are new configuration options for the
Xen-API and legacy XML-RPC servers to set key and certificate files, and
xm simply needs to be configured use an https rather than an http URL.
hvm svm: Initialise VMCB CR4 and shadow CR4 with 0 when VMCB is being
constructed under nested paging mode. It complies with recent
reset_to_realmode change in hvmloader. Signed-off-by: Wei Huang <wei.huang2@amd.com>
linux/x86-64: cleanup the Xen-specific macros in entry-xen.S
- SWITCH_TO_KERNEL is dead (and was broken)
- comments to HYPERVISOR_IRET were somewhat outdated
- updates of selecor RPLs shouldn't be done with byte size to avoid
store-to-load forwarding issues
hvm svm: Bug fix for page allocation when HAP is being used
Initialise count_info of newly allocated hap page with 0, and removes
unnecessary page deallcation when destroying monitor table. Without
this patch, destroying hap domain will fail.
hvm: Fix undefined bit shifting in mmio emulation path
In functions set_eflags_* (xen/arch/x86/hvm/io.c), if the first
argument "size" equals sizeof(long), the following code will produce
unintended and invalid result:
unsigned long mask = (1 << (8 * size)) - 1;
In ANSI C, if the shift amount is greater or equal to the width of the
data type, the result is undefined. Specifically on x86, a bit mask is
applied to the shift amount, so that more significant bits are
ignored. So the above expression results 0x0 instead of the intended
~0UL.
This patch fixes this issue. Because size=0 is not a valid parameter,
rewriting the code using right shift avoids an additional condition
check.
xen: Make all performance counter per-cpu, avoiding the need to update
them with atomic (locked) ops.
Conversion here isn't complete in the sense that many places still use
the old per-CPU accessors (which are now redundant). Since the patch
is already rather big, I'd prefer replacing those in a subsequent
patch.
While doing this, I also converted x86's multicall macros to no longer
require inclusion of asm-offsets.h in the respective C file (on IA64
the use of asm-offsets.h in C sources seems more wide spread, hence
there I rather used IA64_ prefixes for the otherwise conflicting
performance counter indices).
On x86, a few counter increments get moved a little, to avoid
duplicate counting of preempted hypercalls.
Also, a few counters are being added.
IA64 changes only compile-tested, hence somebody doing active IA64
work may want to have a close look at those changes.
In order to allow building as non-root with a non-default CC (which
root may not have access to through its $PATH), defer the generation
of an error until CC is actually needed.
Original patch by Jan Beulich <jbeulich@novell.com>
The recent change to guest time handling dropped a call to
update_vcpu_system_time(), leading to time-went-backwards messages and
guest hangs (the latter were observed only in 2.6.21-rc4 and only when
no serial console was in use).
Debugging the issue also revealed that some commented out debug
printk-s in x86's time handling code didn't compile under x86-64.
Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir@xensource.com>