>>> On 15.10.12 at 12:25, Ian Campbell wrote:
> On Thu, 2012-09-13 at 19:00 +0300, Dan Carpenter wrote:
>> Hi,
>
> Thanks Dan. I'm not sure anyone from Xen-land really monitors
> virtualization@. Adding xen-devel and Konrad.
>
>>
>> I was reading some code and had a question in xenbus_file_writ
>>> On 15.10.12 at 12:27, Ian Campbell wrote:
>> My static analyzer complains about potential memory corruption in
>> HYPERVISOR_physdev_op()
>>
>> arch/x86/include/asm/xen/hypercall.h
>>389 static inline int
>>390 HYPERVISOR_physdev_op(int cmd, void *arg)
>>391 {
>>392
>>> On 16.10.12 at 11:07, "Jan Beulich" wrote:
On 15.10.12 at 12:27, Ian Campbell wrote:
>>> My static analyzer complains about potential memory corruption in
>>> HYPERVISOR_physdev_op()
>>>
>>> arch/x86/include/asm/xen/hypercall.h
>>>389 static inline int
>>>390 HYPERVISOR_physde
"Michael S. Tsirkin" writes:
> On Fri, Oct 12, 2012 at 08:21:50PM +1030, Rusty Russell wrote:
>> "Michael S. Tsirkin" writes:
>> > On Fri, Oct 12, 2012 at 08:59:36AM +1030, Rusty Russell wrote:
>> >> >> For writes, the standard seems to be a commit latch. We could abuse
>> >> >> the
>> >> >> ge
On Tue, Oct 16, 2012 at 11:45:41PM +1030, Rusty Russell wrote:
> "Michael S. Tsirkin" writes:
> > On Fri, Oct 12, 2012 at 08:21:50PM +1030, Rusty Russell wrote:
> >> "Michael S. Tsirkin" writes:
> >> > On Fri, Oct 12, 2012 at 08:59:36AM +1030, Rusty Russell wrote:
> >> >> >> For writes, the stand
From: "Michael S. Tsirkin"
[Split from "correct capacity math on ring full" -- Rusty]
Signed-off-by: Michael S. Tsirkin
Signed-off-by: Rusty Russell
---
drivers/net/virtio_net.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net
Now we can easily use vq->num_free to determine if there are descriptors
left in the queue, we're about to change virtqueue_add_buf() to return 0
on success. The virtio_net driver is the only one which actually uses
the return value, so change that.
Signed-off-by: Rusty Russell
---
drivers/net/
They're generic concepts, so hoist them. This also avoids accessor
functions.
This goes even further than Jason Wang's 17bb6d4088 patch
("virtio-ring: move queue_index to vring_virtqueue") which moved the
queue_index from the specific transport.
Signed-off-by: Rusty Russell
---
drivers/virtio/
Now noone relies on this behavior, we simplify virtqueue_add_buf() so it
return 0 or -errno.
Signed-off-by: Rusty Russell
---
drivers/virtio/virtio_ring.c |7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
ind
From: "Michael S. Tsirkin"
Capacity math on ring full is wrong: we are
looking at num_sg but that might be optimistic
because of indirect buffer use.
The implementation also penalizes fast path
with extra memory accesses for the benefit of
ring full condition handling which is slow path.
It's e
On Wed, Oct 17, 2012 at 12:00:51AM +1030, Rusty Russell wrote:
> Now we can easily use vq->num_free to determine if there are descriptors
> left in the queue, we're about to change virtqueue_add_buf() to return 0
> on success. The virtio_net driver is the only one which actually uses
> the return
On Wed, Oct 17, 2012 at 12:00:48AM +1030, Rusty Russell wrote:
> They're generic concepts, so hoist them. This also avoids accessor
> functions.
>
> This goes even further than Jason Wang's 17bb6d4088 patch
> ("virtio-ring: move queue_index to vring_virtqueue") which moved the
> queue_index from
Note: I also have minor cleanups to virtio drivers to change (ret >= 0)
to (ret == 0) where it would otherwise be confusing for new readers, but
I didn't clutter the list with them. See my virtio-wip tree for the
gory details.
Cheers,
Rusty.
___
Virtual
"Michael S. Tsirkin" writes:
> On Tue, Oct 16, 2012 at 11:45:41PM +1030, Rusty Russell wrote:
>> "Michael S. Tsirkin" writes:
>> I was assuming the implementation would keep two complete copies of the
>> config space: writes go to the scratch version, which gets copied to the
>> master version up
"Michael S. Tsirkin" writes:
> On Wed, Oct 17, 2012 at 12:00:48AM +1030, Rusty Russell wrote:
>> * @priv: a pointer for the virtqueue implementation to use.
>> + * @index: the zero-based ordinal number for this queue.
>> + * @num_free: number of buffers we expect to be able to fit.
>
> Only it's
On Wed, Oct 17, 2012 at 12:00:48AM +1030, Rusty Russell wrote:
> They're generic concepts, so hoist them. This also avoids accessor
> functions.
>
> This goes even further than Jason Wang's 17bb6d4088 patch
> ("virtio-ring: move queue_index to vring_virtqueue") which moved the
> queue_index from
Compiling xenbus_xs.o triggers this GCC warning:
drivers/xen/xenbus/xenbus_xs.c:628:13: warning: function declaration isn’t
a prototype [-Wstrict-prototypes]
Add the obvious and trivial fix.
While we're touching this function add some equally obvious and trivial
whitespace fixes.
Signed-off
17 matches
Mail list logo