Skip to content

Commit

Permalink
Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/rusty/linux

Pull virtio updates from Rusty Russell:
 "OK, this has the big virtio 1.0 implementation, as specified by OASIS.

  On top of tht is the major rework of lguest, to use PCI and virtio
  1.0, to double-check the implementation.

  Then comes the inevitable fixes and cleanups from that work"

* tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (80 commits)
  virtio: don't set VIRTIO_CONFIG_S_DRIVER_OK twice.
  virtio_net: unconditionally define struct virtio_net_hdr_v1.
  tools/lguest: don't use legacy definitions for net device in example launcher.
  virtio: Don't expose legacy net features when VIRTIO_NET_NO_LEGACY defined.
  tools/lguest: use common error macros in the example launcher.
  tools/lguest: give virtqueues names for better error messages
  tools/lguest: more documentation and checking of virtio 1.0 compliance.
  lguest: don't look in console features to find emerg_wr.
  tools/lguest: don't start devices until DRIVER_OK status set.
  tools/lguest: handle indirect partway through chain.
  tools/lguest: insert driver references from the 1.0 spec (4.1 Virtio Over PCI)
  tools/lguest: insert device references from the 1.0 spec (4.1 Virtio Over PCI)
  tools/lguest: rename virtio_pci_cfg_cap field to match spec.
  tools/lguest: fix features_accepted logic in example launcher.
  tools/lguest: handle device reset correctly in example launcher.
  virtual: Documentation: simplify and generalize paravirt_ops.txt
  lguest: remove NOTIFY call and eventfd facility.
  lguest: remove NOTIFY facility from demonstration launcher.
  lguest: use the PCI console device's emerg_wr for early boot messages.
  lguest: always put console in PCI slot #1.
  ...
  • Loading branch information
torvalds committed Feb 18, 2015
2 parents 5c27700 + 5b40a7d commit 53861af
Show file tree
Hide file tree
Showing 43 changed files with 3,367 additions and 1,605 deletions.
137 changes: 0 additions & 137 deletions Documentation/ia64/paravirt_ops.txt

This file was deleted.

3 changes: 3 additions & 0 deletions Documentation/virtual/00-INDEX
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ Virtualization support in the Linux kernel.

00-INDEX
- this file.

paravirt_ops.txt
- Describes the Linux kernel pv_ops to support different hypervisors
kvm/
- Kernel Virtual Machine. See also http://linux-kvm.org
uml/
Expand Down
32 changes: 32 additions & 0 deletions Documentation/virtual/paravirt_ops.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Paravirt_ops
============

Linux provides support for different hypervisor virtualization technologies.
Historically different binary kernels would be required in order to support
different hypervisors, this restriction was removed with pv_ops.
Linux pv_ops is a virtualization API which enables support for different
hypervisors. It allows each hypervisor to override critical operations and
allows a single kernel binary to run on all supported execution environments
including native machine -- without any hypervisors.

pv_ops provides a set of function pointers which represent operations
corresponding to low level critical instructions and high level
functionalities in various areas. pv-ops allows for optimizations at run
time by enabling binary patching of the low-ops critical operations
at boot time.

pv_ops operations are classified into three categories:

- simple indirect call
These operations correspond to high level functionality where it is
known that the overhead of indirect call isn't very important.

- indirect call which allows optimization with binary patch
Usually these operations correspond to low level critical instructions. They
are called frequently and are performance critical. The overhead is
very important.

- a set of macros for hand written assembly code
Hand written assembly codes (.S files) also need paravirtualization
because they include sensitive instructions or some of code paths in
them are very performance critical.
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -7302,7 +7302,7 @@ M: Alok Kataria <[email protected]>
M: Rusty Russell <[email protected]>
L: [email protected]
S: Supported
F: Documentation/ia64/paravirt_ops.txt
F: Documentation/virtual/paravirt_ops.txt
F: arch/*/kernel/paravirt*
F: arch/*/include/asm/paravirt.h

Expand Down
35 changes: 0 additions & 35 deletions arch/mn10300/unit-asb2305/pci-iomap.c

This file was deleted.

1 change: 1 addition & 0 deletions arch/s390/include/asm/pci_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
struct zpci_iomap_entry {
u32 fh;
u8 bar;
u16 count;
};

extern struct zpci_iomap_entry *zpci_iomap_start;
Expand Down
34 changes: 27 additions & 7 deletions arch/s390/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,10 @@ void __iowrite64_copy(void __iomem *to, const void *from, size_t count)
}

/* Create a virtual mapping cookie for a PCI BAR */
void __iomem *pci_iomap(struct pci_dev *pdev, int bar, unsigned long max)
void __iomem *pci_iomap_range(struct pci_dev *pdev,
int bar,
unsigned long offset,
unsigned long max)
{
struct zpci_dev *zdev = get_zdev(pdev);
u64 addr;
Expand All @@ -270,23 +273,40 @@ void __iomem *pci_iomap(struct pci_dev *pdev, int bar, unsigned long max)

idx = zdev->bars[bar].map_idx;
spin_lock(&zpci_iomap_lock);
zpci_iomap_start[idx].fh = zdev->fh;
zpci_iomap_start[idx].bar = bar;
if (zpci_iomap_start[idx].count++) {
BUG_ON(zpci_iomap_start[idx].fh != zdev->fh ||
zpci_iomap_start[idx].bar != bar);
} else {
zpci_iomap_start[idx].fh = zdev->fh;
zpci_iomap_start[idx].bar = bar;
}
/* Detect overrun */
BUG_ON(!zpci_iomap_start[idx].count);
spin_unlock(&zpci_iomap_lock);

addr = ZPCI_IOMAP_ADDR_BASE | ((u64) idx << 48);
return (void __iomem *) addr;
return (void __iomem *) addr + offset;
}
EXPORT_SYMBOL_GPL(pci_iomap);
EXPORT_SYMBOL_GPL(pci_iomap_range);

void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
{
return pci_iomap_range(dev, bar, 0, maxlen);
}
EXPORT_SYMBOL(pci_iomap);

void pci_iounmap(struct pci_dev *pdev, void __iomem *addr)
{
unsigned int idx;

idx = (((__force u64) addr) & ~ZPCI_IOMAP_ADDR_BASE) >> 48;
spin_lock(&zpci_iomap_lock);
zpci_iomap_start[idx].fh = 0;
zpci_iomap_start[idx].bar = 0;
/* Detect underrun */
BUG_ON(!zpci_iomap_start[idx].count);
if (!--zpci_iomap_start[idx].count) {
zpci_iomap_start[idx].fh = 0;
zpci_iomap_start[idx].bar = 0;
}
spin_unlock(&zpci_iomap_lock);
}
EXPORT_SYMBOL_GPL(pci_iounmap);
Expand Down
1 change: 0 additions & 1 deletion arch/x86/include/asm/lguest_hcall.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#define LHCALL_SET_PTE 14
#define LHCALL_SET_PGD 15
#define LHCALL_LOAD_TLS 16
#define LHCALL_NOTIFY 17
#define LHCALL_LOAD_GDT_ENTRY 18
#define LHCALL_SEND_INTERRUPTS 19

Expand Down
Loading

0 comments on commit 53861af

Please sign in to comment.