]> xenbits.xensource.com Git - xenclient/kernel.git/log
xenclient/kernel.git
16 years agovscsiif.h: define interface between frontend and backend driver
Keir Fraser [Mon, 2 Jun 2008 08:59:29 +0000 (09:59 +0100)]
vscsiif.h: define interface between frontend and backend driver

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agopvSCSI frontend driver
Keir Fraser [Mon, 2 Jun 2008 08:58:56 +0000 (09:58 +0100)]
pvSCSI frontend driver

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agopvSCSI backend driver
Keir Fraser [Mon, 2 Jun 2008 08:58:27 +0000 (09:58 +0100)]
pvSCSI backend driver

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agoxen: Set blocking timeout to 1/2 jiffy later than we want. This avoids
Keir Fraser [Fri, 30 May 2008 18:08:50 +0000 (19:08 +0100)]
xen: Set blocking timeout to 1/2 jiffy later than we want. This avoids
repeated early wakeup just before the jiffy tick, causing us to
effectively spin rather than sleep.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86_64: Remove warning message about 'Breaking affinity for irq'.
Keir Fraser [Tue, 27 May 2008 09:33:54 +0000 (10:33 +0100)]
x86_64: Remove warning message about 'Breaking affinity for irq'.

32-bit equivalent checked in as:
 http://xenbits.xensource.com/xen-unstable.hg/rev/d24ab5abf857

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
16 years agoxen: Do not allow gcc-3.4 to turn loop on a 64-bit variable into
Keir Fraser [Wed, 21 May 2008 16:04:37 +0000 (17:04 +0100)]
xen: Do not allow gcc-3.4 to turn loop on a 64-bit variable into
64-bit division, which the kernel does not support.

Signed-off-by: Guillaume Rousse <guillaume.rousse@inria.fr>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoAdd support for SB700 storage controllers.
Keir Fraser [Wed, 21 May 2008 10:11:00 +0000 (11:11 +0100)]
Add support for SB700 storage controllers.
Signed-off-by: Travis Betak <travis.betak@amd.com>
16 years agoxen: Sync sysctl.h for xen cpuidle statistic interface.
Keir Fraser [Wed, 21 May 2008 10:00:28 +0000 (11:00 +0100)]
xen: Sync sysctl.h for xen cpuidle statistic interface.
Signed-off-by: Wei Gang <gang.wei@intel.com>
16 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Tue, 20 May 2008 02:33:33 +0000 (11:33 +0900)]
merge with linux-2.6.18-xen.hg

16 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Thu, 15 May 2008 07:26:16 +0000 (16:26 +0900)]
merge with linux-2.6.18-xen.hg

16 years agoballoon: Fix minimum_target() check to work when built as a module.
Keir Fraser [Thu, 15 May 2008 08:42:27 +0000 (09:42 +0100)]
balloon: Fix minimum_target() check to work when built as a module.
From: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoacpi: Fix a bug related to parse named objects
Keir Fraser [Wed, 14 May 2008 12:53:06 +0000 (13:53 +0100)]
acpi: Fix a bug related to parse named objects

This patch is pulled from native linux, and is needed in our patchset
to make it run, otherwise will parse wrong _PSD info.

Fixed a problem with the Package operator where all named
references were created as object references and left otherwise
unresolved. According to the ACPI specification, a Package can
only contain Data Objects or references to control methods. The
implication is that named references to Data Objects (Integer,
Buffer, String, Package, BufferField, Field) should be resolved
immediately upon package creation. This is the approach taken
with this change. References to all other named objects (Methods,
Devices, Scopes, etc.) are all now properly created as reference
objects.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoxen: Basic framework of getting and notifying Px info
Keir Fraser [Wed, 14 May 2008 12:51:50 +0000 (13:51 +0100)]
xen: Basic framework of getting and notifying Px info

Setup basic framework for ACPI Px parse, get basic Px info,
transfer Px info to hypervisor through platform op hypercall.
Add external control for ACPI parse, add notify mechanism for
dynamic Px event (like ppc).

Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
17 years agoSync Xen public headers.
Keir Fraser [Wed, 14 May 2008 08:32:31 +0000 (09:32 +0100)]
Sync Xen public headers.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoAvoid theoretical TOCTTOU bug in block backend nr_segments checking.
Keir Fraser [Tue, 13 May 2008 09:28:48 +0000 (10:28 +0100)]
Avoid theoretical TOCTTOU bug in block backend nr_segments checking.

Based on a patch by Steven Smith <steven.smith@citrix.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxen: Cleanup of MSI code
Keir Fraser [Tue, 13 May 2008 08:32:00 +0000 (09:32 +0100)]
xen: Cleanup of MSI code

A few cleanups of the MSI code.  There were a couple of race
conditions in the use of msi_dev_head which this patch fixes.  Use
list_empty rather than list_empty_careful since pirq_list_head is only
ever accessed under pirq_list_lock.  I removed some unused variables.

Signed-off-by: Neil Turton <nturton@solarflare.com>
17 years agoSync with Xen pciif.h public header.
Keir Fraser [Tue, 13 May 2008 08:22:10 +0000 (09:22 +0100)]
Sync with Xen pciif.h public header.
Signed-off-by: Shan Haitao <Haitao.shan@intel.com>
17 years ago[IA64] implement xencomm routine for HVMOP_track_dirty_vram.
Isaku Yamahata [Tue, 13 May 2008 01:42:09 +0000 (10:42 +0900)]
[IA64] implement xencomm routine for HVMOP_track_dirty_vram.

This patches implement xencomm routine for HVMOP_track_dirty_vram hypercall.
Without this, using vfb results in annoying messages in dom0 as
> xencomm_privcmd_hvm_op: unknown HVMOP 6
xen/ia64 doesn't implement the hypercall at this moment so that
it simply returns -ENOSYS. So the xencomm routine returns -ENOSYS
directly without issuing the useless hypercall.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Tue, 13 May 2008 01:38:04 +0000 (10:38 +0900)]
merge with linux-2.6.18-xen.hg

17 years agoxen: Fix bug in MSI-X passthrough.
Keir Fraser [Mon, 12 May 2008 09:05:27 +0000 (10:05 +0100)]
xen: Fix bug in MSI-X passthrough.
Signed-off-by: Shan Haitao <Haitao.shan@intel.com>
17 years agoSync public Xen hedaers with xen-unstable.hg
Keir Fraser [Mon, 12 May 2008 09:03:08 +0000 (10:03 +0100)]
Sync public Xen hedaers with xen-unstable.hg
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoRemove some references to powerpc port.
Keir Fraser [Thu, 8 May 2008 12:44:57 +0000 (13:44 +0100)]
Remove some references to powerpc port.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoevtchn: Use wmb instead of rmb to enforce ordering between
Keir Fraser [Thu, 8 May 2008 10:55:42 +0000 (11:55 +0100)]
evtchn: Use wmb instead of rmb to enforce ordering between
evtchn_upcall_pending and evtchn_pending_sel stores.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agodefconfigs: Disable MSI support by default.
Keir Fraser [Thu, 8 May 2008 10:14:47 +0000 (11:14 +0100)]
defconfigs: Disable MSI support by default.
Signed-off-by: Hiroya INAKOSHI <inakoshi.hiroya@jp.fujitsu.com>
17 years agoIsolate Xen PM related code in dom0 with #ifdef CONFIG_XEN to avoid
Keir Fraser [Mon, 5 May 2008 09:17:41 +0000 (10:17 +0100)]
Isolate Xen PM related code in dom0 with #ifdef CONFIG_XEN to avoid
breaking native.

Signed-off-by: Wei Gang <gang.wei@intel.com>
17 years agoKeep platform.h sync with Xen side.
Keir Fraser [Mon, 5 May 2008 09:14:25 +0000 (10:14 +0100)]
Keep platform.h sync with Xen side.

Signed-off-by: Wei Gang <gang.wei@intel.com>
17 years agoi386/xen: Fix domU build.
Keir Fraser [Thu, 1 May 2008 10:28:23 +0000 (11:28 +0100)]
i386/xen: Fix domU build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoHandle dom0_max_vcpus < nr_pcpu cases, e.g. UP dom0.
Keir Fraser [Thu, 1 May 2008 09:53:37 +0000 (10:53 +0100)]
Handle dom0_max_vcpus < nr_pcpu cases, e.g. UP dom0.

Just try to pass info about all acpi processors to xen even in such cases.

Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
17 years agoNotify xen about Cx acpi info, such as table returned by _CST/_CSD methods.
Keir Fraser [Thu, 1 May 2008 09:53:07 +0000 (10:53 +0100)]
Notify xen about Cx acpi info, such as table returned by _CST/_CSD methods.

Add notifiers for P/T & hotplug as placeholders.
Add option "xen_processor_pmbits" for enable/disable control.

Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
17 years agoNotify ACPI processor events to external logic, including C/P/T and hotplug, etc.
Keir Fraser [Thu, 1 May 2008 09:52:31 +0000 (10:52 +0100)]
Notify ACPI processor events to external logic, including C/P/T and hotplug, etc.

Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
17 years agoAdd basic interface to allow ACPI processor events revealed to
Keir Fraser [Thu, 1 May 2008 09:52:06 +0000 (10:52 +0100)]
Add basic interface to allow ACPI processor events revealed to
external control logic like VMM.

Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
17 years agoMSI 6/6: add MSI support to domain0/domainU
Keir Fraser [Thu, 1 May 2008 09:35:30 +0000 (10:35 +0100)]
MSI 6/6: add MSI support to domain0/domainU

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
17 years agomerge with linux-2.6.18-xen.hg
Alex Williamson [Thu, 24 Apr 2008 20:08:54 +0000 (14:08 -0600)]
merge with linux-2.6.18-xen.hg

17 years agoxen, x86_64: Fix the build.
Keir Fraser [Tue, 22 Apr 2008 17:56:27 +0000 (18:56 +0100)]
xen, x86_64: Fix the build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agolinux/x86: set up machine_e820 in copy_e820_map() for it to be usable
Keir Fraser [Tue, 22 Apr 2008 13:41:51 +0000 (14:41 +0100)]
linux/x86: set up machine_e820 in copy_e820_map() for it to be usable
earlier (and also for being placed more logically).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agomerge with linux-2.6.18-xen.hg
Alex Williamson [Tue, 15 Apr 2008 17:10:27 +0000 (11:10 -0600)]
merge with linux-2.6.18-xen.hg

17 years agonetfront: Allow netfront in domain 0.
Keir Fraser [Tue, 15 Apr 2008 14:18:58 +0000 (15:18 +0100)]
netfront: Allow netfront in domain 0.

This is useful if your physical network device is in a utility domain.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
17 years agoxen: Don't allow mapping foreign pages through /dev/kmem
Keir Fraser [Tue, 15 Apr 2008 14:18:26 +0000 (15:18 +0100)]
xen: Don't allow mapping foreign pages through /dev/kmem
since the mapping will fail and crash dom0.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
CC: Christian Limpach <christian.limpach@citrix.com>
17 years agoxenbus: Don't try to talk to xenstore from dom0 when xenstore has
Keir Fraser [Tue, 15 Apr 2008 14:17:41 +0000 (15:17 +0100)]
xenbus: Don't try to talk to xenstore from dom0 when xenstore has
already been killed during reboot/shutdown.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Christian Limpach <christian.limpach@citrix.com>
17 years agoblkback: Set the VDISK_CDROM flag when a device is marked as being a
Keir Fraser [Tue, 15 Apr 2008 14:16:28 +0000 (15:16 +0100)]
blkback: Set the VDISK_CDROM flag when a device is marked as being a
cdrom, even if the underlying device/file is not a physical cdrom.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
CC: Christian Limpach <christian.limpach@citrix.com>
17 years agoFix inclusion of VDSO in core dumps.
Keir Fraser [Tue, 15 Apr 2008 14:15:26 +0000 (15:15 +0100)]
Fix inclusion of VDSO in core dumps.

This makes backtraces useful when they touch the VDSO.

Patch taken from linux-2.6-misc-fix-vdso-in-core-dumps.patch by Roland
McGrath in RHEL 5.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
CC: Roland McGrath <roland@redhat.com>
CC: Hollis Blanchard <hollisb@us.ibm.com>
17 years ago[IA64] Set memory attribute in inline asm
Alex Williamson [Mon, 14 Apr 2008 19:29:37 +0000 (13:29 -0600)]
[IA64] Set memory attribute in inline asm

Some priv_ops need memory attribulte in inline asm.  This avoids
potential issues if the compiler optimizes the functions.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
17 years agoxen: Fix typo of page structure name.
Keir Fraser [Mon, 14 Apr 2008 09:00:58 +0000 (10:00 +0100)]
xen: Fix typo of page structure name.

Signed-off-by: Michael Abd-El-Malek <mabelmalek@cmu.edu>
17 years agonetfront: Bug fixes to support arp link monitoring for bonding module
Keir Fraser [Thu, 10 Apr 2008 11:05:57 +0000 (12:05 +0100)]
netfront: Bug fixes to support arp link monitoring for bonding module

Signed-off-by: Masroor Vettuparambil <masroor.vettuparambil@neterion.com>
17 years agox86_64: Fix the build.
Keir Fraser [Tue, 8 Apr 2008 10:30:38 +0000 (11:30 +0100)]
x86_64: Fix the build.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoia64/xen: Fix the build after x86 acpi changes.
Keir Fraser [Sat, 5 Apr 2008 21:41:38 +0000 (22:41 +0100)]
ia64/xen: Fix the build after x86 acpi changes.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
17 years agolinux/balloon: don't allow ballooning down a domain below a reasonable limit
Keir Fraser [Sat, 5 Apr 2008 21:36:49 +0000 (22:36 +0100)]
linux/balloon: don't allow ballooning down a domain below a reasonable limit

Reasonable is hard to judge; we don't want to disallow small domains.
But the system needs a reasonable amount of memory to perform its
duties, set up tables, etc. If on the other hand, the admin is able
to set up and boot up correctly a very small domain, there's no point
in forcing it to be larger. We end up with some kind of logarithmic
function, approximated.

Signed-off-by: Kurt Garloff <garloff@suse.de>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agolinux/x86: fix powering off certain machines
Keir Fraser [Fri, 4 Apr 2008 12:27:48 +0000 (13:27 +0100)]
linux/x86: fix powering off certain machines

Dell's Precision490, for example, fails to properly power off without
going through the full sequence of operations in the hypervisor. Hence
acpi_notify_hypervisor_state() must be defined, and used for entry to
S5, regardless of CONFIG_ACPI_PV_SLEEP configuration.

Also fix a compiler warning and the improper use of a hypervisor
return value as ACPI status.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoxen, i386: Remove PAGE_UNUSED1 definition, as the bit is no longer
Keir Fraser [Fri, 4 Apr 2008 12:21:29 +0000 (13:21 +0100)]
xen, i386: Remove PAGE_UNUSED1 definition, as the bit is no longer
unused (we use it as PAGE_IO indicator).

Based on a patch by Jan Beulich <jbeulich@novell.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agofs/compat_ioctl.c: don't include Xen headers in non-Xen builds
Keir Fraser [Fri, 4 Apr 2008 12:11:28 +0000 (13:11 +0100)]
fs/compat_ioctl.c: don't include Xen headers in non-Xen builds

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoIA64: Bug fix for kexec to work on an HP rx2620 ia64 machine.
Keir Fraser [Fri, 4 Apr 2008 09:21:02 +0000 (10:21 +0100)]
IA64: Bug fix for kexec to work on an HP rx2620 ia64 machine.

 PCI: fix for quirk_e100_interrupt()

 Check that the e100 is in the D0 power state. If it's not, it won't
 respond to MMIO accesses and we end up with master-abort machine
 checks on some platforms.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
17 years agonetfront: Support set_mac_address()
Keir Fraser [Thu, 3 Apr 2008 10:36:05 +0000 (11:36 +0100)]
netfront: Support set_mac_address()

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
17 years agoxen evtchn: Rememeber to re-bind user-attached event channels to VCPU
Keir Fraser [Thu, 3 Apr 2008 10:30:56 +0000 (11:30 +0100)]
xen evtchn: Rememeber to re-bind user-attached event channels to VCPU
0 when the channel is closed.
From: Pascal Bouchareine <pascal@gandi.net>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years ago[IA64] avoid unnecessarily SWIOTLB bounce buffering
Alex Williamson [Wed, 2 Apr 2008 16:02:57 +0000 (10:02 -0600)]
[IA64] avoid unnecessarily SWIOTLB bounce buffering

x86 improved range_straddles_page_boundary() by the c/s 501:5486a234923d.
The same discussion applies to ia64. This patch is ia64 counter part of it.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agoUpdate public Xen sysctl.h file.
Keir Fraser [Fri, 16 May 2008 08:36:51 +0000 (09:36 +0100)]
Update public Xen sysctl.h file.
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
16 years agolinux/x86-64: initialization code cleanup
Keir Fraser [Thu, 15 May 2008 14:15:09 +0000 (15:15 +0100)]
linux/x86-64: initialization code cleanup

Since init_memory_mapping() installs the pgd entry after populating
all lower level tables, the whole mechanism can be coded to avoid
using xen_l?_entry_update() on pages that aren't page tables
(yet). Also, __set_pte() is a pure duplicate of set_pte() and hence
can go away.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux/x86: utilize lookup_address() for virt_to_ptep()
Keir Fraser [Thu, 15 May 2008 14:14:31 +0000 (15:14 +0100)]
linux/x86: utilize lookup_address() for virt_to_ptep()
Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoDo not unmap all MSI-X pirqs when enabling MSI-X
Keir Fraser [Thu, 15 May 2008 09:03:29 +0000 (10:03 +0100)]
Do not unmap all MSI-X pirqs when enabling MSI-X

Originally, all existing MSI-X pirqs of that device are unmapped
before mapping the required MSI-X entries. This is actually not
right. This function may be called several times, with each time
requiring enabling different parts of the device MSI-X entry. Former
pirqs should not be unmapped.

Thanks for Neil Turton's comments on this problem.

Signed-off-by: Shan Haitao <Haitao.shan@intel.com>
17 years agomerge with linux-2.6.18-xen.hg
Alex Williamson [Tue, 1 Apr 2008 17:29:31 +0000 (11:29 -0600)]
merge with linux-2.6.18-xen.hg

17 years agomerge with linux-2.6.18-xen.hg
Alex Williamson [Tue, 25 Mar 2008 18:37:54 +0000 (12:37 -0600)]
merge with linux-2.6.18-xen.hg

17 years agoSupport for ICH10 chipset PCI IDs.
Keir Fraser [Wed, 26 Mar 2008 08:52:36 +0000 (08:52 +0000)]
Support for ICH10 chipset PCI IDs.
Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
17 years agonetback accel: Avoid BUG_ON when vifs have conflicting MAC addresses
Keir Fraser [Tue, 25 Mar 2008 17:54:59 +0000 (17:54 +0000)]
netback accel: Avoid BUG_ON when vifs have conflicting MAC addresses

Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
17 years ago[IA64] Need to set psr.ac in page_fault
Alex Williamson [Tue, 25 Mar 2008 16:23:28 +0000 (10:23 -0600)]
[IA64] Need to set psr.ac in page_fault

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
17 years agoSync Xen public headers with xen-unstable tip.
Keir Fraser [Mon, 31 Mar 2008 17:07:41 +0000 (18:07 +0100)]
Sync Xen public headers with xen-unstable tip.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxen: fix grant table bug
Keir Fraser [Mon, 31 Mar 2008 10:03:07 +0000 (11:03 +0100)]
xen: fix grant table bug

A PV OS has two grant table data structures: the grant table itself
and a free list.  The free list is composed of an array of pages,
which grow dynamically as the guest OS requires more grants.  While
the grant table contains 8-byte entries, the free list contains 4-byte
entries.  So we have half as many pages in the free list than in the
grant table.

There was a bug in the free list allocation code. The free list was
indexed as if it was the same size as the grant table.  But it's only
half as large.  So memory got corrupted, and I was seeing crashes in
the slab allocator later on.

Signed-off-by: Michael Abd-El-Malek <mabdelmalek@cmu.edu>
17 years agoXen dma: avoid unnecessarily SWIOTLB bounce buffering.
Keir Fraser [Mon, 31 Mar 2008 09:32:25 +0000 (10:32 +0100)]
Xen dma: avoid unnecessarily SWIOTLB bounce buffering.

On Xen kernels, BIOVEC_PHYS_MERGEABLE permits merging of disk IOs that
span multiple pages, provided that the pages are both
pseudophysically- AND machine-contiguous ---

        (((bvec_to_phys((vec1)) + (vec1)->bv_len) ==
        bvec_to_phys((vec2))) && \
         ((bvec_to_pseudophys((vec1)) + (vec1)->bv_len) == \
          bvec_to_pseudophys((vec2))))

However, this best-effort merging of adjacent pages can occur in
regions of dom0 memory which just happen, by virtue of having been
initially set up that way, to be machine-contiguous.  Such pages
which occur outside of a range created by xen_create_contiguous_
region won't be seen as contiguous by range_straddles_page_boundary(),
so the pci-dma-xen.c code for dma_map_sg() will send these regions
to the swiotlb for bounce buffering.

This patch adds a new check, check_pages_physically_contiguous(),
to the test for pages stradding page boundaries both in
swiotlb_map_sg() and dma_map_sg(), to capture these ranges and map
them directly via virt_to_bus() mapping rather than through the
swiotlb.

Signed-off-by: Stephen Tweedie <sct@redhat.com>
17 years agoballon sysfs: Avoid sysfs name-clash with Linux memory hotplug
Keir Fraser [Fri, 28 Mar 2008 14:27:38 +0000 (14:27 +0000)]
ballon sysfs: Avoid sysfs name-clash with Linux memory hotplug
infrastructure by renaming to /sys/devices/system/xen_memory/
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoAvoid kernel hang reading /sys/hypervisor/uuid if xenstore is not available.
Ian Campbell [Fri, 28 Mar 2008 10:21:17 +0000 (10:21 +0000)]
Avoid kernel hang reading /sys/hypervisor/uuid if xenstore is not available.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
17 years agoAvoid deadlock when unregistering a xenbus watch.
Ian Campbell [Fri, 28 Mar 2008 09:49:22 +0000 (09:49 +0000)]
Avoid deadlock when unregistering a xenbus watch.

Watch handlers which run in a separate thread (XBWF_new_thread) should
run without the xenbus_mutex held since kthread_run can block waiting
for memory which causes a deadlock if further watches need to be
unregistered in order to activate the swap device on resume.

XBWF_new_thread cannot be safely unregistered anyway since the mutex
only protects thread startup.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
17 years agoAvoid another allocation on the resume path which can lead to deadlock
Ian Campbell [Fri, 28 Mar 2008 09:44:51 +0000 (09:44 +0000)]
Avoid another allocation on the resume path which can lead to deadlock
if the swap device isn't present yet.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
17 years agoblkback: Fix creation of grant-unmap array in fast_flush_area().
Keir Fraser [Thu, 27 Mar 2008 17:56:50 +0000 (17:56 +0000)]
blkback: Fix creation of grant-unmap array in fast_flush_area().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agopcifront: Fix an error message in device detachment.
Keir Fraser [Thu, 27 Mar 2008 17:12:14 +0000 (17:12 +0000)]
pcifront: Fix an error message in device detachment.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
17 years agopfvb: Add offset in resize event.
Keir Fraser [Wed, 26 Mar 2008 14:11:25 +0000 (14:11 +0000)]
pfvb: Add offset in resize event.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agopciback: Make PV PCI hotplug work with CONFIG_XEN_PCIDEV_BACKEND_PASS
Keir Fraser [Wed, 26 Mar 2008 11:08:08 +0000 (11:08 +0000)]
pciback: Make PV PCI hotplug work with CONFIG_XEN_PCIDEV_BACKEND_PASS

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
17 years agoxen, i386: Fix non-PAE build failure.
Keir Fraser [Wed, 26 Mar 2008 09:07:52 +0000 (09:07 +0000)]
xen, i386: Fix non-PAE build failure.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxenfb: Dynamic modes support
Keir Fraser [Wed, 26 Mar 2008 08:54:24 +0000 (08:54 +0000)]
xenfb: Dynamic modes support

Corresponding backend IOEMU patch is required for functionality but
this patch is not dependent on it, preserving backwards compatibility.

Signed-off-by: Pat Campbell <plc@novell.com>
17 years agoxen, x86: Track foreign and I/O mappings with a new pte flag, and do
Keir Fraser [Thu, 20 Mar 2008 11:35:25 +0000 (11:35 +0000)]
xen, x86: Track foreign and I/O mappings with a new pte flag, and do
not subject such ptes to conversions to/from pseudophysical addresses.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agopciback: Trivial coding style fix.
Keir Fraser [Wed, 19 Mar 2008 10:23:31 +0000 (10:23 +0000)]
pciback: Trivial coding style fix.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
17 years agoxen: Fix the build.
Keir Fraser [Tue, 18 Mar 2008 19:37:33 +0000 (19:37 +0000)]
xen: Fix the build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxen: Variable-size gntdev support
Keir Fraser [Tue, 18 Mar 2008 15:01:09 +0000 (15:01 +0000)]
xen: Variable-size gntdev support

This patch adds the ability to set the number of slots that may be
used for mapping grant references, using the gntdev user-space grant
reference mapping driver.

Signed-off-by: Derek Murray <Derek.Murray@cl.cam.ac.uk>
17 years agonetfront accel: Reduce length of accel_watch workqueue name
Keir Fraser [Tue, 18 Mar 2008 11:43:42 +0000 (11:43 +0000)]
netfront accel: Reduce length of accel_watch workqueue name

As reported reported (see link below) the first argument to
create_workqueue is limited to 10 character on RHEL4U2.  This patch
shortens the length and makes the workqueue name a little more
descriptive.

http://lists.xensource.com/archives/html/xen-devel/2008-03/msg00417.html

Signed-off-by: Neil Turton <nturton@solarflare.com>
17 years agoxen/x86: simplify synch_test_bit()
Keir Fraser [Tue, 18 Mar 2008 11:24:01 +0000 (11:24 +0000)]
xen/x86: simplify synch_test_bit()

There really is no need for a redundant implementation here, just keep
the alternative name for allowing consumers to use consistent naming.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoxen/i386: re-add and use pre_setup_arch_hook()
Keir Fraser [Tue, 18 Mar 2008 11:22:54 +0000 (11:22 +0000)]
xen/i386: re-add and use pre_setup_arch_hook()

It was only during the 2.6.25 merge that I realized that there was a
difference to native code that was not only unnecessary, but even
preventing the Xen version from being better readable and closer to
native both in terms of source code and behavior:
pre_setup_arch_hook() can do everything that (or equivalent to what)
x86-64 does in head64-xen.c. Apart from that it simplifies forward
porting, since certain pieces set up here are required to be available
much earlier in newer Linux.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoxen: satisfy newer modpost requirements, part 2
Keir Fraser [Tue, 18 Mar 2008 11:21:44 +0000 (11:21 +0000)]
xen: satisfy newer modpost requirements, part 2

References to __devinit probe functions are considered valid by newer
modprobe if the containing structure is named in certain ways. Use the
_driver suffix where necessary.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoxen/x86-64: slightly simplify smp-xen.c
Keir Fraser [Tue, 18 Mar 2008 11:20:34 +0000 (11:20 +0000)]
xen/x86-64: slightly simplify smp-xen.c

Two Xen conditionals can be folded into one, as the code between the
two is also not used on Xen.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoxen/x86-64: ia32entry.S doesn't need xen_entry.S anymore
Keir Fraser [Tue, 18 Mar 2008 11:19:54 +0000 (11:19 +0000)]
xen/x86-64: ia32entry.S doesn't need xen_entry.S anymore
Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoxen/i386: change the way trampoline.S building is suppressed
Keir Fraser [Tue, 18 Mar 2008 11:18:57 +0000 (11:18 +0000)]
xen/i386: change the way trampoline.S building is suppressed

Instead of using the disabled-obj-$() mechanism, preventing
trampoline.S from being built can be done simply be adding a config
option dependency.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoxen pcifront: satisfy newer modpost requirements
Keir Fraser [Tue, 18 Mar 2008 11:18:06 +0000 (11:18 +0000)]
xen pcifront: satisfy newer modpost requirements

pcifront_scan_root() calls pci_scan_bus_parented() possibly after core
kernel initialization, but that latter function is marked __devinit.
While HOTPLUG can be turned off only under EMBEDDED, 2.6.25's modpost
still (validly) catches this as an incorrect reference. Marking
pcifront_scan_root() __init_refok seems too dangerous, however, so
instead the much more streamlined pcifront_backend_changed() is being
marked so, and the rest of the offending dependencies is being marked
__devinit, and XEN_PCIDEV_FRONTEND now selects HOTPLUG to make it
independend of any changes in HOTPLUG's prompt visibility.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoxen/x86: put trap initialization code/data into cpuinit space
Keir Fraser [Tue, 18 Mar 2008 11:17:05 +0000 (11:17 +0000)]
xen/x86: put trap initialization code/data into cpuinit space
Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agolinux/x86-64: make original definition of VGCF_IN_SYSCALL usable in assembly
Keir Fraser [Tue, 18 Mar 2008 11:16:03 +0000 (11:16 +0000)]
linux/x86-64: make original definition of VGCF_IN_SYSCALL usable in assembly
Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoxen: validate type and value of the dtor argument of SetPageForeign()
Keir Fraser [Tue, 18 Mar 2008 11:13:37 +0000 (11:13 +0000)]
xen: validate type and value of the dtor argument of SetPageForeign()

Linux 2.6.25 changes the protoype of pte_free() etc., resulting in
those functions no longer be suitable as a PageForeign destructor. I
had to find out by way of analysing a crash, but for the future it'd
be much better if the build would already indicate a problem with
this.

At the same time, also check the destructor supplied is not NULL.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoxen,x86: fix warnings introduced by c/s 468
Keir Fraser [Mon, 17 Mar 2008 11:21:25 +0000 (11:21 +0000)]
xen,x86: fix warnings introduced by c/s 468

I overlooked the compiler warnings resulting from cases where the
argument of __pte_ma() is a plain zero.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoxen, x86: get_phys_id hypercall interface change.
Keir Fraser [Mon, 10 Mar 2008 22:53:07 +0000 (22:53 +0000)]
xen, x86: get_phys_id hypercall interface change.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxenbus: properly qualify all static 'struct xenbus_device_id' instances
Keir Fraser [Wed, 5 Mar 2008 17:29:05 +0000 (17:29 +0000)]
xenbus: properly qualify all static 'struct xenbus_device_id' instances

include/xen/xenbus.h nicely declares struct xenbus_driver's 'ids'
member as pointer to const...

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoxenbus: prevent warnings on unhandled enumeration values
Keir Fraser [Wed, 5 Mar 2008 17:28:41 +0000 (17:28 +0000)]
xenbus: prevent warnings on unhandled enumeration values

XenbusStateReconfiguring/XenbusStateReconfigured were introduced by
c/s 437, but aren't handled in many switch statements. This c/s also
introduced a possibly un-referenced label, which also gets eliminated
here.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agolinux: fix pv driver build
Keir Fraser [Wed, 5 Mar 2008 17:28:04 +0000 (17:28 +0000)]
linux: fix pv driver build

When building with -Werror-implicit-function-declaration, the addition
of is_initial_xen_domain() checks in drivers/xen/netfront/accel.c
causes the build to fail.

Additionally, drivers/xen/netfront/netfront.c illegally (and
needlessly) includes xen/hypercall.h directly.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agolinux/i386-pae: fix __pte_ma()
Keir Fraser [Wed, 5 Mar 2008 17:27:36 +0000 (17:27 +0000)]
linux/i386-pae: fix __pte_ma()

While at present there's no use of the macro that would suffer from
this problem, this is a latent bug and should therefore be fixed (just
like __pte() in the native kernel).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agolinux/x86-64: remove stale MCA_bus definition
Keir Fraser [Wed, 5 Mar 2008 17:27:09 +0000 (17:27 +0000)]
linux/x86-64: remove stale MCA_bus definition

Apparently a merge oversight that pre-dates 2.6.16.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agox86 xen: New vcpu_op call to get physical CPU identity.
Keir Fraser [Wed, 5 Mar 2008 11:09:41 +0000 (11:09 +0000)]
x86 xen: New vcpu_op call to get physical CPU identity.

Some AMD machines have APIC IDs that not equal to CPU IDs. In
the default Xen configuration, ACPI calls on these machines
can get confused. This shows up most noticeably when running
AMD PowerNow!. The only solution is for dom0 to get the
hypervisor's cpuid to apicid table when needed (ie, when dom0
vcpus are pinned).

Add a vcpu op to Xen to allow dom0 to query the hypervisor for
architecture dependent physical cpu information if dom0 vcpus are
pinned.

Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxen suspend: Fix write-after-read error on fast_suspend flag.
Keir Fraser [Mon, 3 Mar 2008 13:36:57 +0000 (13:36 +0000)]
xen suspend: Fix write-after-read error on fast_suspend flag.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>