- Apr 09, 2018
-
-
Changpeng Liu authored
Signed-off-by:
Changpeng Liu <changpeng.liu@intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Mar 20, 2018
-
-
Dr. David Alan Gilbert authored
Tell QEMU we understand the protocol features needed for postcopy. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Dr. David Alan Gilbert authored
This message is sent just before the end of postcopy to get the client to stop using userfault since we wont respond to any more requests. It should close userfaultfd so that any other pages get mapped to the backing file automatically by the kernel, since at this point we know we've received everything. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Dr. David Alan Gilbert authored
Clear the area and turn off THP. PROT_NONE the area until after we've userfault advised it to catch any unexpected changes. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Dr. David Alan Gilbert authored
We need a better way, but at the moment we need the address of the mappings sent back to qemu so it can interpret the messages on the userfaultfd it reads. This is done as a 3 stage set: QEMU -> client set_mem_table mmap stuff, get addresses client -> qemu here are the addresses qemu -> client OK - now you can use them That ensures that qemu has registered the new addresses in it's userfault code before the client starts accessing them. Note: We don't ask for the default 'ack' reply since we've got our own. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Dr. David Alan Gilbert authored
When new regions are sent to the client using SET_MEM_TABLE, register them with the userfaultfd. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Dr. David Alan Gilbert authored
Split the set_mem_table routines in both qemu and libvhost-user because the postcopy versions are going to be quite different once changes in the later patches are added. However, this patch doesn't produce any functional change, just the split. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Dr. David Alan Gilbert authored
Notify the vhost-user slave on reception of the 'postcopy-listen' event from the source. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Dr. David Alan Gilbert authored
Open a userfaultfd (on a postcopy_advise) and send it back in the reply to the qemu for it to monitor. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Dr. David Alan Gilbert authored
Allow replies with fds (for postcopy) Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Dr. David Alan Gilbert authored
Wire up a notifier to send a VHOST_USER_POSTCOPY_ADVISE message on an incoming advise. Later patches will fill in the behaviour/contents of the message. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Dr. David Alan Gilbert authored
Add a vhost feature flag for postcopy support, and use the postcopy notifier to check it before allowing postcopy. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Feb 13, 2018
-
-
Yongji Xie authored
The sg list/indirect descriptor table may be contigious in GPA but not in HVA address space. But libvhost-user wasn't aware of that. This would cause out-of-bounds access. Even a malicious guest could use it to get information from the vhost-user backend. Introduce a plen parameter in vu_gpa_to_va() so we can handle this case, returning the actual mapped length. Signed-off-by:
Yongji Xie <xieyongji@baidu.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Maxime Coquelin <maxime.coquelin@redhat.com>
-
Yongji Xie authored
Free the mmaped memory when we need to mmap new memory space on vu_set_mem_table_exec() and vu_set_log_base_exec() to avoid memory leak. Also close the corresponding fd after mmap() on vu_set_log_base_exec() to avoid fd leak. Signed-off-by:
Yongji Xie <xieyongji@baidu.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
- Feb 09, 2018
-
-
Markus Armbruster authored
qemu-common.h includes qemu/option.h, but most places that include the former don't actually need the latter. Drop the include, and add it to the places that actually need it. While there, drop superfluous includes of both headers, and separate #include from file comment with a blank line. This cleanup makes the number of objects depending on qemu/option.h drop from 4545 (out of 4743) to 284 in my "build everything" tree. Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-20-armbru@redhat.com> [Semantic conflict with commit bdd6a90a in block/nvme.c resolved]
-
Markus Armbruster authored
System headers should be included with <...>, our own headers with "...". Offenders tracked down with an ugly, brittle and probably buggy Perl script. Previous iteration was commit a9c94277. Delete inclusions of "string.h" and "strings.h" instead of fixing them to <string.h> and <strings.h>, because we always include these via osdep.h. Put the cleaned up system header includes first. While there, separate #include from file comment with exactly one blank line. Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-2-armbru@redhat.com>
-
- Jan 18, 2018
-
-
Changpeng Liu authored
This commit introduces a vhost-user-blk backend device, it uses UNIX domain socket to communicate with QEMU. The vhost-user-blk sample application should be used with QEMU vhost-user-blk-pci device. To use it, complie with: make vhost-user-blk and start like this: vhost-user-blk -b /dev/sdb -s /path/vhost.socket Signed-off-by:
Changpeng Liu <changpeng.liu@intel.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Changpeng Liu authored
Enable VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages in libvhost-user library, users can implement their own I/O target based on the library. This enable the virtio config space delivered between QEMU host device and the I/O target. Signed-off-by:
Changpeng Liu <changpeng.liu@intel.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Dec 20, 2017
-
-
Paolo Bonzini authored
This lets distros standardize on how QEMU should install systemd services for qemu-ga and qemu-pr-helper. The qemu-ga unit file comes from Fedora, but I checked that Debian is using the same path for the virtio-serisal port. I would like to include this in 2.11, so that the qemu-pr-helper socket can be standardized across distros. Note however that the files are not installed. We can add a configure option in 2.12 perhaps, but it's too late now; documenting the files in the release notes should do. Suggested-by:
Daniel P. Berrange <berrange@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20171124164422.3960-1-pbonzini@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 12, 2017
-
-
Dr. David Alan Gilbert authored
Allow the qemu to pass us a slave fd. We don't do anything with it yet. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20171002191521.15748-5-dgilbert@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Maxime Coquelin <maxime.coquelin@redhat.com>
-
Dr. David Alan Gilbert authored
Update the ProtocolFeature and UserRequest lists to match hw/virtio/vhost-user.c. Fix the text labelling in libvhost-user.c to match the list. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20171002191521.15748-4-dgilbert@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Maxime Coquelin <maxime.coquelin@redhat.com>
-
Dr. David Alan Gilbert authored
Add a vu_queue_started method to complement vu_queue_enabled. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20171002191521.15748-2-dgilbert@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Maxime Coquelin <maxime.coquelin@redhat.com>
-
- Oct 10, 2017
-
-
Marc-André Lureau authored
It is unneeded in the VusDev device structure, and also simplify a bit the code. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
This file implements a bridge from the vu_init API of libvhost-user to GSource, so that libvhost-user can be used inside a GLib main loop. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
- PLOG is unused - code is compiled out unless debug is enabled - logging is too verbose - you can pipe to ts to have timestamp if needed, or use structured logging with more recent glib Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Marc-André Lureau authored
Using a hashtable. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
Use the one from the source with casting, like any other glib source. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Marc-André Lureau authored
There is no need to include hw/virtio/virtio-scsi.h, then the conflict with SCSI_XFER enum goes away. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Marc-André Lureau authored
It is confusing and could easily conflict with future versions. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Marc-André Lureau authored
- use Vus prefix consistently - use CamelCase, since that's glib & libvhost-user style - avoid _t postfix, usually for system headers Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
There is no code to support more than 1 yet, no need for that today. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Marc-André Lureau authored
Instead of a preliminary check, add an assert to the function that has the pre-condition. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Marc-André Lureau authored
Always remove the unix path when leaving the program (instead of when freeing scsi_dev). Note that unix_sock_new() also unlink() exisiting path before creating the socket. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
The *dev pointer belongs to the vhost_scsi_dev_t parent. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Marc-André Lureau authored
They abort instead, so get rid of failure conditions. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-