Displaying 20 results from an estimated 20 matches for "pci_base_address_space_memory".
2012 Sep 26
3
[PATCH v3] xen/tools: Add 64 bits big bar support
...RESS_0 + 4*bar;
             if ( bar == 6 )
                 bar_reg = PCI_ROM_ADDRESS;
 
             bar_data = pci_readl(devfn, bar_reg);
+            is_64bar = !!((bar_data & (PCI_BASE_ADDRESS_SPACE |
+                         PCI_BASE_ADDRESS_MEM_TYPE_MASK)) ==
+                         (PCI_BASE_ADDRESS_SPACE_MEMORY |
+                         PCI_BASE_ADDRESS_MEM_TYPE_64));
             pci_writel(devfn, bar_reg, ~0);
             bar_sz = pci_readl(devfn, bar_reg);
             pci_writel(devfn, bar_reg, bar_data);
-            if ( bar_sz == 0 )
-                continue;
 
             bar_sz &= (((bar...
2017 Mar 20
3
[BUG] virtio-net linux driver fails to probe on MIPS Malta since 'hw/virtio-pci: fix virtio behaviour'
On Mon, Mar 20, 2017 at 05:21:22PM +0200, Marcel Apfelbaum wrote:
> On 03/17/2017 11:57 PM, James Hogan wrote:
> > Hi,
> > 
> > I've bisected the following failure of the virtio_net linux v4.10 driver
> > to probe in QEMU v2.9.0-rc1 emulating a MIPS Malta machine:
> > 
> > virtio_net virtio0: virtio: device uses modern interface but does not have
2017 Mar 20
3
[BUG] virtio-net linux driver fails to probe on MIPS Malta since 'hw/virtio-pci: fix virtio behaviour'
On Mon, Mar 20, 2017 at 05:21:22PM +0200, Marcel Apfelbaum wrote:
> On 03/17/2017 11:57 PM, James Hogan wrote:
> > Hi,
> > 
> > I've bisected the following failure of the virtio_net linux v4.10 driver
> > to probe in QEMU v2.9.0-rc1 emulating a MIPS Malta machine:
> > 
> > virtio_net virtio0: virtio: device uses modern interface but does not have
2009 Apr 03
0
[PATCH] PCI: sync up the SR-IOV changes between Dom0 and upstream kernels
...void __devinit quirk_i82576_sriov(struct pci_dev *dev)
 {
-	int i, flags;
+	int pos, flags;
 	u32 bar, start, size;
 
 	if (PAGE_SIZE > 0x10000)
 		return;
 
-	if (pci_read_config_dword(dev, 0x184, &bar))
+	flags = pci_resource_flags(dev, 0);
+	if ((flags & PCI_BASE_ADDRESS_SPACE) !=
+			PCI_BASE_ADDRESS_SPACE_MEMORY ||
+	    (flags & PCI_BASE_ADDRESS_MEM_TYPE_MASK) !=
+			PCI_BASE_ADDRESS_MEM_TYPE_32)
 		return;
 
+	pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_SRIOV);
+	if (!pos)
+		return;
+
+	pci_read_config_dword(dev, pos + PCI_SRIOV_BAR, &bar);
 	if (bar & PCI_BASE_ADDRESS_MEM_MASK)
 		ret...
2017 Mar 21
0
[BUG] virtio-net linux driver fails to probe on MIPS Malta since 'hw/virtio-pci: fix virtio behaviour'
...c
index f9b7244..5b4d429 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1671,9 +1671,7 @@ static void virtio_pci_device_plugged(DeviceState *d, Error **errp)
          }
          pci_register_bar(&proxy->pci_dev, proxy->modern_mem_bar_idx,
-                         PCI_BASE_ADDRESS_SPACE_MEMORY |
-                         PCI_BASE_ADDRESS_MEM_PREFETCH |
-                         PCI_BASE_ADDRESS_MEM_TYPE_64,
+                         PCI_BASE_ADDRESS_SPACE_MEMORY,
                           &proxy->modern_bar);
          proxy->config_cap = virtio_pci_add_mem_cap(proxy, &cf...
2012 Mar 19
2
[PATCH RFC] virtio-pci: add MMIO property
...;bar, &virtio_pci_config_ops, proxy,
                           "virtio-pci", size);
-    pci_register_bar(&proxy->pci_dev, 0, PCI_BASE_ADDRESS_SPACE_IO,
-                     &proxy->bar);
+
+    if (proxy->flags & VIRTIO_PCI_FLAG_USE_MMIO) {
+        bar0_type = PCI_BASE_ADDRESS_SPACE_MEMORY;
+    } else {
+        bar0_type = PCI_BASE_ADDRESS_SPACE_IO;
+    }
+
+    pci_register_bar(&proxy->pci_dev, 0, bar0_type, &proxy->bar);
 
     if (!kvm_has_many_ioeventfds()) {
         proxy->flags &= ~VIRTIO_PCI_FLAG_USE_IOEVENTFD;
@@ -823,6 +830,7 @@ static Property virti...
2012 Mar 19
2
[PATCH RFC] virtio-pci: add MMIO property
...;bar, &virtio_pci_config_ops, proxy,
                           "virtio-pci", size);
-    pci_register_bar(&proxy->pci_dev, 0, PCI_BASE_ADDRESS_SPACE_IO,
-                     &proxy->bar);
+
+    if (proxy->flags & VIRTIO_PCI_FLAG_USE_MMIO) {
+        bar0_type = PCI_BASE_ADDRESS_SPACE_MEMORY;
+    } else {
+        bar0_type = PCI_BASE_ADDRESS_SPACE_IO;
+    }
+
+    pci_register_bar(&proxy->pci_dev, 0, bar0_type, &proxy->bar);
 
     if (!kvm_has_many_ioeventfds()) {
         proxy->flags &= ~VIRTIO_PCI_FLAG_USE_IOEVENTFD;
@@ -823,6 +830,7 @@ static Property virti...
2012 Mar 19
1
[PATCHv2] virtio-pci: add MMIO property
...;bar, &virtio_pci_config_ops, proxy,
                           "virtio-pci", size);
-    pci_register_bar(&proxy->pci_dev, 0, PCI_BASE_ADDRESS_SPACE_IO,
-                     &proxy->bar);
+
+    if (proxy->flags & VIRTIO_PCI_FLAG_USE_MMIO) {
+        bar0_type = PCI_BASE_ADDRESS_SPACE_MEMORY;
+    } else {
+        bar0_type = PCI_BASE_ADDRESS_SPACE_IO;
+    }
+
+    pci_register_bar(&proxy->pci_dev, 0, bar0_type, &proxy->bar);
 
     if (!kvm_has_many_ioeventfds()) {
         proxy->flags &= ~VIRTIO_PCI_FLAG_USE_IOEVENTFD;
@@ -823,6 +882,7 @@ static Property virti...
2012 Mar 19
1
[PATCHv2] virtio-pci: add MMIO property
...;bar, &virtio_pci_config_ops, proxy,
                           "virtio-pci", size);
-    pci_register_bar(&proxy->pci_dev, 0, PCI_BASE_ADDRESS_SPACE_IO,
-                     &proxy->bar);
+
+    if (proxy->flags & VIRTIO_PCI_FLAG_USE_MMIO) {
+        bar0_type = PCI_BASE_ADDRESS_SPACE_MEMORY;
+    } else {
+        bar0_type = PCI_BASE_ADDRESS_SPACE_IO;
+    }
+
+    pci_register_bar(&proxy->pci_dev, 0, bar0_type, &proxy->bar);
 
     if (!kvm_has_many_ioeventfds()) {
         proxy->flags &= ~VIRTIO_PCI_FLAG_USE_IOEVENTFD;
@@ -823,6 +882,7 @@ static Property virti...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [1/4]
...>dev, "BAR %d: error updating (%#08x != %#08x)\n",
-			resno, new, check);
+		dev_err(&dev->dev, "BAR at %d: error updating "
+			"(%#08x != %#08x)\n", pos, new, check);
 	}
 
 	if ((new & (PCI_BASE_ADDRESS_SPACE|PCI_BASE_ADDRESS_MEM_TYPE_MASK)) ==
 	    (PCI_BASE_ADDRESS_SPACE_MEMORY|PCI_BASE_ADDRESS_MEM_TYPE_64)) {
 		new = region.start >> 16 >> 16;
-		pci_write_config_dword(dev, reg + 4, new);
-		pci_read_config_dword(dev, reg + 4, &check);
+		pci_write_config_dword(dev, pos + 4, new);
+		pci_read_config_dword(dev, pos + 4, &check);
 		if (check != new) {...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [1/4]
...>dev, "BAR %d: error updating (%#08x != %#08x)\n",
-			resno, new, check);
+		dev_err(&dev->dev, "BAR at %d: error updating "
+			"(%#08x != %#08x)\n", pos, new, check);
 	}
 
 	if ((new & (PCI_BASE_ADDRESS_SPACE|PCI_BASE_ADDRESS_MEM_TYPE_MASK)) ==
 	    (PCI_BASE_ADDRESS_SPACE_MEMORY|PCI_BASE_ADDRESS_MEM_TYPE_64)) {
 		new = region.start >> 16 >> 16;
-		pci_write_config_dword(dev, reg + 4, new);
-		pci_read_config_dword(dev, reg + 4, &check);
+		pci_write_config_dword(dev, pos + 4, new);
+		pci_read_config_dword(dev, pos + 4, &check);
 		if (check != new) {...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [1/4]
...>dev, "BAR %d: error updating (%#08x != %#08x)\n",
-			resno, new, check);
+		dev_err(&dev->dev, "BAR at %d: error updating "
+			"(%#08x != %#08x)\n", pos, new, check);
 	}
 
 	if ((new & (PCI_BASE_ADDRESS_SPACE|PCI_BASE_ADDRESS_MEM_TYPE_MASK)) ==
 	    (PCI_BASE_ADDRESS_SPACE_MEMORY|PCI_BASE_ADDRESS_MEM_TYPE_64)) {
 		new = region.start >> 16 >> 16;
-		pci_write_config_dword(dev, reg + 4, new);
-		pci_read_config_dword(dev, reg + 4, &check);
+		pci_write_config_dword(dev, pos + 4, new);
+		pci_read_config_dword(dev, pos + 4, &check);
 		if (check != new) {...
2013 May 28
3
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...VIRTIO_PCI_CONFIG_DEVICE,
+                           proxy->vdev->config_len,
+                           VIRTIO_PCI_CAP_DEVICE_CFG,
+                           0);
+    }
+
+    pci_register_bar(&proxy->pci_dev, VIRTIO_PCI_CONFIG_BAR_NUM,
+                     PCI_BASE_ADDRESS_SPACE_MEMORY,
+                     &proxy->config_bar);
+
     if (!kvm_has_many_ioeventfds()) {
         proxy->flags &= ~VIRTIO_PCI_FLAG_USE_IOEVENTFD;
     }
@@ -1012,6 +1370,13 @@ static void virtio_pci_exit(PCIDevice *pci_dev)
     VirtIOPCIProxy *proxy = VIRTIO_PCI(pci_dev);
     virtio_pci...
2013 May 28
3
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...VIRTIO_PCI_CONFIG_DEVICE,
+                           proxy->vdev->config_len,
+                           VIRTIO_PCI_CAP_DEVICE_CFG,
+                           0);
+    }
+
+    pci_register_bar(&proxy->pci_dev, VIRTIO_PCI_CONFIG_BAR_NUM,
+                     PCI_BASE_ADDRESS_SPACE_MEMORY,
+                     &proxy->config_bar);
+
     if (!kvm_has_many_ioeventfds()) {
         proxy->flags &= ~VIRTIO_PCI_FLAG_USE_IOEVENTFD;
     }
@@ -1012,6 +1370,13 @@ static void virtio_pci_exit(PCIDevice *pci_dev)
     VirtIOPCIProxy *proxy = VIRTIO_PCI(pci_dev);
     virtio_pci...
2013 May 28
0
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...CONFIG_DEVICE,
> +                           proxy->vdev->config_len,
> +                           VIRTIO_PCI_CAP_DEVICE_CFG,
> +                           0);
> +    }
> +
> +    pci_register_bar(&proxy->pci_dev, VIRTIO_PCI_CONFIG_BAR_NUM,
> +                     PCI_BASE_ADDRESS_SPACE_MEMORY,
> +                     &proxy->config_bar);
> +
>      if (!kvm_has_many_ioeventfds()) {
>          proxy->flags &= ~VIRTIO_PCI_FLAG_USE_IOEVENTFD;
>      }
> @@ -1012,6 +1370,13 @@ static void virtio_pci_exit(PCIDevice *pci_dev)
>      VirtIOPCIProxy *proxy = V...
2015 Nov 18
2
[RFC] kvmtool: add support for modern virtio-pci
....class[0]		= class & 0xff,
+		.class[1]		= (class >> 8) & 0xff,
+		.class[2]		= (class >> 16) & 0xff,
+		.subsys_vendor_id	= cpu_to_le16(PCI_SUBSYSTEM_VENDOR_ID_REDHAT_QUMRANET),
+		.subsys_id		= cpu_to_le16(subsys_id),
+		.bar[0]			= cpu_to_le32(vpci->mmio_addr
+							| PCI_BASE_ADDRESS_SPACE_MEMORY),
+		.bar[1]			= cpu_to_le32(vpci->port_addr
+							| PCI_BASE_ADDRESS_SPACE_IO),
+		.bar[2]			= cpu_to_le32(vpci->msix_io_block
+							| PCI_BASE_ADDRESS_SPACE_MEMORY),
+		.status			= cpu_to_le16(PCI_STATUS_CAP_LIST),
+		.capabilities		= (void *)&vpci->pci_hdr.msix - (void *)&vp...
2015 Nov 18
2
[RFC] kvmtool: add support for modern virtio-pci
....class[0]		= class & 0xff,
+		.class[1]		= (class >> 8) & 0xff,
+		.class[2]		= (class >> 16) & 0xff,
+		.subsys_vendor_id	= cpu_to_le16(PCI_SUBSYSTEM_VENDOR_ID_REDHAT_QUMRANET),
+		.subsys_id		= cpu_to_le16(subsys_id),
+		.bar[0]			= cpu_to_le32(vpci->mmio_addr
+							| PCI_BASE_ADDRESS_SPACE_MEMORY),
+		.bar[1]			= cpu_to_le32(vpci->port_addr
+							| PCI_BASE_ADDRESS_SPACE_IO),
+		.bar[2]			= cpu_to_le32(vpci->msix_io_block
+							| PCI_BASE_ADDRESS_SPACE_MEMORY),
+		.status			= cpu_to_le16(PCI_STATUS_CAP_LIST),
+		.capabilities		= (void *)&vpci->pci_hdr.msix - (void *)&vp...
2010 May 10
5
GFX Passthrough
Hi List,
many People seem to be interested in the Graphic-Card Passthrough Feature (for 
more or less obvious reasons).
Official Support is still under development, and i hope not to interfere with it 
in any (bad) way ...
But i remember my own painfull and timeconsuming research when i wanted this 
feature to work, so i thought perhaps this spares some time for the unpatient 
users like me :)
2011 May 18
90
Patches for VGA-Passthrough XEN 4.2 unstable
Hello, I have been working on VGA-passthrough in the last month.
When Xen was at his version 3.5 there was a few patches to make this work for some graphic cards using the patches developed by Han Weidong and posted here (http://lists.xensource.com/archives/html/xen-devel/2009-08/msg01176.html) and the same patches posted file by file are here
2011 May 18
90
Patches for VGA-Passthrough XEN 4.2 unstable
Hello, I have been working on VGA-passthrough in the last month.
When Xen was at his version 3.5 there was a few patches to make this work for some graphic cards using the patches developed by Han Weidong and posted here (http://lists.xensource.com/archives/html/xen-devel/2009-08/msg01176.html) and the same patches posted file by file are here