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>
This option is disabled by default, only if we have "pae=1" in config
file, cpuid will return PAE available to VMX guest, and Linux PAE VMX
guest need this. Once the PAE VMX guest support is stable, we will
enable it by default.
Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
is present. We tested only Linux at this point, and we'll improve the
functionality as we test other guests.
The SVM needs the equivalent changes to the vmc.c to get this
functionality working, but this patch does not break the build.
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
to 15feb06, update to Makefile.am. The original gcc-mirror patch is
removed and the buildroot configuration updated.
Signed-off-by: Woody Marvel <marvel@us.ibm.com>
This reverts a previous changeset that removed this code.
It is currently required for good TSC behaviour in SVM
(fully virtualised) guests.
Signed-off-by: Keir Fraser <keir@xensource.com>
Update the documentation to include the syntax of "hiding" a PCI
device from domain 0 and for specifying the assignment of a PCI device
to a driver domain. It also includes a brief section exploring some of
the security concerns that driver domains address and mentioning some
of those that remain.
Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
Replace the old pciif DevController class with a new one that
configures the PCI backend. A util class detects the resource usage of
the specified PCI devices and pciif interacts with Xen to permit a
driver domain to directly access those physical I/O resources.
Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
I also added a one-liner that causes xenbus_dev_(error|fatal) to output
to the kernel log buffer (and thus syslog) which was invaluable to me
while debugging (by default, error messages only appear in xenstore).
Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
setup_fpu(), as the flag can be set in CR0 even if the VCPU
has already dirtied the FPU (this happens if a paravirtualised
guest has set CR0.TS).
Signed-off-by: Keir Fraser <keir@xensource.com>
fix VMX mov_to_cr0: must setup_fpu() if the new cr0 value
has TS clear, regardless of previous cr0.TS value.
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6.16-rc2/arch/i386/kernel/cpu/*.
Also include kernel taint tracking and include that
information, and Xen release info, in our crash dumps.
Signed-off-by: Keir Fraser <keir@xensource.com>
switch to an alternate page table before entering the
real-mode emulator.
Signed-off-by: Xin B Li <xin.b.li@intel.com>
Signed-off-by: Leendert van Doorn <leendert@watson.ibm.com>
event channels by re-setting the selector and master
pending flags when it exits. Should make for better
behaviour when there are others using the event channels.
This needs some testing to be sure it doesn't break
anything or trigger latent bugs.
Signed-off-by: Keir Fraser <keir@xensource.com>
domain0. Provide a temporary glue between our swiotlb
implementation and x86/64's dma_ops dynamic dma-mapping
infrastructure.
Signed-off-by: Keir Fraser <keir@xensource.com>
We check it is a member of a small set of permitted hypercalls.
Fix libxenstat to not use multicalls (not permitted, and not
need for efficiency in libxenstat).
Based on an original patch by Chris Wright.
Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
It has been superceded by run-time flag
XENFEAT_auto_translated_physmap.
This patch changes behaviour slightly:
1. set_pmd/set_pgd/set_pud always use mmu_ops, even when
XENFEAT_writable_page_tables is available. Unclear whether
we want to add a test to avoid this.
2. xen_l1_entry_update always uses mmu_op. Again, could gate
this on XENFEAT_writable_page_tables.
3. We always pin/unpin pagetables. Could gate this on a
new XENFEAT flag.
Signed-off-by: Keir Fraser <keir@xensource.com>