need for a hypercall in the guest timer interrupt handler.
Cleaned up stolen/blocked tick handling in Linux.
Signed-off-by: Keir Fraser <keir@xensource.com>
exported by Xen. This is based heavily on a patch from Rik van Riel, but
extended to distinguish between idle/blocked cycles and stolen cycles.
There is still stuff todo:
1. Xen should export the time values in shared memory, to save a hypercall
on every time interrupt (even though that is only every 10ms, worst case).
2. As in s390, Xen's cputime_t should be measured at finer granularity than
jiffies. Nanoseconds would be a better unit.
3. Break out the internals of the account_steal_time() interface so that we don't
need to abuse it so wretchedly.
Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
run state of a VCPU (running, runnable, blocked, etc.) and the total time
spent in each state since the VCPU was created.
Signed-off-by: Keir Fraser <keir@xensource.com>
1) add INIT-SIPI-SIPI IPI sequence handling code to HVM virtual lapic
code.
2) add an new interface init_ap_context to hvm_funcs, and implement the
VMX side.
3) add a hvm generic function hvm_bringup_ap, which in turn calls
init_ap_context.
Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
1) set_p2m_entry/alloc_p2m_table call domain_crash instead of
domain_crash_synchronous when map_p2m_entry return with failure, or dom0
will crash.
2) free_p2m_table now uses domain as parameter instead of vcpu.
3) add AP p2m initialization logic for VMX domain.
And some coding style cleanups.
Signed-off-by: Xin Li <xin.b.li@intel.com>
uses slow iret path every time (but most returns will do that
anyway, since they'll be to userspace). Fast return (to kernel)
can be implemented inside the macro and respect the
supervisor_mode_kernel feature flag.
Signed-off-by: Keir Fraser <keir@xensource.com>
Fail to boot if domain 0 requires features that Xen does not
understand or support (for domain 0).
Remove stale dom0_translate boot option.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
Add comments in public header version.h to explain what all the different
feature flags mean. Add a new flag XENFEAT_pae_pgdir_above_4gb to inform the guest
that its PAE page directories do not need to conform to the usual hardware
restriction.
Signed-off-by: Keir Fraser <keir@xensource.com>
in auto_translated_physmap mode. A new comment in that function explains
why this is an okay thing to do.
This avoids an unnecessary crash in Xen's skbuff_ctor.
Signed-off-by: Michael Vrable <mvrable@cs.ucsd.edu>
Signed-off-by: Keir Fraser <keir@xensource.com>
to 0. Later, in desched_extra_dom(), if the extrawight is not set, the
vcpu's score is calculated with this:
/*domain was running in L1 extraq => score is inverse of
utilization and is used somewhat incremental!*/
if ( !inf->extraweight )
/*NB: use fixed point arithmetic with 10 bits*/
inf->score[EXTRA_UTIL_Q] = (inf->period << 10) /
inf->slice;
Which can result in a divide by zero.
This changeset adds a comments and additional sanity check to prevent this
case from crashing Xen.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
fail: ip_of() is returning a LIST of IP addresses, one per line.
The vif-scripts attempt to use the list where single addresses ought to
be, with predictable results. This patch changes ip_of() to return
the first address in the list, which seems to be the first one configured.
Signed-off-by: Jim Dykman <dykman@us.ibm.com>
To support this we give kernel GDT entries DPL=0 and use kernel
segment selectors with RPL=0. Xen will crunch these to ring 1 when
they are passed in. When a segment selector is used directly or placed
in a stack frame the guest OS is reponsible for crunching the RPL.
Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>