Commit Graph
19599 Commits
Author SHA1 Message Date
Keir Fraser 9f97da694d 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>
2009-05-13 10:28:35 +01:00
Keir Fraser 1930ad84e4 x86: update ioport_quirks_tbl[] for the proliant BL2xx
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2009-05-11 13:52:04 +01:00
Keir Fraser a9f4e68513 stubdom docs: Update to reflect the new way of configuring stubdom domains.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-05-11 13:50:34 +01:00
Keir Fraser a5db2986d4 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>
2009-05-08 11:50:12 +01:00
Keir Fraser 727a00e80e 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>
2009-05-07 19:32:10 +01:00
Keir Fraser ca8d042e26 xend: fix the pci BDF format string
Fix the typo introduced by changeset 19446:2ef77b4bdf58.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2009-05-07 10:03:18 +01:00
Keir Fraser 605c6166fc x86: Extend VMX_PERF_EXIT_REASON_SIZE to sync with latest SDM
Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
2009-05-06 12:40:51 +01:00
Keir Fraser 8d305f1efe x86: Fix a couple of asm constraints.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-05-04 22:52:18 +01:00
Keir Fraser 311f9004e8 Update Xen version for 3.4.0-rc4-pre 2009-04-30 14:34:15 +01:00
Keir Fraser f9d73d4855 Added tag 3.4.0-rc3 for changeset 22e01301ff64 2009-04-30 14:33:45 +01:00
Keir Fraser fcaf4a2871 Update Xen version for 3.4.0-rc3 3.4.0-rc3 2009-04-30 14:33:32 +01:00
Keir Fraser 7145897cfb 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>
2009-04-30 10:05:00 +01:00
Keir Fraser ffc362fcd3 xenstore: Add brief notice regarding xenstore protocol limits to xs.h.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-04-30 09:43:29 +01:00
Keir Fraser f6171aa18d x86_32: Fix build after e820 verbosity printks.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-04-29 13:54:57 +01:00
Keir Fraser ea5f19324f 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>
2009-04-29 11:53:23 +01:00
Keir Fraser 9d85142e67 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>
2009-04-29 11:52:14 +01:00
Keir Fraser 1e906caa0a x86 vmx: Reuse idtv_info to avoid double read of IDT_VECTORING.
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
2009-04-28 13:45:08 +01:00
Keir Fraser 80ff70bc1c 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>
2009-04-27 18:59:56 +01:00
Keir Fraser 55a21ac087 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>
2009-04-27 15:42:38 +01:00
Keir Fraser 0d5ae43e5f xend: fix cset 19547:b2c43b0fba71 (a managed domain may not shutdown)
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2009-04-27 15:41:28 +01:00
Keir Fraser 1908c5cf43 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>
2009-04-27 15:40:09 +01:00
Keir Fraser 5dd00021b3 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>
2009-04-25 08:19:14 +01:00
Keir Fraser 522b335995 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>
2009-04-24 17:51:56 +01:00
Keir Fraser 3326419806 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>
2009-04-24 13:46:17 +01:00
Keir Fraser 0bd0cce37e xentrace: fix trivial typo.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-04-24 13:20:55 +01:00
Keir Fraser 94e98d9fff 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>
2009-04-24 13:19:37 +01:00
Keir Fraser 4a696a0a86 stubdoms: handle cdrom devices in the config file
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-04-23 16:22:48 +01:00
Keir Fraser 9e8fd772d0 x86 numa: Fix left shift overflows
Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
2009-04-23 12:21:29 +01:00
Keir Fraser 82ed447498 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>
2009-04-23 12:19:14 +01:00
Keir Fraser 5bacab3172 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>
2009-04-23 10:11:33 +01:00
Keir Fraser b0514069f1 x86: Remove bogus vtd frametable range check
Signed-off-by:  Joseph Cihula <joseph.cihula@intel.com>
2009-04-23 10:10:11 +01:00
Keir Fraser 00f3705554 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>
2009-04-23 10:09:16 +01:00
Keir Fraser da27f6d8b7 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>
2009-04-23 10:08:04 +01:00
Keir Fraser 575479154d xc_save: fixes typo in error message.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-04-22 13:46:50 +01:00
Keir Fraser 744ba6479a 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>
2009-04-22 11:26:37 +01:00
Keir Fraser 946a02890c intel vtd: Remove the BUG_ON in domain_context_mapping().
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2009-04-21 16:31:26 +01:00
Isaku Yamahata 23eab25ed0 [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
2009-04-21 18:27:59 +09:00
Keir Fraser 33ac804deb 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>
2009-04-20 15:38:29 +01:00
Keir Fraser 5aa2a526e2 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>
2009-04-20 14:56:31 +01:00
Keir Fraser c6c343f888 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>
2009-04-20 13:48:31 +01:00
Keir Fraser e4640b6f1f 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>
2009-04-17 17:39:05 +01:00
Keir Fraser 7fdf62c44f 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>
2009-04-17 13:16:39 +01:00
Keir Fraser ede78f509c 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>
2009-04-17 13:14:01 +01:00
Keir Fraser cebd2137ea 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>
2009-04-17 13:07:06 +01:00
Keir Fraser 9d09f146c9 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>
2009-04-17 13:04:47 +01:00
Keir Fraser 3d506a34a7 Update Xen version for 3.4.0-rc3-pre 2009-04-16 11:54:06 +01:00
Keir Fraser 05a68a8bc4 Added tag 3.4.0-rc2 for changeset 087854cf3ed9 2009-04-16 11:53:46 +01:00
Keir Fraser a17d8d5c8d Update Xen version for 3.4.0-rc2 3.4.0-rc2 2009-04-16 11:53:38 +01:00
Keir Fraser 5f4f4697d5 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>
2009-04-16 11:52:08 +01:00
Keir Fraser d09486dba3 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>
2009-04-15 15:47:25 +01:00