diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-03 01:09:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-03 01:09:10 -0400 |
commit | 56d92aa5cf7c96c70f81d0350c94faf46a9fb76d (patch) | |
tree | 2fb5d5b891903cada4dff9c581c70d33340a3769 /drivers/pci/xen-pcifront.c | |
parent | 33c2a174120b2c1baec9d1dac513f9d4b761b26a (diff) | |
parent | c341ca45ce56143804ef5a8f4db753e554e640b4 (diff) |
Merge tag 'stable/for-linus-3.7-x86-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
Pull Xen update from Konrad Rzeszutek Wilk:
"Features:
- When hotplugging PCI devices in a PV guest we can allocate
Xen-SWIOTLB later.
- Cleanup Xen SWIOTLB.
- Support pages out grants from HVM domains in the backends.
- Support wild cards in xen-pciback.hide=(BDF) arguments.
- Update grant status updates with upstream hypervisor.
- Boot PV guests with more than 128GB.
- Cleanup Xen MMU code/add comments.
- Obtain XENVERS using a preferred method.
- Lay out generic changes to support Xen ARM.
- Allow privcmd ioctl for HVM (used to do only PV).
- Do v2 of mmap_batch for privcmd ioctls.
- If hypervisor saves the LED keyboard light - we will now instruct
the kernel about its state.
Fixes:
- More fixes to Xen PCI backend for various calls/FLR/etc.
- With more than 4GB in a 64-bit PV guest disable native SWIOTLB.
- Fix up smatch warnings.
- Fix up various return values in privmcmd and mm."
* tag 'stable/for-linus-3.7-x86-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (48 commits)
xen/pciback: Restore the PCI config space after an FLR.
xen-pciback: properly clean up after calling pcistub_device_find()
xen/vga: add the xen EFI video mode support
xen/x86: retrieve keyboard shift status flags from hypervisor.
xen/gndev: Xen backend support for paged out grant targets V4.
xen-pciback: support wild cards in slot specifications
xen/swiotlb: Fix compile warnings when using plain integer instead of NULL pointer.
xen/swiotlb: Remove functions not needed anymore.
xen/pcifront: Use Xen-SWIOTLB when initting if required.
xen/swiotlb: For early initialization, return zero on success.
xen/swiotlb: Use the swiotlb_late_init_with_tbl to init Xen-SWIOTLB late when PV PCI is used.
xen/swiotlb: Move the error strings to its own function.
xen/swiotlb: Move the nr_tbl determination in its own function.
xen/arm: compile and run xenbus
xen: resynchronise grant table status codes with upstream
xen/privcmd: return -EFAULT on error
xen/privcmd: Fix mmap batch ioctl error status copy back.
xen/privcmd: add PRIVCMD_MMAPBATCH_V2 ioctl
xen/mm: return more precise error from xen_remap_domain_range()
xen/mmu: If the revector fails, don't attempt to revector anything else.
...
Diffstat (limited to 'drivers/pci/xen-pcifront.c')
-rw-r--r-- | drivers/pci/xen-pcifront.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index def8d0b5620c..0aab85a51559 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/bitops.h> | 21 | #include <linux/bitops.h> |
22 | #include <linux/time.h> | 22 | #include <linux/time.h> |
23 | 23 | ||
24 | #include <asm/xen/swiotlb-xen.h> | ||
24 | #define INVALID_GRANT_REF (0) | 25 | #define INVALID_GRANT_REF (0) |
25 | #define INVALID_EVTCHN (-1) | 26 | #define INVALID_EVTCHN (-1) |
26 | 27 | ||
@@ -236,7 +237,7 @@ static int pcifront_bus_write(struct pci_bus *bus, unsigned int devfn, | |||
236 | return errno_to_pcibios_err(do_pci_op(pdev, &op)); | 237 | return errno_to_pcibios_err(do_pci_op(pdev, &op)); |
237 | } | 238 | } |
238 | 239 | ||
239 | struct pci_ops pcifront_bus_ops = { | 240 | static struct pci_ops pcifront_bus_ops = { |
240 | .read = pcifront_bus_read, | 241 | .read = pcifront_bus_read, |
241 | .write = pcifront_bus_write, | 242 | .write = pcifront_bus_write, |
242 | }; | 243 | }; |
@@ -668,7 +669,7 @@ static irqreturn_t pcifront_handler_aer(int irq, void *dev) | |||
668 | schedule_pcifront_aer_op(pdev); | 669 | schedule_pcifront_aer_op(pdev); |
669 | return IRQ_HANDLED; | 670 | return IRQ_HANDLED; |
670 | } | 671 | } |
671 | static int pcifront_connect(struct pcifront_device *pdev) | 672 | static int pcifront_connect_and_init_dma(struct pcifront_device *pdev) |
672 | { | 673 | { |
673 | int err = 0; | 674 | int err = 0; |
674 | 675 | ||
@@ -681,9 +682,13 @@ static int pcifront_connect(struct pcifront_device *pdev) | |||
681 | dev_err(&pdev->xdev->dev, "PCI frontend already installed!\n"); | 682 | dev_err(&pdev->xdev->dev, "PCI frontend already installed!\n"); |
682 | err = -EEXIST; | 683 | err = -EEXIST; |
683 | } | 684 | } |
684 | |||
685 | spin_unlock(&pcifront_dev_lock); | 685 | spin_unlock(&pcifront_dev_lock); |
686 | 686 | ||
687 | if (!err && !swiotlb_nr_tbl()) { | ||
688 | err = pci_xen_swiotlb_init_late(); | ||
689 | if (err) | ||
690 | dev_err(&pdev->xdev->dev, "Could not setup SWIOTLB!\n"); | ||
691 | } | ||
687 | return err; | 692 | return err; |
688 | } | 693 | } |
689 | 694 | ||
@@ -842,10 +847,10 @@ static int __devinit pcifront_try_connect(struct pcifront_device *pdev) | |||
842 | XenbusStateInitialised) | 847 | XenbusStateInitialised) |
843 | goto out; | 848 | goto out; |
844 | 849 | ||
845 | err = pcifront_connect(pdev); | 850 | err = pcifront_connect_and_init_dma(pdev); |
846 | if (err) { | 851 | if (err) { |
847 | xenbus_dev_fatal(pdev->xdev, err, | 852 | xenbus_dev_fatal(pdev->xdev, err, |
848 | "Error connecting PCI Frontend"); | 853 | "Error setting up PCI Frontend"); |
849 | goto out; | 854 | goto out; |
850 | } | 855 | } |
851 | 856 | ||