Displaying 20 results from an estimated 76 matches for "vp_set".
2018 Dec 07
2
[PATCH 1/1] virtio: remove deprecated VIRTIO_PCI_CONFIG()
...device *vdev, unsigned offset,
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
void __iomem *ioaddr = vp_dev->ioaddr +
- VIRTIO_PCI_CONFIG(vp_dev) + offset;
+ VIRTIO_PCI_CONFIG_OFF(vp_dev->msix_enabled) +
+ offset;
u8 *ptr = buf;
int i;
@@ -67,7 +68,8 @@ static void vp_set(struct virtio_device *vdev, unsigned offset,
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
void __iomem *ioaddr = vp_dev->ioaddr +
- VIRTIO_PCI_CONFIG(vp_dev) + offset;
+ VIRTIO_PCI_CONFIG_OFF(vp_dev->msix_enabled) +
+ offset;
const u8 *ptr = buf;
int i;
diff --gi...
2018 Dec 07
2
[PATCH 1/1] virtio: remove deprecated VIRTIO_PCI_CONFIG()
...device *vdev, unsigned offset,
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
void __iomem *ioaddr = vp_dev->ioaddr +
- VIRTIO_PCI_CONFIG(vp_dev) + offset;
+ VIRTIO_PCI_CONFIG_OFF(vp_dev->msix_enabled) +
+ offset;
u8 *ptr = buf;
int i;
@@ -67,7 +68,8 @@ static void vp_set(struct virtio_device *vdev, unsigned offset,
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
void __iomem *ioaddr = vp_dev->ioaddr +
- VIRTIO_PCI_CONFIG(vp_dev) + offset;
+ VIRTIO_PCI_CONFIG_OFF(vp_dev->msix_enabled) +
+ offset;
const u8 *ptr = buf;
int i;
diff --gi...
2014 Dec 08
0
[PATCH v2 08/10] virtio_pci: split out legacy device support
..._t *callbacks[],
+ const char *names[]);
+const char *vp_bus_name(struct virtio_device *vdev);
+
+/* Setup the affinity for a virtqueue:
+ * - force the affinity for per vq vector
+ * - OR over all affinities for shared MSI
+ * - ignore the affinity request if we're using INTX
+ */
+int vp_set_vq_affinity(struct virtqueue *vq, int cpu);
+void virtio_pci_release_dev(struct device *);
+
+#ifdef CONFIG_PM_SLEEP
+extern const struct dev_pm_ops virtio_pci_pm_ops;
+#endif
+
+#endif
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index c8ca3f7..d73ceec 100644
--- a/driver...
2014 Dec 08
0
[PATCH v2 08/10] virtio_pci: split out legacy device support
..._t *callbacks[],
+ const char *names[]);
+const char *vp_bus_name(struct virtio_device *vdev);
+
+/* Setup the affinity for a virtqueue:
+ * - force the affinity for per vq vector
+ * - OR over all affinities for shared MSI
+ * - ignore the affinity request if we're using INTX
+ */
+int vp_set_vq_affinity(struct virtqueue *vq, int cpu);
+void virtio_pci_release_dev(struct device *);
+
+#ifdef CONFIG_PM_SLEEP
+extern const struct dev_pm_ops virtio_pci_pm_ops;
+#endif
+
+#endif
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index c8ca3f7..d73ceec 100644
--- a/driver...
2014 Dec 08
0
[PATCH 8/9] virtio_pci: split out legacy device support
..._t *callbacks[],
+ const char *names[]);
+const char *vp_bus_name(struct virtio_device *vdev);
+
+/* Setup the affinity for a virtqueue:
+ * - force the affinity for per vq vector
+ * - OR over all affinities for shared MSI
+ * - ignore the affinity request if we're using INTX
+ */
+int vp_set_vq_affinity(struct virtqueue *vq, int cpu);
+void virtio_pci_release_dev(struct device *);
+
+#ifdef CONFIG_PM_SLEEP
+extern const struct dev_pm_ops virtio_pci_pm_ops;
+#endif
+
+#endif
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index c8ca3f7..6c7e186 100644
--- a/driver...
2014 Dec 08
0
[PATCH 8/9] virtio_pci: split out legacy device support
..._t *callbacks[],
+ const char *names[]);
+const char *vp_bus_name(struct virtio_device *vdev);
+
+/* Setup the affinity for a virtqueue:
+ * - force the affinity for per vq vector
+ * - OR over all affinities for shared MSI
+ * - ignore the affinity request if we're using INTX
+ */
+int vp_set_vq_affinity(struct virtqueue *vq, int cpu);
+void virtio_pci_release_dev(struct device *);
+
+#ifdef CONFIG_PM_SLEEP
+extern const struct dev_pm_ops virtio_pci_pm_ops;
+#endif
+
+#endif
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index c8ca3f7..6c7e186 100644
--- a/driver...
2018 Dec 07
0
[PATCH 1/1] virtio: remove deprecated VIRTIO_PCI_CONFIG()
...ct virtio_pci_device *vp_dev = to_vp_device(vdev);
> void __iomem *ioaddr = vp_dev->ioaddr +
> - VIRTIO_PCI_CONFIG(vp_dev) + offset;
> + VIRTIO_PCI_CONFIG_OFF(vp_dev->msix_enabled) +
> + offset;
> u8 *ptr = buf;
> int i;
>
> @@ -67,7 +68,8 @@ static void vp_set(struct virtio_device *vdev, unsigned offset,
> {
> struct virtio_pci_device *vp_dev = to_vp_device(vdev);
> void __iomem *ioaddr = vp_dev->ioaddr +
> - VIRTIO_PCI_CONFIG(vp_dev) + offset;
> + VIRTIO_PCI_CONFIG_OFF(vp_dev->msix_enabled) +
> + offset;
> const...
2018 Dec 10
0
[PATCH v2 1/1] virtio: remove deprecated VIRTIO_PCI_CONFIG()
...device *vdev, unsigned offset,
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
void __iomem *ioaddr = vp_dev->ioaddr +
- VIRTIO_PCI_CONFIG(vp_dev) + offset;
+ VIRTIO_PCI_CONFIG_OFF(vp_dev->msix_enabled) +
+ offset;
u8 *ptr = buf;
int i;
@@ -67,7 +68,8 @@ static void vp_set(struct virtio_device *vdev, unsigned offset,
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
void __iomem *ioaddr = vp_dev->ioaddr +
- VIRTIO_PCI_CONFIG(vp_dev) + offset;
+ VIRTIO_PCI_CONFIG_OFF(vp_dev->msix_enabled) +
+ offset;
const u8 *ptr = buf;
int i;
--
2.7.4
2013 May 16
2
[PATCH] virtio_pci: fix macro exported in uapi
...ct virtio_pci_device *vp_dev = to_vp_device(vdev);
- void __iomem *ioaddr = vp_dev->ioaddr +
- VIRTIO_PCI_CONFIG(vp_dev) + offset;
+ void __iomem *ioaddr = vp_dev->ioaddr + offset +
+ VIRTIO_PCI_CONFIG(vp_dev->msix_enabled);
u8 *ptr = buf;
int i;
@@ -147,8 +147,8 @@ static void vp_set(struct virtio_device *vdev, unsigned offset,
const void *buf, unsigned len)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
- void __iomem *ioaddr = vp_dev->ioaddr +
- VIRTIO_PCI_CONFIG(vp_dev) + offset;
+ void __iomem *ioaddr = vp_dev->ioaddr + offset +
+ VIRTIO_PCI_C...
2013 May 16
2
[PATCH] virtio_pci: fix macro exported in uapi
...ct virtio_pci_device *vp_dev = to_vp_device(vdev);
- void __iomem *ioaddr = vp_dev->ioaddr +
- VIRTIO_PCI_CONFIG(vp_dev) + offset;
+ void __iomem *ioaddr = vp_dev->ioaddr + offset +
+ VIRTIO_PCI_CONFIG(vp_dev->msix_enabled);
u8 *ptr = buf;
int i;
@@ -147,8 +147,8 @@ static void vp_set(struct virtio_device *vdev, unsigned offset,
const void *buf, unsigned len)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
- void __iomem *ioaddr = vp_dev->ioaddr +
- VIRTIO_PCI_CONFIG(vp_dev) + offset;
+ void __iomem *ioaddr = vp_dev->ioaddr + offset +
+ VIRTIO_PCI_C...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 05/13] [Mostly resend] virtio additions
...+ void *ioaddr = vp_dev->ioaddr + VIRTIO_PCI_CONFIG + offset;
+ u8 *ptr = buf;
+ int i;
+
+ for (i = 0; i < len; i++)
+ ptr[i] = ioread8(ioaddr + i);
+}
+
+/* the config->set() implementation. it's symmetric to the config->get()
+ * implementation */
+static void vp_set(struct virtio_device *vdev, unsigned offset,
+ const void *buf, unsigned len)
+{
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
+ void *ioaddr = vp_dev->ioaddr + VIRTIO_PCI_CONFIG + offset;
+ const u8 *ptr = buf;
+ int i;
+
+ for (i = 0; i < len; i++)
+...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 05/13] [Mostly resend] virtio additions
...+ void *ioaddr = vp_dev->ioaddr + VIRTIO_PCI_CONFIG + offset;
+ u8 *ptr = buf;
+ int i;
+
+ for (i = 0; i < len; i++)
+ ptr[i] = ioread8(ioaddr + i);
+}
+
+/* the config->set() implementation. it's symmetric to the config->get()
+ * implementation */
+static void vp_set(struct virtio_device *vdev, unsigned offset,
+ const void *buf, unsigned len)
+{
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
+ void *ioaddr = vp_dev->ioaddr + VIRTIO_PCI_CONFIG + offset;
+ const u8 *ptr = buf;
+ int i;
+
+ for (i = 0; i < len; i++)
+...
2007 Nov 10
2
[PATCH] Change virtio_pci to use a shared memory area for config
...0; i < len; i++)
- ptr[i] = ioread8(ioaddr + i);
- break;
- }
- }
+ BUG_ON(vp_dev->config_len < (offset + len));
+
+ memcpy(buf, vp_dev->config + offset, len);
}
/* the config->set() implementation. it's symmetric to the config->get()
@@ -160,43 +131,10 @@ static void vp_set(struct virtio_device *vdev, unsigned offset,
const void *buf, unsigned len)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
- void *ioaddr = vp_dev->ioaddr + VIRTIO_PCI_CONFIG + offset;
-
- switch (len) {
- case 1: {
- u8 val;
- memcpy(&val, buf, sizeof(val));
- iowrite8...
2007 Nov 10
2
[PATCH] Change virtio_pci to use a shared memory area for config
...0; i < len; i++)
- ptr[i] = ioread8(ioaddr + i);
- break;
- }
- }
+ BUG_ON(vp_dev->config_len < (offset + len));
+
+ memcpy(buf, vp_dev->config + offset, len);
}
/* the config->set() implementation. it's symmetric to the config->get()
@@ -160,43 +131,10 @@ static void vp_set(struct virtio_device *vdev, unsigned offset,
const void *buf, unsigned len)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
- void *ioaddr = vp_dev->ioaddr + VIRTIO_PCI_CONFIG + offset;
-
- switch (len) {
- case 1: {
- u8 val;
- memcpy(&val, buf, sizeof(val));
- iowrite8...
2009 Jul 23
0
[PATCH 2/2] virtio: retry on vector assignment failure
...ions[0] = vectors + 1;
+
+ for (i = 0; i < ARRAY_SIZE(options); ++i) {
+ err = vp_try_to_find_vqs(vdev, nvqs, vqs, callbacks, names,
+ vectors, options[i]);
+ if (!err)
+ break;
+ }
+ return err;
+}
+
static struct virtio_config_ops virtio_pci_config_ops = {
.get = vp_get,
.set = vp_set,
--
1.6.2.5
2009 Jul 23
0
[PATCH 2/2] virtio: retry on vector assignment failure
...ions[0] = vectors + 1;
+
+ for (i = 0; i < ARRAY_SIZE(options); ++i) {
+ err = vp_try_to_find_vqs(vdev, nvqs, vqs, callbacks, names,
+ vectors, options[i]);
+ if (!err)
+ break;
+ }
+ return err;
+}
+
static struct virtio_config_ops virtio_pci_config_ops = {
.get = vp_get,
.set = vp_set,
--
1.6.2.5
2014 Dec 30
0
[PATCH RFC v2 5/7] virtio_pci: modern driver
...y(buf, &l, sizeof l);
+ l = cpu_to_le32(ioread32(vp_dev->device + offset + sizeof l));
+ memcpy(buf + sizeof l, &l, sizeof l);
+ break;
+ default:
+ BUG();
+ }
+}
+
+/* the config->set() implementation. it's symmetric to the config->get()
+ * implementation */
+static void vp_set(struct virtio_device *vdev, unsigned offset,
+ const void *buf, unsigned len)
+{
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
+ u8 b;
+ __le16 w;
+ __le32 l;
+
+ switch (len) {
+ case 1:
+ memcpy(&b, buf, sizeof b);
+ iowrite8(b, vp_dev->device + offset);
+ break;
+ case 2...
2014 Dec 30
0
[PATCH RFC v2 5/7] virtio_pci: modern driver
...y(buf, &l, sizeof l);
+ l = cpu_to_le32(ioread32(vp_dev->device + offset + sizeof l));
+ memcpy(buf + sizeof l, &l, sizeof l);
+ break;
+ default:
+ BUG();
+ }
+}
+
+/* the config->set() implementation. it's symmetric to the config->get()
+ * implementation */
+static void vp_set(struct virtio_device *vdev, unsigned offset,
+ const void *buf, unsigned len)
+{
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
+ u8 b;
+ __le16 w;
+ __le32 l;
+
+ switch (len) {
+ case 1:
+ memcpy(&b, buf, sizeof b);
+ iowrite8(b, vp_dev->device + offset);
+ break;
+ case 2...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...truct virtio_pci_device *vp_dev = to_vp_device(vdev);
- void __iomem *ioaddr = vp_dev->ioaddr + VIRTIO_PCI_CONFIG + offset;
+ void __iomem *ioaddr = vp_dev->ioaddr +
+ VIRTIO_PCI_CONFIG(vp_dev) + offset;
u8 *ptr = buf;
int i;
@@ -123,7 +149,8 @@ static void vp_set(struct virtio_device *vdev, unsigned offset,
const void *buf, unsigned len)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
- void __iomem *ioaddr = vp_dev->ioaddr + VIRTIO_PCI_CONFIG + offset;
+ void __iomem *ioaddr = vp_dev->ioaddr +
+ VIRTIO_PCI_CONFIG(vp_...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...truct virtio_pci_device *vp_dev = to_vp_device(vdev);
- void __iomem *ioaddr = vp_dev->ioaddr + VIRTIO_PCI_CONFIG + offset;
+ void __iomem *ioaddr = vp_dev->ioaddr +
+ VIRTIO_PCI_CONFIG(vp_dev) + offset;
u8 *ptr = buf;
int i;
@@ -123,7 +149,8 @@ static void vp_set(struct virtio_device *vdev, unsigned offset,
const void *buf, unsigned len)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
- void __iomem *ioaddr = vp_dev->ioaddr + VIRTIO_PCI_CONFIG + offset;
+ void __iomem *ioaddr = vp_dev->ioaddr +
+ VIRTIO_PCI_CONFIG(vp_...