search for: vm_get

Displaying 20 results from an estimated 75 matches for "vm_get".

2015 Mar 05
3
[PATCH] virtio_mmio: generation support
..._device *vdev, unsigned offset, } } +static u32 vm_generation(struct virtio_device *vdev) +{ + struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + + if (vm_dev->version == 1) + return 0; + else + return readl(vm_dev->base + VIRTIO_MMIO_CONFIG_GENERATION); +} + static u8 vm_get_status(struct virtio_device *vdev) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); @@ -503,6 +513,8 @@ static const char *vm_bus_name(struct virtio_device *vdev) static const struct virtio_config_ops virtio_mmio_config_ops = { .get = vm_get, .set = vm_set, + .generation...
2015 Mar 05
3
[PATCH] virtio_mmio: generation support
..._device *vdev, unsigned offset, } } +static u32 vm_generation(struct virtio_device *vdev) +{ + struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + + if (vm_dev->version == 1) + return 0; + else + return readl(vm_dev->base + VIRTIO_MMIO_CONFIG_GENERATION); +} + static u8 vm_get_status(struct virtio_device *vdev) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); @@ -503,6 +513,8 @@ static const char *vm_bus_name(struct virtio_device *vdev) static const struct virtio_config_ops virtio_mmio_config_ops = { .get = vm_get, .set = vm_set, + .generation...
2015 Mar 05
3
[PATCH] virtio_mmio: fix endian-ness for mmio
...++++++++++++++++++++++++++++++++++++----- 1 file changed, 71 insertions(+), 8 deletions(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index cad5698..0375456 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -156,22 +156,85 @@ static void vm_get(struct virtio_device *vdev, unsigned offset, void *buf, unsigned len) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - u8 *ptr = buf; - int i; + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG; + u8 b; + __le16 w; + __le32 l; - for (i = 0; i < len; i++) -...
2015 Mar 05
3
[PATCH] virtio_mmio: fix endian-ness for mmio
...++++++++++++++++++++++++++++++++++++----- 1 file changed, 71 insertions(+), 8 deletions(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index cad5698..0375456 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -156,22 +156,85 @@ static void vm_get(struct virtio_device *vdev, unsigned offset, void *buf, unsigned len) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - u8 *ptr = buf; - int i; + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG; + u8 b; + __le16 w; + __le32 l; - for (i = 0; i < len; i++) -...
2015 Mar 12
1
[PATCH v2 log fixed] virtio_mmio: fix endian-ness for mmio
...++++++++++++++++++++++++++++++++++++----- 1 file changed, 71 insertions(+), 8 deletions(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index cad5698..0375456 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -156,22 +156,85 @@ static void vm_get(struct virtio_device *vdev, unsigned offset, void *buf, unsigned len) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - u8 *ptr = buf; - int i; + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG; + u8 b; + __le16 w; + __le32 l; - for (i = 0; i < len; i++) -...
2015 Mar 12
1
[PATCH v2 log fixed] virtio_mmio: fix endian-ness for mmio
...++++++++++++++++++++++++++++++++++++----- 1 file changed, 71 insertions(+), 8 deletions(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index cad5698..0375456 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -156,22 +156,85 @@ static void vm_get(struct virtio_device *vdev, unsigned offset, void *buf, unsigned len) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - u8 *ptr = buf; - int i; + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG; + u8 b; + __le16 w; + __le32 l; - for (i = 0; i < len; i++) -...
2015 Mar 12
2
[PATCH] virtio_mmio: fix endian-ness for mmio
...71 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c > > index cad5698..0375456 100644 > > --- a/drivers/virtio/virtio_mmio.c > > +++ b/drivers/virtio/virtio_mmio.c > > @@ -156,22 +156,85 @@ static void vm_get(struct virtio_device *vdev, unsigned offset, > > void *buf, unsigned len) > > { > > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > > - u8 *ptr = buf; > > - int i; > > + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG; > &...
2015 Mar 12
2
[PATCH] virtio_mmio: fix endian-ness for mmio
...71 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c > > index cad5698..0375456 100644 > > --- a/drivers/virtio/virtio_mmio.c > > +++ b/drivers/virtio/virtio_mmio.c > > @@ -156,22 +156,85 @@ static void vm_get(struct virtio_device *vdev, unsigned offset, > > void *buf, unsigned len) > > { > > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > > - u8 *ptr = buf; > > - int i; > > + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG; > &...
2020 Aug 19
0
[PATCH v3 05/18] virtio: Implement get_shm_region for MMIO transport
...vers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 627ac0487494..238383ff1064 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -498,6 +498,36 @@ static const char *vm_bus_name(struct virtio_device *vdev) return vm_dev->pdev->name; } +static bool vm_get_shm_region(struct virtio_device *vdev, + struct virtio_shm_region *region, u8 id) +{ + struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + u64 len, addr; + + /* Select the region we're interested in */ + writel(id, vm_dev->base + VIRTIO_MMIO_SHM_SEL); + + /* Read the r...
2015 Mar 12
0
[PATCH] virtio_mmio: generation support
...32 vm_generation(struct virtio_device *vdev) > +{ > + struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > + > + if (vm_dev->version == 1) > + return 0; > + else > + return readl(vm_dev->base + VIRTIO_MMIO_CONFIG_GENERATION); > +} > + > static u8 vm_get_status(struct virtio_device *vdev) > { > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > @@ -503,6 +513,8 @@ static const char *vm_bus_name(struct virtio_device *vdev) > static const struct virtio_config_ops virtio_mmio_config_ops = { > .get = vm_get, >...
2015 Mar 12
0
[PATCH] virtio_mmio: generation support
...32 vm_generation(struct virtio_device *vdev) > +{ > + struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > + > + if (vm_dev->version == 1) > + return 0; > + else > + return readl(vm_dev->base + VIRTIO_MMIO_CONFIG_GENERATION); > +} > + > static u8 vm_get_status(struct virtio_device *vdev) > { > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > @@ -503,6 +513,8 @@ static const char *vm_bus_name(struct virtio_device *vdev) > static const struct virtio_config_ops virtio_mmio_config_ops = { > .get = vm_get, >...
2015 Mar 12
0
[PATCH] virtio_mmio: fix endian-ness for mmio
...++----- > 1 file changed, 71 insertions(+), 8 deletions(-) > > diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c > index cad5698..0375456 100644 > --- a/drivers/virtio/virtio_mmio.c > +++ b/drivers/virtio/virtio_mmio.c > @@ -156,22 +156,85 @@ static void vm_get(struct virtio_device *vdev, unsigned offset, > void *buf, unsigned len) > { > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > - u8 *ptr = buf; > - int i; > + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG; > + u8 b; > + __le16 w; > +...
2015 Mar 12
0
[PATCH] virtio_mmio: fix endian-ness for mmio
...++----- > 1 file changed, 71 insertions(+), 8 deletions(-) > > diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c > index cad5698..0375456 100644 > --- a/drivers/virtio/virtio_mmio.c > +++ b/drivers/virtio/virtio_mmio.c > @@ -156,22 +156,85 @@ static void vm_get(struct virtio_device *vdev, unsigned offset, > void *buf, unsigned len) > { > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > - u8 *ptr = buf; > - int i; > + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG; > + u8 b; > + __le16 w; > +...
2015 Mar 13
0
[PATCH] virtio_mmio: fix endian-ness for mmio
...tions(-) >> > >> > diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c >> > index cad5698..0375456 100644 >> > --- a/drivers/virtio/virtio_mmio.c >> > +++ b/drivers/virtio/virtio_mmio.c >> > @@ -156,22 +156,85 @@ static void vm_get(struct virtio_device *vdev, unsigned offset, >> > void *buf, unsigned len) >> > { >> > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); >> > - u8 *ptr = buf; >> > - int i; >> > + void __iomem *base = vm_dev->base + VI...
2015 Mar 13
0
[PATCH] virtio_mmio: fix endian-ness for mmio
...tions(-) >> > >> > diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c >> > index cad5698..0375456 100644 >> > --- a/drivers/virtio/virtio_mmio.c >> > +++ b/drivers/virtio/virtio_mmio.c >> > @@ -156,22 +156,85 @@ static void vm_get(struct virtio_device *vdev, unsigned offset, >> > void *buf, unsigned len) >> > { >> > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); >> > - u8 *ptr = buf; >> > - int i; >> > + void __iomem *base = vm_dev->base + VI...
2020 Jul 16
1
[PATCH RFC don't apply] vdpa_sim: endian-ness for config space
On Wed, Jul 15, 2020 at 10:02:32PM +0800, Jason Wang wrote: > > On 2020/7/15 ??9:58, Michael S. Tsirkin wrote: > > VDPA sim stores config space as native endian, but that > > is wrong: modern guests expect LE. > > I coded up the following to fix it up, but it is wrong too: > > vdpasim_create is called before guest features are known. > > > > So what
2011 Nov 15
1
[RFC PATCH net-next v2] enable virtio_net to return bus_info in ethtool -i consistent with emulated NICs
...ruct virtio_device *vdev, unsigned nvqs, return 0; } +static const char *vm_bus_name(struct virtio_device *vdev) +{ + struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + return vm_dev->pdev->name; +} static struct virtio_config_ops virtio_mmio_config_ops = { .get = vm_get, @@ -373,6 +378,7 @@ static struct virtio_config_ops virtio_mmio_config_ops = { .del_vqs = vm_del_vqs, .get_features = vm_get_features, .finalize_features = vm_finalize_features, + .bus_name = vm_bus_name, }; diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 79...
2011 Nov 15
1
[RFC PATCH net-next v2] enable virtio_net to return bus_info in ethtool -i consistent with emulated NICs
...ruct virtio_device *vdev, unsigned nvqs, return 0; } +static const char *vm_bus_name(struct virtio_device *vdev) +{ + struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + return vm_dev->pdev->name; +} static struct virtio_config_ops virtio_mmio_config_ops = { .get = vm_get, @@ -373,6 +378,7 @@ static struct virtio_config_ops virtio_mmio_config_ops = { .del_vqs = vm_del_vqs, .get_features = vm_get_features, .finalize_features = vm_finalize_features, + .bus_name = vm_bus_name, }; diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 79...
2014 Dec 04
0
[PATCH RFC v2 3/4] virtio: allow finalize_features to fail
...+ return 0; } static void rproc_virtio_get(struct virtio_device *vdev, unsigned offset, diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c index f5575cc..dd65c8b 100644 --- a/drivers/s390/kvm/kvm_virtio.c +++ b/drivers/s390/kvm/kvm_virtio.c @@ -93,7 +93,7 @@ static u64 kvm_get_features(struct virtio_device *vdev) return features; } -static void kvm_finalize_features(struct virtio_device *vdev) +static int kvm_finalize_features(struct virtio_device *vdev) { unsigned int i, bits; struct kvm_device_desc *desc = to_kvmdev(vdev)->desc; @@ -112,6 +112,8 @@ static...
2014 Dec 04
0
[PATCH RFC v2 3/4] virtio: allow finalize_features to fail
...+ return 0; } static void rproc_virtio_get(struct virtio_device *vdev, unsigned offset, diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c index f5575cc..dd65c8b 100644 --- a/drivers/s390/kvm/kvm_virtio.c +++ b/drivers/s390/kvm/kvm_virtio.c @@ -93,7 +93,7 @@ static u64 kvm_get_features(struct virtio_device *vdev) return features; } -static void kvm_finalize_features(struct virtio_device *vdev) +static int kvm_finalize_features(struct virtio_device *vdev) { unsigned int i, bits; struct kvm_device_desc *desc = to_kvmdev(vdev)->desc; @@ -112,6 +112,8 @@ static...