Commit Graph
8973 Commits
Author SHA1 Message Date
kaf24@firebug.cl.cam.ac.uk 705ea2b54c New VCPUOP_register_runstate_memory_area hypercall. Avoids
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>
2006-02-25 21:28:27 +01:00
kaf24@firebug.cl.cam.ac.uk 11a008c7c5 Update Linux time IRQ handler to understand the new stolen/blocked cycle counts
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>
2006-02-25 20:07:28 +01:00
kaf24@firebug.cl.cam.ac.uk eefccca99e New VCPUOP_get_runstate_info hypercall. Returns information about the current
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>
2006-02-25 17:58:37 +01:00
kaf24@firebug.cl.cam.ac.uk 73f56b3d57 Avoid pcnet dm packet loss / corruption.
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
2006-02-25 12:27:53 +01:00
kaf24@firebug.cl.cam.ac.uk f79d0e5aeb Split XENFEAT_ feature flags into new header file features.h.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-24 19:34:54 +01:00
kaf24@firebug.cl.cam.ac.uk 396a3a4f19 Fix up CPU allocation and topology reporting.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-24 19:16:52 +01:00
kaf24@firebug.cl.cam.ac.uk 7258ce4242 Quieten down MSR access warnings.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-24 19:16:15 +01:00
kaf24@firebug.cl.cam.ac.uk 28c8245ab0 Default minimum number of receive buffers queued by netfront is now 64, not 8.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-24 17:50:20 +01:00
kaf24@firebug.cl.cam.ac.uk 143dc15137 Bring up AP of VMX domain.
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>
2006-02-24 17:32:58 +01:00
kaf24@firebug.cl.cam.ac.uk 6b2c1a390c Clean up p2m functions.
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>
2006-02-24 17:32:19 +01:00
kaf24@firebug.cl.cam.ac.uk f6591ed77a Two missing exports (one of them needed only for PAE) prevented netfront from being built as a module.
From: Jan Beulich

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-24 17:25:41 +01:00
kaf24@firebug.cl.cam.ac.uk e6e48842c2 Another tiny C89 fix.
Signed-off-by: Bruce Rogers <brogers@novell.com>
2006-02-24 16:37:09 +01:00
cl349@firebug.cl.cam.ac.uk bb5d5f577a linux-i386: cleanup head.S, sync default_ldt and {new,boot}_cpu_data with native.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-02-24 14:41:45 +00:00
Ian.Campbell@xensource.com c6ba49142d Implement direct iret to guest kernel where possible in HYPERVISOR_IRET macro.
Returns to guest userspace and from an NMI must still go via the hypervisor.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-02-24 11:05:52 +00:00
kaf24@firebug.cl.cam.ac.uk 3157cba60d Tools changes for per-vcpu io event channel on IA64.
Signed-off-by Kevin Tian <Kevin.tian@intel.com>
2006-02-24 10:29:09 +01:00
kaf24@firebug.cl.cam.ac.uk e36c8877da Return <4GB memory back to Xen when destroying a PAE pgdir.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-24 08:49:32 +01:00
kaf24@firebug.cl.cam.ac.uk 4df7e8e499 This patch allows for compilation with C89 era compilers, by removing the
trailing comma from an enum, which was not part of the C89 spec.

Signed-off-by: Bruce Rogers <brogers@novell.com>
2006-02-24 08:28:04 +01:00
kaf24@firebug.cl.cam.ac.uk 50345bb6c0 Cset 8950 adds shadow info dump in common code, however
IA64 has no shadow mode. Move it into arch specific stub instead.

Signed-off-by Kevin Tian <kevin.tian@intel.com>
2006-02-24 08:27:05 +01:00
kaf24@firebug.cl.cam.ac.uk e16b78bf48 Use common IRET macro for all exits from XenLinux. Currently
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>
2006-02-23 18:40:08 +01:00
kaf24@firebug.cl.cam.ac.uk 3eaf2dff37 Remove TBF_SLOW_IRET hack from x86/64 Xen return-to-guest
path. Guest should set up flags for itself in its own
NMI handler.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-23 18:30:43 +01:00
kaf24@firebug.cl.cam.ac.uk 9925f4a7dc Remove explicit munging of selector RPLs from Xen Linux x86/64.
Not needed now it's done by Xen.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-23 18:27:18 +01:00
vhanquez@kneesa.uk.xensource.com aadfc97676 initialize few structure fully to zero with talloc_zero
instead of explicitely initializing some fields to NULL.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2006-02-23 17:14:55 +00:00
cl349@firebug.cl.cam.ac.uk 5cef365e77 Output which shadow mode is used, if any.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-02-23 16:29:06 +00:00
cl349@firebug.cl.cam.ac.uk f79142a93d Make the fixmap area moveable in kernel address space.
From: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-02-23 15:59:54 +00:00
cl349@firebug.cl.cam.ac.uk 7ac0b750e5 Move the gate page (vsyscall) out of the fixmap area into user address space,
just below PAGE_OFFSET.

From: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-02-23 15:22:19 +00:00
cl349@firebug.cl.cam.ac.uk 14fbb23123 Add include/asm-i386/{a.out,elf}.h to sparse tree
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-02-23 15:22:17 +00:00
kaf24@firebug.cl.cam.ac.uk 21cf8ef96a Add XENFEAT feature parsing to the domain 0 builder in Xen.
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>
2006-02-23 15:55:35 +01:00
kaf24@firebug.cl.cam.ac.uk 186366e279 Remove some unnecessary diffs vs. native Linux. We now don't use the Xen
FLAT_foo segment selectors at all.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-23 15:33:08 +01:00
kaf24@firebug.cl.cam.ac.uk cc0225babb Fix netfront receive path for auto_translate_physmap mode.
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-23 15:22:12 +01:00
kaf24@firebug.cl.cam.ac.uk c05842ad99 Disable pagetable pinning for shadow-mode-refcount guests.
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-23 14:50:00 +01:00
kaf24@firebug.cl.cam.ac.uk 0e480fbe65 Clean up segment selector fixup and validation.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-23 14:43:45 +01:00
kaf24@firebug.cl.cam.ac.uk 55232abc7e Rename XENFEAT_ring0_kernel to slightly more generic XENFEAT_supervisor_mode_kernel.
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>
2006-02-23 11:59:27 +01:00
kaf24@firebug.cl.cam.ac.uk 7b7a8ea148 Silenty ignore calls to xen_create_contiguous_region() when running
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>
2006-02-23 11:42:19 +01:00
kaf24@firebug.cl.cam.ac.uk 66d54fe762 Clean up some vmx code.
Signed-off-by: Xin Li <xin.b.li@intel.com>
2006-02-23 11:34:11 +01:00
kaf24@firebug.cl.cam.ac.uk 224d655aba Whenever the slice of a domU is set to 0, sedf_adjdom() sets extraweight
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>
2006-02-23 11:31:01 +01:00
kaf24@firebug.cl.cam.ac.uk 2b3ef497e8 Update the hypercalls in Mini-OS to reflect the current state in XenLinux.
Signed-off-by: Aravindh Puthiyaparambil <aravindh.puthiyaparambil@unisys.com>
2006-02-23 11:27:35 +01:00
kaf24@firebug.cl.cam.ac.uk 28a8fc92e9 Per-vcpu IO evtchn support for VT-i guests (ia64).
Signed-off-by Kevin Tian <kevin.tian@intel.com>
Signed-off-by Xin Li <xin.b.li@intel.com>
2006-02-23 11:24:37 +01:00
kaf24@firebug.cl.cam.ac.uk bb86d19e6e Per-vcpu IO evtchn patch for HVM domain.
We are starting to send patches to support SMP VMX guest.

Signed-off-by: Xin Li <xin.b.li@intel.com>
2006-02-23 11:22:25 +01:00
emellor@leeni.uk.xensource.com d7f4473fae Adding a second IP address onto eth0 causes the vif-* hotplug scripts to
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>
2006-02-22 21:52:30 +01:00
Ian.Campbell@xensource.com a58703d1ed Add feature flag allowing guest kernel to run in domain 0.
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>
2006-02-22 19:11:23 +00:00
kaf24@firebug.cl.cam.ac.uk c0b9da693c Cset 8916 missed two extra pages for VT-i domain and thus breaks domain
creation. This fixes it.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2006-02-22 19:40:19 +01:00
kaf24@firebug.cl.cam.ac.uk 123f8f60a2 Fix gcc warning and clean a piece of code in arch_set_info_guest to avoid
AP of HVM domain going to a wrong code path.

Signed-off-by: Xin Li <xin.b.li@intel.com>
2006-02-22 19:38:50 +01:00
kaf24@firebug.cl.cam.ac.uk a9ed4151ba Change shadow_direct_map_init/clean param from vcpu to domain.
Also some cleanups.

Signed-off-by: Xin Li <xin.b.li@intel.com>
2006-02-22 19:23:35 +01:00
Ian.Campbell@xensource.com 30f174ca36 Fix x86_64 Xen build.
event_callback_cs and failsafe_callback_cs are x86_32 only.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
2006-02-22 17:26:39 +00:00
cl349@firebug.cl.cam.ac.uk 4720eab035 Don't reload segment registers -- it's done later in generic code.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-02-22 15:50:28 +00:00
Ian.Campbell@xensource.com 3d7e20748b Move lgdt_finish inline
Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
2006-02-22 15:17:04 +00:00
Ian.Campbell@xensource.com c0bb7d27dc List supported feature flags in __xen_guest section.
Signed-off-bu: Ian Campbell <Ian.Campbell@XenSource.com>
2006-02-22 15:16:44 +00:00
Ian.Campbell@xensource.com 12597da1a7 Validate the segment selectors passed to arch_set_info_guest().
Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
2006-02-22 15:13:48 +00:00
Ian.Campbell@xensource.com 33718a77fd Allow Xen to truncate x86_32 segment limits to the correct value
rather than hardcoding them in each guest kernel.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
2006-02-22 15:13:08 +00:00
pl@us.ibm.com c9eb2aae5d XM-Test takes a really long time to build the initrd it uses for testing. This patch to the Makefile allows you to specify INITRD="url" when running make existing to make it download a prebuilt copy of the initrd from a repository.
Signed-off-by: Paul Larson <pl@us.ibm.com>
2006-02-22 16:02:54 +01:00