search for: virtio_mmio_config

Displaying 20 results from an estimated 36 matches for "virtio_mmio_config".

2015 Mar 05
3
[PATCH] virtio_mmio: fix endian-ness for mmio
...tio_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++) - ptr[i] = readb(vm_dev->base + VIRTIO_MMIO_CONFIG + offset + i); + if (vm_dev->version == 1) { + u8 *ptr = buf; + int i; + + for (i = 0; i < len; i++) + ptr[i] = readb(base + offset + i); + return; + } + + switch (le...
2015 Mar 05
3
[PATCH] virtio_mmio: fix endian-ness for mmio
...tio_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++) - ptr[i] = readb(vm_dev->base + VIRTIO_MMIO_CONFIG + offset + i); + if (vm_dev->version == 1) { + u8 *ptr = buf; + int i; + + for (i = 0; i < len; i++) + ptr[i] = readb(base + offset + i); + return; + } + + switch (le...
2015 Mar 12
1
[PATCH v2 log fixed] virtio_mmio: fix endian-ness for mmio
...tio_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++) - ptr[i] = readb(vm_dev->base + VIRTIO_MMIO_CONFIG + offset + i); + if (vm_dev->version == 1) { + u8 *ptr = buf; + int i; + + for (i = 0; i < len; i++) + ptr[i] = readb(base + offset + i); + return; + } + + switch (le...
2015 Mar 12
1
[PATCH v2 log fixed] virtio_mmio: fix endian-ness for mmio
...tio_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++) - ptr[i] = readb(vm_dev->base + VIRTIO_MMIO_CONFIG + offset + i); + if (vm_dev->version == 1) { + u8 *ptr = buf; + int i; + + for (i = 0; i < len; i++) + ptr[i] = readb(base + offset + i); + return; + } + + switch (le...
2015 Mar 12
2
[PATCH] virtio_mmio: fix endian-ness for mmio
...6,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++) > > - ptr[i] = readb(vm_dev->base + VIRTIO_MMIO_CONFIG + offset + i); > > + if (vm_dev->version == 1) { > > + u8 *ptr = buf; > > + int i; > > +...
2015 Mar 12
2
[PATCH] virtio_mmio: fix endian-ness for mmio
...6,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++) > > - ptr[i] = readb(vm_dev->base + VIRTIO_MMIO_CONFIG + offset + i); > > + if (vm_dev->version == 1) { > > + u8 *ptr = buf; > > + int i; > > +...
2015 Mar 12
0
[PATCH] virtio_mmio: fix endian-ness for mmio
...tio_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++) > - ptr[i] = readb(vm_dev->base + VIRTIO_MMIO_CONFIG + offset + i); > + if (vm_dev->version == 1) { > + u8 *ptr = buf; > + int i; > + > + for (i = 0; i < len; i++) > + ptr[...
2015 Mar 12
0
[PATCH] virtio_mmio: fix endian-ness for mmio
...tio_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++) > - ptr[i] = readb(vm_dev->base + VIRTIO_MMIO_CONFIG + offset + i); > + if (vm_dev->version == 1) { > + u8 *ptr = buf; > + int i; > + > + for (i = 0; i < len; i++) > + ptr[...
2015 Mar 13
0
[PATCH] virtio_mmio: fix endian-ness for mmio
...et(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++) >> > - ptr[i] = readb(vm_dev->base + VIRTIO_MMIO_CONFIG + offset + i); >> > + if (vm_dev->version == 1) { >> > + u8 *ptr = buf;...
2015 Mar 13
0
[PATCH] virtio_mmio: fix endian-ness for mmio
...et(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++) >> > - ptr[i] = readb(vm_dev->base + VIRTIO_MMIO_CONFIG + offset + i); >> > + if (vm_dev->version == 1) { >> > + u8 *ptr = buf;...
2014 Oct 25
0
[RFC PATCH 1/2] Add a new register offset let interrupt reason available
...,6 +95,9 @@ /* Device status register - Read Write */ #define VIRTIO_MMIO_STATUS 0x070 +/* Allocate ISRMEM for interrupt reason - Write Only */ +#define VIRTIO_MMIO_ISRMEM 0x080 + /* The config space is defined by each driver as * the per-driver configuration space - Read Write */ #define VIRTIO_MMIO_CONFIG 0x100 -- 1.7.9.5
2017 Jan 12
1
[PATCH 1/2] virtio_mmio: add standard header file
...alves */ +#define VIRTIO_MMIO_QUEUE_AVAIL_LOW 0x090 +#define VIRTIO_MMIO_QUEUE_AVAIL_HIGH 0x094 + +/* Selected queue's Used Ring address, 64 bits in two halves */ +#define VIRTIO_MMIO_QUEUE_USED_LOW 0x0a0 +#define VIRTIO_MMIO_QUEUE_USED_HIGH 0x0a4 + +/* Configuration atomicity value */ +#define VIRTIO_MMIO_CONFIG_GENERATION 0x0fc + +/* The config space is defined by each driver as + * the per-driver configuration space - Read Write */ +#define VIRTIO_MMIO_CONFIG 0x100 + + + +/* + * Interrupt flags (re: interrupt status & acknowledge registers) + */ + +#define VIRTIO_MMIO_INT_VRING (1 << 0) +#def...
2017 Jan 12
1
[PATCH 1/2] virtio_mmio: add standard header file
...alves */ +#define VIRTIO_MMIO_QUEUE_AVAIL_LOW 0x090 +#define VIRTIO_MMIO_QUEUE_AVAIL_HIGH 0x094 + +/* Selected queue's Used Ring address, 64 bits in two halves */ +#define VIRTIO_MMIO_QUEUE_USED_LOW 0x0a0 +#define VIRTIO_MMIO_QUEUE_USED_HIGH 0x0a4 + +/* Configuration atomicity value */ +#define VIRTIO_MMIO_CONFIG_GENERATION 0x0fc + +/* The config space is defined by each driver as + * the per-driver configuration space - Read Write */ +#define VIRTIO_MMIO_CONFIG 0x100 + + + +/* + * Interrupt flags (re: interrupt status & acknowledge registers) + */ + +#define VIRTIO_MMIO_INT_VRING (1 << 0) +#def...
2012 Apr 07
0
[PATCH 05/14] kvm tools: Add virtio-mmio support
...dev->virtio; + u32 i; + + for (i = 0; i < len; i++) { + if (is_write) + vdev->ops->set_config(vmmio->kvm, vmmio->dev, + *(u8 *)data + i, addr + i); + else + data[i] = vdev->ops->get_config(vmmio->kvm, + vmmio->dev, addr + i); + } +} + +static void virtio_mmio_config_in(u64 addr, void *data, u32 len, + struct virtio_device *vdev) +{ + struct virtio_mmio *vmmio = vdev->virtio; + u32 val = 0; + + switch (addr) { + case VIRTIO_MMIO_MAGIC_VALUE: + case VIRTIO_MMIO_VERSION: + case VIRTIO_MMIO_DEVICE_ID: + case VIRTIO_MMIO_VENDOR_ID: + case VIRTIO_MMIO_STATUS...
2012 Apr 07
0
[PATCH 05/14] kvm tools: Add virtio-mmio support
...dev->virtio; + u32 i; + + for (i = 0; i < len; i++) { + if (is_write) + vdev->ops->set_config(vmmio->kvm, vmmio->dev, + *(u8 *)data + i, addr + i); + else + data[i] = vdev->ops->get_config(vmmio->kvm, + vmmio->dev, addr + i); + } +} + +static void virtio_mmio_config_in(u64 addr, void *data, u32 len, + struct virtio_device *vdev) +{ + struct virtio_mmio *vmmio = vdev->virtio; + u32 val = 0; + + switch (addr) { + case VIRTIO_MMIO_MAGIC_VALUE: + case VIRTIO_MMIO_VERSION: + case VIRTIO_MMIO_DEVICE_ID: + case VIRTIO_MMIO_VENDOR_ID: + case VIRTIO_MMIO_STATUS...
2014 Oct 26
0
[RFC PATCH 1/2] Add a new register offset let interrupt reason available
...Read Write */ > #define VIRTIO_MMIO_STATUS 0x070 > > +/* Allocate ISRMEM for interrupt reason - Write Only */ > +#define VIRTIO_MMIO_ISRMEM 0x080 > + > /* The config space is defined by each driver as > * the per-driver configuration space - Read Write */ > #define VIRTIO_MMIO_CONFIG 0x100 > -- > 1.7.9.5 >
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