]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/log
legacy/linux-2.6.18-xen.git
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>
16 years agolinux/x86-64: fix unwind annotations
Keir Fraser [Mon, 27 Oct 2008 10:32:08 +0000 (10:32 +0000)]
linux/x86-64: fix unwind annotations

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years ago[IA64] xencomm: support several domctls for VT-d.
Isaku Yamahata [Fri, 24 Oct 2008 02:22:02 +0000 (11:22 +0900)]
[IA64] xencomm: support several domctls for VT-d.

This patch adds xencomm support of several domctl hypercalls
for VT-d.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agoRemove contiguous_bitmap[] as it's no longer needed.
Keir Fraser [Wed, 22 Oct 2008 13:55:29 +0000 (14:55 +0100)]
Remove contiguous_bitmap[] as it's no longer needed.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agodom0: remove "pci-mem-align" option
Keir Fraser [Wed, 22 Oct 2008 10:54:44 +0000 (11:54 +0100)]
dom0: remove "pci-mem-align" option

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agolinux/pciback: constify struct config_field instances
Keir Fraser [Mon, 20 Oct 2008 14:29:07 +0000 (15:29 +0100)]
linux/pciback: constify struct config_field instances

... plus the necessary adjustments to declarations. Also simplify the
static list terminators.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoFix compilation error when CONFIG_PCI_REASSIGN is not set.
Keir Fraser [Fri, 17 Oct 2008 11:02:53 +0000 (12:02 +0100)]
Fix compilation error when CONFIG_PCI_REASSIGN is not set.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agodom0 linux: remove "reassign_resources" option.
Keir Fraser [Fri, 17 Oct 2008 11:02:23 +0000 (12:02 +0100)]
dom0 linux: remove "reassign_resources" option.

To reassign page-aligned resources to device, please add boot
parameters of dom0 linux as follows.

        reassigndev=00:1d.7,01:00.0

        reassigndev=    Specifies device to reassign page-aligned
                        resources.  PCI-PCI bridge can be specified,
                        if resource windows need to be expanded.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agodom0 linux: Fix issue on reassigning resources to PCI-PCI bridge.
Keir Fraser [Fri, 17 Oct 2008 11:01:56 +0000 (12:01 +0100)]
dom0 linux: Fix issue on reassigning resources to PCI-PCI bridge.

This patch fixes the issue on reassigning resources to PCI-PCI bridge,
which was found by Zhao, Yu.

Current "quirk_align_mem_resources" updates Base/Limit register of
PCI-PCI bridge, if IORESOURCE_MEM is set in "dev->resource[i].flags".
But, when "quirk_align_mem_resources" is called,
dev->resource[i].flags
is not initialized, because "quirk_align_mem_resources" is called
before "pci_read_bridge_bases". As a result, current code does not
update Base/Limit register.

This patch sets All F to Base register and sets 0 to Limit register,
regardless of "dev->resource[i].flags". After that,
"pci_assign_unassigned_resources" calculates resource window size and
assigns resource to PCI-PCI bridge.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoxen: conditionalize PCI reassign code by a config option, selected
Keir Fraser [Tue, 14 Oct 2008 13:58:08 +0000 (14:58 +0100)]
xen: conditionalize PCI reassign code by a config option, selected
only from privileged Xen configurations.

Also eliminate the pointless new macro ROUND_UP_TO_PAGESIZE().

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux/x86-64: again pte_val() -> __pte_val()
Keir Fraser [Tue, 14 Oct 2008 13:57:26 +0000 (14:57 +0100)]
linux/x86-64: again pte_val() -> __pte_val()
... as the generated code is so much easier to read (performance
doesn't really matter here).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoMerge with IA64 tree
Keir Fraser [Fri, 10 Oct 2008 09:17:40 +0000 (10:17 +0100)]
Merge with IA64 tree

16 years agoThis patch adds the power management support to ahci driver.
Keir Fraser [Fri, 10 Oct 2008 08:58:50 +0000 (09:58 +0100)]
This patch adds the power management support to ahci driver.
And it is necessary for S3.

It is back-ported from linux kernel mainline tree.
More precisely, the patch is the diff between the commit
c1332875cbe0c148c7f200d4f9b36b64e34d9872 and tag v2.8.18.

The authorship of the overall changes go to:

=============
commit c1332875cbe0c148c7f200d4f9b36b64e34d9872
Author: Tejun Heo <htejun@gmail.com>
Date:   Wed Jul 26 15:59:26 2006 +0900

    [PATCH] ahci: implement Power Management support

    Implement power management support.

    Original implementation is from Zhao, Forrest
    <forrest.zhao@intel.com>

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
commit d91542c11f3981768367815cf087ad36e792ea4a
Author: Tejun Heo <htejun@gmail.com>
Date:   Wed Jul 26 15:59:26 2006 +0900

    [PATCH] ahci: separate out ahci_reset_controller() and
    ahci_init_controller()

    Separate out ahci_reset_controller() and ahci_init_controller()
    from
    ata_host_init().  These will be used by PM callbacks.  This patch
    doesn't introduce any behavior change.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
commit 0be0aa98985dfec42502c0d0af2a1baff9bdb19f
Author: Tejun Heo <htejun@gmail.com>
Date:   Wed Jul 26 15:59:26 2006 +0900

    [PATCH] libata: improve driver initialization and deinitialization

    Implement ahci_[de]init_port() and use it during initialization
    and
    de-initialization.  ahci_[de]init_port() are supersets of what
    used to
    be done during driver [de-]initialization.  This patch makes the
    following behavior changes.

    * Per-port IRQ mask is cleared on driver load as done in other
      drivers.  The mask will be configured properly during probe.

    * During init_one(), HOST_IRQ_STAT is cleared after masking port
      IRQs
      such that there is no race window.

    * CMD_SPIN_UP is cleared during init_one() instead of being set.
      It
      is set in port_start().  This is more consistent with overall
      structure of initialization.  Note that CMD_SPIN_UP simply
      controls
      PHY activation.

    * Slumber and staggered spin-up are handled properly.

    * All init/deinit operations are done in step-by-step manner as
      described in the spec instead of issued as single merged
      command.

    Original implementation is from Zhao, Forrest
    <forrest.zhao@intel.com>

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
commit 9f5920567bfabbd1be26112a31c44652b6587394
Author: Tejun Heo <htejun@gmail.com>
Date:   Wed Jul 26 15:59:26 2006 +0900

    [PATCH] ahci: simplify ahci_start_engine()

    Simplify ahci_start_engine() by killing prerequisite condition
    checks.
    Rationales are..

    * No user checks error return from ahci_start_engine()

    * Code flow guarantees the prerequisite conditions unless the
      controller is malfunctioning.  In such cases, the driver had
      chances
      to learn about the problem _before_ calling this function.

    * Closely related to the above two, driver calls into this
      function
      even when prerequisites fail hoping for the best.

    Basically, ahci_start_engine() should only do the operation
    itself.
    It isn't the right place to check for prerequisites.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
commit d8fcd116d203dfe2f6c272d0cd67724b172f1bc2
Author: Tejun Heo <htejun@gmail.com>
Date:   Wed Jul 26 15:59:25 2006 +0900

    [PATCH] ahci: cosmetic changes to ahci_start/stop_engine()

    * fascist-format comments according to comment style used in
      libata
      core layer.

    * if() -> if ()

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
commit 254950cd56fee220c9d548f3e57211b95976ba64
Author: Tejun Heo <htejun@gmail.com>
Date:   Wed Jul 26 15:59:25 2006 +0900

    [PATCH] ahci: relocate several internal functions

    * move ahci_port_start/stop() below EH functions.  This makes ahci
      more consistent with other drivers and makes prototypes for
      ahci_start/stop_engine() unnecessary.

    * swap positions between ahci_start_engine() and
      ahci_stop_engine()
      for readability.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
commit 5457f2194ad198a0aba4190ec99a6a81846fdca5
Author: zhao, forrest <forrest.zhao@intel.com>
Date:   Thu Jul 13 13:38:32 2006 +0800

    [PATCH] The redefinition of ahci_start_engine() and
    ahci_stop_engine()

    - Make ahci_start_engine() and ahci_stop_engine() more consistent
      with
      AHCI spec 1.1
    - Change their input parameter from ap to port_mmio
    - Update the existing users of ahci_start_engine() and
      ahci_stop_engine()

Signed-off-by: Forrest Zhao <forrest.zhao@intel.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
=============

Some of the commits above may not be directly related to the ahci pm
problem, but they lay the basic ground for the final commit.

Signed-off-by: Guanqun Lu <guanqun.lu@gmail.com>