search for: virtio_pci_guest_featur

Displaying 20 results from an estimated 101 matches for "virtio_pci_guest_featur".

2014 Nov 27
2
[PATCH v6 02/46] virtio: use u32, not bitmap for features
...i.c +++ b/drivers/virtio/virtio_pci.c @@ -120,8 +120,7 @@ static void vp_finalize_features(struct virtio_device *vdev) vring_transport_features(vdev); /* We only support 32 feature bits. */ - BUILD_BUG_ON(ARRAY_SIZE(vdev->features) != 1); - iowrite32(vdev->features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); + iowrite32(vdev->features, vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); } /* virtio config->get() implementation */ diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 3b1f89b..839247c 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_r...
2014 Nov 27
2
[PATCH v6 02/46] virtio: use u32, not bitmap for features
...i.c +++ b/drivers/virtio/virtio_pci.c @@ -120,8 +120,7 @@ static void vp_finalize_features(struct virtio_device *vdev) vring_transport_features(vdev); /* We only support 32 feature bits. */ - BUILD_BUG_ON(ARRAY_SIZE(vdev->features) != 1); - iowrite32(vdev->features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); + iowrite32(vdev->features, vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); } /* virtio config->get() implementation */ diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 3b1f89b..839247c 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_r...
2014 Nov 28
0
[PATCH v6 02/46] virtio: use u32, not bitmap for features
...c void vp_finalize_features(struct virtio_device *vdev) > vring_transport_features(vdev); > > /* We only support 32 feature bits. */ I think you can kill this comment... > - BUILD_BUG_ON(ARRAY_SIZE(vdev->features) != 1); > - iowrite32(vdev->features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); > + iowrite32(vdev->features, vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); ...and add blanks around '+', as you're touching this line anyway. > } > > /* virtio config->get() implementation */ Reviewed-by: Cornelia Huck <cornelia.huck at de.ibm.com>
2014 Nov 28
0
[PATCH v6 02/46] virtio: use u32, not bitmap for features
...c void vp_finalize_features(struct virtio_device *vdev) > vring_transport_features(vdev); > > /* We only support 32 feature bits. */ I think you can kill this comment... > - BUILD_BUG_ON(ARRAY_SIZE(vdev->features) != 1); > - iowrite32(vdev->features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); > + iowrite32(vdev->features, vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); ...and add blanks around '+', as you're touching this line anyway. > } > > /* virtio config->get() implementation */ Reviewed-by: Cornelia Huck <cornelia.huck at de.ibm.com>
2013 May 27
1
[PATCH rusty/virtio-pci-new-layout] virtio: new layout minor header fixups
...4096 #ifndef VIRTIO_PCI_NO_LEGACY +#ifndef VIRTIO_PCI_LEGACY_COMPAT_NAMES /* Don't break compile of old userspace code. These will go away. */ #warning "Please support virtio_pci non-legacy mode!" +#endif #define VIRTIO_PCI_HOST_FEATURES VIRTIO_PCI_LEGACY_HOST_FEATURES #define VIRTIO_PCI_GUEST_FEATURES VIRTIO_PCI_LEGACY_GUEST_FEATURES #define VIRTIO_PCI_QUEUE_PFN VIRTIO_PCI_LEGACY_QUEUE_PFN @@ -125,10 +127,10 @@ /* This is the PCI capability header: */ struct virtio_pci_cap { - u8 cap_vndr; /* Generic PCI field: PCI_CAP_ID_VNDR */ - u8 cap_next; /* Generic PCI field: next ptr. */ - u8 cfg_...
2013 May 27
1
[PATCH rusty/virtio-pci-new-layout] virtio: new layout minor header fixups
...4096 #ifndef VIRTIO_PCI_NO_LEGACY +#ifndef VIRTIO_PCI_LEGACY_COMPAT_NAMES /* Don't break compile of old userspace code. These will go away. */ #warning "Please support virtio_pci non-legacy mode!" +#endif #define VIRTIO_PCI_HOST_FEATURES VIRTIO_PCI_LEGACY_HOST_FEATURES #define VIRTIO_PCI_GUEST_FEATURES VIRTIO_PCI_LEGACY_GUEST_FEATURES #define VIRTIO_PCI_QUEUE_PFN VIRTIO_PCI_LEGACY_QUEUE_PFN @@ -125,10 +127,10 @@ /* This is the PCI capability header: */ struct virtio_pci_cap { - u8 cap_vndr; /* Generic PCI field: PCI_CAP_ID_VNDR */ - u8 cap_next; /* Generic PCI field: next ptr. */ - u8 cfg_...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 1/7] userspace virtio
...err.h> + +#include "virtio.h" +#include "sysemu.h" + +/* from Linux's linux/virtio_pci.h */ + +/* A 32-bit r/o bitmask of the features supported by the host */ +#define VIRTIO_PCI_HOST_FEATURES 0 + +/* A 32-bit r/w bitmask of features activated by the guest */ +#define VIRTIO_PCI_GUEST_FEATURES 4 + +/* A 32-bit r/w PFN for the currently selected queue */ +#define VIRTIO_PCI_QUEUE_PFN 8 + +/* A 16-bit r/o queue size for the currently selected queue */ +#define VIRTIO_PCI_QUEUE_NUM 12 + +/* A 16-bit r/w queue selector */ +#define VIRTIO_PCI_QUEUE_SEL 14 + +/* A 16-...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 1/7] userspace virtio
...err.h> + +#include "virtio.h" +#include "sysemu.h" + +/* from Linux's linux/virtio_pci.h */ + +/* A 32-bit r/o bitmask of the features supported by the host */ +#define VIRTIO_PCI_HOST_FEATURES 0 + +/* A 32-bit r/w bitmask of features activated by the guest */ +#define VIRTIO_PCI_GUEST_FEATURES 4 + +/* A 32-bit r/w PFN for the currently selected queue */ +#define VIRTIO_PCI_QUEUE_PFN 8 + +/* A 16-bit r/o queue size for the currently selected queue */ +#define VIRTIO_PCI_QUEUE_NUM 12 + +/* A 16-bit r/w queue selector */ +#define VIRTIO_PCI_QUEUE_SEL 14 + +/* A 16-...
2010 Sep 29
1
[RFC PATCH] virtio: (Partially) enable suspend/resume support
...virtio_pci_resume(struct pci_dev *pci_dev) { + struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev); + struct virtio_pci_vq_info *info; + unsigned long flags; + pci_restore_state(pci_dev); pci_set_power_state(pci_dev, PCI_D0); + + iowrite32(vp_dev->vdev.features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); + if (vp_dev->msix_used_vectors) + iowrite16(vp_dev->msix_used_vectors, + vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); + + spin_lock_irqsave(&vp_dev->lock, flags); + list_for_each_entry(info, &vp_dev->virtqueues, node) { + /* Select the queue we're interested in...
2010 Sep 29
1
[RFC PATCH] virtio: (Partially) enable suspend/resume support
...virtio_pci_resume(struct pci_dev *pci_dev) { + struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev); + struct virtio_pci_vq_info *info; + unsigned long flags; + pci_restore_state(pci_dev); pci_set_power_state(pci_dev, PCI_D0); + + iowrite32(vp_dev->vdev.features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); + if (vp_dev->msix_used_vectors) + iowrite16(vp_dev->msix_used_vectors, + vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); + + spin_lock_irqsave(&vp_dev->lock, flags); + list_for_each_entry(info, &vp_dev->virtqueues, node) { + /* Select the queue we're interested in...
2011 Apr 11
3
[RFC][PATCH] virtio: 64 bit features
...e else. */ - return ioread32(vp_dev->ioaddr + VIRTIO_PCI_HOST_FEATURES); + flo = ioread32(vp_dev->ioaddr + VIRTIO_PCI_HOST_FEATURES); + if (flo & (0x1 << VIRTIO_F_FEATURES_HI)) { + vp_dev->features_hi = 1; + iowrite32(0x1 << VIRTIO_F_FEATURES_HI, + vp_dev->ioaddr + VIRTIO_PCI_GUEST_FEATURES_HI); + } else { + vp_dev->features_hi = 0; + } + fhi = ioread32(vp_dev->ioaddr + VIRTIO_PCI_HOST_FEATURES_HI); + return ((u64)fhi << 32) | flo; } /* virtio config->finalize_features() implementation */ static void vp_finalize_features(struct virtio_device *vdev) { struct v...
2011 Apr 11
3
[RFC][PATCH] virtio: 64 bit features
...e else. */ - return ioread32(vp_dev->ioaddr + VIRTIO_PCI_HOST_FEATURES); + flo = ioread32(vp_dev->ioaddr + VIRTIO_PCI_HOST_FEATURES); + if (flo & (0x1 << VIRTIO_F_FEATURES_HI)) { + vp_dev->features_hi = 1; + iowrite32(0x1 << VIRTIO_F_FEATURES_HI, + vp_dev->ioaddr + VIRTIO_PCI_GUEST_FEATURES_HI); + } else { + vp_dev->features_hi = 0; + } + fhi = ioread32(vp_dev->ioaddr + VIRTIO_PCI_HOST_FEATURES_HI); + return ((u64)fhi << 32) | flo; } /* virtio config->finalize_features() implementation */ static void vp_finalize_features(struct virtio_device *vdev) { struct v...
2014 Oct 07
0
[PATCH RFC 01/11] virtio: use u32, not bitmap for struct virtio_device's features
...i.c +++ b/drivers/virtio/virtio_pci.c @@ -123,8 +123,7 @@ static void vp_finalize_features(struct virtio_device *vdev) vring_transport_features(vdev); /* We only support 32 feature bits. */ - BUILD_BUG_ON(ARRAY_SIZE(vdev->features) != 1); - iowrite32(vdev->features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); + iowrite32(vdev->features, vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); } /* virtio config->get() implementation */ diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 4d08f45a..94eb463 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_...
2014 Nov 24
0
[PATCH v3 01/41] virtio: use u32, not bitmap for struct virtio_device's features
...i.c +++ b/drivers/virtio/virtio_pci.c @@ -120,8 +120,7 @@ static void vp_finalize_features(struct virtio_device *vdev) vring_transport_features(vdev); /* We only support 32 feature bits. */ - BUILD_BUG_ON(ARRAY_SIZE(vdev->features) != 1); - iowrite32(vdev->features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); + iowrite32(vdev->features, vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); } /* virtio config->get() implementation */ diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 3b1f89b..15a8a05 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_r...
2014 Nov 24
0
[PATCH v3 01/41] virtio: use u32, not bitmap for struct virtio_device's features
...i.c +++ b/drivers/virtio/virtio_pci.c @@ -120,8 +120,7 @@ static void vp_finalize_features(struct virtio_device *vdev) vring_transport_features(vdev); /* We only support 32 feature bits. */ - BUILD_BUG_ON(ARRAY_SIZE(vdev->features) != 1); - iowrite32(vdev->features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); + iowrite32(vdev->features, vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); } /* virtio config->get() implementation */ diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 3b1f89b..15a8a05 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_r...
2014 Oct 22
0
[PATCH RFC v2 03/16] virtio: use u32, not bitmap for struct virtio_device's features
...i.c +++ b/drivers/virtio/virtio_pci.c @@ -120,8 +120,7 @@ static void vp_finalize_features(struct virtio_device *vdev) vring_transport_features(vdev); /* We only support 32 feature bits. */ - BUILD_BUG_ON(ARRAY_SIZE(vdev->features) != 1); - iowrite32(vdev->features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); + iowrite32(vdev->features, vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); } /* virtio config->get() implementation */ diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 048e1bc..ea1c02e 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_r...
2014 Oct 22
0
[PATCH RFC v3 03/16] virtio: use u32, not bitmap for struct virtio_device's features
...i.c +++ b/drivers/virtio/virtio_pci.c @@ -120,8 +120,7 @@ static void vp_finalize_features(struct virtio_device *vdev) vring_transport_features(vdev); /* We only support 32 feature bits. */ - BUILD_BUG_ON(ARRAY_SIZE(vdev->features) != 1); - iowrite32(vdev->features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); + iowrite32(vdev->features, vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); } /* virtio config->get() implementation */ diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 048e1bc..ea1c02e 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_r...
2014 Oct 23
0
[PATCH RFC v4 03/17] virtio: use u32, not bitmap for struct virtio_device's features
...i.c +++ b/drivers/virtio/virtio_pci.c @@ -120,8 +120,7 @@ static void vp_finalize_features(struct virtio_device *vdev) vring_transport_features(vdev); /* We only support 32 feature bits. */ - BUILD_BUG_ON(ARRAY_SIZE(vdev->features) != 1); - iowrite32(vdev->features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); + iowrite32(vdev->features, vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); } /* virtio config->get() implementation */ diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 048e1bc..ea1c02e 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_r...
2014 Oct 22
0
[PATCH RFC v2 03/16] virtio: use u32, not bitmap for struct virtio_device's features
...i.c +++ b/drivers/virtio/virtio_pci.c @@ -120,8 +120,7 @@ static void vp_finalize_features(struct virtio_device *vdev) vring_transport_features(vdev); /* We only support 32 feature bits. */ - BUILD_BUG_ON(ARRAY_SIZE(vdev->features) != 1); - iowrite32(vdev->features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); + iowrite32(vdev->features, vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); } /* virtio config->get() implementation */ diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 048e1bc..ea1c02e 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_r...
2014 Oct 22
0
[PATCH RFC v3 03/16] virtio: use u32, not bitmap for struct virtio_device's features
...i.c +++ b/drivers/virtio/virtio_pci.c @@ -120,8 +120,7 @@ static void vp_finalize_features(struct virtio_device *vdev) vring_transport_features(vdev); /* We only support 32 feature bits. */ - BUILD_BUG_ON(ARRAY_SIZE(vdev->features) != 1); - iowrite32(vdev->features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); + iowrite32(vdev->features, vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); } /* virtio config->get() implementation */ diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 048e1bc..ea1c02e 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_r...