Jan Beulich [Fri, 16 Mar 2012 10:35:06 +0000 (11:35 +0100)]
unmodified drivers: use upstream sync_bitops if available
The forward ported xenlinux sources in openSuSE 12.2 were switched from
the old synch_bitops to the sync_bitops since kernel version 3.3. Add
compat macros to use either old or new helpers depending on used kernel
source version.
Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Olaf Hering [Fri, 16 Mar 2012 10:34:41 +0000 (11:34 +0100)]
unmodified drivers: add pfn_is_ram helper for kdump
Register pfn_is_ram helper speed up reading /proc/vmcore in the kdump
kernel. It is compiled only if the kernel source is recent enough to
have the pfn_is_ram helper (v3.0-rc1, commit 997c136f518c5debd63847e78e2a8694f56dcf90).
Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Jan Beulich <jbeulich@suse.com>
Olaf Hering [Fri, 16 Mar 2012 10:34:14 +0000 (11:34 +0100)]
unmodified drivers: hide xen_cpuid_base() in version 2.6.38+
Allow compilation of PVonHVM drivers with forward-ported xenlinux
sources in openSuSE 12.1. xen_cpuid_base() is now in mainline, the copy
in the xen tree leads to a compilation error. The current state leads
to a compile error:
/usr/src/packages/BUILD/xen-4.2.24547/non-dbg/obj/default/platform-pci/platform-pci.c:121: error: redefinition of 'xen_cpuid_base'
/usr/src/linux-3.0.13-0.11/arch/x86/include/asm/xen/hypervisor.h:43: error: previous definition of 'xen_cpuid_base' was here
The reason is that the kernel sources are searched before the xen
sources for asm/hypervisor.h:
Andrew Cooper [Fri, 16 Mar 2012 10:30:12 +0000 (10:30 +0000)]
KEXEC: Allocate crash structures in low memory
On 64bit Xen with 32bit dom0 and crashkernel, xmalloc'ing items such
as the CPU crash notes will go into the xenheap, which tends to be in
upper memory. This causes problems on machines with more than 64GB
(or 4GB if no PAE support) of ram as the crashkernel physically cant
access the crash notes.
The solution is to force Xen to allocate certain structures in lower
memory. This is achieved by introducing two new command line
parameters; low_crashinfo and crashinfo_maxaddr. Because of the
potential impact on 32bit PV guests, and that this problem does not
exist for 64bit dom0 on 64bit Xen, this new functionality defaults to
the codebase's previous behavior, requiring the user to explicitly
add extra command line parameters to change the behavior.
This patch consists of 3 logically distinct but closely related
changes.
1) Add the two new command line parameters.
2) Change crash note allocation to use lower memory when instructed.
3) Change the conring buffer to use lower memory when instructed.
There result is that the crash notes and console ring will be placed
in lower memory so useful information can be recovered in the case of
a crash.
Changes since v1:
- Patch xen-command-line.markdown to document new options
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
Andrew Cooper [Fri, 16 Mar 2012 10:29:20 +0000 (10:29 +0000)]
KEXEC: Allocate crash notes on boot
Currently, the buffers for crash notes are allocated per CPU when a
KEXEC_CMD_kexec_get_range hypercall is made, referencing the CPU in
question. This has certain problems including not being able to
allocate the crash buffers if the host is out of memory when crashing.
In addition, my forthcoming code to support 32bit kdump kernels on
64bit Xen on large (>64GB) boxes will require some guarentees as to
where the crash note buffers are actually allocated in physical
memory. This is far easier to sort out at boot time, rather than
after dom0 has been booted and potentially using the physical memory
required.
Therefore, allocate the crash note buffers at boot time.
Changes since v6:
* Tweak kexec_init() to use xzmalloc_array(), and to defer
registering the
crashdump keyhandler until the crash notes have been successfully
allocated.
Changes since v5:
* Introduce sizeof_cpu_notes to move calculation of note size into a
separate location.
* Tweak sizeof_note() to return size_t rather than int, as it is a
function based upon sizeof().
Changes since v4:
* Replace the current cpu crash note scheme of using void pointers
and hand calculating the size each time is needed, by a range
structure containing a pointer and a size. This removes duplicate
times where the size is calculated.
* Tweak kexec_get_cpu(). Don't fail if a cpu is offline because it
may already have crash notes, and may be up by the time a crash
happens. Split the error conditions up to return ERANGE for an
out-of-range cpu request rather than EINVAL. Finally, returning a
range of zeros is acceptable, so do this in preference to failing.
Changes since v3:
* Alter the spinlocks to avoid calling xmalloc/xfree while holding
the lock.
* Tidy up the coding style used.
Changes since v2:
* Allocate crash_notes dynamically using nr_cpu_ids at boot time,
rather than statically using NR_CPUS.
* Fix the incorrect use of signed integers for cpu id.
* Fix collateral damage to do_crashdump_trigger() and
crashdump_trigger_handler caused by reordering sizeof_note() and
setup_note()
* Tweak the issue about returing -ENOMEM from kexec_init_cpu_note().
No functional change.
* Change kexec_get_cpu() to attempt to allocate crash note buffers
in case we have more free memory now than when the pcpu came up.
* Now that there are two codepaths possibly allocating crash notes,
protect the allocation itself with a spinlock.
Changes since v1:
* Use cpu hotplug notifiers to handle allocating of the notes
buffers rather than assuming the boot state of cpus will be the
same as the crash state.
* Move crash_notes from being per_cpu. This is because the kdump
kernel elf binary put in the crash area is hard coded to physical
addresses which the dom0 kernel typically obtains at boot time.
If a cpu is offlined, its buffer should not be deallocated because
the kdump kernel would read junk when trying to get the crash
notes. Similarly, the same problem would occur if the cpu was
re-onlined later and its crash notes buffer was allocated
elsewhere.
* Only attempt to allocate buffers if a crash area has been
specified. Else, allocating crash note buffers is a waste of
space. Along with this, change the test in kexec_get_cpu to
return -EINVAL if no buffers have been allocated.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
Tim Deegan [Thu, 15 Mar 2012 15:20:37 +0000 (15:20 +0000)]
arm: don't use atomic operations to gate non-boot CPUs
Since the cache is not enabled that early, better not to rely on
load-linked/store-conditional. Instead, have the boot CPU call the
other CPUs by their IDs, just like we do later for proper CPU bringup.
Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 15 Mar 2012 15:20:37 +0000 (15:20 +0000)]
arm: map DTB as outer- rather than inner-shareable.
This is consistent with how we map Xen which is important if they happen to be
in the same 2MB super page (which they generally are)
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: David Vrabel <david.vrabel@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Tim Deegan [Thu, 15 Mar 2012 11:46:54 +0000 (11:46 +0000)]
x86/mm: make 'query type' argument to get_gfn into a set of flags
Having an enum for this won't work if we want to add any orthogonal
options to it -- the existing code is only correct (after the removal of
p2m_guest in the previous patch) because there are no tests anywhere for
'== p2m_alloc', only for '!= p2m_query' and '== p2m_unshare'.
Replace it with a set of flags.
Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Tim Deegan [Thu, 15 Mar 2012 11:41:11 +0000 (11:41 +0000)]
x86/mm: remove 'p2m_guest' lookup type.
It was neither consistently used by callers nor correctly handled by the
lookup code. Instead, treat any lookup that might allocate or unshare
memory as a 'guest' lookup for the purposes of:
- detecting the highest pod gfn populated; and
- crashing the guest on access to a broken page
which were the only things this was used for.
Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Tim Deegan [Thu, 15 Mar 2012 11:40:51 +0000 (11:40 +0000)]
mm: guest_remove_page() should not populate or unshare.
guest_remove_page() ought to use get_gfn_query() to look up the
current state of the gfn. Otherwise it might populate or unshare
the gfn just before dropping it.
Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Tim Deegan [Thu, 15 Mar 2012 11:12:44 +0000 (11:12 +0000)]
x86/mm/paging: Prevent the guest from faulting on the same gfn when dying
A crashing guest due to paging may hit an "endless" loop faulting repeatedly on
the current paged-out gfn, until the toolstack comes around to killing the
domain.
Unfortunately domain_crash at this point may not pause the vcpu due to the
shutting_down flag, so we pause it explicitly when detecting the condition.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Tim Deegan [Thu, 15 Mar 2012 11:12:44 +0000 (11:12 +0000)]
Memory sharing: better handling of ENOMEM while unsharing
If unsharing fails with ENOMEM, we were:
- leaving the list of gfns backed by the shared page in an inconsistent state
- cycling forever on the hap page fault handler.
- Attempting to produce a mem event (which could sleep on a wait queue)
while holding locks.
- Not checking, for all callers, that unshare could have indeed failed.
Fix bugs above, and sanitize callers to place a ring event in an unlocked
context, or without requiring to go to sleep on a wait queue.
A note on the rationale for unshare error handling:
1. Unshare can only fail with ENOMEM. Any other error conditions BUG_ON()
2. We notify a potential dom0 helper through a mem_event ring. But we
allow the notification to not go to sleep. If the event ring is full
of ENOMEM warnings, then the helper will already have been kicked enough.
3. We cannot "just" go to sleep until the unshare is resolved, because we
might be buried deep into locks (e.g. something -> copy_to_user ->
__hvm_copy)
4. So, we make sure we:
4.1. return an error
4.2. do not corrupt memory shared with other guests
4.3. do not corrupt memory private to the current guest
4.4. do not corrupt the hypervisor memory sharing meta data
4.5. let the guest deal with the error, if propagation will reach that far
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Tim Deegan [Thu, 15 Mar 2012 11:12:44 +0000 (11:12 +0000)]
x86/mm: Allow to not sleep on mem event ring
Under extreme congestion conditions, generating a mem event may put the vcpu to
sleep on a wait queue if the ring is full. This is generally desirable, although
fairly convoluted to work with, since sleeping on a wait queue requires a
non-atomic context (i.e. no locks held).
Introduce an allow_sleep flag to make this optional. The default API remains
such that all current callers set allow_sleep to true and thus will sleep if
necessary.
The end-use is for cases in which loss of guest mem events is tolerable. One
such consumer to be added later is the unsharing code under ENOMEM conditions.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Signed-off-by: Adin Scannell <adin@scannell.ca> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
x86/mm: Fix deadlock between p2m and event channel locks.
The hvm io emulation code holds the p2m lock for the duration of the
emulation, which may include sending an event to qemu. On a separate path,
map_domain_pirq grabs the event channel and p2m locks in opposite order.
Fix this by ensuring liveness of the ram_gfn used by io emulation, with a
page ref.
Reported-by: "Hao, Xudong" <xudong.hao@intel.com> Signed-off-by: "Hao, Xudong" <xudong.hao@intel.com> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Roger Pau Monne [Wed, 14 Mar 2012 14:20:58 +0000 (14:20 +0000)]
autoconf: add missing compression checks for libxc
Move missing checks from tools/libxc/Makefile to configure script.
Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Jan Beulich <JBeulich@suse.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Roger Pau Monne [Wed, 14 Mar 2012 14:19:42 +0000 (14:19 +0000)]
autoconf: check for uuid.h or uuid/uuid.h with -luuid
Check for uuid/uuid.h and if found check for -luuid usability (Linux
case), if not, check for uuid (NetBSD). One of this tests has to
succeed to be able to build Xen tools.
Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Wed, 14 Mar 2012 14:10:17 +0000 (14:10 +0000)]
tools: Add explicit clean rule for SeaBIOS
Since seabios-dir is cloned during build we need to check that it exists before
recursing into it for clean, following the pattern used for qemu-*-dir etc.
Also remove usage of "buildmakevars2shellvars" except when used to poopulate
the environment for qemu-xen-traditional's xen-setup script, which is the only
user.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Roger Pau Monne [Wed, 14 Mar 2012 14:08:04 +0000 (14:08 +0000)]
autoconf: check for Python.h header and -lpython* lib
Check that the package usually called python-dev is present.
Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Add features to the sched-credit interface to allow querying and
displaying scheduler parameters.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
George Dunlap [Wed, 14 Mar 2012 14:04:58 +0000 (14:04 +0000)]
xl: Refactor sched_domain_output to have a callback for pool information
Allow a scheduler to provide a callback to display pool-wide information,
providing a default. This is in preparation for displaying pool-wide
scheduler parameters on this line.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Andrew Cooper [Wed, 14 Mar 2012 11:10:20 +0000 (11:10 +0000)]
xl: display max_cpu_ids for xl info
Expose `max_cpu_id' in stdout from `xl info'
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Fabio Fantoni [Tue, 13 Mar 2012 17:30:50 +0000 (17:30 +0000)]
tools/hotplug/Linux/init.d/: create /var/run/xen if not exists
Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/python: Py_INCREF(Py_None) when returing Py_None
Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Tue, 13 Mar 2012 17:06:36 +0000 (17:06 +0000)]
libxl: always set a default value for VFB.opengl
Fixes an assertion failure.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reported-by: Fantu <fantonifabio@tiscali.it> Tested-by: Fantu <fantonifabio@tiscali.it> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
George Dunlap [Tue, 13 Mar 2012 16:26:20 +0000 (16:26 +0000)]
tools, build: Fix libaio Makefile to put files in $(DESTDIR)
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
** This is a guest visible ABI change which requires an updated guest kernel **
Use r12 to pass the hypercall number and r0-r4 for the hypercall
arguments.
Use the ISS to pass an hypervisor specific tag.
Remove passing unused registers to arm_hypercall_table: we don't have 6
arguments hypercalls and we never use 64 bit values as hypercall
arguments, 64 bit values are only contained within structs passed as
arguments.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[ use #ifndef NDEBUG, fix coding style, expand calling convention comment
slightly and added a big fat note about ABI change - ijc ] Committed-by: Ian Campbell <ian.campbell@citrix.com>
Daniel De Graaf [Tue, 13 Mar 2012 15:40:42 +0000 (15:40 +0000)]
xenstat: Use local domain names
The domain name stored in /local/domain/$domid/name is simpler to
access and is the only domain name modified by "xl rename". Use this
domain name in libxenstat's reporting.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Wei Liu [Tue, 13 Mar 2012 15:36:58 +0000 (15:36 +0000)]
libxl: fix libxl_get_cpu_topology
Fix upper bound of for loop, thus preventing memory corruption.
Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
This is information is currently not harvested from libxc.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Roger Pau Monne [Tue, 13 Mar 2012 15:23:35 +0000 (15:23 +0000)]
autoconf: add check for curses library
Check for a curses compatible library (curses or ncurses basically).
One of those is needed to compile Xen tools (gtraceview and xentop).
Modify Makefiles/sources to use configure output (fetch CURSES_LIBS
from tools/Tools.mk and header to include from tools/config.h)
Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Tim Deegan [Tue, 13 Mar 2012 15:11:00 +0000 (15:11 +0000)]
arm: Put the CPU into a sleep state in the idle loop
The ARM doesn't actually say that the WFI instruction will return
immediately if CPSR.I is clear and an instruction is pending, but
this seems to match up with how linux uses it.
Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Tim Deegan [Tue, 13 Mar 2012 15:10:58 +0000 (15:10 +0000)]
arm: new hook for late MMU setup on secondary CPUs
The boot CPU turns on W^X in setup_pagetables(). Do the same for other
CPUs after they boot. If we go to per-CPU pagetables, this is where
that will happen.
Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Tim Deegan [Tue, 13 Mar 2012 15:10:56 +0000 (15:10 +0000)]
arm: Boot secondary CPUs into C
Secondary CPUs come up directly onto the stack of the appropriate idle
vcpu; the boot CPU starts on a statically allocated stack and switches
over to the idle vcpu's one once the idle domain has been built.
Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Tim Deegan [Tue, 13 Mar 2012 15:10:53 +0000 (15:10 +0000)]
arm: More SMP bringup
Bring non-boot CPUs up as far as running on the relocated pagetables,
one at a time, before the non-relocated copy of Xen gets reused for
general memory pools.
Don't yet bring them up into C; that will happen later when stacks are
allocated.
Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Tim Deegan [Thu, 8 Mar 2012 16:40:05 +0000 (16:40 +0000)]
Use a reserved pfn in the guest address space to store mem event rings
This solves a long-standing issue in which the pages backing these rings were
pages belonging to dom0 user-space processes. Thus, if the process would die
unexpectedly, Xen would keep posting events to a page now belonging to some
other process.
We update all API-consumers in tree (xenpaging and xen-access).
This is an API/ABI change, so please speak up if it breaks your accumptions.
The patch touches tools, hypervisor x86/hvm bits, and hypervisor x86/mm bits.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Tim Deegan <tim@xen.org>
Tim Deegan [Thu, 8 Mar 2012 16:40:05 +0000 (16:40 +0000)]
Tools: Remove shared page from mem_event/access/paging interfaces
Don't use the superfluous shared page, return the event channel directly as
part of the domctl struct, instead.
In-tree consumers (xenpaging, xen-access) updated. This is an ABI/API change,
so please voice any concerns.
Known pending issues:
- pager could die and its ring page could be used by some other process, yet
Xen retains the mapping to it.
- use a saner interface for the paging_load buffer.
This change also affects the x86/mm bits in the hypervisor that process the
mem_event setup domctl.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Tim Deegan <tim@xen.org>
Eric Chanudet [Thu, 8 Mar 2012 16:04:32 +0000 (17:04 +0100)]
XENPF_set_processor_pminfo XEN_PM_CX overflows states array
Calling XENPF_set_processor_pminfo with XEN_PM_CX could cause states
array in "struct acpi_processor_power" to exceed its limit.
The array used to be reset (by function cpuidle_init_cpu()) for each
hypercall. The patch puts it back that way and adds an assertion to
make it clear in case that happens again.
Signed-off-by: Eric Chanudet <eric.chanudet@eu.citrix.com>
- convert assertion to printk() & bail
- eliminate struct acpi_processor_cx's valid member (not read anymore)
- further adjustments to one-time-only vs each-time operations in
cpuidle_init_cpu()
- don't use ACPI_STATE_Cn as array index anymore
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Jan Beulich [Thu, 8 Mar 2012 16:02:57 +0000 (17:02 +0100)]
oprofile: don't pass around redundant, easily derived arguments
Passing both a struct vcpu pointer and the corresponding struct domain
one is simply pointless, especially when intermediate functions just
forward it without themselves making use of the already obtained value.
Also constify a few function parameters.
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Andrew Cooper [Thu, 8 Mar 2012 09:23:27 +0000 (09:23 +0000)]
NMI: Command line parameter for watchdog timeout
Introduce a command parameter to set the watchtog timeout. Manually
specifying "watchdog_timeout=<seconds>" on the command line will also
turn the watchdog on. For consistency, move opt_watchdog into nmi.c
along with opt_watchdog_timeout.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
George Dunlap [Thu, 8 Mar 2012 09:17:21 +0000 (09:17 +0000)]
svm: Fake out the Bus Unit Config MSR on revF AMD CPUs
Win2k8 x64 reads this MSR on revF chips, where it wasn't publically
available; it uses a magic constant in %rdi as a password, which we
don't have in rdmsr_safe(). Since we'll ignore the later writes, just
use a plausible value here (the reset value from rev10h chips) if the
real CPU didn't provide one.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
George Dunlap [Thu, 8 Mar 2012 09:16:09 +0000 (09:16 +0000)]
x86: Add more specific logging for get_page_from_l1e failures
This patch should clarify which of the two possible reasons cause the
messages
of the form "(XEN) mm.c:908:d1 Error getting mfn 29b2b (pfn 5555555555555555)
from L1 entry 0000000029b2b067 for l1e_owner=1, pg_owner=1".
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
Jan Beulich [Wed, 7 Mar 2012 10:50:31 +0000 (11:50 +0100)]
provide a single, common implementation for get_order_from_{bytes,pages}()
All three per-architecture implementations were identical, and I cannot
see how future architectures would need any sort of customization here
(the only per-architecture aspect here is the actual PAGE_SHIFT value).
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
George Dunlap [Wed, 7 Mar 2012 07:43:02 +0000 (07:43 +0000)]
build: Don't remove user-supplied xen-version during make clean
xen/Makefile is designed to allow the user to supply a file named
xen/xen-include to change the format of xen version strings.
Unfortunately, "make clean" removes xen/xen*, which will remove this
file.
Make the clean process more targeted.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
Boris Ostrovsky [Wed, 7 Mar 2012 07:30:30 +0000 (07:30 +0000)]
x86: Use deep C states for off-lined CPUs
Currently when a core is taken off-line it is placed in C1 state
(unless MONITOR/MWAIT is used). This patch allows a core to go to
deeper C states resulting in significantly higher power savings.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com> Committed-by: Keir Fraser <keir@xen.org>
Jan Beulich [Tue, 6 Mar 2012 15:43:01 +0000 (16:43 +0100)]
x86/xenoprof: fix 32-bit guest stack handling after c/s 24537:3c0a533d3af0
32-bit guests don't have 64-bit precudrure return addresses - both
elements of struct frame_head_32bit should be 32 bits wide, not just
the frame link pointer.
Further, consolidate the whole handling here (also in the native size
guest case) to properly use guest handles and guest memory accessors.
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>