[Qemu-devel] [virtio-net] migration

2016-05-27 Thread Catalin Vasile
uest know that the jobs he sent on the virtqueue were discarded so that he can retry or release resources that were used for managing those jobs/packets? Catalin Vasile

Re: [Qemu-devel] virtio-net and vhost-net init, virtio-scsi and vhost-scsi init

2016-05-06 Thread Catalin Vasile
Yes it is. Thanks From: Stefan Hajnoczi Sent: Thursday, May 5, 2016 9:00:33 PM To: Catalin Vasile Cc: qemu-devel@nongnu.org Subject: Re: [Qemu-devel] virtio-net and vhost-net init, virtio-scsi and vhost-scsi init On Thu, May 05, 2016 at 11:05:27AM +

[Qemu-devel] virtio-net and vhost-net init, virtio-scsi and vhost-scsi init

2016-05-05 Thread Catalin Vasile
When the virtio-net and virtio-scsi drivers have done the probe() primitive they set the DRIVER_OK flag. If the vhost kernel backend is used, the set_status() primitive in qemu will be triggered with DRIVER_OK status and it will trigger vhost_XXX_start(). How does the net and scsi solutions ens

Re: [Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-16 Thread Catalin Vasile
Do you mean vhost_net - old kernel, qemu - latest, guest - latest? On Thu, Jul 16, 2015 at 7:33 PM, Stefan Hajnoczi wrote: > On Thu, Jul 16, 2015 at 1:54 PM, Catalin Vasile > wrote: >> Both. The compiled kernel was common for both. > > Does vhost_net work with the old kerne

Re: [Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-16 Thread Catalin Vasile
Both. The compiled kernel was common for both. On Thu, Jul 16, 2015 at 3:52 PM, Stefan Hajnoczi wrote: > On Thu, Jul 09, 2015 at 01:45:50PM +0300, Catalin Vasile wrote: >> I have managed to deal with it. >> The thing is I was using one of the latest versions of qemu, but an >

Re: [Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-09 Thread Catalin Vasile
I have managed to deal with it. The thing is I was using one of the latest versions of qemu, but an old Linux Kernel version of 3.12. On Thu, Jul 9, 2015 at 1:43 PM, Stefan Hajnoczi wrote: > On Tue, Jul 07, 2015 at 02:43:06PM +0300, Catalin Vasile wrote: >> My vhost module respects t

Re: [Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-07 Thread Catalin Vasile
Jul 7, 2015 at 1:17 PM, Stefan Hajnoczi wrote: > On Mon, Jul 06, 2015 at 06:13:29PM +0300, Catalin Vasile wrote: >> What is the logic behind vring_need_event() when used with >> virtqueue_kick_prepare()? >> What does the keyword >>just<< refer to from the following

[Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-06 Thread Catalin Vasile
What is the logic behind vring_need_event() when used with virtqueue_kick_prepare()? What does the keyword >>just<< refer to from the following context: /* The following is used with USED_EVENT_IDX and AVAIL_EVENT_IDX */ /* Assuming a given event_idx value from the other size, if * we have just in

Re: [Qemu-devel] [vhost] virtio (guest) interrupt kernel modules

2015-06-11 Thread Catalin Vasile
hu, Jun 11, 2015 at 5:26 PM, Catalin Vasile wrote: > Is there something I need to install (kernel module or something like > that) so that the virtio guest receives signals from vhost? > The communication from and to qemu works (I can send a message from > guest to qemu, and I can send

[Qemu-devel] [vhost] virtio (guest) interrupt kernel modules

2015-06-11 Thread Catalin Vasile
Is there something I need to install (kernel module or something like that) so that the virtio guest receives signals from vhost? The communication from and to qemu works (I can send a message from guest to qemu, and I can send a message from qemu to guest), and I can send a message from guest to v

Re: [Qemu-devel] [virtio] when is VIRTIO_CONFIG_S_DRIVER_OK set?

2015-06-10 Thread Catalin Vasile
The problem was that my device started having activity before the backend was finished to be set up. On Wed, Jun 10, 2015 at 12:26 PM, Catalin Vasile wrote: > When is VIRTIO_CONFIG_S_DRIVER_OK set? > I've seen in vhost-scsi from qemu, that it sets it's own set_status() > me

[Qemu-devel] [virtio] when is VIRTIO_CONFIG_S_DRIVER_OK set?

2015-06-10 Thread Catalin Vasile
When is VIRTIO_CONFIG_S_DRIVER_OK set? I've seen in vhost-scsi from qemu, that it sets it's own set_status() member function for a virtio object, which checks for VIRTIO_CONFIG_S_DRIVER_OK (from a status variable received as a parameter) so it knows if it has to call vhost_scsi_start(), vhost_scsi_

[Qemu-devel] [virtio] virtqueue_add_sgs

2015-06-03 Thread Catalin Vasile
If I send to the backend out buffers using multiple sgs, what should I expect when the user sends me back the result? What should I expect to get when I do a virtqueue_get_buf()? Do I need to make multiple calls to virtqueue_get_buf() in order to get all my out buffers? Or it returns with the first

[Qemu-devel] [virtio-net] guest driver, vq sync

2015-06-02 Thread Catalin Vasile
>From what I see, there are no sync primitives used on virtqueues in the guest driver. How does it make sure start_xmit() (for example) is not called multiple times, so that the vq internal control data doesn't get destroyed?

[Qemu-devel] eventfd_signal()

2015-05-08 Thread Catalin Vasile
Is eventfd blocking? By that I mean: If I signal the guest for something, will that thread remain blocked till the guest clears the interrupt?

[Qemu-devel] [virtio] use virtqueue async

2015-05-08 Thread Catalin Vasile
Can I use a virtqueue asynchronously between guest and backend? By that I mean that any end of the communication channel (virtqueue) can push/pop how much data he wants anytime, without worrying that it will pop a thing that it pushed on the queue, and in fact the other end should have popped it? O

[Qemu-devel] [virtio-vhost] virtqueue, async vq push from vhost

2015-05-05 Thread Catalin Vasile
Can virtqueues be used asynchronous from the vhost end? >From what I've seen there are some primitives with "*add_used_and_signal*" which update some indexes behind the scene. Could marking and signaling used buffers (in another order other than the way they were received) mess up cleaning and/or o

Re: [Qemu-devel] physical memory address in guest (from his point of view)

2015-04-24 Thread Catalin Vasile
On Fri, Apr 24, 2015 at 12:05 PM, Paolo Bonzini wrote: > > > On 24/04/2015 10:46, Catalin Vasile wrote: >> Does a physical memory address in a guest points to the same memory as qemu? >> For example: if I have a physical pointer 0x34 in the guest, does it >> point to

[Qemu-devel] physical memory address in guest (from his point of view)

2015-04-24 Thread Catalin Vasile
Does a physical memory address in a guest points to the same memory as qemu? For example: if I have a physical pointer 0x34 in the guest, does it point to the same location that qemu points with 0x34 address?

Re: [Qemu-devel] vhost/virtio migration planning

2015-04-21 Thread Catalin Vasile
Sorry for not respoding there. When I started researching and working on this qemu-devel was the only mailing list where I actually got support (answers) for my questions. On Tue, Apr 21, 2015 at 4:33 PM, Stefan Hajnoczi wrote: > On Fri, Apr 17, 2015 at 02:03:59PM +0300, Catalin Vasile wr

[Qemu-devel] [virtio-vhost communication] memory mapping

2015-04-21 Thread Catalin Vasile
If I send a pointer to a vhost server from a virtio driver, do I have to do anything else before I can call copy_from_user() or copy_to_user() on that pointer?

Re: [Qemu-devel] register_savevm()

2015-04-17 Thread Catalin Vasile
Does loadvm create new virtual devices (dev.init(), dev.realize(), etc.) for the vm to run onto and then load VMStateDescription? On Fri, Apr 17, 2015 at 4:40 PM, Peter Maydell wrote: > On 17 April 2015 at 14:03, Catalin Vasile > wrote: > > When are save() and load() handlers a

[Qemu-devel] register_savevm()

2015-04-17 Thread Catalin Vasile
When are save() and load() handlers actually used? When are they trying to save and restore state?

[Qemu-devel] vhost/virtio migration planning

2015-04-17 Thread Catalin Vasile
I am working on a virtio-crypto with vhost backend. This functionality should expose a virtual cryptographic device to the guest which would send crypto jobs to the host. One problem I am facing is where to store session data (such as keys, IVs, etc.). For performance improvements, I would be ideal

[Qemu-devel] virtio/vhost find queues, which virtqueue is which

2015-04-07 Thread Catalin Vasile
How can I tell which virtqueue is which? I'm trying to make 2 virtqueues: 1) control vq between qemu and guest 2) data/job vq between vhost and guest I went through find_vqs() inside the guest (virtio-net), but I can't tell how it associates which one is the rx queue, which one is tx, and which on

Re: [Qemu-devel] [virtio] qemu vs vhost virtqueue consumer

2015-04-07 Thread Catalin Vasile
Awesome. Thanks On Tue, Apr 7, 2015 at 11:51 AM, Greg Kurz wrote: > On Tue, 7 Apr 2015 11:10:07 +0300 > Catalin Vasile wrote: > >> I am using the virtio-net vhost-net model to make another virtio/vhost >> solution. >> I can't seem to find how does one make a vir

[Qemu-devel] [virtio] qemu vs vhost virtqueue consumer

2015-04-07 Thread Catalin Vasile
I am using the virtio-net vhost-net model to make another virtio/vhost solution. I can't seem to find how does one make a virtqueue to only be consumed by vhost when adding notifiers to vhost. virtio_add_queue() seems to always ask for a valid handle for qemu, and I don't see any disable function p

[Qemu-devel] [valgrind] getauxval AT_DCACHEBSIZE failed

2015-03-31 Thread Catalin Vasile
I'm trying to test something I'm working on qemu-kvm and I ran into a segfault. I usually use valgrind to deal with these kind of issues, but when I try to used it on qemu it goes nuts and shows me this error and closes: getauxval AT_DCACHEBSIZE failed Is it because I use hugetlb ? Or do any of yo

[Qemu-devel] unhandled signal 11

2015-03-27 Thread Catalin Vasile
How can I debug errors like this: qemu-system-ppc[2273]: unhandled signal 11 at 0008 nip 1007ed08 lr 103404e0 code 30001 ? I know it is a ppc binary, but I am asking a general question. >From a first impression it looks a little like Linux Kernel Oops messages. How can I actually find out the l

[Qemu-devel] [GSoC] project proposal

2015-03-18 Thread Catalin Vasile
Hi, My name is Catalin Vasile and I want to participate with a project for qemu at GSoC. >From what I understand from the rules, I can participate with things I could also use for my college projects. This is my last bachelor year and I'm doing my diploma project, which is re

[Qemu-devel] sanity checks and error management

2015-03-13 Thread Catalin Vasile
Is there any documentation on error reporting in qemu? I've seen a lot of diverse methods used to report errors in sanity checks and I don't know which one should I use and when.

[Qemu-devel] [vhost-net kernel module]: file.fd = -1 does nothing ?

2015-03-12 Thread Catalin Vasile
Why do vhost init/start functions put out with the work of using a vhost_call(VHOST_NET_SET_BACKEND) with file.fd = -1 in qemu vhost-net sources? >From what I see in vhost-net kernel module it just returns NULL from get_socket(), and that's it. It doesn't set anything.

[Qemu-devel] qemu sources and makefile system

2015-01-06 Thread Catalin Vasile
Hi, I'm new to qemu-devel and I'm trying to add a ".c" source to qemu. To be more specific, I'm trying to add a file into /hw/virtio/. I've added "common-obj-y += virtio-src.o" to the Makefile.objs in that folder and when I'm compiling qemu it seems to compile the sources, but I don't know if they

[Qemu-devel] qemu sources and makefile system

2015-01-06 Thread Catalin Vasile
Hi, I'm new to qemu-devel and I'm trying to add a ".c" source to qemu. To be more specific, I'm trying to add a file into /hw/virtio/. I've added "common-obj-y += virtio-src.o" to the Makefile.objs in that folder and when I'm compiling qemu it seems to compile the sources, but I don't know if they