[XEN] Remove backpointer info from page type info. No longer used.
Replace with a flag for PAE final L2, needed for detecting PAE L2's
which contain Xen mappings.
Update list of privileged xenoprof operations which were not in sync
with new added functions.
Since the number of privileged operations is larger than the non
privileged ones, change the logic to list unprivileged ones instead.
Also added a few printk statements on failed xenoprof initialization
to identify the source of the problem.
Signed-off-by: Jose Renato Santos <jsantos@hpl.hp.com>
[XEN] Do not steal work from idle CPUs. This can happen
if a idle CPU is in the process of waking up.
This fix suggested by Anthony Xu <anthony.xu@intel.com> as
it can have a significant boost to HVM performance. Signed-off-by: Keir Fraser <keir@xensource.com>
In this patch, the xc_domain_dumpcore_via_callback() in xc_core.c of
libxc is modified. Previously, the xc_domain_dumpcore_via_callback()
did not respond to error when copy_from_domain_page() failed.
In other words, the dump core remained silent even if mapping the domain
memory failed and its page could not be copied. When this happened,
erroneous data had been dumped to the file without the user realizing it.
Now, it has been modified so that if copy_from_domain_page fails,
this fact is recorded in the logfile and make imcoplerte-list.
However even in such cases, the dumping will continue as before.
Signed-off-by: Ken Hironaka <hironaka.ken@soft.fujitsu.com> Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
-L| --live Live dump:
By default, xm dump does an xm pause, unpause before and
after taking the dump, respectively. This option disables
the pause/unpause and simply takes the dump.
-C :| --crash crash dump:
This executes an xm destroy after the dump file is complete.
The output path is optional, and if it is not specified, the path will be
/var/xen/dump/<domU name>.<domU ID>.core
This command uses the existant dumpCore(), which has been used for
coredump when a domU crashed.
Signed-off-by: Ken Hironaka <hironaka.ken@soft.fujitsu.com> Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Ewan Mellor [Thu, 14 Sep 2006 07:18:56 +0000 (08:18 +0100)]
Remove the '-instance' parameter from the qemu device model. Since this parameter
is not interpreted by the DM, it actually causes the DM to hang if
passed. Future device model support for the vTPM will read parameters
from the xenstore and won't need the command line parameter(s).
The patch includes a small change to the debugging output for the vTPM
module.
Ewan Mellor [Thu, 14 Sep 2006 06:57:41 +0000 (07:57 +0100)]
When redirecting the output of the echo command using '>' on bash, the
output seems to be broken up into multiple write()s (depending on the
version of busybox?). Unfortunately /dev/tpm0 needs to have the complete
command written to in one chunk. The work-around 'echo <string> > file ;
cat file > /dev/tpm0' seems to get around this problem.
The patch also removes a redundant test and error output.
[HVM] Fix an error when read from APIC registers like IRR, ISR and TMR.
From SDM3 spec, for APIC registers, all 32-bit registers should
be accessed using 128-bit aligned 32bit loads or stores.
And wider registers (64-bit or 256-bit) must be accessed using
multiple 32-bit loads or stores.
In old APIC virtualization code, we use IRR, ISR and TMR which are
256-bit registers as contiguous bit maps other than multiple 32-bit.
So guest always fetch error values.
Original patch was:
* Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
* Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
* Signed-off-by: Eddie Dong <eddie.dong@intel.com>
If an error occurs, such as wget failing because the site (or proxy)
is unavailable, the script will now terminate, rather than trying
to soldier on without any real hope of success.
mkbuildtree should really get the same treatment, but that
can wait for another day.
LC_ALL=C is needed to ensure C locale output in date.
Without this locale-specific, and thus potentially
non-ascii data will end up in include/xen/compile.h which
is displayed on the (often only ascii capable) terminal
at bootup. In any case, its good to have a consistent bootup
message, regadless of the locale prevailing at build.
[XEN] Allow direct reads of port 0x61 by any guest.
Often used by BIOS code which may be executed e.g., when starting
an X server.
From: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir@xensource.com>
Better PIC code production: Using #pragma GCC visibility, *all*
data references benefit, not just the ones to objects defined in the
same translation unit. However, as this now is a header file change,
detection logic cannot be used as nicely, so I guess we want to keep the
previous change and add this one on top.
[HVM] Add broadcast destination for physical destination mode in
VLAPIC.
Based on a patch from Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Keir Fraser <keir@xensource.com>
Add new operation XENOPROF_get_buffer in xenoprof hypercall. Also
remove buffer related arguments from XENOPROF_init operation. This
is the first step to allow dynamic mapping/unmapping of xenoprof
buffers to
enable profiling a domain in passive mode and then switch to active
mode (or vice-versa). Currently a domain can only be profiled in a
single mode. Also passive domains cannot have oprofile builtin the
kernel or passive profiling will fail.
Signed-off-by: Jose Renato Santos <jsantos@hpl.hp.com>
[CONSOLED] Shouldn't call domain_create_ring() for a domU which is shutting down.
There is a race condition between domain_create_ring() and the removal
of the domU entry from xenstore. If the removal of the domU entry from xenstore
comes later than the first xs_gather() call in domain_create_ring(), it will go
on and bind the evtchn port to the dying domU, which will cause below error
message: (XEN) (file=event_channel.c, line=144) EVTCHNOP failure: domain 0, error -22, line 144
Do not define dma_supported to platform_dma_supported when building
the Xen kernel. This happend to work for DIG builds because the
swiotlb.c version of dma_supported compiles to identical code as
arch/i386/kernel/pci-dma-xen.c so the linker didn't complain.
Steven Hand [Tue, 12 Sep 2006 10:09:22 +0000 (11:09 +0100)]
This patch fixes return codes for the acm-related Xen management scripts
(error conditions) and addresses minor issues that 'pycheck' complains
about. It is tested with xm-test and by manually running the xm
commands. It also handles the return case (reported by Masaki Kanno)
that was missed in the originally patch.
Ian Campbell [Sat, 9 Sep 2006 19:48:16 +0000 (20:48 +0100)]
[LINUX] Move .bss declaration after .data.* in x86_64 linker script.
Older binutils (prior to 2.16) have a problem with the linker script resulting
from the change introducing explicit segment maps. Namely does the
respective linker not properly handle @nobits sections (i.e. .bss) sitting
between @progbits ones (i.e. .data.*). The .bss section must therefore
be moved past all initialized sections (as is already the case on i386).
Replacement patch attached.
From: Jan Beulich <jbeulich@novell.com> Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
[XEN] Remove backpointer info from page type info. No longer used.
Replace with a flag for PAE final L2, needed for detecting PAE L2's
which contain Xen mappings. Signed-off-by: Keir Fraser <keir@xensource.com>
[HVM] pv drivers: Allocate hypercall area as an executable region.
We have to use __vmalloc() and __PAGE_KERNEL because vmalloc_exec()
and PAGE_KERNEL_EXEC are not exported to modules. Signed-off-by: Keir Fraser <keir@xensource.com>
__gnttab_unmap_grant_ref verifies the validity of the handle by
checking it against maptrack_limit and making sure that the flags
field at the given handle is non-zero.
This means that the flags of an unused handle should be zero in
order to prevent unused handles from getting past this check.
However, we don't seem to set it to zero to begin with when we
allocate the maptrack table. This could potentially lead to the
corruption of the other domain's internal state, and/or the hypervisor's
internal state.
This patch makes sure that it is zeroed.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
[XEN] Fix bitops inline asm to specify that memory is clobbered.
Necessary because the modified word may not be the one directly
addressed by the memory parameter (since the parameter actually
points at an array, not a scalar value).
The change to set_bit/__set_bit is reported to fix an issue
on x460 hardware, as reported (and this fix suggested) by
Ryan Harper <ryanh@us.ibm.com>
Ewan Mellor [Tue, 5 Sep 2006 13:17:50 +0000 (14:17 +0100)]
Fix the memory reservation calculations. Introduce a new architecture-specific
call to determine the initial reservation separately from the amount of
memory to be freed up by ballooning -- when using QEMU, we lose 8 MiB to video
RAM, which must be accounted for when ballooning, but _not_ accounted for
within the domain's memory allocation.
Tidy this code up using the new architecture-specific interface arrangement.
Ewan Mellor [Tue, 5 Sep 2006 13:17:49 +0000 (14:17 +0100)]
The attached patch prevents a domain with an attached vTPM from doing
local migration since this does not seem to work correctly (see tests in
xm test suite). If no vTPM has been attached, the local migration
proceeds as usual.
This patch supports the hwclock on Domain-0.
It adds the following EFI runtime service emulations for the
hwclock support.
1. SetTime
2. Get/SetWakeupTime
Tim Deegan [Sat, 2 Sep 2006 11:11:54 +0000 (12:11 +0100)]
[XEN] Fix mapping of p2m into monitor tables for external-mode guests.
The previous code could map frame zero into the P2M table on PAE hosts. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
This fixes the sparse tree buildconfigs to allow xenU to build
automatically. There's no need to force netdev front/back on from
the arch Kconfig file anymore. Based on patch from Akio Takebe &
Yoshiro Fujita.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
This patch makes frontend drivers being shutdown when devices_shutdown()
is called and walks down the device tree. Most of it is handled by the
xenbus core, which got a new function for the bus->shutdown callback.
[XENBUS] Introduce new "online" node for backend drivers.
Driver changes: Make backend drivers check it when entering Closed
state, only unregister devices when the "online" node is either "0" or
not present. The later maintains backward compatibility.
Tools changes: Update "online" node when creating and hot-unplugging
devices.
Background: When kexec'ing a new kernel, the old kernel's frontend
driver will shutdown, but the backend device should *NOT* disappear
due to that, so the new kernel instance can reconnect.
[XEN] Clean up BASE_DISALLOW_MASK and fix for x86/64.
Original patch from Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Keir Fraser <keir@xensource.com>
[XEN] interfaces: Remove explicit alignment/padding from domctl/sysctl hypercalls.
Generation of 32-on-64 compat shims is being semi-automated for all
other hypercalls. It seems sensible to teat all hypercalls uniformly
and do the same for the control-stack management interfaces too.
[LINUX] /proc/iomem should not be initialised from pseudophysical e820 map.
This is because it should only contain real I/O memory address ranges,
otherwise we can get false conflicts between a real I/O range and a
'pseudophysical' RAM range, causing drivers to fail to work in a domU.
Also prevent kernel code/data being requested as iomem resources --
they are not contiguous in 'io memory' space so this would not make
sense.