]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/log
people/liuw/libxenctrl-split/xen.git
15 years agotools: clean up handling of xen config and scripts directories.
Keir Fraser [Tue, 19 May 2009 00:48:18 +0000 (01:48 +0100)]
tools: clean up handling of xen config and scripts directories.

For now hardcode /etc w/o a prefix as there are hardcoded
config paths in the code which would break otherwise.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
15 years agoxend: solve issues with xm block-configure command.
Keir Fraser [Tue, 19 May 2009 00:37:19 +0000 (01:37 +0100)]
xend: solve issues with xm block-configure command.

In the case of inactive managed domains:
 The following error occurs currently.  We cannot change the
 configuration of the VBD by using xm block-configure.  Of course,
 using xm block-detach and xm block-attach instead of xm
 block-configure, we can change it. However, I'd like to change it by
 using xm block-configure.

In the case of active domains:
 Another problem occurs after a domain was rebooted.  Even if we
 change a configuration of a VBD in the domain by using xm
 block-configure, the configuration of the VBD is reverted to previous
 configuration after the domain was rebooted.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
15 years agoxend: Avoid deprecation warnings with Python 2.6.
Keir Fraser [Tue, 19 May 2009 00:34:34 +0000 (01:34 +0100)]
xend: Avoid deprecation warnings with Python 2.6.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
15 years agox86, cpufreq: fix ondemand governor to take aperf/mperf feedback
Keir Fraser [Tue, 19 May 2009 00:31:26 +0000 (01:31 +0100)]
x86, cpufreq: fix ondemand governor to take aperf/mperf feedback

APERF/MPERF MSRs provides feedback about actual freq in
eplased time, which could be different from requested freq by
governor. However currently ondemand governor only takes that
feedback at freq down path. We should do that for scale up too.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
15 years agoioemu: Export PREFIX variable to ioemu build environment.
Keir Fraser [Tue, 19 May 2009 00:27:36 +0000 (01:27 +0100)]
ioemu: Export PREFIX variable to ioemu build environment.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
15 years agox86 hvm: Provide x2APIC identifier in CPUID leaf 0xb.
Keir Fraser [Tue, 19 May 2009 00:25:59 +0000 (01:25 +0100)]
x86 hvm: Provide x2APIC identifier in CPUID leaf 0xb.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
15 years agostubdom: fix issue with phy disks
Keir Fraser [Tue, 19 May 2009 00:18:35 +0000 (01:18 +0100)]
stubdom: fix issue with phy disks

Add an exception for stubdoms in the same_vm hotplug script function.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
15 years agox86: Use PGC_cacheattr_mask rather than a hardcoded constant.
Keir Fraser [Tue, 19 May 2009 00:17:16 +0000 (01:17 +0100)]
x86: Use PGC_cacheattr_mask rather than a hardcoded constant.

Signed-off-by: Patrick Colp <Patrick.Colp@citrix.com>
15 years agoUpdate README for 3.4 branch.
Keir Fraser [Mon, 18 May 2009 12:53:55 +0000 (13:53 +0100)]
Update README for 3.4 branch.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agovt-d: Fix interrupt remapping for multiple IOAPICs
Keir Fraser [Fri, 15 May 2009 07:12:39 +0000 (08:12 +0100)]
vt-d: Fix interrupt remapping for multiple IOAPICs

Current IOAPIC interrupt remapping code assumes there is only one
IOAPIC in system. It brings problem when there are more than one
IOAPIC in system. This patch extends ioapic_pin_to_intremap_index[]
array to handle multiple IOAPICs case.

Signed-off-by: Weidong Han <weidong.han@intel.com>
15 years agocpuidle: Fix possible false judge caused by type casting
Keir Fraser [Thu, 14 May 2009 14:46:43 +0000 (15:46 +0100)]
cpuidle: Fix possible false judge caused by type casting

For timer_deadline == 0 or timer_deadline - now > largest u32
case, the expected_us (in u32 type) may become wrong.

Add a tunable option to ease conditional adjustment.

Signed-off-by: Wei Gang <gang.wei@intel.com>
15 years agoxen public: make mmuext_op's vcpumask field const
Keir Fraser [Thu, 14 May 2009 14:46:04 +0000 (15:46 +0100)]
xen public: make mmuext_op's vcpumask field const

Linux started to pass around pointers to 'const cpumask_t' a while ago,
and passing such a pointer to set_xen_guest_handle() requires that the
field be a handle for a constant type in order to avoid compiler
warnings.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agox86 vmx: Ensure debug-mode intercept for int3 and debug exceptions are
Keir Fraser [Wed, 13 May 2009 09:39:44 +0000 (10:39 +0100)]
x86 vmx: Ensure debug-mode intercept for int3 and debug exceptions are
reinstated when resetting EXCEPTION_BIRTMAP entry in VMCS after
exiting real mode.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agopassthrough: Fix PCI hot-plug option parsing
Keir Fraser [Wed, 13 May 2009 09:28:35 +0000 (10:28 +0100)]
passthrough: Fix PCI hot-plug option parsing

When a PCI function is passed-through extra options may be passed
through.
In the case of boot-time PCI pass-through the documented format is:
    [dom:]bus:dev.slot[@vslot][[,opt]...]
    e.g.
    00:01.00.1@7,msitranslate=3D1

In the case of PCI hot-plug the xm pci-attach command take the
following arguments:
    [-o opt[,opt]...] [dom:]bus:dev.slot [vslot]
    e.g.
    -o msitranslate=3D1 00:01.00.1 7

    These xm ends up passing these to xem-qemu as:
    [dom:]bus:dev.slot[[,opt]...][@vslot]
    e.g.
    00:01.00.1,msitranslate=3D1@7

    Note that the option and the vslot have are transposed when
    compared to the format used by boot-time PCI pass-through.

The parser inside qemu-xen can only handle the format used by
boot-time PCI pass-through and because of this ignores
any options passed by hot-plug.

This patch alters format used by hot-plug to match the parser.

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years agox86: update ioport_quirks_tbl[] for the proliant BL2xx
Keir Fraser [Mon, 11 May 2009 12:52:04 +0000 (13:52 +0100)]
x86: update ioport_quirks_tbl[] for the proliant BL2xx

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agostubdom docs: Update to reflect the new way of configuring stubdom domains.
Keir Fraser [Mon, 11 May 2009 12:50:34 +0000 (13:50 +0100)]
stubdom docs: Update to reflect the new way of configuring stubdom domains.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agox86 hvm: hvm_set_callback_irq_level() must not be called in IRQ
Keir Fraser [Fri, 8 May 2009 10:50:12 +0000 (11:50 +0100)]
x86 hvm: hvm_set_callback_irq_level() must not be called in IRQ
context or with IRQs disabled. Ensure this by deferring to tasklet
(softirq) context if required.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoPermit user to suppress passing --prefix to setup.py
Keir Fraser [Thu, 7 May 2009 18:32:10 +0000 (19:32 +0100)]
Permit user to suppress passing --prefix to setup.py

We change all invocations of setup.py as follows:

* use $(PYTHON) instead of `python' so that the user can specify
  an alternative python version if they need to.  If not set it
  defaults to `python' in Config.mk.

* pass --prefix=$(PREFIX) via a new make variable
  $(PYTHON_PREFIX_ARG).  This allows a user to suppress the
  --prefix=... argument entirely by setting PYTHON_PREFIX_ARG=''.
  This will work around the bug described here
     https://bugs.launchpad.net/ubuntu/+bug/362570
  where passing --prefix=/usr/local (which ought to have no effect as
  /usr/local is the default prefix) changes which subdirectory
  distutils chooses, and results in the files being installed in
  site-packages which is not on the default search path.

  Users not affected by this python packaging bug should not set
  PYTHON_PREFIX_ARG and their builds will not be affected.  (Provided
  PREFIX did not contain spaces.  People who put spaces in PREFIX are
  being quite optimistic.)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoxend: fix the pci BDF format string
Keir Fraser [Thu, 7 May 2009 09:03:18 +0000 (10:03 +0100)]
xend: fix the pci BDF format string

Fix the typo introduced by changeset 19446:2ef77b4bdf58.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
16 years agox86: Extend VMX_PERF_EXIT_REASON_SIZE to sync with latest SDM
Keir Fraser [Wed, 6 May 2009 11:40:51 +0000 (12:40 +0100)]
x86: Extend VMX_PERF_EXIT_REASON_SIZE to sync with latest SDM

Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
16 years agox86: Fix a couple of asm constraints.
Keir Fraser [Mon, 4 May 2009 21:52:18 +0000 (22:52 +0100)]
x86: Fix a couple of asm constraints.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoUpdate Xen version for 3.4.0-rc4-pre
Keir Fraser [Thu, 30 Apr 2009 13:34:15 +0000 (14:34 +0100)]
Update Xen version for 3.4.0-rc4-pre

16 years agoAdded tag 3.4.0-rc3 for changeset 22e01301ff64
Keir Fraser [Thu, 30 Apr 2009 13:33:45 +0000 (14:33 +0100)]
Added tag 3.4.0-rc3 for changeset 22e01301ff64

16 years agoUpdate Xen version for 3.4.0-rc3
Keir Fraser [Thu, 30 Apr 2009 13:33:32 +0000 (14:33 +0100)]
Update Xen version for 3.4.0-rc3

16 years agocpuidle: Fix for timer_deadline==0 case
Keir Fraser [Thu, 30 Apr 2009 09:05:00 +0000 (10:05 +0100)]
cpuidle: Fix for timer_deadline==0 case

After the scheduler timer became suspended before entering cpu idle
state, the percpu timer_deadline is possible to be 0, i.e. no soft
timer in the queue. This case will cause unexpected large residency
percentage in C1 for the purely idle cpu.

Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoxenstore: Add brief notice regarding xenstore protocol limits to xs.h.
Keir Fraser [Thu, 30 Apr 2009 08:43:29 +0000 (09:43 +0100)]
xenstore: Add brief notice regarding xenstore protocol limits to xs.h.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86_32: Fix build after e820 verbosity printks.
Keir Fraser [Wed, 29 Apr 2009 12:54:57 +0000 (13:54 +0100)]
x86_32: Fix build after e820 verbosity printks.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86 shadow: fix audit mode.
Keir Fraser [Wed, 29 Apr 2009 10:53:23 +0000 (11:53 +0100)]
x86 shadow: fix audit mode.

Splintered L1s can have the dirty bit clean because of vram tracking.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
16 years agox86: Add boot options regarding e820 parsinga nd clipping.
Keir Fraser [Wed, 29 Apr 2009 10:52:14 +0000 (11:52 +0100)]
x86: Add boot options regarding e820 parsinga nd clipping.

 [no-]e820-mtrr-clip: Clip e820 RAM areas to top-of-memory according
 to MTRRs. Prefix no- to disable the clip.

 e820-verbose: Extra e820 info printed during boot.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86 vmx: Reuse idtv_info to avoid double read of IDT_VECTORING.
Keir Fraser [Tue, 28 Apr 2009 12:45:08 +0000 (13:45 +0100)]
x86 vmx: Reuse idtv_info to avoid double read of IDT_VECTORING.

Signed-off-by: Eddie Dong <eddie.dong@intel.com>
16 years agoUpdate XEN_LINUX_GIT_REMOTEBRANCH to match changes made in upstream
Keir Fraser [Mon, 27 Apr 2009 17:59:56 +0000 (18:59 +0100)]
Update XEN_LINUX_GIT_REMOTEBRANCH to match changes made in upstream
repo. Needed if you want setting KERNELS=linux-2.6-pvops in
config/Linux.mk to work.

Signed-off-by: Alex Zeffert <alex.zeffert@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
16 years agoxend: Fix for op_pincpu in SrvDomain.py
Keir Fraser [Mon, 27 Apr 2009 14:42:38 +0000 (15:42 +0100)]
xend: Fix for op_pincpu in SrvDomain.py

op_pincpu method in SrvDomain.py does not currently work because
op_pincpu method gives string objects to a cpumap argument of
domain_pincpu method in XendDomain.py though the cpumap argument
expects list objects.

This patch solves the above problem as follows.

op_pincpu method gives string objects to the cpumap argument as is,
because op_pincpu method cannot give list objects to the cpumap
argument.
Instead, domain_pincpu method expects that the cpumap argument is
string objects, then domain_pincpu method converts the cpumap
argument into list objects.
Also, the patch modifies two methods (except for op_pincpu method)
calling domain_pincpu method.  The methods give string objects to
the cpumap argument instead of list objects.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
16 years agoxend: fix cset 19547:b2c43b0fba71 (a managed domain may not shutdown)
Keir Fraser [Mon, 27 Apr 2009 14:41:28 +0000 (15:41 +0100)]
xend: fix cset 19547:b2c43b0fba71 (a managed domain may not shutdown)

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
16 years agox86 hvm: During task switch, LDT must be loaded before all other
Keir Fraser [Mon, 27 Apr 2009 14:40:09 +0000 (15:40 +0100)]
x86 hvm: During task switch, LDT must be loaded before all other
segments, as some may be loaded from the LDT.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86 vtd: Do not exclude freed percpu areas from dom0 vtd tables.
Keir Fraser [Sat, 25 Apr 2009 07:19:14 +0000 (08:19 +0100)]
x86 vtd: Do not exclude freed percpu areas from dom0 vtd tables.

Signed-off-by: Qing He <qing.he@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86: Detect bogus BIOS e820 tables which are not fully covered as
Keir Fraser [Fri, 24 Apr 2009 16:51:56 +0000 (17:51 +0100)]
x86: Detect bogus BIOS e820 tables which are not fully covered as
cacheable (WB) by MTRRs. Fix up by truncating the memory map.

This fixes performance issues on certain systems.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoxentrace: Clean up HVM I/O tracing.
Keir Fraser [Fri, 24 Apr 2009 12:46:17 +0000 (13:46 +0100)]
xentrace: Clean up HVM I/O tracing.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoxentrace: fix trivial typo.
Keir Fraser [Fri, 24 Apr 2009 12:20:55 +0000 (13:20 +0100)]
xentrace: fix trivial typo.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
16 years agoxend: modify the order of resetting/deassigning device.
Keir Fraser [Fri, 24 Apr 2009 12:19:37 +0000 (13:19 +0100)]
xend: modify the order of resetting/deassigning device.

  When guest OS shutdowns or a device is hotremoved.
   1. Xend resets devices.
   2. Xend deassigns devices.

Because if devices are deassigned before the reset, dom0 memory may be
overwritten by DMA.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agostubdoms: handle cdrom devices in the config file
Keir Fraser [Thu, 23 Apr 2009 15:22:48 +0000 (16:22 +0100)]
stubdoms: handle cdrom devices in the config file

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agox86 numa: Fix left shift overflows
Keir Fraser [Thu, 23 Apr 2009 11:21:29 +0000 (12:21 +0100)]
x86 numa: Fix left shift overflows

Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
16 years agostubdom: drop lwip support
Keir Fraser [Thu, 23 Apr 2009 11:19:14 +0000 (12:19 +0100)]
stubdom: drop lwip support

Network support is still provided the same way: using the tap
interface, created in qemu using netfront.
The lwip stack is still available to avoid additional compilation
issues.
However the stubdom is not going to have its own vif anymore,
this means that the only vnc server supported is the one in dom0.
You can still enable the vnc server in a stubdom at compile time, if
you want so.

Probably the most important change caused by this patch to xen users
is that you don't have to specify two vif in the stubdom config file
anymore, but just one:

-vif = [ '', 'ip=10.0.1.1,mac=aa:00:00:12:23:34']
+vif = ['ip=10.0.1.1,mac=aa:00:00:12:23:34']

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoxm: Fix hot-unplug of statically-assigned devices
Keir Fraser [Thu, 23 Apr 2009 09:11:33 +0000 (10:11 +0100)]
xm: Fix hot-unplug of statically-assigned devices

Prior to changset 19510:5c69f98c348e - 'xm, xend: Replace "vslt" with
"vslot"', both vslt and vslot were used in the xm code, often fairly
arbitrarily.

However, in the dictionary that describes a pci function both vslt and
vslot were present. vslt stored the slot assigned to the function. And
vslot stored the slot the user requested for the function, or
AUTO_PHP_SLOT if no slot was requested.

With the renaming these two values got merged into a single entry.
This patch un-merges them by renaming the what was vslot to
requested_vslot.

So an out of chronological order list of name changes is:

'vslot' -> 'requested_vslot'
'vslt'  -> 'vslot'

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years agox86: Remove bogus vtd frametable range check
Keir Fraser [Thu, 23 Apr 2009 09:10:11 +0000 (10:10 +0100)]
x86: Remove bogus vtd frametable range check

Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
16 years agoxend: Do not overwrite xauthority and display with empty values
Keir Fraser [Thu, 23 Apr 2009 09:09:16 +0000 (10:09 +0100)]
xend: Do not overwrite xauthority and display with empty values

Display and xauthority vars are read from vmConfig['platform'] first,
then they are read again from dev_info.
However if the user does not set those variable in the config file,
dev_info won't contain them, hence we are going to overwrite the
current significant values with null.
This patch fixes the problem setting display and xauthority to the
current values if dev_info does not contain them.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agostubdoms: generate stubdom config file
Keir Fraser [Thu, 23 Apr 2009 09:08:04 +0000 (10:08 +0100)]
stubdoms: generate stubdom config file

This patch removes the need for a second configuration file for
stubdoms: it is going to be automatically generated by the script
stubdom-dm using command line options and xenstore to find any needed
information.
The configuration script will be placed under /etc/xen/stubdoms and
automatically removed when the domain is destroyed.
The only change needed in xend is not to write on xenstore sdl,
opengl and serial command line options for qemu, because stubdoms do
not support them.
It is safe to remove those two options from xenstore because qemu does
not use xenstore to read commans line options.
Finally this patch fixes blkfront disconnections from backends and
display and xauthority variables for pv guests.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoxc_save: fixes typo in error message.
Keir Fraser [Wed, 22 Apr 2009 12:46:50 +0000 (13:46 +0100)]
xc_save: fixes typo in error message.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
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>