]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/log
legacy/linux-2.6.18-xen.git
14 years agoia64, xencomm: fix 1018:b7eb9756e522
Keir Fraser [Fri, 11 Jun 2010 08:37:25 +0000 (09:37 +0100)]
ia64, xencomm: fix 1018:b7eb9756e522

This fixes the following errors:
  /arch/ia64/xen/xcom_privcmd.c: In function `xencomm_privcmd_sysctl':
  /arch/ia64/xen/xcom_privcmd.c:295: error: case label not within a
  switch statement
  /arch/ia64/xen/xcom_privcmd.c:305: error: break statement not within
  loop or switch

Since 1018:b7eb9756e522 inserted lines in outside of a switch
statement. This patch corrects it.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
14 years agoia64, xencomm: support XEN_SYSCTL_topologyinfo and XEN_SYSCTL_numainfo
Keir Fraser [Mon, 7 Jun 2010 05:57:35 +0000 (06:57 +0100)]
ia64, xencomm: support XEN_SYSCTL_topologyinfo and XEN_SYSCTL_numainfo

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
14 years agoia64, xencomm: support XEN_SYSCTL_cpupool_op
Keir Fraser [Mon, 7 Jun 2010 05:57:11 +0000 (06:57 +0100)]
ia64, xencomm: support XEN_SYSCTL_cpupool_op

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
15 years agoSync with latest Xen public headers.
Keir Fraser [Thu, 6 May 2010 14:52:48 +0000 (15:52 +0100)]
Sync with latest Xen public headers.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoblktap: make debugging messages a little more meaningful
Keir Fraser [Thu, 22 Apr 2010 08:36:11 +0000 (09:36 +0100)]
blktap: make debugging messages a little more meaningful

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoblktap: fix cleanup after unclean application exit #2
Keir Fraser [Thu, 22 Apr 2010 08:35:46 +0000 (09:35 +0100)]
blktap: fix cleanup after unclean application exit #2

When an application using blktap devices doesn't close the mmap-s of
/dev/xen/blktapN and the frontend driver never connects, we cannot
defer the mmput() on the stored mm until blktap_release() or the exit
path of the worker thread, as the former will never be called without
the mm's reference count dropping to zero, and the worker thread
would never get started.

Also remove a left-over from c/s 1013.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxen/blktap: fix various checks
Keir Fraser [Mon, 19 Apr 2010 16:19:56 +0000 (17:19 +0100)]
xen/blktap: fix various checks

- array indices got checked after having indexed the array already
- several were off by one
- BLKTAP_IOCTL_FREEINTF should not be used on other than the control
  device (or the logic should be changed to that when thus used only
  the respective device can be freed)
- BLKTAP_IOCTL_MINOR can reasonably also be used on non-control
- devices
  (returning that device's minor and ignoring the passed in argument)

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxen/blktap: fix cleanup after unclean application exit
Keir Fraser [Mon, 19 Apr 2010 16:19:23 +0000 (17:19 +0100)]
xen/blktap: fix cleanup after unclean application exit

When an application using blktap devices doesn't close the file handle
(or mmap-s) of /dev/xen/blktapN, we cannot defer the mmput() on the
stored mm until blktap_release(), as that will never be called without
the mm's reference count dropping to zero.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxen/x86-64: kern_addr_valid() must not walk page tables mapping hypervisor space
Keir Fraser [Mon, 12 Apr 2010 16:34:34 +0000 (17:34 +0100)]
xen/x86-64: kern_addr_valid() must not walk page tables mapping hypervisor space

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxen/balloon: Fix return value interpretation for XENMEM_get_pod_target
Keir Fraser [Tue, 30 Mar 2010 17:28:34 +0000 (18:28 +0100)]
xen/balloon: Fix return value interpretation for XENMEM_get_pod_target

Unfortunately c/s 989 didn't consider what I would call a quirk in
pre-3.4 Xen, resulting in XENMEM_get_pod_target calls to not return
-ENOSYS as one would normally expect.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agopci: fix PCI resource reservation option parsing
Keir Fraser [Thu, 25 Mar 2010 10:00:03 +0000 (10:00 +0000)]
pci: fix PCI resource reservation option parsing

Start looking for the second '+' after the first one (rather than at
the beginning again). Also fail if second string cannot be parsed.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agopvscsi: allow pvscsi hba driver to be loaded automatically
Keir Fraser [Thu, 25 Mar 2010 09:59:38 +0000 (09:59 +0000)]
pvscsi: allow pvscsi hba driver to be loaded automatically

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agopvusb: allow pvusb hcd driver to be loaded automatically
Keir Fraser [Thu, 25 Mar 2010 09:59:07 +0000 (09:59 +0000)]
pvusb: allow pvusb hcd driver to be loaded automatically

From: jsong@novell.com
Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agolinux: small ACPI processor external control code adjustments
Keir Fraser [Wed, 17 Mar 2010 08:32:52 +0000 (08:32 +0000)]
linux: small ACPI processor external control code adjustments

- don't send a change notification to Xen before having sent an init
  one
- fix a bogus preprocessor directive

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoblkback: Fix the build.
Keir Fraser [Mon, 15 Mar 2010 17:05:28 +0000 (17:05 +0000)]
blkback: Fix the build.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoxenblk: dynamic vbd resizing
Keir Fraser [Mon, 15 Mar 2010 13:31:19 +0000 (13:31 +0000)]
xenblk: dynamic vbd resizing
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
15 years agousbfront: fix some bugs
Keir Fraser [Mon, 15 Mar 2010 13:20:21 +0000 (13:20 +0000)]
usbfront: fix some bugs

Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
15 years agopciback: Replace commented-out use of dev->enable_cnt with dev->is_enabled.
Keir Fraser [Mon, 1 Mar 2010 10:19:41 +0000 (10:19 +0000)]
pciback: Replace commented-out use of dev->enable_cnt with dev->is_enabled.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoblkfront: Fix an unlikely xenbus crasher
Keir Fraser [Mon, 1 Mar 2010 09:56:52 +0000 (09:56 +0000)]
blkfront: Fix an unlikely xenbus crasher

Getting partition 0 should not fail, but if it does we won't continue.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoblktap2: Fix queue restart, racing block device removal.
Keir Fraser [Mon, 1 Mar 2010 09:56:15 +0000 (09:56 +0000)]
blktap2: Fix queue restart, racing block device removal.

Makes tapdisk context test dev->gd before attempting a queue restart,
with the device lock held. Fixes a race lost against device
destruction, which may issued anywhere on the control path.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoblktap2: Fwd: Fix wild ptr deref during device destruction.
Keir Fraser [Mon, 1 Mar 2010 09:55:54 +0000 (09:55 +0000)]
blktap2: Fwd: Fix wild ptr deref during device destruction.

A put_disk() before blk_cleanup_queue() would free gd before gd->queue
is read.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoGuest SR-IOV: Replace previous changeset with a more complete implementation from...
Keir Fraser [Mon, 1 Mar 2010 09:55:09 +0000 (09:55 +0000)]
Guest SR-IOV: Replace previous changeset with a more complete implementation from Intel

"""Guest SR-IOV support for PV guest

These changes are for PV guest to use Virtual Function. Because the
VF's vendor, device registers in cfg space are 0xffff, which are
invalid and ignored by PCI device scan. Values in 'struct pci_dev' are
fixed up by SR-IOV code, and using these values will present correct
VID and DID to PV guest kernel.

And command registers in the cfg space are read only 0, which means we
have to emulate MMIO enable bit (VF only uses MMIO resource) so PV
kernel can work properly."""

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agopciback: Fix SRIOV VF passthru
Keir Fraser [Fri, 26 Feb 2010 17:15:45 +0000 (17:15 +0000)]
pciback: Fix SRIOV VF passthru

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

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

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agolinux/x86: fix long timeout handling in stop_hz_timer()
Keir Fraser [Mon, 22 Feb 2010 10:03:18 +0000 (10:03 +0000)]
linux/x86: fix long timeout handling in stop_hz_timer()

Other than for HYPERVISOR_set_timer_op, zero doesn't mean "no timeout"
for VCPUOP_set_singleshot_timer (but should be retained rather than
adjusted by NS_PER_TICK/2 for the former).

Also properly cancel the singleshot timer is start_hz_timer().

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoAdditional PCI IDs to support AHCI-compliant Nvidia SATA controllers
Keir Fraser [Mon, 15 Feb 2010 17:44:01 +0000 (17:44 +0000)]
Additional PCI IDs to support AHCI-compliant Nvidia SATA controllers

Backported the Nvidia PCI IDs for the AHCI SATA driver from the 2.6.30
mainline kernel.

From: Moritz Muehlenhoff <muehlenhoff@univention.de>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoRemus: turn on IMQ in xen/xen0 defconfig
Keir Fraser [Thu, 11 Feb 2010 19:47:52 +0000 (19:47 +0000)]
Remus: turn on IMQ in xen/xen0 defconfig

This module is needed for Remus network buffering.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
15 years agoxen/blkfront: don't access freed struct xenbus_device
Keir Fraser [Thu, 4 Feb 2010 13:08:27 +0000 (13:08 +0000)]
xen/blkfront: don't access freed struct xenbus_device

Unfortunately c/s 983 still wasn't quite right - there was a reference
to freed memory left from blkfront_closing().

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxen/i386: dma_addr_t must always be 64 bits wide
Keir Fraser [Thu, 4 Feb 2010 08:54:27 +0000 (08:54 +0000)]
xen/i386: dma_addr_t must always be 64 bits wide

Irrespective of CONFIG_HIGHMEM settings, DMA addresses must always be
64-bit wide.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxen/evtchn: Remove redundant clear of l2i at end of round-robin loop
Keir Fraser [Wed, 3 Feb 2010 11:20:36 +0000 (11:20 +0000)]
xen/evtchn: Remove redundant clear of l2i at end of round-robin loop

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoxen/evtchn: MAke round-robin scan fairer by snapshotting each l2 word
Keir Fraser [Wed, 3 Feb 2010 09:30:46 +0000 (09:30 +0000)]
xen/evtchn: MAke round-robin scan fairer by snapshotting each l2 word
once only (except for starting l2 word, which we scan in two parts).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoxen/balloon: fix balloon driver accounting for HVM-with-PoD case
Keir Fraser [Mon, 1 Feb 2010 14:12:36 +0000 (14:12 +0000)]
xen/balloon: fix balloon driver accounting for HVM-with-PoD case

With PoD, ballooning down a guest to the target set through xenstore
based on its totalram_pages value isn't sufficient, since that value
doesn't include all the pages assigned to the guest. Since the delta
is static, determine it once at load time.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxen/evtchn: Clean up round-robin evtchn scan.
Keir Fraser [Fri, 29 Jan 2010 07:57:48 +0000 (07:57 +0000)]
xen/evtchn: Clean up round-robin evtchn scan.

Also fixes a couple of boundary cases.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoxen/privcmd: mmapbatch-v2 fixes
Keir Fraser [Thu, 21 Jan 2010 15:05:02 +0000 (15:05 +0000)]
xen/privcmd: mmapbatch-v2 fixes

- clear error indication array when no error encountered
- no need to copy back mfn array in compat mode shim

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoblkback: Flush blkback data when connecting.
Keir Fraser [Thu, 21 Jan 2010 14:39:05 +0000 (14:39 +0000)]
blkback: Flush blkback data when connecting.

First cut at flushing blkback data when first connecting
blkback.  This should avoid the pygrub issues we are experiencing
in (RedHat bugzilla) 466681.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoFix blk{back,tap} sysfs race
Keir Fraser [Thu, 21 Jan 2010 09:08:35 +0000 (09:08 +0000)]
Fix blk{back,tap} sysfs race

Read blk{back,tap} statistics info after remove vbd device(s) kernel
will crash.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
Acked-by: Jan Beulich <jbeulich@novell.com>
15 years agoxen/privcmd: Declare repeatedly used variables just once. Fix types.
Keir Fraser [Mon, 18 Jan 2010 14:50:43 +0000 (14:50 +0000)]
xen/privcmd: Declare repeatedly used variables just once. Fix types.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxen/blkfront: fixes for 'xm block-detach ... --force'
Keir Fraser [Mon, 18 Jan 2010 10:46:43 +0000 (10:46 +0000)]
xen/blkfront: fixes for 'xm block-detach ... --force'

Prevent prematurely freeing 'struct blkfront_info' instances (when the
xenbus data structures are gone, but the Linux ones are still needed).

Prevent adding a disk with the same (major, minor) [and hence the same
name and sysfs entries, which leads to oopses] when the previous
instance wasn't fully de-allocated yet.

This still doesn't address all issues resulting from forced detach:
I/O submitted after the detach still blocks forever, likely preventing
subsequent un-mounting from completing. It's not clear to me (not
knowing much about the block layer) how this can be avoided.

This also doesn't address issues with duplicate device creation caused
by re-using the hdXX and sdXX name spaces - this would require
synchronization with the respective native code.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoprivcmd: add new (replacement) mmap-batch ioctl
Keir Fraser [Wed, 13 Jan 2010 08:11:51 +0000 (08:11 +0000)]
privcmd: add new (replacement) mmap-batch ioctl

While the error indicator of IOCTL_PRIVCMD_MMAPBATCH should be in the
top nibble (it is documented that way in include/xen/public/privcmd.h
and include/xen/compat_ioctl.h), it really wasn't for 64-bit
implementations. With MFNs now possibly being 32 or more bits wide on
x86-64, using bits 28-31 as failure indicator (and bit 31 as paged-out
indicator) is not longer acceptable. Instead, a new ioctl with a
separate error indication array is being introduced.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoUpdate sfc_netback driver to match sfc_resource 3.0.2.2074
Keir Fraser [Fri, 8 Jan 2010 13:07:17 +0000 (13:07 +0000)]
Update sfc_netback driver to match sfc_resource 3.0.2.2074
Add support for direct guest access and acceleration of SFC9000 series
NICs.
Improve handling of NIC reset in sfc_netback
Remove nic_index state and replace with if_index from struct
net_device Remove duplication of header files with sfc_resource driver

Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
15 years agoUpdate Solarflare Communications resource driver to version 3.0.2.2074
Keir Fraser [Fri, 8 Jan 2010 13:06:22 +0000 (13:06 +0000)]
Update Solarflare Communications resource driver to version 3.0.2.2074
to match net driver update.
Add support for new SFC9000 series NICs

Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
15 years agoUpdate Solarflare Communications net driver to version 3.0.2.2074
Keir Fraser [Fri, 8 Jan 2010 13:05:49 +0000 (13:05 +0000)]
Update Solarflare Communications net driver to version 3.0.2.2074
Bring net driver in Xen tree in line with kernel.org tree
Add support for new SFC9000 series NICs

Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
15 years agoxen: Fix compat_ioctl.h build.
Keir Fraser [Fri, 8 Jan 2010 11:56:04 +0000 (11:56 +0000)]
xen: Fix compat_ioctl.h build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoia64, xencomm: support XEN_DOMCTL_mem_sharing_op
Keir Fraser [Fri, 8 Jan 2010 11:36:42 +0000 (11:36 +0000)]
ia64, xencomm: support XEN_DOMCTL_mem_sharing_op

This patch enables ia64 to support XEN_DOMCTL_mem_sharing_op.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
15 years agoSync sysctl.h Xen public header.
Keir Fraser [Fri, 8 Jan 2010 11:26:32 +0000 (11:26 +0000)]
Sync sysctl.h Xen public header.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
15 years agoprivcmd: fix build
Keir Fraser [Fri, 8 Jan 2010 11:23:29 +0000 (11:23 +0000)]
privcmd: fix build

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxen/privcmd: fix for proper operation in compat mode
Keir Fraser [Wed, 6 Jan 2010 08:38:09 +0000 (08:38 +0000)]
xen/privcmd: fix for proper operation in compat mode

- sizeof(struct privcmd_mmapbatch_32) was wrong
- MFN array must be translated for IOCTL_PRIVCMD_MMAPBATCH

Also, the error indicator of IOCTL_PRIVCMD_MMAPBATCH should be in the
top nibble (it is documented that way in include/xen/public/privcmd.h
and include/xen/compat_ioctl.h), but since that is an incompatible
change it is not being done here (instead, a new ioctl with proper
behavior will need to be added).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxenoprof: dynamic buffer array allocation
Keir Fraser [Wed, 6 Jan 2010 08:15:35 +0000 (08:15 +0000)]
xenoprof: dynamic buffer array allocation

The recent change to locally define MAX_VIRT_CPUS wasn't really
appropriate - with there not being a hard limit on the number of
vCPU-s anymore, these arrays should be allocated dynamically.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxen/privcmd: convert single shot check to be per-page
Keir Fraser [Wed, 6 Jan 2010 08:14:10 +0000 (08:14 +0000)]
xen/privcmd: convert single shot check to be per-page

For the sake of not breaking the ia64 build, old behavior is being
retained when HAVE_ARCH_PRIVCMD_MMAP. Hopefully someone able to
test ia64 can fix this up in the not too distant future.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoSync domctl.h Xen public header.
Keir Fraser [Mon, 4 Jan 2010 10:37:14 +0000 (10:37 +0000)]
Sync domctl.h Xen public header.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoxenoprofile: Hardcode MAX_VIRT_CPUS - not supplied by Xen public headers.
Keir Fraser [Mon, 28 Dec 2009 09:42:49 +0000 (09:42 +0000)]
xenoprofile: Hardcode MAX_VIRT_CPUS - not supplied by Xen public headers.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoSync Xen grant-table header file.
Keir Fraser [Tue, 22 Dec 2009 18:18:43 +0000 (18:18 +0000)]
Sync Xen grant-table header file.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoSync Xen public headers for Xen 4.0.
Keir Fraser [Tue, 22 Dec 2009 13:30:45 +0000 (13:30 +0000)]
Sync Xen public headers for Xen 4.0.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoChanges to various backends to handle GNTST_eagain errors.
Keir Fraser [Thu, 17 Dec 2009 06:37:50 +0000 (06:37 +0000)]
Changes to various backends to handle GNTST_eagain errors.

Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>
15 years agoChanges to netback to handle GNTST_eagain errors.
Keir Fraser [Thu, 17 Dec 2009 06:37:50 +0000 (06:37 +0000)]
Changes to netback to handle GNTST_eagain errors.

Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>
15 years agoFixes to block backend to handle -EAGAIN grant table errors properly.
Keir Fraser [Thu, 17 Dec 2009 06:37:50 +0000 (06:37 +0000)]
Fixes to block backend to handle -EAGAIN grant table errors properly.

Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>
15 years agoUpdate to grant_table.h to sync with xen/include/public
Keir Fraser [Thu, 17 Dec 2009 06:37:49 +0000 (06:37 +0000)]
Update to grant_table.h to sync with xen/include/public

Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>
15 years agoprivcmd: Handle paged-out areas of foreign guest memory in mmap().
Keir Fraser [Thu, 17 Dec 2009 06:37:49 +0000 (06:37 +0000)]
privcmd: Handle paged-out areas of foreign guest memory in mmap().

Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>
15 years agoxen/backends: simplify address translations
Keir Fraser [Wed, 16 Dec 2009 16:44:12 +0000 (16:44 +0000)]
xen/backends: simplify address translations

There are quite a number of places where e.g. page->va->page
translations happen.

Besides yielding smaller code (source and binary), a second goal is to
make it easier to determine where virtual addresses of pages allocated
through alloc_empty_pages_and_pagevec() are really used (in turn in
order to determine whether using highmem pages would be possible
there).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxen/balloon: prefer using pages from balloon in alloc_empty_pages_and_pagevec()
Keir Fraser [Wed, 16 Dec 2009 16:43:33 +0000 (16:43 +0000)]
xen/balloon: prefer using pages from balloon in alloc_empty_pages_and_pagevec()

This is both faster and less demanding on kernel resources.

Likely also something that could be done in the pv-ops tree (though it
would need some adjustment to deal with the balloon_order!=0 case).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoblktap2: properly __init-annotate blktap2 code
Keir Fraser [Fri, 11 Dec 2009 08:47:19 +0000 (08:47 +0000)]
blktap2: properly __init-annotate blktap2 code

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agonetback: Fixes for delayed copy of tx network packets.
Keir Fraser [Mon, 7 Dec 2009 14:14:28 +0000 (14:14 +0000)]
netback: Fixes for delayed copy of tx network packets.

 - Should call net_tx_action_dealloc() even when dealloc ring is
   empty, as there may in any case be work to do on the
   pending_inuse list.
 - Should not exit directly from the middle of the tx_action tasklet,
   as the tx_pending_timer should always be checked and updated at the
   end of the tasklet.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoxenfb: Only start one xenfb kthread
Keir Fraser [Thu, 3 Dec 2009 13:53:06 +0000 (13:53 +0000)]
xenfb: Only start one xenfb kthread

When doing save/restore testing with the linux-2.6.18-xen.hg tree it
was discovered that every time a restore happened we would get a new
xenfb thread.  While the framebuffer continues to work, this is an
obvious resource leak.  The attached patch only starts up a new xenfb
thread the first time the backend connects, and continues to re-use
that in the future.  Jeremy's upstream LKML tree doesn't suffer from
this since it uses a completely different mechanism to do screen
updates.  Original patch from John Haxby @ Oracle; slightly modified
by me to apply to the linux-2.6.18-xen.hg tree.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoxen/x86_64: correctly handle mem= reducing memory amount
Keir Fraser [Tue, 1 Dec 2009 14:02:52 +0000 (14:02 +0000)]
xen/x86_64: correctly handle mem= reducing memory amount

When mem= is being used to specify a value below the amount a domain
got passed from Xen, init_memory_mapping() got called with the higher
original value (end_pfn_map), triggering the BUG()s in maddr.h
checking PFNs against end_pfn.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxen/PCI/MSI-X: Don't disable when it was never enabled
Keir Fraser [Mon, 30 Nov 2009 10:37:45 +0000 (10:37 +0000)]
xen/PCI/MSI-X: Don't disable when it was never enabled

This is the MSI-X counterpart for c/s 945.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoDisable xenbus warning for console during domU boot
Keir Fraser [Tue, 24 Nov 2009 17:27:38 +0000 (17:27 +0000)]
Disable xenbus warning for console during domU boot
and vfb timeout during domU shutdown
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
15 years agoNew generic RTC class PC-style 'CMOS' driver backported
Keir Fraser [Tue, 24 Nov 2009 17:27:19 +0000 (17:27 +0000)]
New generic RTC class PC-style 'CMOS' driver backported
from Linux Kernel Ver. 2.6.29.2
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
15 years agoRealtek 8169 gigabit ethernet driver backported
Keir Fraser [Tue, 24 Nov 2009 17:26:55 +0000 (17:26 +0000)]
Realtek 8169 gigabit ethernet driver backported
from Linux Kernel Ver. 2.6.29.2
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
15 years agoMMCONFIG PCI config space access driver backported
Keir Fraser [Tue, 24 Nov 2009 17:26:34 +0000 (17:26 +0000)]
MMCONFIG PCI config space access driver backported
from Linux Kernel Ver. 2.6.31.5
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
15 years agoEnable PATA support in some SATA drivers
Keir Fraser [Tue, 24 Nov 2009 17:26:12 +0000 (17:26 +0000)]
Enable PATA support in some SATA drivers
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
15 years agoIntel TCO Timer/Watchdog driver backported
Keir Fraser [Tue, 24 Nov 2009 17:25:44 +0000 (17:25 +0000)]
Intel TCO Timer/Watchdog driver backported
from Linux Kernel Ver. 2.6.29.2
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
15 years agoITE IT87xx and compatibles driver backported
Keir Fraser [Tue, 24 Nov 2009 17:25:22 +0000 (17:25 +0000)]
ITE IT87xx and compatibles driver backported
from Linux Kernel Ver. 2.6.29.2
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
15 years agoIntel 82801 (ICH) driver backported
Keir Fraser [Tue, 24 Nov 2009 17:25:00 +0000 (17:25 +0000)]
Intel 82801 (ICH) driver backported
from Linux Kernel Ver. 2.6.29.2
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
15 years agoIntel Core (2) Duo/Solo temperature sensor driver
Keir Fraser [Tue, 24 Nov 2009 17:24:40 +0000 (17:24 +0000)]
Intel Core (2) Duo/Solo temperature sensor driver
backported from Linux Kernel Ver. 2.6.29.2
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
15 years agoATI drivers backported from Linux Kernel Ver. 2.6.29.2
Keir Fraser [Tue, 24 Nov 2009 17:24:14 +0000 (17:24 +0000)]
ATI drivers backported from Linux Kernel Ver. 2.6.29.2
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
15 years agoxen: Dont call msi_unmap_pirq() if did not enable msi
Keir Fraser [Tue, 24 Nov 2009 14:45:19 +0000 (14:45 +0000)]
xen: Dont call msi_unmap_pirq() if did not enable msi

When device driver unload, it may call pci_disable_msi(), if msi did
not enabled but do msi_unmap_pirq(), then later driver reload and
without msi, then will failed in request_irq() for irq_desc[irq]->chip
valie is no_irq_chip. So when did not enable msi during driver
initializing, then unloaded driver will not try to disable it.

How to reproduce it:
  At the server with QLogic 25xx, try to reload qla2xxx will hit it.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
15 years agodell rbu: force proper address translation in Dell RBU
Keir Fraser [Mon, 23 Nov 2009 07:32:47 +0000 (07:32 +0000)]
dell rbu: force proper address translation in Dell RBU

Replacing virt_to_phys() by virt_to_bus(), and adding code to ensure
contiguity as required by the firmware.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Tested-by: Douglas Warzecha <Douglas_Warzecha@Dell.com>
15 years agoIMQ allows the network buffer queuing discipline to block inbound
Keir Fraser [Fri, 13 Nov 2009 22:01:54 +0000 (22:01 +0000)]
IMQ allows the network buffer queuing discipline to block inbound
packets from the guest (normal queuing disciplines can only block
outbound packets).

From http://www.linuximq.net/patchs/linux-2.6.18-imq.diff

15 years agoAdded tag xen-3.4.2 for changeset 9348c4535655
Keir Fraser [Tue, 10 Nov 2009 18:52:25 +0000 (18:52 +0000)]
Added tag xen-3.4.2 for changeset 9348c4535655

15 years agoxenbus: do not hold transaction_mutex when returning to userspace xen-3.4.2
Keir Fraser [Wed, 4 Nov 2009 18:13:32 +0000 (18:13 +0000)]
xenbus: do not hold transaction_mutex when returning to userspace

  ================================================
  [ BUG: lock held when returning to user space! ]
  ------------------------------------------------
  xenstore-list/3522 is leaving the kernel with locks still held!
  1 lock held by xenstore-list/3522:
   #0:  (&xs_state.transaction_mutex){......}, at: [<c026dc6f>]
   xenbus_dev_request_and_reply+0x8f/0xa0

The canonical fix for this type of issue appears to be to maintain a
count manually rather than using an rwsem so do that here.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
15 years agoxen/x86: fix GFP mask handling in dma_alloc_coherent()
Keir Fraser [Fri, 23 Oct 2009 09:07:22 +0000 (10:07 +0100)]
xen/x86: fix GFP mask handling in dma_alloc_coherent()

Ever since no longer pushing all memory into the DMA zone (c/s 355),
explicitly setting GFP_DMA as well as not masking off GFP_DMA32 was
unnecessarily restricting the pool from which suitable memory could be
taken.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agousbback: check return value of xenbus_register in usbback_init().
Keir Fraser [Fri, 23 Oct 2009 09:06:48 +0000 (10:06 +0100)]
usbback: check return value of xenbus_register in usbback_init().

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
15 years agoblkfront: Use system default scheduler rather than force no-op.
Keir Fraser [Mon, 12 Oct 2009 11:57:55 +0000 (12:57 +0100)]
blkfront: Use system default scheduler rather than force no-op.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agousbfront: fix compile error and disable PM feature
Keir Fraser [Thu, 8 Oct 2009 07:53:36 +0000 (08:53 +0100)]
usbfront: fix compile error and disable PM feature

Fix the compilation error of usbfront, and disable bus suspend/resume
by default.

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
15 years agoPVUSB: Fixes and updates
Keir Fraser [Wed, 7 Oct 2009 07:42:00 +0000 (08:42 +0100)]
PVUSB: Fixes and updates

- xenbus state flow changed.
  Whole of the flow is changed to be like netback/netfront.
  Reconfiguring/Reconfiguring are removed.

- New RING for hotplug notification added.

- USBIF_MAX_SEGMENTS_PER_REQUEST value is changed (10) to (16).
  According to this change, RING_SIZE is decreased from 32 to 16.
  This affects the performance. My flash drive's read throughput
  was dropped from 29MB/s to 18MB/s in the linux environment.
  However, Windows guest send urb with 64kB buffer(64KB = 4kB * 16).
  This is required.

- New port-setting interface
  xenbus_watch_path2 is added to usbback, port-setting interface
  is moved from sysfs to xenstore.
  Now, the port-rule is directly written to xenstore entry.
  Example.
  # xenstore-write /local/domain/0/backend/vusb/1/0/port/1 "2-1"
    (adding physical bus 2-1 to vusb-1-0 port 1)

- urb dequeue function completed.
  usbfront send unlink-request to usbback, and can cancel the urb
  that is submitted in the backend.

- New USB Spec version (USB1.1/USB2.0) selection support.
  usbfront can act as both USB1.1 and USB2.0 virtual host controller
  according to the xenstore entry key "usb-ver".

- experimental bus_suspend/bus_resume added to usbfront.

- various cleanups, bugfix, refactoring and codestyle-fix.

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
15 years agoxen: re-synchronize ring.h public header
Keir Fraser [Wed, 7 Oct 2009 06:33:40 +0000 (07:33 +0100)]
xen: re-synchronize ring.h public header

Patch 20267:e9366bed077e modified the definition of sring in the xen
repo's version of ring.h, but not the version in the linux kernel
repo. That change broke pause/resume/shutdown messages from the
blktap2 kernel module, which (for the time being) relies on pad[0]
being at consistent location in the sring struct.  This patch fixes
this regression by resyncronizing the two the files.

Signed off by: Jake Wires <Jake.Wires@citrix.com>

15 years agomce: support machine check logging left over from previous reset
Keir Fraser [Tue, 29 Sep 2009 10:23:06 +0000 (11:23 +0100)]
mce: support machine check logging left over from previous reset

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
15 years agoxen/usb: force proper address translation in USB monitor
Keir Fraser [Tue, 22 Sep 2009 07:04:07 +0000 (08:04 +0100)]
xen/usb: force proper address translation in USB monitor

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxen/edac: force proper address translation in EDAC
Keir Fraser [Tue, 22 Sep 2009 07:03:39 +0000 (08:03 +0100)]
xen/edac: force proper address translation in EDAC

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoFix BUG in unlock_cpu_hotplug().
Keir Fraser [Sun, 30 Aug 2009 07:54:15 +0000 (08:54 +0100)]
Fix BUG in unlock_cpu_hotplug().

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoxen/x86: make do_settimeofday() return -EPERM when clock can't be changed
Keir Fraser [Tue, 25 Aug 2009 13:55:22 +0000 (14:55 +0100)]
xen/x86: make do_settimeofday() return -EPERM when clock can't be changed

Rather than returning success here (without actually having done
anything), it seems more appropriate/conforming to let the caller know
that what he intended to do didn't succeed.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoixgbe: memset size in netif_napi_del()
Keir Fraser [Wed, 19 Aug 2009 12:00:40 +0000 (13:00 +0100)]
ixgbe: memset size in netif_napi_del()

By inspection the memset appears to be long as napi->poll_dev
is a struct net_device not a struct napi_struct.

Cc: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
15 years agoRevert 927:56df01ffed10
Keir Fraser [Sun, 16 Aug 2009 07:42:29 +0000 (08:42 +0100)]
Revert 927:56df01ffed10

15 years agodrivers/xen/blkback: Add the kernel side of the blkback queueing feature.
Keir Fraser [Fri, 14 Aug 2009 16:28:43 +0000 (17:28 +0100)]
drivers/xen/blkback: Add the kernel side of the blkback queueing feature.

This is similar to the credit scheduler used in netif, except that it
allows occasional burstability (for use with e2fsck as an example).

Signed-off-by: William Pitcock <nenolod@dereferenced.org>
15 years agonet: Fix NULL pointer deref of sock->ops->Sendpage in sock_sendpage().
Keir Fraser [Fri, 14 Aug 2009 16:05:54 +0000 (17:05 +0100)]
net: Fix NULL pointer deref of sock->ops->Sendpage in sock_sendpage().

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
15 years agoPCI x86: always use conf1 to access config space below 256 bytes
Keir Fraser [Fri, 14 Aug 2009 09:54:33 +0000 (10:54 +0100)]
PCI x86: always use conf1 to access config space below 256 bytes

Back-ported to 2.6.18.8 by Simon Horman

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
15 years agommconfig: Fix x86_64 ioremap base_address
Keir Fraser [Fri, 14 Aug 2009 09:53:56 +0000 (10:53 +0100)]
mmconfig: Fix x86_64 ioremap base_address

Current mmconfig has some problems of remapped range.

a) In the case of broken MCFG tables on Asus etc., we need to remap
   256M range, but currently only remap 1M.

b) The base address always corresponds to bus number 0, but currently
   we are assuming it corresponds to start bus number.

This patch fixes the above problems.

(akpm: Arjan suggests that if the MCFG table is broken we just
shouldn't use it, rather than try to work around things).

Back-ported to 2.6.18 by Simon Horman

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
15 years agoxen/x86-64: fix Dom0 boot on AMD K8 CPUs
Keir Fraser [Wed, 5 Aug 2009 11:05:34 +0000 (12:05 +0100)]
xen/x86-64: fix Dom0 boot on AMD K8 CPUs

The workaround in question here should be (and is being) applied by
the hypervisor (which doesn't allow any guest - including Dom0 - to
write other than all zeroes or all ones into MCi_CTL).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoxen-blkfront: beyond ARRAY_SIZE of info->shadow
Keir Fraser [Wed, 29 Jul 2009 08:21:40 +0000 (09:21 +0100)]
xen-blkfront: beyond ARRAY_SIZE of info->shadow

Import upstream pv-ops change
b9ed7252d219c1c663944bf03846eabb515dbe75:

Do not go beyond ARRAY_SIZE of info->shadow
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
15 years agoblktap2: properly suppress compiler warning
Keir Fraser [Tue, 28 Jul 2009 15:29:11 +0000 (16:29 +0100)]
blktap2: properly suppress compiler warning

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