]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/log
legacy/linux-2.6.18-xen.git
16 years agoBackport: PCI: fix 64-vbit prefetchable memory resource BARs
Keir Fraser [Fri, 13 Mar 2009 07:40:22 +0000 (07:40 +0000)]
Backport: PCI: fix 64-vbit prefetchable memory resource BARs

    commit e354597cce8d219d135d65e585dc4f30323486b9
    Author: Peter Chubb <peterc@gelato.unsw.edu.au>
    Date:   Mon Oct 13 11:49:04 2008 +1100

    PCI: fix 64-vbit prefetchable memory resource BARs

    Since patch 6ac665c63dcac8fcec534a1d224ecbb8b867ad59 my infiniband
    controller hasn't worked.  This is because it has 64-bit
    prefetchable
    memory, which was mistakenly being  taken to be 32-bit memory.
    The
    resource flags in this case are PCI_BASE_ADDRESS_MEM_TYPE_64 |
    PCI_BASE_ADDRESS_MEM_PREFETCH.

    This patch checks only for the PCI_BASE_ADDRESS_MEM_TYPE_64 bit;
    thus
    whether the region is prefetchable or not is ignored.  This fixes
    my
    Infiniband.

Reviewed-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoBackport: PCI: handle 64-bit resources better on 32-bit machines
Keir Fraser [Fri, 13 Mar 2009 07:40:10 +0000 (07:40 +0000)]
Backport: PCI: handle 64-bit resources better on 32-bit machines

    commit cc5499c3a607a392e8a7adb934aaf14b2c6a3519
    Author: Matthew Wilcox <matthew@wil.cx>
    Date:   Mon Jul 28 13:39:00 2008 -0400

    PCI: handle 64-bit resources better on 32-bit machines

    If the kernel is configured to support 64-bit resources on a
    32-bit
    machine, we can support 64-bit BARs properly.  Just change the
    condition
    to check sizeof(resource_size_t) instead of BITS_PER_LONG.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoBackport: PCI: rewrite PCI BAR reading code
Keir Fraser [Fri, 13 Mar 2009 07:39:48 +0000 (07:39 +0000)]
Backport: PCI: rewrite PCI BAR reading code

    commit 6ac665c63dcac8fcec534a1d224ecbb8b867ad59
    Author: Matthew Wilcox <matthew@wil.cx>
    Date:   Mon Jul 28 13:38:59 2008 -0400

    PCI: rewrite PCI BAR reading code

    Factor out the code to read one BAR from the loop in
    pci_read_bases into
    a new function, __pci_read_base.  The new code is slightly more
    readable, better commented and removes the ifdef.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoblkfront: Fix the build by expanding sg_init_table() in place.
Keir Fraser [Fri, 6 Mar 2009 12:51:33 +0000 (12:51 +0000)]
blkfront: Fix the build by expanding sg_init_table() in place.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agolinux/blkfront: use blk_rq_map_sg to generate ring entries
Keir Fraser [Thu, 5 Mar 2009 14:42:00 +0000 (14:42 +0000)]
linux/blkfront: use blk_rq_map_sg to generate ring entries

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux/evtchn: fix off-by-one error in the pirq range check
Keir Fraser [Thu, 5 Mar 2009 14:40:35 +0000 (14:40 +0000)]
linux/evtchn: fix off-by-one error in the pirq range check

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agonetfront: Unregister inetdev notifiers on failure
Keir Fraser [Mon, 2 Mar 2009 11:06:52 +0000 (11:06 +0000)]
netfront: Unregister inetdev notifiers on failure
If you attempt to modprobe the pv-on-hvm netfront driver on a machine
not running under Xen (say, bare-metal, or under another hypervisor), the
netfront code correctly returns an ENODEV and fails to load.  However, if you
then shutdown that machine, you will oops while tearing down the network.
This is because we forget to unregister the the inetaddr_notifier on failure,
and so the kernel takes a fatal page fault.  The attached patch just unregisters
the notifier on failure, and solves the problem for me.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
16 years agopci: Fix the definition of PCI_PM_CTRL_NO_SOFT_RESET.
Keir Fraser [Mon, 2 Mar 2009 11:02:00 +0000 (11:02 +0000)]
pci: Fix the definition of PCI_PM_CTRL_NO_SOFT_RESET.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
16 years agopciback: Fix invalid use of pci_match_id()
Keir Fraser [Mon, 2 Mar 2009 10:57:56 +0000 (10:57 +0000)]
pciback: Fix invalid use of pci_match_id()

We cannot use pci_match_id() because the first argument (tmp_quirk->devid)
is not an array of pci device ids. Instead this patch adds a utility
function to compare a pci_device_id and a pci_dev.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
16 years agoACPI: Backport to support ACPI throttling s/w coordination
Keir Fraser [Mon, 2 Mar 2009 10:54:44 +0000 (10:54 +0000)]
ACPI: Backport to support ACPI throttling s/w coordination

commit 3abbd337c60591305cbfeb984ff2922c175be37f
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Mon Jan 28 13:53:21 2008 +0800

    ACPI: Set _PSD ACPI_PDC_SMP_T_SWCOORD

    The ACPI_PDC_SMP_T_SWCOORD bit is set by and OS that is capable of
    native ACPI throttling software coordination for mutli-processors
    using the _TSD information.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
16 years agoACPI: Backport to get correct throtting info after evaluating _PDC
Keir Fraser [Mon, 2 Mar 2009 10:54:26 +0000 (10:54 +0000)]
ACPI: Backport to get correct throtting info after evaluating _PDC

commit 0ac3c571315a53c14d2733564f14ebdb911fe903
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Thu Nov 15 17:05:46 2007 +0800

    ACPI: Get throttling info from BIOS only after evaluating _PDC

    Previously _PDC was evaluated later, and thus we'd not get
    the chance to tell the BIOS that we can suport FixedHW registers
    (MSRs)
    and the BIOS would always ask us to use System I/O access
    for throttling.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
16 years agoACPI: Backport missing part for T-State MSR support
Keir Fraser [Mon, 2 Mar 2009 10:53:59 +0000 (10:53 +0000)]
ACPI: Backport missing part for T-State MSR support

Part of below kernel commit was missed while packporting T-State
support.

commit f79f06ab9f86d7203006d2ec8992ac80df36a34e
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Thu Nov 15 17:06:36 2007 +0800

    ACPI: Enable MSR (FixedHW) support for T-States

    Add throttling control via MSR when T-states uses
    the FixHW Control Status registers.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
16 years agolinux/x86: fix off-by-one error in the pirq range checks
Keir Fraser [Tue, 17 Feb 2009 11:31:13 +0000 (11:31 +0000)]
linux/x86: fix off-by-one error in the pirq range checks

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoAdd the igb driver for dom0
Keir Fraser [Tue, 17 Feb 2009 11:25:51 +0000 (11:25 +0000)]
Add the igb driver for dom0

backport the driver from RHEL5.3 and make it work.

signed-off-by: Zhang Yang <yang.zhang@intel.com>

16 years agoAdd the e1000e driver for dom0
Keir Fraser [Tue, 17 Feb 2009 11:25:22 +0000 (11:25 +0000)]
Add the e1000e driver for dom0

backport the driver from RHEL5.3 and make it work.

signed-off-by: Zhang Yang <yang.zhang@intel.com>

16 years agopvSCSI: add new device assignment mode
Keir Fraser [Tue, 17 Feb 2009 11:17:11 +0000 (11:17 +0000)]
pvSCSI: add new device assignment mode

Add a new device assignment mode, which assigns whole HBA
(SCSI host) to guest domain. Current implementation requires SCSI
command emulation on backend driver, and it causes limitations for
some SCSI commands. (Please see
"http://www.xen.org/files/xensummit_tokyo/24_Hitoshi%20Matsumoto_en.pdf"
for detail about why we need the new assignment mode.

SCSI command emulation on backend driver is bypassed when "host" mode
is specified.

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agonetback: make queue length parameter writeable in sysfs
Keir Fraser [Fri, 6 Feb 2009 12:01:56 +0000 (12:01 +0000)]
netback: make queue length parameter writeable in sysfs

Any changes will only take effect for newly created VIFs.

Also hook up the vif devices to their parent and publish bus info via
ethtool.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agonetback: add ethtool stat to track copied skbs.
Keir Fraser [Thu, 5 Feb 2009 15:24:46 +0000 (15:24 +0000)]
netback: add ethtool stat to track copied skbs.

Copied skbs should be rare but we have no way of verifying that.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agolinux: fix IRQ handling for PV passthrough
Keir Fraser [Wed, 4 Feb 2009 12:26:00 +0000 (12:26 +0000)]
linux: fix IRQ handling for PV passthrough

For DomU-s registering PIRQ-s must be done separately, as they don't
use the IO-APIC code.

Additionally make sure the IRQ chip doesn't get set twice (and the
event channel information overwritten) for an IRQ possibly in use by
more than one device.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux: remove xen specific member from pci_dev
Keir Fraser [Wed, 4 Feb 2009 12:25:09 +0000 (12:25 +0000)]
linux: remove xen specific member from pci_dev

Move msi related variable irq_old out of struct pci_dev. This is
logically more consistent and has the additional benefit that xen
kernel and vanilla kernel now have the same pci_dev layout

Signed-off-by: Qing He <qing.he@intel.com>
16 years agofbfront: Improve diagnostics when kthread_run() fails
Keir Fraser [Tue, 3 Feb 2009 13:59:17 +0000 (13:59 +0000)]
fbfront: Improve diagnostics when kthread_run() fails

Failure is reported with xenbus_dev_fatal(..."register_framebuffer"),
which was already suboptimal before it got moved away from
register_framebuffer(), and is outright misleading now.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
16 years agoxenfb: Revert mm_lock changes. They're not needed.
Keir Fraser [Fri, 30 Jan 2009 10:54:10 +0000 (10:54 +0000)]
xenfb: Revert mm_lock changes. They're not needed.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
16 years agonet: Intel ixgbe driver
Keir Fraser [Fri, 30 Jan 2009 10:52:47 +0000 (10:52 +0000)]
net: Intel ixgbe driver

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
16 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Fri, 30 Jan 2009 01:53:27 +0000 (10:53 +0900)]
merge with linux-2.6.18-xen.hg

16 years agoxenfb: eliminate the update_wanted field.
Keir Fraser [Thu, 29 Jan 2009 11:28:58 +0000 (11:28 +0000)]
xenfb: eliminate the update_wanted field.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
16 years agolinux/netback: unmap tx ring gref when mapping of rx ring gref failed
Keir Fraser [Wed, 28 Jan 2009 13:42:09 +0000 (13:42 +0000)]
linux/netback: unmap tx ring gref when mapping of rx ring gref failed

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoxenfb: fix xenfb_update_screen bogus rect
Keir Fraser [Wed, 28 Jan 2009 13:41:33 +0000 (13:41 +0000)]
xenfb: fix xenfb_update_screen bogus rect
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Wed, 28 Jan 2009 04:07:23 +0000 (13:07 +0900)]
merge with linux-2.6.18-xen.hg

16 years ago[IA64] xencomm: support XEN_DOMCTL_[gs]et_address_size
Isaku Yamahata [Wed, 28 Jan 2009 03:27:28 +0000 (12:27 +0900)]
[IA64] xencomm: support XEN_DOMCTL_[gs]et_address_size

xencomm: support XEN_DOMCTL_[gs]et_address_size for dump-core.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agoFix !CONFIG_PM compilation problem
Keir Fraser [Tue, 20 Jan 2009 13:28:35 +0000 (13:28 +0000)]
Fix !CONFIG_PM compilation problem

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
16 years agoMake CONFIG_PCI_GUESTDEV depend on ACPI
Keir Fraser [Tue, 20 Jan 2009 13:28:17 +0000 (13:28 +0000)]
Make CONFIG_PCI_GUESTDEV depend on ACPI

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
16 years agopciback: Global 'permissive' module parameter.
Keir Fraser [Mon, 19 Jan 2009 16:25:17 +0000 (16:25 +0000)]
pciback: Global 'permissive' module parameter.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agogso: Ensure that the packet is long enough
Keir Fraser [Wed, 14 Jan 2009 14:04:07 +0000 (14:04 +0000)]
gso: Ensure that the packet is long enough

When we get a GSO packet from an untrusted source, we need to
ensure that it is sufficiently long so that we don't end up
crashing.

Based on discovery and patch by Ian Campbell.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agorevert: "netfront/back: do not mark packets of length < MSS as GSO"
Keir Fraser [Wed, 14 Jan 2009 14:03:42 +0000 (14:03 +0000)]
revert: "netfront/back: do not mark packets of length < MSS as GSO"

  changeset:   774:107e10e0e07c
  user:        Keir Fraser <keir.fraser@citrix.com>
  date:        Tue Jan 13 15:17:54 2009 +0000
  summary:     netfront/back: do not mark packets of length < MSS as GSO

Herbert Xu suggested a better fix in the network
stack which will follow.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agoSync Xen public memory.h header file.
Keir Fraser [Wed, 14 Jan 2009 11:44:54 +0000 (11:44 +0000)]
Sync Xen public memory.h header file.

Remove ia64 translations of removed hypercall structs.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agonetfront/back: do not mark packets of length < MSS as GSO
Keir Fraser [Tue, 13 Jan 2009 15:17:54 +0000 (15:17 +0000)]
netfront/back: do not mark packets of length < MSS as GSO

Linux assumes that skbs marked for GSO are longer than MSS. In
particular tcp_tso_segment assumes that skb_segment will return a
chain of at least 2 skbs.

Both netfront and back should therefor not pass such a packet up the
stack.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Wed, 7 Jan 2009 03:21:54 +0000 (12:21 +0900)]
merge with linux-2.6.18-xen.hg

16 years agoevtchn: Fix CPU offlining to switch all affected ports belonging to a
Keir Fraser [Mon, 5 Jan 2009 11:29:42 +0000 (11:29 +0000)]
evtchn: Fix CPU offlining to switch all affected ports belonging to a
particular /dev/evcthn user.

Original patch by James Harper <james.harper@bendigoit.com.au>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoCleanup function name relating resource reassignment.
Keir Fraser [Mon, 5 Jan 2009 10:54:36 +0000 (10:54 +0000)]
Cleanup function name relating resource reassignment.

Existing functions don't have "pci_" prefix. But they are part of PCI
driver. So the patch adds "pci_" prefix to them.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoBind PCI back driver to PCI device specified by "guestdev=".
Keir Fraser [Mon, 5 Jan 2009 10:54:08 +0000 (10:54 +0000)]
Bind PCI back driver to PCI device specified by "guestdev=".

This patch binds PCI back driver to PCI device specified by
"guestdev=" boot parameter.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoAdd "guestdev=" boot parameter.
Keir Fraser [Mon, 5 Jan 2009 10:53:44 +0000 (10:53 +0000)]
Add "guestdev=" boot parameter.

This patch adds "guestdev=" boot parameter. This boot parameter is
used to reassign page-aligned memory resource and bind PCI back driver.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoExpose HID, UID, SEG, BBN of PCI root bridge via sysfs.
Keir Fraser [Mon, 5 Jan 2009 10:53:06 +0000 (10:53 +0000)]
Expose HID, UID, SEG, BBN of PCI root bridge via sysfs.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years ago[IA64] xencomm: add PHYSDEVOP_pirq_eoi_gmfn support.
Isaku Yamahata [Mon, 5 Jan 2009 05:13:49 +0000 (14:13 +0900)]
[IA64] xencomm: add PHYSDEVOP_pirq_eoi_gmfn support.

This patch fixes some weird issues in upstream.
Dom0 uses one page shared with hypervisor to notify which pirqs need EOI
writes, but the page is set incorrectly for ia64 due to following reasons:
1. the related two hypercalls are not enabled in the correct way, so this page
is not really used by dom0 and hypervisor do nothing when dom0 writes eoi.

Signed-off-by : Xiantao Zhang <xiantao.zhang@intel.com>

16 years ago[IA64] clean up of xcom_hcall.c.
Isaku Yamahata [Mon, 5 Jan 2009 03:11:43 +0000 (12:11 +0900)]
[IA64] clean up of xcom_hcall.c.

make xencommize_xxx() calling convention consistent.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years ago[IA64] add unwind info to xen_event_callback
Isaku Yamahata [Mon, 5 Jan 2009 02:32:31 +0000 (11:32 +0900)]
[IA64] add unwind info to xen_event_callback

Unwind info for xen_event_callback is missing.
This patch adds it.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agonetback: handle non-netback foreign pages
Keir Fraser [Thu, 18 Dec 2008 11:51:36 +0000 (11:51 +0000)]
netback: handle non-netback foreign pages

An SKB can contain pages which are foreign but not tracked by netback,
such as those created by gnttab_copy_grant_page when in
NETBK_DELAYED_COPY_SKB mode. These pages do not have a mapping field
which points to a valid offset in the pending_tx_info array.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agodom0: Enable C3 without bm control only for CST based C3
Keir Fraser [Sat, 13 Dec 2008 16:00:43 +0000 (16:00 +0000)]
dom0: Enable C3 without bm control only for CST based C3

commit ed3110efb538d7acbf635095c1382118f7414f75
Author: Venki Pallipadi <venkatesh.pallipadi@intel.com>
Date:   Tue Jul 31 12:04:31 2007 -0700

    ACPI: fix "Time Problems with 2.6.23-rc1-gf695baf2"

    Enable C3 without bm control only for CST based C3.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoadd hvc compatibility mode to xencons.
Ian Campbell [Thu, 11 Dec 2008 13:38:48 +0000 (13:38 +0000)]
add hvc compatibility mode to xencons.

Makes switching back and forth with a pvops kernel easier. Taken from
http://lists.alioth.debian.org/pipermail/pkg-xen-devel/2008-October/002098.html
http://svn.debian.org/viewsvn/kernel?rev=12337&view=rev with thanks to
Bastian Blank.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agoblktap, gntdev: fix highpte handling
Keir Fraser [Wed, 10 Dec 2008 13:32:32 +0000 (13:32 +0000)]
blktap, gntdev: fix highpte handling

In case of highpte, virt_to_machine() can't be used. Introduce
ptep_to_machine() and use it, also to simplify xen_l1_entry_update().

Original patch from: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux/evtchn: allocate pirq_needs_eoi bitmap dynamically
Keir Fraser [Wed, 10 Dec 2008 13:31:38 +0000 (13:31 +0000)]
linux/evtchn: allocate pirq_needs_eoi bitmap dynamically

Original patch from: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agopvSCSI: fix slight issue
Keir Fraser [Wed, 10 Dec 2008 13:21:23 +0000 (13:21 +0000)]
pvSCSI: fix slight issue

Signed-off-by: James Harper <james.harper@bendigoit.com.au>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years ago[PVSCSI] rmmod not supported
Keir Fraser [Tue, 9 Dec 2008 13:03:44 +0000 (13:03 +0000)]
[PVSCSI] rmmod not supported

Signed-off-by: James Harper <james.harper@bendigoit.com.au>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years ago[PVSCSI] Fix some issues
Keir Fraser [Tue, 9 Dec 2008 13:03:14 +0000 (13:03 +0000)]
[PVSCSI] Fix some issues

Signed-off-by: James Harper <james.harper@bendigoit.com.au>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years ago[PVSCSI] bug fix report_lun
Keir Fraser [Tue, 9 Dec 2008 13:02:38 +0000 (13:02 +0000)]
[PVSCSI] bug fix report_lun

Signed-off-by: James Harper <james.harper@bendigoit.com.au>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years ago[PVSCSI] Fix sense_len
Keir Fraser [Tue, 9 Dec 2008 13:02:20 +0000 (13:02 +0000)]
[PVSCSI] Fix sense_len

Signed-off-by: James Harper <james.harper@bendigoit.com.au>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years ago[LINUX][PVSCSI] add platform-compat.h
Keir Fraser [Tue, 9 Dec 2008 13:02:02 +0000 (13:02 +0000)]
[LINUX][PVSCSI] add platform-compat.h

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Thu, 4 Dec 2008 02:02:17 +0000 (11:02 +0900)]
merge with linux-2.6.18-xen.hg

16 years agoevtchn, phydev: rename PHYSDEVOP_pirq_eoi_mfn to PHYSDEVOP_pirq_eoi_gmfn
Keir Fraser [Wed, 3 Dec 2008 11:54:23 +0000 (11:54 +0000)]
evtchn, phydev: rename PHYSDEVOP_pirq_eoi_mfn to PHYSDEVOP_pirq_eoi_gmfn

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoIA64: xencomm support for multi call with physdev_op and event_channel_op.
Isaku Yamahata [Wed, 3 Dec 2008 02:38:32 +0000 (11:38 +0900)]
IA64: xencomm support for multi call with physdev_op and event_channel_op.

Recently the c/s of d545a95fca73 makes use of multi call
with __HYPERVISOR_event_channel_op and __HYPERVISOR_physdev_op.
This patch adds support of those hypercall.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agoFix buggy mask_base in saving/restoring MSI-X table during S3
Keir Fraser [Tue, 2 Dec 2008 11:54:47 +0000 (11:54 +0000)]
Fix buggy mask_base in saving/restoring MSI-X table during S3

Fix mask_base (actually MSI-X table base, copy name from native) to be
a virtual address rather than a physical address. And remove wrong
printk in pci_disable_msix.

Signed-off-by: Shan Haitao <haitao.shan@intel.com>
16 years agoevtchn: Fix the build.
Keir Fraser [Fri, 28 Nov 2008 13:41:38 +0000 (13:41 +0000)]
evtchn: Fix the build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agolinux/x86: cleanup IO-APIC code
Keir Fraser [Fri, 28 Nov 2008 13:31:21 +0000 (13:31 +0000)]
linux/x86: cleanup IO-APIC code

- get 32-bit code in sync with 64-bit wrt ExtINT pin detection being
  unnecessary
- eliminate build warnings resulting from c/s 725

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux/x86: revert the effect of xen_limit_pages_to_max_mfn()
Keir Fraser [Fri, 28 Nov 2008 13:30:58 +0000 (13:30 +0000)]
linux/x86: revert the effect of xen_limit_pages_to_max_mfn()

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux/x86: use shared page indicating the need for an EOI notification
Keir Fraser [Fri, 28 Nov 2008 13:30:27 +0000 (13:30 +0000)]
linux/x86: use shared page indicating the need for an EOI notification

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agodom0 linux: Fix and cleanup reassigning memory resource code.
Keir Fraser [Fri, 28 Nov 2008 13:07:36 +0000 (13:07 +0000)]
dom0 linux: Fix and cleanup reassigning memory resource code.

When we use PCI pass-through, we have to assign page-aligned resources
to device. To do this, we round up the alignment to PAGE_SIZE, if
device is specified by "reassigndev=" boot parameter.

"pdev_sort_resources" function uses the alignment. But it does not
round up the alignment to PAGE_SIZE. This patch makes
"pdev_sort_resources" function round up the alignment to PAGE_SIZE.

"pbus_size_mem" function round up the alignment of bridge's resource
window as well as that of normal resource. But we don't need to do
this. This patch makes "pbus_size_mem" function exclude bridges's
resource window.

This patch also cleanups code of reassigning memory resource.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoMerge with ia64 tree.
Keir Fraser [Wed, 26 Nov 2008 11:13:49 +0000 (11:13 +0000)]
Merge with ia64 tree.

16 years agoblkback, blktap: Fix potential resource leak.
Keir Fraser [Wed, 26 Nov 2008 11:10:33 +0000 (11:10 +0000)]
blkback, blktap: Fix potential resource leak.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Wed, 26 Nov 2008 01:24:15 +0000 (10:24 +0900)]
merge with linux-2.6.18-xen.hg

16 years agoSupport I2C bus,and SATA IDE/AHCI modes for new Intel PCH chipset.
Keir Fraser [Tue, 25 Nov 2008 11:22:04 +0000 (11:22 +0000)]
Support I2C bus,and SATA IDE/AHCI modes for new Intel PCH chipset.

Signed-off-by: Scott Parker <james.s.parker@intel.com>
16 years agoballoon: Fix the build by including <linux/init.h>
Keir Fraser [Tue, 25 Nov 2008 11:19:41 +0000 (11:19 +0000)]
balloon: Fix the build by including <linux/init.h>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agokexec: Don't pass limit_pages_to_max_mfn() regions to xen_destroy_contiguous_region().
Keir Fraser [Tue, 25 Nov 2008 11:16:36 +0000 (11:16 +0000)]
kexec: Don't pass limit_pages_to_max_mfn() regions to xen_destroy_contiguous_region().

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoSave/restore PCI MSI state across S3.
Keir Fraser [Mon, 24 Nov 2008 14:15:58 +0000 (14:15 +0000)]
Save/restore PCI MSI state across S3.

Signed-off-by: Haitao Shan <haitao.shan@intel.com>
16 years agolinux: remove sysfs files during balloon module exit
Keir Fraser [Mon, 24 Nov 2008 11:13:20 +0000 (11:13 +0000)]
linux: remove sysfs files during balloon module exit

Relevant when building pv drivers.

Also adjust some section attributes of the sysfs code.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agopciback: error handler for PCIE_AER.
Keir Fraser [Mon, 24 Nov 2008 11:04:54 +0000 (11:04 +0000)]
pciback: error handler for PCIE_AER.

This patch is the main implementation for enabling PCIE_AER handling,
adding related pci error handler in pciback and pcifront.

When a device sends a PCIE error message to the root port, it will
trigger an interrupt. The irq handler will then collect roor error
status register, then schedule a work to process the error based on
the error type.

If the error is non-correctable error (fatal or non-fatal), AER
service driver will call the callback funtions of the endpoint's
driver. For bridge, it will broadcast the error to the downstream
ports. Pciback error handler will be called accordingly. Pciback then
ask pcifront help to call the end-device driver for finally completing
the related pci error handling jobs.

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Ke Liping <liping.ke@intel.com>
16 years agopci: small fix of aerdrv_core, add one new function of get_device by BDF
Keir Fraser [Mon, 24 Nov 2008 11:03:21 +0000 (11:03 +0000)]
pci: small fix of aerdrv_core, add one new function of get_device by BDF

Signed-off-by: Jiang Yunhong<yunhong.jiang@intel.com>
Signed-off-by: Ke Liping<liping.ke@intel.com>
16 years agoPCI-Express AER implemetation: pcie_portdrv error handler.
Keir Fraser [Mon, 24 Nov 2008 11:02:43 +0000 (11:02 +0000)]
PCI-Express AER implemetation: pcie_portdrv error handler.

Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPCI-Express AER implemetation: AER core and aerdriver
Keir Fraser [Mon, 24 Nov 2008 11:02:14 +0000 (11:02 +0000)]
PCI-Express AER implemetation: AER core and aerdriver

Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPCI-Express AER implementation: export pcie_port_bus_type
Keir Fraser [Mon, 24 Nov 2008 11:01:21 +0000 (11:01 +0000)]
PCI-Express AER implementation: export pcie_port_bus_type

Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPCI-Express AER implemetation: aer howto document
Keir Fraser [Mon, 24 Nov 2008 11:00:47 +0000 (11:00 +0000)]
PCI-Express AER implemetation: aer howto document

Backported from upstream Linux.

Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agolinux/x86: remove broken HYPERVISOR_acm_op()
Keir Fraser [Wed, 19 Nov 2008 13:15:46 +0000 (13:15 +0000)]
linux/x86: remove broken HYPERVISOR_acm_op()

That hypercall apparently never really worked (it's being passed two
arguments, but the hypercall entry point code only loaded one, while
do_acm_op() again consumed two), appears to be pointless in the kernel
anyway, and there's been no __HYPERVISOR_acm_op for quite a while.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux: re-order fbfront initialization
Keir Fraser [Wed, 19 Nov 2008 13:15:08 +0000 (13:15 +0000)]
linux: re-order fbfront initialization

The helper thread shouldn't be started before xenfb_connect_backend(),
to avoid the thread using the potentially not yet initialized irq.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoSync Xen public headers.
Keir Fraser [Wed, 19 Nov 2008 13:14:11 +0000 (13:14 +0000)]
Sync Xen public headers.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agolinux, S3: dom0 doesn't need save ioapic state
Keir Fraser [Tue, 18 Nov 2008 16:04:04 +0000 (16:04 +0000)]
linux, S3: dom0 doesn't need save ioapic state

Dom0 doesn't need to save/restore ioapic state across S3
suspend/resume, as Xen already does it. The more important
is to avoid warnings on some platforms which may have
uninitialized RTEs to be weird value (like smi mode) but
masked. When dom0 saves those entries and then write back
later, it's easy to trigger Xen's sanity check from
ioapic_guest_write.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
16 years agoxen: Shouldn't remove device in pci_bus_probe_wrapper()
Keir Fraser [Fri, 7 Nov 2008 17:04:20 +0000 (17:04 +0000)]
xen: Shouldn't remove device in pci_bus_probe_wrapper()

In pci_bus_probe_wrapper(), it adds (assign) a device to dom0 firstly,
but if pci_bus_probe() for the device fails (don't have driver), the
device will be removed (deassigned) from dom0. For PCIe-to-PCI
bridges, they are removed from dom0 when they are hooked by
pci_bus_probe_wrapper(). That's to say they are not mapped in VT-d
page table. Thus the PCI devices under these bridges cannot work. This
situation happens when install pciback module, because pciback will
probe these bridges and removed them from dom0. Built-in pciback won't
result in this problem due to these bridges (for example 00:1e.0) are
probed before their devices (for example 02:00.0). (When map a pci
device (02:00.0) to VT-d, it will also map its pcie-to-pci bridge
(00:1e.0) to VT-d)

So I think should not remove (deassign) devices from dom0 when
pci_bus_probe() fails. Each device which can DMA should be mapped in
VT-d when VT-d is enabled. But current code make it possible some
these devices are not mapped into VT-d.

From: Weidong Han <weidong.han@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoblkback: Do not queue up bio structs before submitting them.
Keir Fraser [Thu, 6 Nov 2008 10:29:00 +0000 (10:29 +0000)]
blkback: Do not queue up bio structs before submitting them.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoprevent invalid or unsupportable PIRQs from being used (v2)
Keir Fraser [Wed, 5 Nov 2008 15:43:55 +0000 (15:43 +0000)]
prevent invalid or unsupportable PIRQs from being used (v2)

By keeping the respective irq_desc[] entries pointing to no_irq_type,
setup_irq() (and thus request_irq()) will fail for such IRQs. This
matches native behavior, which also only installs ioapic_*_type out of
ioapic_register_intr().

At the same time, make assign_irq_vector() fail not only when Xen
doesn't support the PIRQ, but also if the IRQ requested doesn't fall
in the kernel's PIRQ space.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoRevert 720:509d67fe5120b. Breaks the build.
Keir Fraser [Wed, 5 Nov 2008 14:51:34 +0000 (14:51 +0000)]
Revert 720:509d67fe5120b. Breaks the build.

16 years agolinux: prevent invalid or unsupportable PIRQs from being used
Keir Fraser [Wed, 5 Nov 2008 14:45:34 +0000 (14:45 +0000)]
linux: prevent invalid or unsupportable PIRQs from being used

By keeping the respective irq_desc[] entries pointing to no_irq_type,
setup_irq() (and thus request_irq()) will fail for such IRQs. This
matches native behavior, which also only installs ioapic_*_type out of
ioapic_register_intr().

At the same time, make assign_irq_vector() fail not only when Xen
doesn't support the PIRQ, but also if the IRQ requested doesn't fall
in the kernel's PIRQ space.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoblktap: ensure vma->vm_mm's mmap_sem is being held whenever it is being modified
Keir Fraser [Wed, 5 Nov 2008 14:08:37 +0000 (14:08 +0000)]
blktap: ensure vma->vm_mm's mmap_sem is being held whenever it is being modified

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Tue, 4 Nov 2008 03:43:37 +0000 (12:43 +0900)]
merge with linux-2.6.18-xen.hg

16 years agoCPUIDLE: DOM0, enable C1 FFH
Keir Fraser [Thu, 30 Oct 2008 13:34:43 +0000 (13:34 +0000)]
CPUIDLE: DOM0, enable C1 FFH

Get C1 info from acpi table and pass it to Xen. It is partially
backported from below kernel commit:

commit 991528d7348667924176f3e29addea0675298944
Author: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Date:   Mon Sep 25 16:28:13 2006 -0700

    ACPI: Processor native C-states using MWAIT

    Intel processors starting with the Core Duo support
    support processor native C-state using the MWAIT instruction.
    Refer: Intel Architecture Software Developer's Manual
    http://www.intel.com/design/Pentium4/manuals/253668.htm

    Platform firmware exports the support for Native C-state to OS
    using
    ACPI _PDC and _CST methods.
    Refer: Intel Processor Vendor-Specific ACPI: Interface
    Specification
    http://www.intel.com/technology/iapc/acpi/downloads/302223.htm

    With Processor Native C-state, we use 'MWAIT' instruction on the
    processor
    to enter different C-states (C1, C2, C3).  We won't use the
    special IO
    ports to enter C-state and no SMM mode etc required to enter
    C-state.
    Overall this will mean better C-state support.

    One major advantage of using MWAIT for all C-states is, with this
    and "treat interrupt as break event" feature of MWAIT, we can now get
    accurate timing for the time spent in C1, C2, ..  states.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
16 years agoRevert mistaken change from previous changeset.
Keir Fraser [Thu, 30 Oct 2008 13:18:07 +0000 (13:18 +0000)]
Revert mistaken change from previous changeset.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agognttab: Checking ->next is insufficient to decide if something is
Keir Fraser [Thu, 30 Oct 2008 12:01:06 +0000 (12:01 +0000)]
gnttab: Checking ->next is insufficient to decide if something is
queued in a singly-linked list (doesn't work for final item).

From: Jake Wires <jake.wires@citrix.com>.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agognttab: Revert c/s 714 as it doesn't really fix Jake's bug.
Keir Fraser [Thu, 30 Oct 2008 11:59:46 +0000 (11:59 +0000)]
gnttab: Revert c/s 714 as it doesn't really fix Jake's bug.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agognttab: Clear linked-list pointer when cancelling a callback handle.
Keir Fraser [Wed, 29 Oct 2008 10:12:14 +0000 (10:12 +0000)]
gnttab: Clear linked-list pointer when cancelling a callback handle.

Based on a patch by Jake Wires <jake.wires@citrix.com>.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agodom0: Fix for throttling while pr->id == -1
Keir Fraser [Tue, 28 Oct 2008 10:39:11 +0000 (10:39 +0000)]
dom0: Fix for throttling while pr->id == -1

Signed-off-by: Wei Gang <gang.wei@intel.com>
16 years agoBuild fixes.
Keir Fraser [Mon, 27 Oct 2008 13:47:07 +0000 (13:47 +0000)]
Build fixes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agolinux/i386: utilize hypervisor highmem handling helpers
Keir Fraser [Mon, 27 Oct 2008 13:34:49 +0000 (13:34 +0000)]
linux/i386: utilize hypervisor highmem handling helpers

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoSync Xen hypervisor public headers.
Keir Fraser [Mon, 27 Oct 2008 13:34:34 +0000 (13:34 +0000)]
Sync Xen hypervisor public headers.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoFix IRQ-from-evtchn delivery so that softirq handling does not happen
Keir Fraser [Mon, 27 Oct 2008 10:43:45 +0000 (10:43 +0000)]
Fix IRQ-from-evtchn delivery so that softirq handling does not happen
while IRQ delivery is blocked. We do this by moving irq_enter/irq_exit
outside the mutual-exclusion region in evtchn_do_upcall(). We then
have to remove irq_enter/irq_exit from do_IRQ(), otherwise the
preempt_coutn check in the rcu code will always fail and we hang
during boot.

Thanks to Eduard Guzovsky of Stratus for help with this patch.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>