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
---
drivers/virtio/{virtio_pci.h => virtio_pci_common.h} | 4 ++--
drivers/virtio/{virtio_pci.c => vi
There's been a lot of changes since 2007.
List main authors, add Red Hat copyright.
Signed-off-by: Michael S. Tsirkin
---
drivers/virtio/virtio_pci.h| 5 -
drivers/virtio/virtio_pci.c| 5 -
drivers/virtio/virtio_pci_legacy.c | 5 -
3 files changed, 12 insertions(+), 3
config vector setup is version specific, do it indirectly.
Signed-off-by: Michael S. Tsirkin
---
drivers/virtio/virtio_pci.c | 19 +--
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 68023e5..c8ca3f7 1
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
---
drivers/virtio/virtio_pci.h| 133
drivers/virtio/virtio_pci.c| 420 ++---
drivers/vir
VQ setup is mostly version-specific, add another level of indirection to
split the version-independent code out.
Signed-off-by: Michael S. Tsirkin
---
drivers/virtio/virtio_pci.c | 69 ++---
1 file changed, 46 insertions(+), 23 deletions(-)
diff --git a/d
VQ deletion is mostly version-specific, add another level of indirection
to split the version-independent code out.
Signed-off-by: Michael S. Tsirkin
---
drivers/virtio/virtio_pci.c | 27 ---
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/drivers/virtio/vi
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
---
drivers/virtio/virtio_pci.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/dr
should be
struct foo {
}
not
struct foo
{
}
Signed-off-by: Michael S. Tsirkin
---
drivers/virtio/virtio_pci.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index ee1b54c..6f3db1f 100644
--- a/drivers/virtio/
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
---
drivers/virtio/virtio_pci.c | 56 +---
Use isr field instead of direct access to ioaddr.
This way generalizes easily to virtio 1.0.
Signed-off-by: Michael S. Tsirkin
---
drivers/virtio/virtio_pci.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index
This will make it easy for transports to validate features and return
failure.
Signed-off-by: Michael S. Tsirkin
---
include/linux/virtio_config.h | 3 ++-
drivers/lguest/lguest_device.c | 4 +++-
drivers/misc/mic/card/mic_virtio.c | 4 +++-
drivers/remoteproc/remoteproc_
There's been a lot of changes since 2007.
List main authors, add Red Hat copyright.
Signed-off-by: Michael S. Tsirkin
---
drivers/virtio/virtio_pci.h| 5 -
drivers/virtio/virtio_pci.c| 5 -
drivers/virtio/virtio_pci_legacy.c | 5 -
3 files changed, 12 insertions(+), 3
VQ setup is mostly version-specific, add another level of indirection to
split the version-independent code out.
Signed-off-by: Michael S. Tsirkin
---
drivers/virtio/virtio_pci.c | 69 ++---
1 file changed, 46 insertions(+), 23 deletions(-)
diff --git a/d
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
---
drivers/virtio/virtio_pci.h| 133
drivers/virtio/virtio_pci.c| 420 ++---
drivers/vir
VQ deletion is mostly version-specific, add another level of indirection
to split the version-independent code out.
Signed-off-by: Michael S. Tsirkin
---
drivers/virtio/virtio_pci.c | 27 ---
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/drivers/virtio/vi
config vector setup is version specific, do it indirectly.
Signed-off-by: Michael S. Tsirkin
---
drivers/virtio/virtio_pci.c | 19 +--
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 68023e5..c8ca3f7 1
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
---
drivers/virtio/virtio_pci.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/dr
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
---
drivers/virtio/virtio_pci.c | 56 +---
should be
struct foo {
}
not
struct foo
{
}
Signed-off-by: Michael S. Tsirkin
---
drivers/virtio/virtio_pci.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index ee1b54c..6f3db1f 100644
--- a/drivers/virtio/
virtio 1.0 support for virtio-pci isn't ready yet.
Therefore, this patchset doesn't make any functional changes.
Instead, this simply refactors virtio-pci, splitting legacy
device support code out to a separate file: virtio_pci_legacy.c
For virtio 1.0, all that's left is to add virtio_pci_modern.c
legacy_only flag is now unused, drop it from core.
Signed-off-by: Michael S. Tsirkin
---
include/linux/virtio.h | 2 --
drivers/virtio/virtio.c | 4
2 files changed, 6 deletions(-)
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index d666bcb..d09e093 100644
--- a/include/lin
Use isr field instead of direct access to ioaddr.
This way generalizes easily to virtio 1.0.
Signed-off-by: Michael S. Tsirkin
---
drivers/virtio/virtio_pci.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index
we have blacklisted balloon in core, no need
for a driver flag.
Signed-off-by: Michael S. Tsirkin
---
drivers/virtio/virtio_balloon.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 4497def..c9703d4 100644
--- a/drivers/v
These are minor robustness enhancements on top of v8 of the patchset
[PATCH v8 00/50] linux: towards virtio-1 guest support
http://mid.gmane.org/1417449619-24896-1-git-send-email-...@redhat.com
As that one seems stable and actually seems to work well for people,
I'm not respinning it anymo
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
Acked-by: Cornelia Huck
---
i
From: Rusty Russell
Another interesting anti-pattern.
Signed-off-by: Rusty Russell
---
drivers/char/hw_random/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index a9286bf..4d13ac5 100644
--- a/drivers/char/hw_random/core.
From: Rusty Russell
The previous patch added one potential problem: we can still be
reading from a hwrng when it's unregistered. Add a wait for zero
in the hwrng_unregister path.
v5: reset cleanup_done flag, use compiler barrier to prevent recording.
v4: add cleanup_done flag to insure that cle
From: Rusty Russell
There's currently a big lock around everything, and it means that we
can't query sysfs (eg /sys/devices/virtual/misc/hw_random/rng_current)
while the rng is reading. This is a real problem when the rng is slow,
or blocked (eg. virtio_rng with qemu's default /dev/random backen
In next patch, we use reference counting for each struct hwrng,
changing reference count also needs to take mutex_lock. Before
releasing the lock, if we try to stop a kthread that waits to
take the lock to reduce the referencing count, deadlock will
occur.
Signed-off-by: Amos Kong
---
drivers/ch
When I hotunplug a busy virtio-rng device or try to access
hwrng attributes in non-smp guest, it gets stuck.
My hotplug tests:
| test 0:
| hotunplug rng device from qemu monitor
|
| test 1:
| guest) # dd if=/dev/hwrng of=/dev/null &
| hotunplug rng device from qemu monitor
|
| test 2:
| g
From: Rusty Russell
Interesting anti-pattern.
Signed-off-by: Rusty Russell
---
drivers/char/hw_random/core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index 067270b..a9286bf 100644
--- a/drivers/char/h
From: Rusty Russell
current_rng holds one reference, and we bump it every time we want
to do a read from it.
This means we only hold the rng_mutex to grab or drop a reference,
so accessing /sys/devices/virtual/misc/hw_random/rng_current doesn't
block on read of /dev/hwrng.
Using a kref is overk
32 matches
Mail list logo