search for: vm_set

Displaying 20 results from an estimated 32 matches for "vm_set".

Did you mean: vm_get
2015 Mar 05
3
[PATCH] virtio_mmio: generation support
...orrectly? drivers/virtio/virtio_mmio.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 0375456..69b2e4d 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -237,6 +237,16 @@ static void vm_set(struct virtio_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); +}...
2015 Mar 05
3
[PATCH] virtio_mmio: generation support
...orrectly? drivers/virtio/virtio_mmio.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 0375456..69b2e4d 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -237,6 +237,16 @@ static void vm_set(struct virtio_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); +}...
2015 Mar 12
0
[PATCH] virtio_mmio: generation support
...mmio.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c > index 0375456..69b2e4d 100644 > --- a/drivers/virtio/virtio_mmio.c > +++ b/drivers/virtio/virtio_mmio.c > @@ -237,6 +237,16 @@ static void vm_set(struct virtio_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 rea...
2015 Mar 12
0
[PATCH] virtio_mmio: generation support
...mmio.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c > index 0375456..69b2e4d 100644 > --- a/drivers/virtio/virtio_mmio.c > +++ b/drivers/virtio/virtio_mmio.c > @@ -237,6 +237,16 @@ static void vm_set(struct virtio_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 rea...
2015 Mar 05
3
[PATCH] virtio_mmio: fix endian-ness for mmio
...ase + offset)); + memcpy(buf, &l, sizeof l); + break; + case 8: + l = cpu_to_le32(readl(base + offset)); + memcpy(buf, &l, sizeof l); + l = cpu_to_le32(ioread32(base + offset + sizeof l)); + memcpy(buf + sizeof l, &l, sizeof l); + break; + default: + BUG(); + } } static void vm_set(struct virtio_device *vdev, unsigned offset, const void *buf, unsigned len) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - const u8 *ptr = buf; - int i; + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG; + u8 b; + __le16 w; + __le32 l; - for (i = 0; i <...
2015 Mar 05
3
[PATCH] virtio_mmio: fix endian-ness for mmio
...ase + offset)); + memcpy(buf, &l, sizeof l); + break; + case 8: + l = cpu_to_le32(readl(base + offset)); + memcpy(buf, &l, sizeof l); + l = cpu_to_le32(ioread32(base + offset + sizeof l)); + memcpy(buf + sizeof l, &l, sizeof l); + break; + default: + BUG(); + } } static void vm_set(struct virtio_device *vdev, unsigned offset, const void *buf, unsigned len) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - const u8 *ptr = buf; - int i; + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG; + u8 b; + __le16 w; + __le32 l; - for (i = 0; i <...
2015 Mar 12
1
[PATCH v2 log fixed] virtio_mmio: fix endian-ness for mmio
...ase + offset)); + memcpy(buf, &l, sizeof l); + break; + case 8: + l = cpu_to_le32(readl(base + offset)); + memcpy(buf, &l, sizeof l); + l = cpu_to_le32(ioread32(base + offset + sizeof l)); + memcpy(buf + sizeof l, &l, sizeof l); + break; + default: + BUG(); + } } static void vm_set(struct virtio_device *vdev, unsigned offset, const void *buf, unsigned len) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - const u8 *ptr = buf; - int i; + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG; + u8 b; + __le16 w; + __le32 l; - for (i = 0; i <...
2015 Mar 12
1
[PATCH v2 log fixed] virtio_mmio: fix endian-ness for mmio
...ase + offset)); + memcpy(buf, &l, sizeof l); + break; + case 8: + l = cpu_to_le32(readl(base + offset)); + memcpy(buf, &l, sizeof l); + l = cpu_to_le32(ioread32(base + offset + sizeof l)); + memcpy(buf + sizeof l, &l, sizeof l); + break; + default: + BUG(); + } } static void vm_set(struct virtio_device *vdev, unsigned offset, const void *buf, unsigned len) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - const u8 *ptr = buf; - int i; + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG; + u8 b; + __le16 w; + __le32 l; - for (i = 0; i <...
2015 Mar 12
2
[PATCH] virtio_mmio: fix endian-ness for mmio
...+ offset)); > > + memcpy(buf, &l, sizeof l); > > + l = cpu_to_le32(ioread32(base + offset + sizeof l)); > > + memcpy(buf + sizeof l, &l, sizeof l); > > + break; > > + default: > > + BUG(); > > + } > > } > > > > static void vm_set(struct virtio_device *vdev, unsigned offset, > > const void *buf, unsigned len) > > { > > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > > - const u8 *ptr = buf; > > - int i; > > + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CO...
2015 Mar 12
2
[PATCH] virtio_mmio: fix endian-ness for mmio
...+ offset)); > > + memcpy(buf, &l, sizeof l); > > + l = cpu_to_le32(ioread32(base + offset + sizeof l)); > > + memcpy(buf + sizeof l, &l, sizeof l); > > + break; > > + default: > > + BUG(); > > + } > > } > > > > static void vm_set(struct virtio_device *vdev, unsigned offset, > > const void *buf, unsigned len) > > { > > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > > - const u8 *ptr = buf; > > - int i; > > + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CO...
2020 Aug 19
0
[PATCH v3 05/18] virtio: Implement get_shm_region for MMIO transport
...ddress */ + addr = (u64) readl(vm_dev->base + VIRTIO_MMIO_SHM_BASE_LOW); + addr |= (u64) readl(vm_dev->base + VIRTIO_MMIO_SHM_BASE_HIGH) << 32; + + region->addr = addr; + + return true; +} + static const struct virtio_config_ops virtio_mmio_config_ops = { .get = vm_get, .set = vm_set, @@ -510,6 +540,7 @@ static const struct virtio_config_ops virtio_mmio_config_ops = { .get_features = vm_get_features, .finalize_features = vm_finalize_features, .bus_name = vm_bus_name, + .get_shm_region = vm_get_shm_region, }; diff --git a/include/uapi/linux/virtio_mmio.h b/include/uap...
2015 Mar 12
0
[PATCH] virtio_mmio: fix endian-ness for mmio
...> + case 8: > + l = cpu_to_le32(readl(base + offset)); > + memcpy(buf, &l, sizeof l); > + l = cpu_to_le32(ioread32(base + offset + sizeof l)); > + memcpy(buf + sizeof l, &l, sizeof l); > + break; > + default: > + BUG(); > + } > } > > static void vm_set(struct virtio_device *vdev, unsigned offset, > const void *buf, unsigned len) > { > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > - const u8 *ptr = buf; > - int i; > + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG; > + u8 b; > + __le...
2015 Mar 12
0
[PATCH] virtio_mmio: fix endian-ness for mmio
...> + case 8: > + l = cpu_to_le32(readl(base + offset)); > + memcpy(buf, &l, sizeof l); > + l = cpu_to_le32(ioread32(base + offset + sizeof l)); > + memcpy(buf + sizeof l, &l, sizeof l); > + break; > + default: > + BUG(); > + } > } > > static void vm_set(struct virtio_device *vdev, unsigned offset, > const void *buf, unsigned len) > { > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > - const u8 *ptr = buf; > - int i; > + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG; > + u8 b; > + __le...
2015 Mar 13
0
[PATCH] virtio_mmio: fix endian-ness for mmio
...&l, sizeof l); >> > + l = cpu_to_le32(ioread32(base + offset + sizeof l)); >> > + memcpy(buf + sizeof l, &l, sizeof l); >> > + break; >> > + default: >> > + BUG(); >> > + } >> > } >> > >> > static void vm_set(struct virtio_device *vdev, unsigned offset, >> > const void *buf, unsigned len) >> > { >> > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); >> > - const u8 *ptr = buf; >> > - int i; >> > + void __iomem *base = vm_dev-&...
2015 Mar 13
0
[PATCH] virtio_mmio: fix endian-ness for mmio
...&l, sizeof l); >> > + l = cpu_to_le32(ioread32(base + offset + sizeof l)); >> > + memcpy(buf + sizeof l, &l, sizeof l); >> > + break; >> > + default: >> > + BUG(); >> > + } >> > } >> > >> > static void vm_set(struct virtio_device *vdev, unsigned offset, >> > const void *buf, unsigned len) >> > { >> > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); >> > - const u8 *ptr = buf; >> > - int i; >> > + void __iomem *base = vm_dev-&...
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 Oct 27
1
[PATCH v3] virtio: Add platform bus driver for memory mapped virtio device
On Mon, 2011-10-24 at 03:33 +0100, Rusty Russell wrote: > No, that's it I think. Please send a diff for the documentation, since > I'm updating the LyX master and I've already applied your previous > version. Here it goes (below). Also do you think you would be able to merge the driver (corresponding v4 patch follows) in the 3.2 merge window that seems to have just opened?
2011 Oct 27
1
[PATCH v3] virtio: Add platform bus driver for memory mapped virtio device
On Mon, 2011-10-24 at 03:33 +0100, Rusty Russell wrote: > No, that's it I think. Please send a diff for the documentation, since > I'm updating the LyX master and I've already applied your previous > version. Here it goes (below). Also do you think you would be able to merge the driver (corresponding v4 patch follows) in the 3.2 merge window that seems to have just opened?
2013 Apr 05
8
[PATCH 0/7] virtio cleanups
Aiming these for coming merge window. Nothing should change, but get ready for a non-guest-endian config transports, and > 32 features bits. Final one is just an overdue consolidation. Cheers, Rusty. Rusty Russell (7): virtio_config: introduce size-based accessors. virtio: use size-based config accessors. virtio_config: helpers for non-converting accessors. virtio_config: make
2013 Apr 05
8
[PATCH 0/7] virtio cleanups
Aiming these for coming merge window. Nothing should change, but get ready for a non-guest-endian config transports, and > 32 features bits. Final one is just an overdue consolidation. Cheers, Rusty. Rusty Russell (7): virtio_config: introduce size-based accessors. virtio: use size-based config accessors. virtio_config: helpers for non-converting accessors. virtio_config: make