]> xenbits.xensource.com Git - xen.git/log
xen.git
15 years agoAdded tag 4.0.0-rc7 for changeset b8f8b07e0076
Keir Fraser [Tue, 23 Mar 2010 07:32:04 +0000 (07:32 +0000)]
Added tag 4.0.0-rc7 for changeset b8f8b07e0076

15 years agoUpdate Xen version to 4.0.0-rc7
Keir Fraser [Tue, 23 Mar 2010 07:31:48 +0000 (07:31 +0000)]
Update Xen version to 4.0.0-rc7

15 years agoUpdate QEMU_TAG to 73cef2cca413c17f314724c66194315038ea66c3
Keir Fraser [Tue, 23 Mar 2010 07:29:51 +0000 (07:29 +0000)]
Update QEMU_TAG to 73cef2cca413c17f314724c66194315038ea66c3

15 years agoxend: fix traceback in pci.py
Keir Fraser [Tue, 23 Mar 2010 07:29:10 +0000 (07:29 +0000)]
xend: fix traceback in pci.py

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
15 years agox86_32: Relocate multiboot modules to below 1GB.
Keir Fraser [Tue, 23 Mar 2010 07:28:33 +0000 (07:28 +0000)]
x86_32: Relocate multiboot modules to below 1GB.

Otherwise Xen cannot access them later during boot. GRUB2 places
modules as high as possible below 4GB, which has been causing boot
failure.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoNo cpu_add_remove_lock in do_boot_cpu.
Keir Fraser [Mon, 22 Mar 2010 10:29:42 +0000 (10:29 +0000)]
No cpu_add_remove_lock in do_boot_cpu.

The do_boot_cpu() will be called when system booting or CPU
online. When system booting, we don't need hold this lock. When system
online, the lock is held already by cpu_up.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
15 years agoDo not spin on locks that may be held by stop_machine_run() callers.
Keir Fraser [Mon, 22 Mar 2010 10:29:13 +0000 (10:29 +0000)]
Do not spin on locks that may be held by stop_machine_run() callers.

Currently stop_machine_run() will try to bring all CPUs to softirq
context, with some locks held, like xenpf_lock or cpu_add_remove_lock
etc. However, if another CPU is trying to get these locks, it may
cause deadlock.

This patch replace all such spin_lock with spin_trylock. For
xenpf_lock and sysctl_lock, we try to use hypercall_continuation, so
that we will not cause trouble to user space tools. For
cpu_hot_remove_lock, we simply return EBUSY if failure, since it will
only impact small number of user space tools.

In the end, we should try to make the stop_machine_run as spinlock
free.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
15 years agons16550: Do not re-init active timer on S3 resume.
Keir Fraser [Mon, 22 Mar 2010 10:24:17 +0000 (10:24 +0000)]
ns16550: Do not re-init active timer on S3 resume.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoFix vcpu hotplug bug: transfer vcpu_avail hex string to qemu
Keir Fraser [Sat, 20 Mar 2010 07:35:04 +0000 (07:35 +0000)]
Fix vcpu hotplug bug: transfer vcpu_avail hex string to qemu

Currently qemu has a bug: When maxvcpus > 64, qemu will get wrong
vcpu bitmap (s->cpus_sts[i]) since it only get bitmap from a long
variable.

This patch, cooperate with another qemu patch, is to fix this bug.
This patch transfer a vcpu_avail string in a hex string format, so
that at qemu side it's more easier to get vcpu bitmap from hex string,
especially when many vcpus, like more than 64.

(Also update QEMU_TAG for matching qemu-side update)

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
15 years agocpufreq: make non-verbose by default
Keir Fraser [Thu, 18 Mar 2010 11:03:07 +0000 (11:03 +0000)]
cpufreq: make non-verbose by default

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agox86: fix dom0 S3 when x2apic is used.
Keir Fraser [Thu, 18 Mar 2010 11:02:25 +0000 (11:02 +0000)]
x86: fix dom0 S3 when x2apic is used.

1) Some variables and functions in xen/arch/x86/genapic/x2apic.c
should not be marked with __init* as they will be used during s3
resume;
2) In do_suspend_lowlevel -> restore_rest_processor_state ->
mcheck_init, lapic is accessed, but x2apic hasn't been re-enabled yet
(x2apic is re-enabled() in device_power_up -> lapic_resume). The patch
moves mcheck_init to a later place.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
15 years agoFixes for 21040:b64a8d2a80ad "support affinity for >64 CPUs"
Keir Fraser [Thu, 18 Mar 2010 07:44:21 +0000 (07:44 +0000)]
Fixes for 21040:b64a8d2a80ad "support affinity for >64 CPUs"

Signed-off-by: James (Song Wei) <jsong@novell.com>
15 years agoImprove graphical console performance
Keir Fraser [Wed, 17 Mar 2010 14:10:43 +0000 (14:10 +0000)]
Improve graphical console performance

As it is pretty pointless to clear unused parts of a line over and
over again, keep track of how much of a line was actually written
to and avoid clearing parts of the screen that are known to already
be clear. With this, scrolling speed becomes comparable to that of
Linux' VESA console.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agox86: suppress pointless Xen messages from ioapic_guest_write()
Keir Fraser [Wed, 17 Mar 2010 14:09:55 +0000 (14:09 +0000)]
x86: suppress pointless Xen messages from ioapic_guest_write()

Previously, these messages were only issued when old and new RTE
differed. Make it so again (requiring adjustment of the guest provided
RTE as that no longer holds a real vector).

While at it, also make the "allocated vector for irq" message more
useful and occur when what it says really happened.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoFix a race condition for cpufreq dbs timer while S3 resuming
Keir Fraser [Wed, 17 Mar 2010 09:18:34 +0000 (09:18 +0000)]
Fix a race condition for cpufreq dbs timer while S3 resuming

The cpufreq_dbs_timer_suspend/resume may race with dbs_timer_init
while s3 resuming before this patch.
This patch along with cset 21030 fix the bug 1586
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1586.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
15 years agolibxc: Support set affinity for more than 64 CPUs.
Keir Fraser [Wed, 17 Mar 2010 09:17:27 +0000 (09:17 +0000)]
libxc: Support set affinity for more than 64 CPUs.

There are more than 64 cpus on new intel platform especially on NUMA
system, so that we need break the pcpu limit (that is 64)  when set
affinity of a VCPU.

Signed-off-by: James (song wei) <jsong@novell.com>
15 years agoVT-d: reduce default verbosity
Keir Fraser [Wed, 17 Mar 2010 08:35:13 +0000 (08:35 +0000)]
VT-d: reduce default verbosity

Introduce a new sub-option "verbose" to "iommu=", and hide most
(debugging) messages when that option is not specified. Particularly
messages printed after time management was initialized can, on
sufficiently large systems and with a graphical console, lead to
time management issues (therefore a call to process_pending_softirqs()
also gets added in case the new sub-option is being used).

While touching that code, also convert all improper uses of gdprintk()
to dprintk(), and convert all boolean iommu config variables to bool_t
residing in the .data.read_mostly section.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoIncrease default console ring allocation size and reduce default verbosity
Keir Fraser [Wed, 17 Mar 2010 08:34:16 +0000 (08:34 +0000)]
Increase default console ring allocation size and reduce default verbosity

In order to have better chance that relevant messages fit into the
ring buffer, allocate a dynamic (larger) one in more cases, and make
the default allocation size depend on both the number of CPUs and the
log level. Also free the static buffer if a dynamic one was obtained.

In order for "xm dmesg" to retrieve larger buffers, eliminate
pyxc_readconsolering()'s 32k limitation resulting from the use of a
statically allocated buffer.

Finally, suppress on x86 most per-CPU boot time messages (by default,
most of them can be re-enabled with a new command line option
"cpuinfo", some others are now only printed more than once when there
are inconsistencies between CPUs). This reduces both boot time (namely
when a graphical console is in use) and pressure on the console ring
and serial transmit buffers.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxend: Remove warning message from xend.log
Keir Fraser [Wed, 17 Mar 2010 08:31:17 +0000 (08:31 +0000)]
xend: Remove warning message from xend.log

When I created a domain, I saw the following warning message in
xend.log.  This patch removes the message from xend.log.

[2010-03-16 19:04:16 3623] WARNING (XendConfig:872) Unconverted key:
Description

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
15 years agoblktap/fs-back: Build fixes for Fedora 13
Keir Fraser [Mon, 15 Mar 2010 17:08:29 +0000 (17:08 +0000)]
blktap/fs-back: Build fixes for Fedora 13

1. Some files use stat, mkfifo, mkdir etc. without including
sys/stat.h

2. Some programs link against libpthread without a -lpthread compile
option. The compile used to work if this library happened to be used
by one of the other libraries that was being linked against, but
Fedora 13 has stopped allowing this.

From: M A Young <m.a.young@durham.ac.uk>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agox86: adjust Dom0 initial memory allocation strategy
Keir Fraser [Mon, 15 Mar 2010 13:25:30 +0000 (13:25 +0000)]
x86: adjust Dom0 initial memory allocation strategy

Simply trying order-9 allocations until they won't succeed anymore
may consume unnecessarily much memory from the DMA zone (since the
page allocator will try to fulfill the request by using memory from
that zone when only lower order memory blocks are left in all other
zones). To avoid using DMA zone memory, make alloc_chunk() try to
allocate a second smaller chunk and use that one in favor of the
first one if it came from a higher addressed memory. This way, all
memory outside the DMA zone will be consumed before eating into that
zone.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoReduce boot-time memory fragmentation
Keir Fraser [Mon, 15 Mar 2010 13:24:33 +0000 (13:24 +0000)]
Reduce boot-time memory fragmentation

On certain NUMA configurations having init_node_heap() consume the
first few pages of a new node's memory for internal data structures
leads to unnecessary memory fragmentation, which can - with
sufficiently many nodes - result in there not remaining enough memory
below 4G for Dom0 to set up its swiotlb and PCI-consistent buffers.

Since alloc_boot_pages() generally consumes from the end of available
regions, make init_node_heap() prefer the end of such regions too (so
that fragmentation occurs at only one end of a region).

(Adjustment from first version: Use the tail of the region when the
end addresses alignment is less or equal to the beginning one's, not
just when it's less.)

Further, in order to prefer allocations from higher memory locations,
insert memory regions in reverse order in end_boot_allocator(), with
the exception of inserting one region residing on the boot CPU's node
first (for the statically allocated structures - used for the first
node seen - to be used for this node).

Finally, reduce MAX_ORDER on x86 to the maximum useful value (1Gb), so
that the reservation of a page on node boundaries (again leading to
fragmentation) can be avoided as much as possible (having node
boundaries on less the 1Gb aligned addresses is expected to be rare,
if found in practice at all).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agopygrub: further improve grub2 support
Keir Fraser [Mon, 15 Mar 2010 13:23:07 +0000 (13:23 +0000)]
pygrub: further improve grub2 support

      * Improve syntax error messages to say what actually went wrong
        instead of giving an arbitrary and basically useless
        integer.
      * Improve handling of quoted values used with the "set" command,
        previously only the default variable was special cased to
        handle quoting.
      * Allow for extra options to the menuentry command, syntax now
        appears to be
                        menuentry "TITLE" --option1 --option2 {...}

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
15 years agolibxenlight: fix segfault when domid_to_name returns NULL
Keir Fraser [Mon, 15 Mar 2010 13:22:06 +0000 (13:22 +0000)]
libxenlight: fix segfault when domid_to_name returns NULL

The function libxl_domid_to_name() can return NULL if the path
/local/domain/%d/name does not exist.  This causes a segfault if the
NULL name is later passed as a value to libxl_xs_writev().  I'm
hitting this making a call to libxl_device_vfb_add() from my graphical
switcher application.

This patch modifies xs_writev() and libxl_xs_writev() to skip NULL
values.

Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
15 years agoFix incremental access to hypervisor console log
Keir Fraser [Mon, 15 Mar 2010 13:19:16 +0000 (13:19 +0000)]
Fix incremental access to hypervisor console log

"xenconsoled --log=hv" outputs duplicated messages to
/var/log/xen/hypervisor.log.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
15 years agox86: Fix possible S3 suspend hangs
Keir Fraser [Mon, 15 Mar 2010 13:17:38 +0000 (13:17 +0000)]
x86: Fix possible S3 suspend hangs

It is possible for cpu to become offlined before irq disabled in idle
loop, which will cause this cpu stay in C state and can't wakeup to
play dead.

Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Yu Ke <ke.yu@intel.com>
15 years agohotplug: Avoid race condition when creating or destroying network bridges
Keir Fraser [Mon, 15 Mar 2010 13:16:35 +0000 (13:16 +0000)]
hotplug: Avoid race condition when creating or destroying network bridges

I saw the following message when I created or destroyed two bridges by
using network-bridge script at same time.  Of course names of the
bridges are different.  But, a temporal name "tmpbridge" is used by
the script to create or destroy the bridges.  I think that the message
was shown by "tmpbridge".

  SIOCSIFNAME: File exists

This patch avoids race condition when creating or destroying the
bridges.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
15 years agox86: adjust available memory calculation for Dom0 construction
Keir Fraser [Thu, 11 Mar 2010 17:40:35 +0000 (17:40 +0000)]
x86: adjust available memory calculation for Dom0 construction

With a large number of CPUs, the amount of memory needed to construct
the vCPU structures for Dom0 becomes significant and hence should be
accounted for when calculating the amount of memory to pass to Dom0.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Add code comments and clean up compute_dom0_nr_pages() invocation.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoVT-d: various initialization fixes
Keir Fraser [Thu, 11 Mar 2010 17:15:54 +0000 (17:15 +0000)]
VT-d: various initialization fixes

Detect invalid/unsupported configurations in iommu_alloc() - offsets
read from hardware must not lead to exceeding a single page (since
only that much gets mapped). This covers the apparently not uncommon
case of the address pointed to by a DMAR reading as all ones (Linux
for example also checks for this).

Further correct error handling of that function: Without storing the
allocated "struct iommu" instance in the drhd, iommu_free() won't do
anything, and hence all successfully set up pieces would be leaked.

Also keep iommu_free() from calling destroy_irq() when no irq was
ever set up.

Additionally, clear_fault_bits() has no need to read the capabilities
field from I/O memory - it's already cached in "struct iommu".

Finally, simplify print_iommu_regs() and its output, and actually use
this function.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxsm/flask: Eliminate "array subscript above array bounds" warning
Keir Fraser [Thu, 11 Mar 2010 17:15:27 +0000 (17:15 +0000)]
xsm/flask: Eliminate "array subscript above array bounds" warning

gcc 4.4 incorrectly reports an "array subscript above array bounds"
warning in the flask policydb code, causing the build to fail with
FLASK_ENABLE=y.  Rework the code slightly to make it go away.

Signed-off-by: Stephen D. Smalley <sds@tycho.nsa.gov>
15 years agoiommu: clear the iommu_* variables to 0 when iommu is not enabled.
Keir Fraser [Thu, 11 Mar 2010 08:09:58 +0000 (08:09 +0000)]
iommu: clear the iommu_* variables to 0 when iommu is not enabled.

With "iommu=0" xen parameter, the 3 iommu_* variables are still left
to the default value 1 -- this is misleading...

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
15 years agoFix 21020:3198a2e81d38
Keir Fraser [Thu, 11 Mar 2010 08:09:37 +0000 (08:09 +0000)]
Fix 21020:3198a2e81d38

This has a pretty serious bug.  ioapic_to_iommu() gets returned
drhd->iommu.  However, drhd->iommu isn't allocated until part of
iommu_setup(), which is called after enable_x2apic().  Has this ever
worked?

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
15 years agoVTd: Ignore HPET/IOAPIC decls in DRHD scopes
Keir Fraser [Thu, 11 Mar 2010 08:08:32 +0000 (08:08 +0000)]
VTd: Ignore HPET/IOAPIC decls in DRHD scopes

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
15 years agoAdded tag 4.0.0-rc6 for changeset b4a1832a916f
Keir Fraser [Tue, 9 Mar 2010 18:18:19 +0000 (18:18 +0000)]
Added tag 4.0.0-rc6 for changeset b4a1832a916f

15 years agoUpdate Xen version to 4.0.0-rc6 4.0.0-rc6
Keir Fraser [Tue, 9 Mar 2010 18:18:05 +0000 (18:18 +0000)]
Update Xen version to 4.0.0-rc6

15 years agoIntel VT-D: Don't turn x2APIC if there is a missing DRHD entry for the IOAPIC.
Keir Fraser [Tue, 9 Mar 2010 17:58:11 +0000 (17:58 +0000)]
Intel VT-D: Don't turn x2APIC if there is a missing DRHD entry for the IOAPIC.

Follow the Linux kernel lead in which the x2APIC is only turned on
only if there is an DRHD entry for all IOAPICs in the system. If we
don't do this we might enable x2APIC and see various devices not
covered by the IOAPIC mentioned in DRHD, not receive any interrupts.

From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agotmem: typo causes incorrect return on out-of-memory
Keir Fraser [Tue, 9 Mar 2010 17:53:01 +0000 (17:53 +0000)]
tmem: typo causes incorrect return on out-of-memory

This classic typo in tmem would result in a false positive
report on a tmem "put" operation if a (unfragmented) page
of memory is completely unavailable.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
15 years agostdvga: avoid bogus warning message
Keir Fraser [Tue, 9 Mar 2010 12:34:39 +0000 (12:34 +0000)]
stdvga: avoid bogus warning message

Prevents stdvga to print the 'unsupported mmio request type'
warning when the actual request type is 'IOREQ_TYPE_COPY'.
This avoids confusion.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
15 years agoFix grant table debug key.
Keir Fraser [Tue, 9 Mar 2010 12:32:04 +0000 (12:32 +0000)]
Fix grant table debug key.

Must skip domains with gt_version==0.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agox86: Disable VCPUOP_register_vcpu_time_memory_area.
Keir Fraser [Tue, 9 Mar 2010 12:29:10 +0000 (12:29 +0000)]
x86: Disable VCPUOP_register_vcpu_time_memory_area.

Its implementation is buggy and causes memory corruption.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoDisable debug build by default.
Keir Fraser [Tue, 9 Mar 2010 10:00:37 +0000 (10:00 +0000)]
Disable debug build by default.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoAdd cpufreq sanity check
Keir Fraser [Tue, 9 Mar 2010 09:59:59 +0000 (09:59 +0000)]
Add cpufreq sanity check

This fixes bug 1585 http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=3D1585

root cause: with incorrect BIOS info, cpufreq driver may not start. in
this case, if user use xenpm to manipulate cpufreq driver, NULL
pointer will cause xen panic. this patch add the sanity check and
warning info to fix this issue.

Signed-off-by: Yu Ke <ke.yu@intel.com>
15 years agohvm: correct time offset update in RTC write emulation
Keir Fraser [Tue, 9 Mar 2010 09:57:25 +0000 (09:57 +0000)]
hvm: correct time offset update in RTC write emulation

mktime takes a month in 1..12 form while tm->tm_mon contains 0..11 so
we need to add 1. Without this fix setting the month back or forward a
month inside the guest would lead to the wrong number of days being
added/subtracted.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
15 years agox86: Increase the default NR_CPUS to 128.
Keir Fraser [Tue, 9 Mar 2010 09:54:39 +0000 (09:54 +0000)]
x86: Increase the default NR_CPUS to 128.

We have newer systems which have more than 64 CPUs, and users
often complain some cpus can't be waken up when play with Xen.
Certainly, MAX_PHYS_CPUS option also can support more CPUs, but
it is still inconvenient for them, so change the default value to
128.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
15 years agolibxl: Do not delete checked-in flex/bison outputs.
Keir Fraser [Mon, 8 Mar 2010 21:34:43 +0000 (21:34 +0000)]
libxl: Do not delete checked-in flex/bison outputs.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agox86: a little bit of cleanup
Keir Fraser [Mon, 8 Mar 2010 19:11:47 +0000 (19:11 +0000)]
x86: a little bit of cleanup

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoFix compat mode type checking macros for gcc 4.5
Keir Fraser [Mon, 8 Mar 2010 19:11:00 +0000 (19:11 +0000)]
Fix compat mode type checking macros for gcc 4.5

Just like with the __RING_SIZE() macro, the compat mode type checking
macros also need changing in order to work with gcc 4.5.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agocpu hotplug: Add the missed rcu init for new added CPU
Keir Fraser [Mon, 8 Mar 2010 19:10:27 +0000 (19:10 +0000)]
cpu hotplug: Add the missed rcu init for new added CPU

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
15 years agoPV-GRUB: Fix gzip support and iso support on x86_64
Keir Fraser [Mon, 8 Mar 2010 19:09:23 +0000 (19:09 +0000)]
PV-GRUB: Fix gzip support and iso support on x86_64

Signed-off-by: Samuel Thibault <sthibault@debian.org>
15 years agoxenstore: Resolve gcc4.5 type error
Keir Fraser [Sat, 6 Mar 2010 13:31:42 +0000 (13:31 +0000)]
xenstore: Resolve gcc4.5 type error

Without this, gcc 4.5 complains with,
error: case value '3' not in enumerated type 'const enum xs_perm_type'

Signed-off-by: Charles Arnold <carnold@novell.com>
15 years agoblktap: provide a variant of __RING_SIZE() that is an integer constant expression
Keir Fraser [Sat, 6 Mar 2010 13:31:03 +0000 (13:31 +0000)]
blktap: provide a variant of __RING_SIZE() that is an integer constant expression

Without this new variant, gcc 4.5 won't compile where this is being
used to specify array sizes.  See also c/s 20975.

Signed-off-by: Charles Arnold <carnold@novell.com>
15 years agoxend: XenAPI does not support pvSCSI multipath
Keir Fraser [Fri, 5 Mar 2010 14:42:25 +0000 (14:42 +0000)]
xend: XenAPI does not support pvSCSI multipath

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
15 years agoFix Makefile targets that generate several files at once
Keir Fraser [Fri, 5 Mar 2010 14:40:19 +0000 (14:40 +0000)]
Fix Makefile targets that generate several files at once

In a few places in the tree the Makefiles have constructs like this:
   one_file another_file:
       $(COMMAND_WHICH_GENERATES_BOTH_AT_ONCE)
This is wrong, because make will run _two copies_ of the same command
at once.  This generally causes races and hard-to-reproduce build
failures.

Notably, `make -j4' at the top level will build stubdom libxc twice
simultaneously!

In this patch we replace the occurrences of this construct with the
correct idiom:
   one_file: another_file
   another_file:
       $(COMMAND_WHICH_GENERATES_BOTH_AT_ONCE)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
15 years agopygrub: Fix grub2 support when config is on a separate /boot partition
Keir Fraser [Fri, 5 Mar 2010 14:39:25 +0000 (14:39 +0000)]
pygrub: Fix grub2 support when config is on a separate /boot partition

Signed-off-by: David Markey <david@dmarkey.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
15 years agoxl: Fix undefined behaviour when pci not specified in input file
Keir Fraser [Fri, 5 Mar 2010 14:35:44 +0000 (14:35 +0000)]
xl: Fix undefined behaviour when pci not specified in input file

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
15 years agoCommit output from flex for benefit of prehistoric people
Keir Fraser [Fri, 5 Mar 2010 14:35:09 +0000 (14:35 +0000)]
Commit output from flex for benefit of prehistoric people

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agovt-d: ensure x2apic is not enabled accidently if no DRHD at all.
Keir Fraser [Fri, 5 Mar 2010 14:31:14 +0000 (14:31 +0000)]
vt-d: ensure x2apic is not enabled accidently if no DRHD at all.

Thanks to Jan Beulich for pointing this out.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
15 years ago[PV-GRUB DOC] Add details to PV-GRUB documentation
Keir Fraser [Fri, 5 Mar 2010 14:30:45 +0000 (14:30 +0000)]
[PV-GRUB DOC] Add details to PV-GRUB documentation

Add a couple of documentation details about PV-GRUB support

- the menu.lst content can be passed as a ramdisk.
- virtual partitions are not supported.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
15 years agox86-64: fix hotplug fault handling for 32-bit domains' M2P range
Keir Fraser [Wed, 3 Mar 2010 17:41:58 +0000 (17:41 +0000)]
x86-64: fix hotplug fault handling for 32-bit domains' M2P range

- handle only when memory hotplug regions were actually found
- fix off-by-one error in fault handler's sanity checking
- use first L4 table entry

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxentop: tmem: no stats for non-tmem domains
Keir Fraser [Wed, 3 Mar 2010 17:40:48 +0000 (17:40 +0000)]
xentop: tmem: no stats for non-tmem domains

In xentop, don't re-use and print stale data of previous tmem
domain for subsequent non-tmem domain.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
15 years agoFix domain exit actions that contain hyphen
Keir Fraser [Wed, 3 Mar 2010 17:40:22 +0000 (17:40 +0000)]
Fix domain exit actions that contain hyphen

Domain exit actions that contain a hyphen (e.g. rename-restart) were
not being detected properly when xm is configured to use xenapi.
Domain config containing on_crash=3D"rename-restart" results in

xen53:~ # xm new /tmp/domU.config
Using config file "/tmp/domU.config".
Unexpected error: <type 'exceptions.TypeError'>

This patch fixes the raised exception and at the same time
handles the replacement of hyphen with underscore properly.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
15 years agoReplace config file parser for "xl"
Keir Fraser [Wed, 3 Mar 2010 17:39:22 +0000 (17:39 +0000)]
Replace config file parser for "xl"

This provides a replacement config file parser for "xl" based on bison
and flex.

Benefits:
  * proper error reporting with line numbers
  * parser can understand nearly all "xm" configuration files directly
     (doesn't understand Python code but should do everything else)
  * parser also understands the ;-infested "xl" style files
  * removes the dependency on libconfig
  * better checking for certain kinds of mistakes
  * eliminates the strange "massage file and try again" code

This is intended to support all config files currently supported by
"xl" and almost all files supported by "xm".  (NB that whether a
feature works depends on the implementation of that feature in
xl/libxl of course.)

This patch also introduces a new library "libxlutil" which is mainly
for the benefit of "xl".  Users of libxl do not need to use libxlutil,
but they can do so if they want to parse "xl" files without being
"xl".

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
15 years agox86: use key handler scratch buffer in dump_irqs()
Keir Fraser [Tue, 2 Mar 2010 14:05:35 +0000 (14:05 +0000)]
x86: use key handler scratch buffer in dump_irqs()

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agox86/acpi: Add a missing CR in printk
Keir Fraser [Tue, 2 Mar 2010 13:43:48 +0000 (13:43 +0000)]
x86/acpi: Add a missing CR in printk

Signed-off-by: Wei Gang <gang.wei@intel.com>
15 years agoUpdate Xen version to 4.0.0-rc6-pre
Keir Fraser [Tue, 2 Mar 2010 13:42:55 +0000 (13:42 +0000)]
Update Xen version to 4.0.0-rc6-pre

15 years agoAdded tag 4.0.0-rc5 for changeset 92f2ee87e501
Keir Fraser [Mon, 1 Mar 2010 16:50:30 +0000 (16:50 +0000)]
Added tag 4.0.0-rc5 for changeset 92f2ee87e501

15 years agoUpdate Xen version to 4.0.0-rc5 4.0.0-rc5
Keir Fraser [Mon, 1 Mar 2010 16:50:26 +0000 (16:50 +0000)]
Update Xen version to 4.0.0-rc5

15 years agoRevert C/S 20966 "Disable memory mapping warnings when stub domain is used."
Keir Fraser [Mon, 1 Mar 2010 12:00:11 +0000 (12:00 +0000)]
Revert C/S 20966 "Disable memory mapping warnings when stub domain is used."

It was ealier resolved by C/S 20720 and C/S 20751.
This fix was backported to xen-3.4-testing.

Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
15 years agoRevert 20954:b4041e7bbe1b "paging_domctl: Add missing breaks in switch stmt"
Keir Fraser [Fri, 26 Feb 2010 17:09:50 +0000 (17:09 +0000)]
Revert 20954:b4041e7bbe1b "paging_domctl: Add missing breaks in switch stmt"

This fixed a fairly innocuous bug (OP_ENABLE/OP_OFF both don't work
properly) but unmasked a much nastier one (turning off shadow mode on
a PV guest crashes the hypervisor).

So, for now, we pick the less of two evils. We don't really much rely
on OP_ENABLE/OP_OFF anyway, as it happens.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agox86: fix number of array elements calculation in
Keir Fraser [Fri, 26 Feb 2010 14:06:16 +0000 (14:06 +0000)]
x86: fix number of array elements calculation in
XEN_DOMCTL_getpageframeinfo3 handler

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoACPI S3: fix S3 resume fail on system w/ msi capable hpet
Keir Fraser [Fri, 26 Feb 2010 14:05:32 +0000 (14:05 +0000)]
ACPI S3: fix S3 resume fail on system w/ msi capable hpet

Don't re-allocate memory for irq_channel which will cause a BUG_ON in
hpet_msi_write, and make sure hpet_setup_msi_irq() executed during S3
resuming.

Signed-off-by: Wei Gang <gang.wei@intel.com>
15 years agox86_32: Fix build after 20983:94535cc63835
Keir Fraser [Fri, 26 Feb 2010 08:13:02 +0000 (08:13 +0000)]
x86_32: Fix build after 20983:94535cc63835

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agox86 numa: Fix post-boot ACPI SLIT accesses.
Keir Fraser [Thu, 25 Feb 2010 21:03:26 +0000 (21:03 +0000)]
x86 numa: Fix post-boot ACPI SLIT accesses.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
15 years agox86 numa: Fix i386 to not do bogus mfn_to_virt(alloc_boot_pages(...))
Keir Fraser [Thu, 25 Feb 2010 21:00:54 +0000 (21:00 +0000)]
x86 numa: Fix i386 to not do bogus mfn_to_virt(alloc_boot_pages(...))

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoACPI: workaround for S3 fail in two facs tables case
Keir Fraser [Thu, 25 Feb 2010 20:56:43 +0000 (20:56 +0000)]
ACPI: workaround for S3 fail in two facs tables case

Some legacy BIOS which support ACPI2.0+ may expose two FACS tables via
both FADT->FIRMWARE_CTRL and FADT->X_FIRMWARE_CTRL, but only lookup S3
waking_vector in the first one.

Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoVT-d: Fix ia64 build for 20974:3b475d9ed6b5
Keir Fraser [Thu, 25 Feb 2010 11:54:19 +0000 (11:54 +0000)]
VT-d: Fix ia64 build for 20974:3b475d9ed6b5

This patch fixes the following error on ia64:
  iommu.c: In function 'init_vtd_hw':
  iommu.c:1831: error: 'nr_ioapics' undeclared (first use in this
  function)

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
15 years agolibxc: Pre-zero argument structures for map/unmap_pirq operations.
Keir Fraser [Thu, 25 Feb 2010 11:52:23 +0000 (11:52 +0000)]
libxc: Pre-zero argument structures for map/unmap_pirq operations.

From: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agox86: allow SRAT to be used on 32-bit systems with memory beyond 4G
Keir Fraser [Wed, 24 Feb 2010 20:27:56 +0000 (20:27 +0000)]
x86: allow SRAT to be used on 32-bit systems with memory beyond 4G

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agox86: Fix build error after c/s 20969:8cb6e7eff2ba
Keir Fraser [Wed, 24 Feb 2010 20:26:08 +0000 (20:26 +0000)]
x86: Fix build error after c/s 20969:8cb6e7eff2ba

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agolibxc: Fix cpuid() inline asm.
Keir Fraser [Wed, 24 Feb 2010 18:48:54 +0000 (18:48 +0000)]
libxc: Fix cpuid() inline asm.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoProvide a variant of __RING_SIZE() that is an integer constant
Keir Fraser [Wed, 24 Feb 2010 11:03:56 +0000 (11:03 +0000)]
Provide a variant of __RING_SIZE() that is an integer constant
expression

Without that, gcc 4.5 won't compile (at least) netfront, where this is
being used to specify array sizes.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agovtd: interrupt remapping: be more defensive
Keir Fraser [Wed, 24 Feb 2010 10:59:37 +0000 (10:59 +0000)]
vtd: interrupt remapping: be more defensive

1) A buggy BIOS may not report IOAPIC in DRHD. Currently we still try
to enable IR while the IOAPIC RTEs are still in non-remappable format
and the host would hang. The patch detects this case and will not try
to enable IR.

2) Currently HPET's MSI mode doesn't work if IR is enabled because we
have no code to allocate IRTE for it. Luckily this HW configuration is
rather rarely at present, we can just work it around by only using
HPET's IOAPIC mode for now.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
15 years agosched_credit: Reduce is_urgent flag check to a WARN_ON.
Keir Fraser [Wed, 24 Feb 2010 10:58:03 +0000 (10:58 +0000)]
sched_credit: Reduce is_urgent flag check to a WARN_ON.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agocpuidle: Small fix to urgent_count update logic.
Keir Fraser [Wed, 24 Feb 2010 10:57:24 +0000 (10:57 +0000)]
cpuidle: Small fix to urgent_count update logic.

From: Ke Yu <ke.yu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years ago[IA64] Support preemption in multicall
Keir Fraser [Wed, 24 Feb 2010 10:47:34 +0000 (10:47 +0000)]
[IA64] Support preemption in multicall

After 19946:91407452cdb6, preemption in multicall may happen while HVM
domains are running. It cause hypervisor's panic on ia64.
This patch implements it in the same way to x86.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
15 years agoxm: Show usage message of xm commands
Keir Fraser [Wed, 24 Feb 2010 10:46:49 +0000 (10:46 +0000)]
xm: Show usage message of xm commands

The following commands don't show an usage message even if we give
a wrong option to the commands.

 - xm block-list
 - xm network-list
 - xm network2-list
 - xm vtpm-list
 - xm pci-list
 - xm scsi-list

e.g.
 # xm block-list --xxx vm1
 Error: option --xxx not recognized

This patch shows the usage message of the commands.

e.g.
 # xm block-list --xxx vm1
 Error: option --xxx not recognized
 Usage: xm block-list <Domain> [--long]
 List virtual block devices for a domain.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
15 years agox86: Generalise BUGFRAME_dump mechanism to allow polled UART irq to
Keir Fraser [Wed, 24 Feb 2010 10:44:30 +0000 (10:44 +0000)]
x86: Generalise BUGFRAME_dump mechanism to allow polled UART irq to
get proper regs argument.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoxend: notify xenpv device model that console info is ready
Keir Fraser [Wed, 24 Feb 2010 09:38:35 +0000 (09:38 +0000)]
xend: notify xenpv device model that console info is ready

Sometimes PV domain with vfb doesn't boot up. /sbin/kudzu is stuck.
After investigation, I've found that the evtchn for console is not
bound at all.

Normal sequence of evtchn initialization in qemu-dm for xenpv is:
1) watch xenstore backpath (/local/domain/0/backend/console/<domid>/0)
2) read console info (/local/domain/<domid>/console/{type, ring-ref,
port..=
})
3) bind the evtchn to the port.

But in some case, xend writes to the backpath before the console info
is prepared, and never write to the backpath again. So the qemu-dm
fails at 2) and never reach to 3).

When this happens, manually xenstore-write command on Domain-0
resumes the guest.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
15 years agopython: Don't install anything directly under /usr/share
Keir Fraser [Mon, 22 Feb 2010 18:47:22 +0000 (18:47 +0000)]
python: Don't install anything directly under /usr/share
Signed-off-by: Guillaume Rousse <Guillaume.Rousse@inria.fr>
15 years agoDisable memory mapping warnings when stub domain is used.
Keir Fraser [Mon, 22 Feb 2010 18:46:09 +0000 (18:46 +0000)]
Disable memory mapping warnings when stub domain is used.

Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
15 years agohvmloader: Replace unportable usage of GNU head with portable awk.
Keir Fraser [Mon, 22 Feb 2010 18:42:50 +0000 (18:42 +0000)]
hvmloader: Replace unportable usage of GNU head with portable awk.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years ago[IA64] Support grant_table v2 for XENMAPSPACE_grant_table
Keir Fraser [Mon, 22 Feb 2010 10:08:10 +0000 (10:08 +0000)]
[IA64] Support grant_table v2 for XENMAPSPACE_grant_table

This patch is ia64 counter part of 20281:95ea2052b41b.
This fixes the issue that HVM domains with PV-on-HVM drivers panic.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
15 years agoFix blktap2 test in xen-hotplug-cleanup
Keir Fraser [Mon, 22 Feb 2010 10:07:27 +0000 (10:07 +0000)]
Fix blktap2 test in xen-hotplug-cleanup

The blktap2 test in xen-hotplug-cleanup was not quite right, causing
orphaned /vm/<uuid>/device node in xenstore.  Attempt to reattach the
device failed:

xen53: # xm block-attach 0 file:/tmp/d0 /dev/xvdp r
xen53: # xm block-detach 0 /dev/xvdp
xen53: # xenstore-ls /vm/00000000-0000-0000-0000-000000000000/device
vbd =3D ""
 51952 =3D ""
  frontend =3D "/local/domain/0/device/vbd/51952"
  frontend-id =3D "0"
  backend-id =3D "0"
  backend =3D "/local/domain/0/backend/vbd/0/51952"
xen53: # xm block-attach 0 file:/tmp/d0 /dev/xvdp r
Error: Device /dev/xvdp (51952, vbd) is already connected.
Usage: xm block-attach <Domain> <BackDev> <FrontDev> <Mode>
[BackDomain]

From: Jim Fehlig <jfehlig@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoFix for fs-backend crash when xend was not started after system boot.
Keir Fraser [Mon, 22 Feb 2010 10:06:21 +0000 (10:06 +0000)]
Fix for fs-backend crash when xend was not started after system boot.

Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
15 years agopv-on-hvm: Fix unplug logic
Keir Fraser [Mon, 22 Feb 2010 10:05:40 +0000 (10:05 +0000)]
pv-on-hvm: Fix unplug logic

Add the missing part for the dev_unplug parameter in r20847

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
15 years agohvmloader: fix vgatype detecting issue
Keir Fraser [Mon, 22 Feb 2010 10:04:22 +0000 (10:04 +0000)]
hvmloader: fix vgatype detecting issue

When graphics card is assigned to a guest as a secondary VGA,
without gfx_passthru and emulated VGA is the primary VGA,
hvmloader misreads gfx_passthru is specified if VGA device is
found after the emulated VGA.

This patch fix this issue. If emulated VGA is found, hvmloader
preserves it and loads vgabios of the emulated VGA.

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
15 years agotmem: Quieten noisy printk in non-debug build
Keir Fraser [Mon, 22 Feb 2010 10:02:17 +0000 (10:02 +0000)]
tmem: Quieten noisy printk in non-debug build

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoUpdate QEMU_TAG to e5d14857cd67490bf956d97c8888c0be95ed3f78
Keir Fraser [Mon, 22 Feb 2010 10:00:59 +0000 (10:00 +0000)]
Update QEMU_TAG to e5d14857cd67490bf956d97c8888c0be95ed3f78

15 years agoxm: Fix xm network-list for XenAPI
Keir Fraser [Mon, 22 Feb 2010 10:00:24 +0000 (10:00 +0000)]
xm: Fix xm network-list for XenAPI

When I use XenAPI, MAC addresses are not shown by xm network-list.
MAC addresses are shown by this patch.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
15 years agopaging: Remove noisy printk
Keir Fraser [Mon, 22 Feb 2010 09:58:48 +0000 (09:58 +0000)]
paging: Remove noisy printk

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>