]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/log
people/liuw/libxenctrl-split/xen.git
16 years agonetwork-bridge: Fix for bonding
Keir Fraser [Wed, 22 Apr 2009 10:26:37 +0000 (11:26 +0100)]
network-bridge: Fix for bonding

If ${netdev} is bonding, brctl addif ${bridge} ${pdev} fails:
  can't add ${pdev} to bridge ${bridge}: Invalid argument
Because ${pdev} has no slaves at this point.=20
# Notice that ifdown ${netdev} clears slaves of ${netdev}.

This patch restores slaves before add_to_bridge2 ${bridge} ${pdev}.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
16 years agointel vtd: Remove the BUG_ON in domain_context_mapping().
Keir Fraser [Tue, 21 Apr 2009 15:31:26 +0000 (16:31 +0100)]
intel vtd: Remove the BUG_ON in domain_context_mapping().

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
16 years ago[IA64] fix early access to per cpu area.
Isaku Yamahata [Tue, 21 Apr 2009 09:27:59 +0000 (18:27 +0900)]
[IA64] fix early access to per cpu area.

The following changeset broke booting xen-ia64 on some kinds of ia64 boxes.
http://xenbits.xensource.com/ext/ia64/xen-unstable.hg/rev/3fd8f9b34941

The tasklet_schedule call raise_softirq().
Because raise_softirq() use per_cpu, if we access per_cpu before cpu_init()
the behavior would be unexpected.

There was a similar issue on Linux/ia64.
The following change sets resolved it.
10617bbe84628eb18ab5f723d3ba35005adde143
c459ce8b5a7d933a3bcf6915ab17ac1e036e2ac4

This patch fixes the issue following the linux/ia64 solution.
Allocate per cpu area for cpu0 in .data section and initialize
it early.

reported-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
--HG--
rename : xen/include/asm-ia64/linux/asm/sections.h => xen/include/asm-ia64/linux-xen/asm/sections.h

16 years agoxenconsoled: Fixes to domain management.
Keir Fraser [Mon, 20 Apr 2009 14:38:29 +0000 (15:38 +0100)]
xenconsoled: Fixes to domain management.

Event-channel setup: Re-bind if the connection becomes unbound (e.g.,
due to 'slow' domain suspend cancellation), even if the remote port
identifier has not changed.

Domain logging: Only open log file once (don't leak fds) and fix a
small memory leak.

Evtchn changes based on a patch by Jiri Denemark <jdenemar@redhat.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86: fix next->vcpu_dirty_cpumask checking in context_switch()
Keir Fraser [Mon, 20 Apr 2009 13:56:31 +0000 (14:56 +0100)]
x86: fix next->vcpu_dirty_cpumask checking in context_switch()

There was a timing window where flush_tlb_mask() could be called with
an empty mask (triggering a WARN_ON() in send_IPI_mask_flat() along
with APIC errors) because rather than using the already taken snapshot
of next's vcpu_dirty_cpumask struct vcpu's field was used directly,
which can get its only bit cleared by remote CPUs.

Replacing the structure field's use by the local variable then made
the inner cpus_empty() check completely redundant with the one in the
surrounding if()'s condition.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoxend: The method union_update on a set was renamed to update in Python 2.3
Keir Fraser [Mon, 20 Apr 2009 12:48:31 +0000 (13:48 +0100)]
xend: The method union_update on a set was renamed to update in Python 2.3

From: Ruben Kerkhof <ruben@rubenkerkhof.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoTXT: update Makefile to latest tboot tarfile
Keir Fraser [Fri, 17 Apr 2009 16:39:05 +0000 (17:39 +0100)]
TXT: update Makefile to latest tboot tarfile

This patch updates the Makefile to download the latest version of
tboot, which supports the interface changes made recently.  This
should go into 3.4, since 3.4 supports the new tboot interface.

Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
16 years agoAMD IOMMU: Fix ioapic interrupt remapping
Keir Fraser [Fri, 17 Apr 2009 12:16:39 +0000 (13:16 +0100)]
AMD IOMMU: Fix ioapic interrupt remapping

A few ioapic redirection entries are initialized by hypervisor before
enabling iommu hardware. This patch copies those entries from ioapic
redirection table into interrupt remapping table after interrupt
remapping table has been allocated.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
16 years agocpuidle: Add support for Always Running APIC timer, CPUID_0x6_EAX_Bit2.
Keir Fraser [Fri, 17 Apr 2009 12:14:01 +0000 (13:14 +0100)]
cpuidle: Add support for Always Running APIC timer, CPUID_0x6_EAX_Bit2.

This bit means the APIC timer continues to run even when CPU is
in deep C-states.

The advantage is that we can use LAPIC timer on these CPUs
always, and there is no need for "slow to read and program"
external timers (HPET/PIT) and the timer broadcast logic
and related code in C-state entry and exit.

Refer to the latest Intel SDM Vol 2A
(http://www.intel.com/products/processor/manuals/index.htm)

Signed-off-by: Wei Gang <gang.wei@intel.com>
16 years agox86: avoid EPT scanning errors when splitting superpages during live migration
Keir Fraser [Fri, 17 Apr 2009 12:07:06 +0000 (13:07 +0100)]
x86: avoid EPT scanning errors when splitting superpages during live migration

Since Xen did not lock the p2m table for p2m table reading, when
splitting the large page during live migration, we should make sure
the path of EPT entries be modified are always there while other CPUs
may access the super entries at the same time.

Signed-off-by: Xin, Xiaohui <xiaohui.xin@intel.com>
16 years agoxend: clean up qemu-dm related items on domain destroy
Keir Fraser [Fri, 17 Apr 2009 12:04:47 +0000 (13:04 +0100)]
xend: clean up qemu-dm related items on domain destroy

Some qemu-dm related stuffs might be left behind after the domain is
destroyed.
 - xenstore entry, /local/domain/0/device-model/<domid>
 - named pipes, /var/run/tap/qemu-{read,write}-<domid>

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
16 years agoUpdate Xen version for 3.4.0-rc3-pre
Keir Fraser [Thu, 16 Apr 2009 10:54:06 +0000 (11:54 +0100)]
Update Xen version for 3.4.0-rc3-pre

16 years agoAdded tag 3.4.0-rc2 for changeset 087854cf3ed9
Keir Fraser [Thu, 16 Apr 2009 10:53:46 +0000 (11:53 +0100)]
Added tag 3.4.0-rc2 for changeset 087854cf3ed9

16 years agoUpdate Xen version for 3.4.0-rc2
Keir Fraser [Thu, 16 Apr 2009 10:53:38 +0000 (11:53 +0100)]
Update Xen version for 3.4.0-rc2

16 years agocpuidle: Fix PV RTC I/O port access hook
Keir Fraser [Thu, 16 Apr 2009 10:52:08 +0000 (11:52 +0100)]
cpuidle: Fix PV RTC I/O port access hook

Call hook before writing to I/O ports. Only hook single-byte writes.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agocpuidle: Enable hpet broadcast by default
Keir Fraser [Wed, 15 Apr 2009 14:47:25 +0000 (15:47 +0100)]
cpuidle: Enable hpet broadcast by default

And stop legacy hpet broadcast and limit max C-state to shallower
state if RTC interrupts are enabled.

Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
16 years agopassthrough: allow pt_bind_irq for msi update
Keir Fraser [Wed, 15 Apr 2009 14:38:57 +0000 (15:38 +0100)]
passthrough: allow pt_bind_irq for msi update

Extend pt_bind_irq to handle the update of msi guest
vector and flag.

Unbind and rebind using separate hypercalls may not be viable
sometime.
For example, the guest may update MSI address/data on fly without
disabling it first (e.g. change delivery/destination), implement these
updates in such a way may result in interrupt loss.

Signed-off-by: Qing He <qing.he@intel.com>
16 years agoxend: serialise domain restart threads
Keir Fraser [Wed, 15 Apr 2009 10:25:07 +0000 (11:25 +0100)]
xend: serialise domain restart threads

I observed from xend.log that several domain restart threads run
simultaneously. This patch make it singleton.
Without this, several coredump of a domain might be created.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
16 years agoxend: fix avoidance to restart domain on crash
Keir Fraser [Wed, 15 Apr 2009 10:23:02 +0000 (11:23 +0100)]
xend: fix avoidance to restart domain on crash

If a qemu-dm dies immediately (probably by wrong setting),
xend repeats to restart a domain so many times.=20
That causes system overload.

There is already a logic to avoid too early restarting, however,
it might not work. Since xenstore entry 'xend/previous_restart_time'
is volatile. XendDomainInfo.destroy() which removes the entry from
xenstore is called in some places.

Also, this patch prevents too early restarting even at the first
domain creation.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
16 years agox86: Disable cpuidle by default unless hpet broadcast is available.
Keir Fraser [Wed, 15 Apr 2009 07:40:12 +0000 (08:40 +0100)]
x86: Disable cpuidle by default unless hpet broadcast is available.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86: Support discontiguous sets of multiboot modules.
Keir Fraser [Tue, 14 Apr 2009 14:23:53 +0000 (15:23 +0100)]
x86: Support discontiguous sets of multiboot modules.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoNew option conring_size= to allow larger console ring.
Keir Fraser [Tue, 14 Apr 2009 13:52:27 +0000 (14:52 +0100)]
New option conring_size= to allow larger console ring.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agominios: fix a memory corruption in blkfront
Keir Fraser [Tue, 14 Apr 2009 10:21:45 +0000 (11:21 +0100)]
minios: fix a memory corruption in blkfront

The corruption happens every time we pass a sector aligned buffer
(instead of a page aligned buffer) to blkfront_aio. To trigger the COW
we have to write at least a byte to each page of the buffer, but we
must be careful not to overwrite useful content.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoFix cpufreq HW-ALL coordination handle
Keir Fraser [Tue, 14 Apr 2009 10:20:55 +0000 (11:20 +0100)]
Fix cpufreq HW-ALL coordination handle

Currently cpufreq HW-ALL coordination is handled same way as SW-ALL.
However, SW-ALL will bring more IPIs which is bad for cpuidle.
This patch implement HW-ALL coordination handled in different way from
SW-ALL, for the sake of performance and reduce IPIs. We also
suspend/resume HW-ALL dbs timer for idle.

Signed-off-by: Yu, Ke <ke.yu@intel.com>
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Tian, Kevin <kevin.tian@intel.com>
16 years agotools: dom0 iptables rule ordering change
Keir Fraser [Tue, 14 Apr 2009 10:20:02 +0000 (11:20 +0100)]
tools: dom0 iptables rule ordering change

This patch makes two small changes to dom0 iptables rules that permit
(and revoke) domU network access.

First:
Currently, a rule intended to allow domU network access is appended to
the end of the FORWARD chain, where it can be preempted by other =20
rules.  This patch causes the rule to be inserted at the top, where
it's more likely to have the intended effect.

Second:
In some cases (e.g. Fedora 9's default iptables configuration), the
first rule alone is insufficient to permit two-way packet flow.  This
patch adds a second rule to the FORWARD chain that permits replies to
domU network requests to reach the domU vif.

Signed-off-by: Chris Bookholt <hap10@tycho.ncsc.mil>
16 years ago[XSM] missing entries to xsm_fixup_ops
Keir Fraser [Tue, 14 Apr 2009 10:18:37 +0000 (11:18 +0100)]
[XSM] missing entries to xsm_fixup_ops

This patch adds the missing presence checks for the pm_op and
get_pmstat hooks in xsm_fixup_ops.

Signed-off-by: George S. Coker, II <gscoker@alpha.ncsc.mil>
16 years agomerge with xen-unstable.hg
Isaku Yamahata [Tue, 14 Apr 2009 05:04:58 +0000 (14:04 +0900)]
merge with xen-unstable.hg

16 years agoUpdate Xen version for 3.4.0-rc2-pre
Keir Fraser [Fri, 10 Apr 2009 05:58:04 +0000 (06:58 +0100)]
Update Xen version for 3.4.0-rc2-pre

16 years agoAdded tag 3.4.0-rc1 for changeset d611d9ac6d02
Keir Fraser [Fri, 10 Apr 2009 05:57:49 +0000 (06:57 +0100)]
Added tag 3.4.0-rc1 for changeset d611d9ac6d02

16 years agoUpdate Xen version for 3.4.0-rc1
Keir Fraser [Fri, 10 Apr 2009 05:56:45 +0000 (06:56 +0100)]
Update Xen version for 3.4.0-rc1

16 years agox86 acpi: Quieten boot messages regarding power modes
Keir Fraser [Fri, 10 Apr 2009 05:56:23 +0000 (06:56 +0100)]
x86 acpi: Quieten boot messages regarding power modes
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoDisable debug build by default.
Keir Fraser [Thu, 9 Apr 2009 16:31:35 +0000 (17:31 +0100)]
Disable debug build by default.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoxenpmd: Explicit build rule.
Keir Fraser [Thu, 9 Apr 2009 16:22:44 +0000 (17:22 +0100)]
xenpmd: Explicit build rule.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoxend: Fix xm pci-attach/detach for inactive managed domains
Keir Fraser [Thu, 9 Apr 2009 10:35:14 +0000 (11:35 +0100)]
xend: Fix xm pci-attach/detach for inactive managed domains

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
16 years agosbdf2devicepath: converts SBDF into device path.
Keir Fraser [Thu, 9 Apr 2009 08:59:16 +0000 (09:59 +0100)]
sbdf2devicepath: converts SBDF into device path.

'SBDF' format is "[SEG#:]BUS#:DEV#.FUNC#"
  ex) 0000:0a:1f.3
Device path format is "HID[:UID]-DEV#.FUNC#[-DEV#.FUNC#[...]]"
  ex) PNP0A08:0-2.0-0.0

The command can be executed as follows.

# sbdf2devicepath 0a:1f.3
PNP0A08:0-2.0-0.0

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoxend: fix a typo in pciif so PciController.unwatchAerState() works
Keir Fraser [Thu, 9 Apr 2009 07:45:32 +0000 (08:45 +0100)]
xend: fix a typo in pciif so PciController.unwatchAerState() works

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
16 years agox86 mce: fix a few possible issues
Keir Fraser [Thu, 9 Apr 2009 07:41:28 +0000 (08:41 +0100)]
x86 mce: fix a few possible issues

Do not share synchronization variables between the trap handler and
the softirq handler, as this will cause problems. Abstract the
synchronization bits into functions. Make the synchronization code
aware of a panic, so that spinning with interrupts disabled is
avoided.

To avoid problems with MCEs happening while we're doing recovery
actions in the softirq handler, implement a deferred list of telemetry
structures, using the mctelem interfaces. Thist list will get updated
atomically, so any additional MCEs will not cause error telemetry to
be missed or not handled.

Signed-off-by: Frank van der Linden <frank.vanderlinden@sun.com>
Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Yunhong Jiang<yunhong.jiang@intel.com>
16 years agotools: Always use sane upstream (`native') python paths
Keir Fraser [Wed, 8 Apr 2009 18:13:04 +0000 (19:13 +0100)]
tools: Always use sane upstream (`native') python paths

Previously, by default we would install our python modules into
/usr/lib/python/xen, for example /usr/lib/python/xen/__init__.py.
Upstream python's standard install location (a) includes the Python
version number and (b) puts things in site-packages by default.

Our best conjecture for the reason for this was an attempt to make the
installs portable between different python versions.  However, that
doesn't work because compiled python modules (.pyc), and C python
extensions corresponding to one version of python, are not compatible
across different versions of python.

This is why upstream include the version number.

site-packages is the standard location for locally-installed packages
and is automatically included on the python search path.

In this change, we abandon our own unusual python path setup:

 * Invoke setup.py in an entirely standard manner.  We pass
   PREFIX and DESTDIR using the appropriate options provided by
   setup.py for those purposes (adding them to setup.py calls
   which were previously lacking them).

 * Since the installation locations are now on the standard
   python path, we no longer need to add anything to the path
   in any of our python utilities.  Therefore remove all that
   code from every python script.  (Many of these scripts
   unconditionally added /usr/lib/python and /usr/lib64/python which
   is wrong even in the old world.)

 * There is no longer any special `Xen python path'.  xen-python-path
   is no longer needed.  It is no longer called by anything in our
   tree.  However since out-of-tree callers may still invoke it, we
   retain it.  It now prints a fixed string referring to a directory
   which does not to exist; callers (who use it to augment their
   python path) will thus add a nonexistent directory to their python
   path which is harmless.

 * Remove various workarounds including use of setup.py --home
   (which is intended for something completely different).

 * Remove tests for the XEN_PYTHON_NATIVE_INSTALL build-time
   environment variable.  The new behaviour is the behaviour which we
   should have had if this variable had been set.  That is, it is now
   as if this variable was always set but also bugs in the resulting
   install have been fixed.

This should be a proper fix for the bug addressed by c/s 19515.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agorestore: sign extend p2m when restoring on a host with pfn width <
Keir Fraser [Wed, 8 Apr 2009 18:10:33 +0000 (19:10 +0100)]
restore: sign extend p2m when restoring on a host with pfn width <
guest pfn width

(i.e. 32on64 domain 0 and 64 bit guest domain).

Otherwise P2M entries which were INVALID_P2M_ENTRY
(==0xffffffffffffffff) become 0xffffffff after a migrate.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agox86 hvm: Remove the extra IS_PRIV_FOR() checks I added to do_hvm_op().
Keir Fraser [Wed, 8 Apr 2009 13:43:12 +0000 (14:43 +0100)]
x86 hvm: Remove the extra IS_PRIV_FOR() checks I added to do_hvm_op().
Actually this is already done by rcu_lock_target_domain_by_id(). Oops.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86 hvm: Fix privilege checking in do_hvm_op() hypercall.
Keir Fraser [Wed, 8 Apr 2009 13:06:37 +0000 (14:06 +0100)]
x86 hvm: Fix privilege checking in do_hvm_op() hypercall.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86 mce: Small cleanups to machine-check hypercall handling.
Keir Fraser [Wed, 8 Apr 2009 13:06:04 +0000 (14:06 +0100)]
x86 mce: Small cleanups to machine-check hypercall handling.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
G: Enter commit message.  Lines beginning with 'HG:' are removed.

16 years agoAvoid deadlocks on domctl_lock when pausing domains/vcpus.
Keir Fraser [Wed, 8 Apr 2009 12:48:35 +0000 (13:48 +0100)]
Avoid deadlocks on domctl_lock when pausing domains/vcpus.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agonetwork-nat: add domain info for nat-dhcpd
Keir Fraser [Wed, 8 Apr 2009 12:18:22 +0000 (13:18 +0100)]
network-nat: add domain info for nat-dhcpd

Signed-off-by: Wei Kong <weikong.cn@gmail.com>
16 years agoxend: Give domain-ID 0 to xc.test_assign_device
Keir Fraser [Wed, 8 Apr 2009 09:18:31 +0000 (10:18 +0100)]
xend: Give domain-ID 0 to xc.test_assign_device

When xend calls xc.test_assign_device, xend does not have to give
the domain-ID of a guest domain.
This patch gives domain-ID 0 to xc.test_assign_device.

The following methods give domain-ID 0 to xc.test_assign_device
currently.
 - setupDevice@xend/server/pciif.py
 - pciinfo@xend/XendNode.py

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
16 years agoxend: fix c/s 19510
Keir Fraser [Wed, 8 Apr 2009 08:02:22 +0000 (09:02 +0100)]
xend: fix c/s 19510

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
16 years agotools: fix python installation
Keir Fraser [Tue, 7 Apr 2009 13:37:35 +0000 (14:37 +0100)]
tools: fix python installation

attached patch lets python install the modules into
DESTDIR/PREFIX as before, but lets python search
the modules in PREFIX rather DESTDIR/PREFIX.

This prevents failures about not finding python modules
after files have been installed into PREFIX.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
16 years agoxm: handle error in auxbin gracefully
Keir Fraser [Tue, 7 Apr 2009 13:24:53 +0000 (14:24 +0100)]
xm: handle error in auxbin gracefully

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
16 years agoxentrace: Only trace 64b vmexit when in long mode.
Keir Fraser [Tue, 7 Apr 2009 10:04:27 +0000 (11:04 +0100)]
xentrace: Only trace 64b vmexit when in long mode.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
16 years agoxentrace: Trace CR accesses in hvm emulator.
Keir Fraser [Tue, 7 Apr 2009 09:57:11 +0000 (10:57 +0100)]
xentrace: Trace CR accesses in hvm emulator.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
16 years agocpufreq: align dbs timer for better package C state residency
Keir Fraser [Tue, 7 Apr 2009 09:43:27 +0000 (10:43 +0100)]
cpufreq: align dbs timer for better package C state residency

Signed-off-by: Yu Ke <ke.yu@intel.com>
16 years agoxm, xend: Replace "vslt" with "vslot"
Keir Fraser [Tue, 7 Apr 2009 09:15:25 +0000 (10:15 +0100)]
xm, xend: Replace "vslt" with "vslot"

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
16 years agoxend: fix leak of /local/domain/* in xenstore
Keir Fraser [Tue, 7 Apr 2009 09:14:35 +0000 (10:14 +0100)]
xend: fix leak of /local/domain/* in xenstore

xenwatch thread _storeChanged() may create /local/domain/<domid>
entries in xenstore even after the domain has shutdown.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
16 years agomerge with xen-unstable.hg
Isaku Yamahata [Tue, 7 Apr 2009 02:32:24 +0000 (11:32 +0900)]
merge with xen-unstable.hg

16 years ago[IA64] Fix unwind info of fast_hypercall
Isaku Yamahata [Tue, 7 Apr 2009 02:29:44 +0000 (11:29 +0900)]
[IA64] Fix unwind info of fast_hypercall

This patch fixes unwind info of fast_hypercall.
fast_hypercall uses r32->r35 without alloc instruction.
In the case of this, the unwind info move over a little.

With my patch, I confirmed the stack trace worked fine.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
16 years agotools/misc: Remove some obsolete scripts.
Keir Fraser [Mon, 6 Apr 2009 20:12:33 +0000 (21:12 +0100)]
tools/misc: Remove some obsolete scripts.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoRevert c/s 19504 -- uses an obsolete sysfs interface.
Keir Fraser [Mon, 6 Apr 2009 19:56:02 +0000 (20:56 +0100)]
Revert c/s 19504 -- uses an obsolete sysfs interface.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86: Make special TSC handling (assuming all TSCs tick at exact same
Keir Fraser [Mon, 6 Apr 2009 13:26:29 +0000 (14:26 +0100)]
x86: Make special TSC handling (assuming all TSCs tick at exact same
rate) dependent on a command-line option 'consistent_tscs'.

Also clean up rendezvous logic.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86_64: explicitly zero CR[1] in getvcpucontext for guests with no user PT
Keir Fraser [Mon, 6 Apr 2009 12:56:35 +0000 (13:56 +0100)]
x86_64: explicitly zero CR[1] in getvcpucontext for guests with no user PT

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agotools: Add device-path command to convert SBDF into device path.
Keir Fraser [Mon, 6 Apr 2009 12:52:56 +0000 (13:52 +0100)]
tools: Add device-path command to convert SBDF into device path.

'SBDF' format is "[SEG#:]BUS#:DEV#.FUNC#"
  ex) 0000:0a:1f.3
Device path format is "HID[:UID]-DEV#.FUNC#[-DEV#.FUNC#[...]]"
  ex) PNP0A08:0-2.0-0.0

The command can be executed as follows.

# device_path 0a:1f.3
PNP0A08:0-2.0-0.0

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoxend: Use AUTO_PHP_SLOT where it ought to be
Keir Fraser [Mon, 6 Apr 2009 12:49:59 +0000 (13:49 +0100)]
xend: Use AUTO_PHP_SLOT where it ought to be

Signed-off-by: Simon Horman <horms@vereg.net.au>
16 years agoxenpm: Set scheduler vcpu_migration_delay by xenpm
Keir Fraser [Mon, 6 Apr 2009 12:49:16 +0000 (13:49 +0100)]
xenpm: Set scheduler vcpu_migration_delay by xenpm

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
16 years agox86 mce: Small fix for polling/CMCI race conditions.
Keir Fraser [Mon, 6 Apr 2009 12:46:11 +0000 (13:46 +0100)]
x86 mce: Small fix for polling/CMCI race conditions.

When CMCI happens very quickly, polling/CMCI processing path might
cross. For Intel CPUs which support CMCI, if the error bank has CMCI
capability, we'll disable poll on this bank.

Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Yunhong Jiang<yunhong.jiang@intel.com>
16 years agoMove logic for avoiding limited idle quantum into credit scheduler.
Keir Fraser [Thu, 2 Apr 2009 13:17:19 +0000 (14:17 +0100)]
Move logic for avoiding limited idle quantum into credit scheduler.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86: imply 'noapic' from 'nolapic'
Keir Fraser [Thu, 2 Apr 2009 12:02:13 +0000 (13:02 +0100)]
x86: imply 'noapic' from 'nolapic'

While in the comments to an earlier submitted (and already applied)
patch I claimed to have fixed the need to specify both "nolapic" and
"noapic" when "nolapic" alone should already have the intended effect,
this doesn't appear to be the case. Here are the missing bits.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoxm: allow space characters in a vscsi definition.
Keir Fraser [Thu, 2 Apr 2009 11:40:44 +0000 (12:40 +0100)]
xm: allow space characters in a vscsi definition.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
16 years agohvm: add ACPI power button for HVM
Keir Fraser [Thu, 2 Apr 2009 11:40:09 +0000 (12:40 +0100)]
hvm: add ACPI power button for HVM

This patch adds the ACPI fixed hardware power button for HVM.
It enables a graceful shutdown of a guest OS by direction of Dom0.
(if a proper action for the power button is set inside the guest)

usage:
  xm trigger <Domain> power

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
16 years agoxenctx, ia64: fix compilation error.
Keir Fraser [Thu, 2 Apr 2009 10:48:32 +0000 (11:48 +0100)]
xenctx, ia64: fix compilation error.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agonetwork-bridge: Fix do_ifup in the case of ${bridge} != ${netdev}
Keir Fraser [Thu, 2 Apr 2009 10:48:10 +0000 (11:48 +0100)]
network-bridge: Fix do_ifup in the case of ${bridge} != ${netdev}

On RHEL5.2, ifup ${bridge} fails if ${bridge} != ${netdev},
because RHEL5.2's ifup ${bridge} runs the following sequence:

1. Search CONFIG that has the same mac address of ${bridge}.=20
   ifcfg-${netdev} is found.
2. Run "ip link set dev ${netdev} up".
   # ${bridge} is expected.
3. Output "Failed to bring up ${netdev}."
   Because ${netdev} does not exist.

Thus, do_ifup() should not use ifup if ${bridge} != ${netdev}.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
16 years ago[IA64] ia64 counter part of 19376:9fc957e63f8d.
Isaku Yamahata [Thu, 2 Apr 2009 10:43:16 +0000 (19:43 +0900)]
[IA64] ia64 counter part of 19376:9fc957e63f8d.

This patch is the ia64 counter part of 19376:9fc957e63f8d.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agox86: A further fix to paging_log_dirty_op() -- do not unmap_domain_page(NULL)
Keir Fraser [Thu, 2 Apr 2009 06:53:11 +0000 (07:53 +0100)]
x86: A further fix to paging_log_dirty_op() -- do not unmap_domain_page(NULL)

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86: hvm_*io_intercept() should only update p->count if X86EMUL_OKAY.
Keir Fraser [Wed, 1 Apr 2009 15:20:30 +0000 (16:20 +0100)]
x86: hvm_*io_intercept() should only update p->count if X86EMUL_OKAY.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoOnly set scheduler quantum timer for non-idle VCPUs
Keir Fraser [Wed, 1 Apr 2009 14:39:20 +0000 (15:39 +0100)]
Only set scheduler quantum timer for non-idle VCPUs

This removes the last idle periodic timer in xen, and enhances the
idle average C state residency from two-digits ms  to three-digit ms.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
16 years agox86 hpet: two more fixes for c/s 19419
Keir Fraser [Wed, 1 Apr 2009 13:04:46 +0000 (14:04 +0100)]
x86 hpet: two more fixes for c/s 19419

vector_channel[], as its name already says, is vector-, not
irq-indexed.

hpet_assign_irq() sits not only in the boot path, but also in the
resume one. Short of knowing why this is, simply checking whether a
vector was already assigned prevents leaking previously assigned ones.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agox86: paging_log_dirty_op() should take care with invalid log_dirty.top
Keir Fraser [Wed, 1 Apr 2009 12:49:35 +0000 (13:49 +0100)]
x86: paging_log_dirty_op() should take care with invalid log_dirty.top

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoxend: Revert c/s 19436 -- fails with Python 2.3, and sock.close()
Keir Fraser [Wed, 1 Apr 2009 12:17:34 +0000 (13:17 +0100)]
xend: Revert c/s 19436 -- fails with Python 2.3, and sock.close()
should suffice to shutdown a connection.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoia64: Fix the build after max_cstate changes.
Keir Fraser [Wed, 1 Apr 2009 12:12:13 +0000 (13:12 +0100)]
ia64: Fix the build after max_cstate changes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86 hpet: fix irq_vector[] update of c/s 19419
Keir Fraser [Wed, 1 Apr 2009 10:53:15 +0000 (11:53 +0100)]
x86 hpet: fix irq_vector[] update of c/s 19419

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoxend: modify a warning log message
Keir Fraser [Wed, 1 Apr 2009 10:47:59 +0000 (11:47 +0100)]
xend: modify a warning log message

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
16 years agoxend: fix rtc_timeoffset when localtime=1
Keir Fraser [Wed, 1 Apr 2009 10:47:25 +0000 (11:47 +0100)]
xend: fix rtc_timeoffset when localtime=1

The rtc_timeoffset parameter in VM config is ignored when
localtime=1. Also it is not preserved across reboot.

NOTE:
This patch changes the meaning of the xenstore
/vm/<uuid>/rtc/timeoffset
from utc offset to local offset. (it's OK for the ioemu)

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
16 years agoxend: Balloon 4MB memory slop when creating a domain
Keir Fraser [Wed, 1 Apr 2009 10:46:31 +0000 (11:46 +0100)]
xend: Balloon 4MB memory slop when creating a domain

I've found some problems when running 2 guests with and then trying
to install a new machine (no matter whether using virt-manager or
virt-install).

Signed-off-by: Michal Novotny <minovotn@redhat.com>
16 years agoxend: Set close-on-exec flag for datagram sockets
Keir Fraser [Wed, 1 Apr 2009 10:45:22 +0000 (11:45 +0100)]
xend: Set close-on-exec flag for datagram sockets
We need to close the socket on the child side when xend creates a
child process such as qemu-dm.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
16 years agoxend: allow hvm domain to have multiple serial consoles
Keir Fraser [Wed, 1 Apr 2009 10:44:49 +0000 (11:44 +0100)]
xend: allow hvm domain to have multiple serial consoles

This patch allows hvm domain to have multiple serial ports
with serial =3D [ '...', '...'].
The old style, serial=3D'option string', is also accepted for
compatibility.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agoacm: Restrict the XML of the policy to only allow one
Keir Fraser [Wed, 1 Apr 2009 10:44:10 +0000 (11:44 +0100)]
acm: Restrict the XML of the policy to only allow one
SimpleTypeEnforcementType node.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
16 years agostubdom: Fix newlib-chk.patch so it applies
Keir Fraser [Wed, 1 Apr 2009 07:36:21 +0000 (08:36 +0100)]
stubdom: Fix newlib-chk.patch so it applies
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agostubdom: Add newlib-chk.patch
Keir Fraser [Tue, 31 Mar 2009 17:37:58 +0000 (18:37 +0100)]
stubdom: Add newlib-chk.patch

From: "George S. Coker, II" <gscoker@alpha.ncsc.mil>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
16 years agoSimplify spinlock code and re-enable IRQs where possible when spinning.
Keir Fraser [Tue, 31 Mar 2009 14:03:59 +0000 (15:03 +0100)]
Simplify spinlock code and re-enable IRQs where possible when spinning.

Based on a patch by Juergen Gross.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agohvmloader: ROMBIOS must POST in big real mode, since it supports PMM,
Keir Fraser [Tue, 31 Mar 2009 13:04:50 +0000 (14:04 +0100)]
hvmloader: ROMBIOS must POST in big real mode, since it supports PMM,
and hence Option ROMs can expect noi segment limit checks.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoxend: Fix domain creation.
Keir Fraser [Tue, 31 Mar 2009 12:57:11 +0000 (13:57 +0100)]
xend: Fix domain creation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agobuild: Get rid of some more hardcoded install paths
Keir Fraser [Tue, 31 Mar 2009 12:30:50 +0000 (13:30 +0100)]
build: Get rid of some more hardcoded install paths
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
16 years agox86: Enable S3 for 32bit dom0 on 64bit Xen
Keir Fraser [Tue, 31 Mar 2009 12:28:45 +0000 (13:28 +0100)]
x86: Enable S3 for 32bit dom0 on 64bit Xen

Three SYSENTER MSRs should be taken care of at save/restore BSP
context, or else 32bit dom0 rejects working after S3 resume. Thanks
for Jan's help to find this missing part.

Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
16 years agohvmloader acpi: Reserve ioport ranges for expanded PHP
Keir Fraser [Tue, 31 Mar 2009 12:27:03 +0000 (13:27 +0100)]
hvmloader acpi: Reserve ioport ranges for expanded PHP

Now there are two control registers plus one register for
each of the 32 PHP slots. A total of 34 registers. Accordingly the
ioport space required has expanded by from 3 to 34 bytes.

Signed-off-by: Simon Horman <horms@verge.net.au>
hvmloader acpi: Use If and Else instead of Switch

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years agox86: unify BUG() & Co, reduce overhead on x86-64
Keir Fraser [Tue, 31 Mar 2009 12:23:11 +0000 (13:23 +0100)]
x86: unify BUG() & Co, reduce overhead on x86-64

Since it's only the string pointer representations that differ between
i386 and x86-64, abstract out those and make everything else shared.

While touching this code, also use
- proper instructions rather than a mixture of such and raw .byte/
  .long/.quad data emissions,
- PC-relative pointers on x86-64 to cut the amount of storage (and
  in particular cache space) needed for string references by half.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoUse unlikely() in BUG_ON()/WARN_ON()
Keir Fraser [Tue, 31 Mar 2009 12:22:12 +0000 (13:22 +0100)]
Use unlikely() in BUG_ON()/WARN_ON()

-fno-reorder-blocks was added in c/s 1712, when x86-64 just started to
become enabled. The reason it got added is entirely unclear to me, and
it prevents the intended effect of unlikely() constructs (in
particular
the ones added here) of moving out of line code which is expected to
never get executed, as well as using forward branches (which are
statically predicted taken by various processors' branch prediction
units) preferably to reach infrequently executed code.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoia64, pygrub: Allow command-line editing in Lilo boot loader
Keir Fraser [Tue, 31 Mar 2009 12:21:36 +0000 (13:21 +0100)]
ia64, pygrub: Allow command-line editing in Lilo boot loader

On IA64 platform reset() function has one more parameter for Lilo
bootloader used by IA64 than for GRUB bootloader used for other
platforms.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
16 years agoxend: less noise in xend-debug.log on HVM shutdown
Keir Fraser [Tue, 31 Mar 2009 12:20:04 +0000 (13:20 +0100)]
xend: less noise in xend-debug.log on HVM shutdown

Shutting down a hvm, xend-debug.log always shows:

Unhandled exception in thread started by=20
Traceback (most recent call last):
  File "//usr/lib64/python/xen/xend/image.py", line 549, in
  _sentinel_watch
    self._dmfailed(message)
  File "//usr/lib64/python/xen/xend/image.py", line 491, in _dmfailed
    xc.domain_shutdown(self.vm.getDomid(), DOMAIN_CRASH)
xen.lowlevel.xc.Error: (3, 'No such process')

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
16 years agoxend: Check for valid CPU_CAP value when creating new domain
Keir Fraser [Tue, 31 Mar 2009 12:19:07 +0000 (13:19 +0100)]
xend: Check for valid CPU_CAP value when creating new domain

Signed-off-by: Michal Novotny <minovotn@redhat.com>
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
16 years agox86 mce: fix and clean up c/s 19423
Keir Fraser [Tue, 31 Mar 2009 12:17:48 +0000 (13:17 +0100)]
x86 mce: fix and clean up c/s 19423

- fix inverted return value check for intel_mce_{rd,wr}msr()
- fix broken initialization of d->arch.vmca_msrs.mci_ctl
- remove pointless (!d || is_idle_domain(d)) checks
- eliminate hard-coded limit to 9 banks
- avoid redundant gdprintk()s

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agox86: small adjustment to asm constraints for c/s 19400
Keir Fraser [Tue, 31 Mar 2009 12:14:10 +0000 (13:14 +0100)]
x86: small adjustment to asm constraints for c/s 19400

Properly indicate the variable that the asm writes to, and allow
compiler more freedom in selecting a suitable input operand for the
ltr instruction.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agox86 mce: fix c/s 18938
Keir Fraser [Tue, 31 Mar 2009 12:12:35 +0000 (13:12 +0100)]
x86 mce: fix c/s 18938

Provide for up to 16/32 on (32/64-bit) extended MCE MSRs, and use
actually existing extended MSRs on 64-bits that were inaccessible so
far.

Signed-off-by: Jan Beulich <jbeulich@novell.com>