- 16 Dec, 2014 1 commit
-
-
Herbert Xu authored
When the virtio_pci driver was moved into virtio_pci_legacy.c the module licence and other attributes went AWOL. This patch restores them. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
- 15 Dec, 2014 9 commits
-
-
Michael S. Tsirkin authored
This just makes code sparse-clean by using new memory access APIs in one file I missed. The new feature bit is not yet negotiated. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
When switching everything over to virtio 1.0 memory access APIs, I missed converting vringh. Fortunately, it's straight-forward. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Pass u64 everywhere. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Seems to mostly be a positive. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Missed one place where vringh_test used long to pass features. Fix it up to u64. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Include missing virtio_config.h Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
As usual, add more stubs to fix test build after main codebase changes. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
- 14 Dec, 2014 3 commits
-
-
Michael S. Tsirkin authored
virtio 1.0 spec says: Drivers MUST NOT assume reads from fields greater than 32 bits wide are atomic, nor are reads from multiple fields: drivers SHOULD read device configuration space fields like so: u32 before, after; do { before = get_config_generation(device); // read config entry/entries. after = get_config_generation(device); } while (after != before); Do exactly this, for transports that support it. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Add macro to disable all legacy register defines. Helpful to make sure legacy macros don't leak through into modern code. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
It turns out this make everything easier. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
- 11 Dec, 2014 3 commits
-
-
Michael S. Tsirkin authored
Legacy drivers use virtio_pci_common.h too, we should not define VIRTIO_PCI_NO_LEGACY there. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
virtio_cread_bytes is implemented incorrectly in case length happens to be 2,4 or 8 bytes: transports and devices will assume it's an integer value that has to be converted to LE format. Let's just do multiple 1-byte reads: this also makes life easier for transports who only need to implement 1,2,4 and 8 byte reads. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
virtio 1.0 devices require that drivers set VIRTIO_CONFIG_S_FEATURES_OK after finalizing features. virtio core missed doing this on restore, fix it up. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
-
- 09 Dec, 2014 24 commits
-
-
Cornelia Huck authored
We previously tried to use device even if finalize_features failed, but that's wrong since driver and device are now out of sync. Fail probe if we detect failures during finalize_features. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
We never negotiate revision > 1, but just to make this code more likely to work when we do, require VERSION_1 with any revision >= 1. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
-
Michael S. Tsirkin authored
kbuild does not seem to like it when we name source files same as the module. Let's rename virtio_pci -> virtio_pci_common, and get rid of #include-ing c files. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
There's been a lot of changes since 2007. List main authors, add Red Hat copyright. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Move everything dealing with legacy devices out to virtio_pci_legacy.c. Expose common code APIs in virtio_pci.h Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
config vector setup is version specific, do it indirectly. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
VQ setup is mostly version-specific, add another level of indirection to split the version-independent code out. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
VQ deletion is mostly version-specific, add another level of indirection to split the version-independent code out. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
slightly reduce the amount of pointer chasing this needs to do. More importantly, this will easily generalize to virtio 1.0. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
We don't need to go from vq to vq info on data path, so using direct vq->priv pointer for that seems like a waste. Let's build an array of vq infos, then we can use vq->index for that lookup. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
should be struct foo { } not struct foo { } Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Use isr field instead of direct access to ioaddr. This way generalizes easily to virtio 1.0. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
legacy_only flag is now unused, drop it from core. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
-
Michael S. Tsirkin authored
we have blacklisted balloon in core, no need for a driver flag. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
-
Michael S. Tsirkin authored
What does it mean if rev 1 device does not set VIRTIO_F_VERSION_1? E.g. is it native endian? Let's not even try to drive such devices: fail attempts to finalize features. virtio core will detect this and bail out. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
This will make it easy for transports to validate features and return failure. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Legacy balloon device doesn't pretend to support revision 1 or 64 bit features. But just in case someone implements a broken one that does, let's not even try to drive legacy only devices using revision 1, and let's not give them a chance to say they support VIRTIO_F_VERSION_1 by not reading or writing high feature bits. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
-
Michael S. Tsirkin authored
transports need to be able to detect legacy-only devices (ATM balloon only) to use legacy path to drive them. Add a core API to do just that. The implementation just blacklists balloon: not too pretty, but let's not over-engineer. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
-
Michael S. Tsirkin authored
CHECK drivers/char/virtio_console.c drivers/char/virtio_console.c:687:36: warning: incorrect type in argument 1 (different address spaces) drivers/char/virtio_console.c:687:36: expected void [noderef] <asn:1>*to drivers/char/virtio_console.c:687:36: got char *out_buf drivers/char/virtio_console.c:790:35: warning: incorrect type in argument 2 (different address spaces) drivers/char/virtio_console.c:790:35: expected char *out_buf drivers/char/virtio_console.c:790:35: got char [noderef] <asn:1>*ubuf fill_readbuf is reused with both kernel and userspace pointers, depending on value of to_user flag. Tag address parameter as __user, and cast to/from regular pointer type when we know it's safe. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Jason Wang authored
Signed-off-by: Jason Wang <jasowang@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Core activates this bit automatically now, drop it from drivers that set it explicitly. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Activate VIRTIO_F_VERSION_1 automatically unless legacy_only is set. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
We have no plans to support virtio 1.0 in balloon driver. Add an explicit flag to mark it legacy only. This will be used by follow-up patches. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Pretty straight-forward, just use accessors for all fields. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-