- 10 1月, 2017 9 次提交
-
-
由 Stefan Weil 提交于
For builds with Mingw-w64 as it is included in Cygwin, there are two header files which define KEY_EVENT with different values. This results in lots of compiler warnings like this one: CC vl.o In file included from /qemu/include/ui/console.h:340:0, from /qemu/vl.c:76: /usr/i686-w64-mingw32/sys-root/mingw/include/curses.h:1522:0: warning: "KEY_EVENT" redefined #define KEY_EVENT 0633 /* We were interrupted by an event */ In file included from /usr/share/mingw-w64/include/windows.h:74:0, from /usr/share/mingw-w64/include/winsock2.h:23, from /qemu/include/sysemu/os-win32.h:29, from /qemu/include/qemu/osdep.h:100, from /qemu/vl.c:24: /usr/share/mingw-w64/include/wincon.h:101:0: note: this is the location of the previous definition #define KEY_EVENT 0x1 QEMU only uses the KEY_EVENT macro from wincon.h. Therefore we can undefine the macro coming from curses.h. The explicit include statement for curses.h in ui/curses.c is not needed and was removed. Those two modifications fix the redefinition warnings. Signed-off-by: NStefan Weil <sw@weilnetz.de> Acked-by: NSamuel Thibault <samuel.thibault@ens-lyon.org> Message-id: 20161119185318.10564-1-sw@weilnetz.de Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Thomas Huth 提交于
If the buffer is not big enough, snprintf() does not return the number of bytes that have been written to the buffer, but the number of bytes that would be needed for writing the whole string. By using this value for the following vnc_write() calls, we send some junk at the end of the name in case the qemu_name is longer than 1017 bytes, which could confuse the VNC clients. Fix this by adding an additional size check here. Buglink: https://bugs.launchpad.net/qemu/+bug/1637447Signed-off-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 1479749115-21932-1-git-send-email-thuth@redhat.com Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Marc-André Lureau 提交于
When too many consoles are created, vcs[] may be write out-of-bounds. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20161207105511.25173-1-marcandre.lureau@redhat.com Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Frediano Ziglio 提交于
The relicense permits sharing the code with Spice which is LGPL. All people listed below have agreed to the relicense: - Arei Gonglei; - Cole Robinson; - Gerd Hoffmann; - Peter Maydell. Signed-off-by: NFrediano Ziglio <fziglio@redhat.com> Acked-by: NCole Robinson <crobinso@redhat.com> Acked-by: NGonglei <arei.gonglei@huawei.com> Acked-by: NPeter Maydell <peter.maydell@linaro.org> Message-id: 20161208104539.3045-1-fziglio@redhat.com Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Samuel Thibault 提交于
This uses the console API to record the window ID of the SDL2 windows. Signed-off-by: NSamuel Thibault <samuel.thibault@ens-lyon.org> Message-id: 20161221003806.22412-4-samuel.thibault@ens-lyon.org Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Samuel Thibault 提交于
This moves the SDL bits for window ID from the baum driver to SDL, as well as fixing the build for non-X11. Signed-off-by: NSamuel Thibault <samuel.thibault@ens-lyon.org> Message-id: 20161221003806.22412-3-samuel.thibault@ens-lyon.org Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Samuel Thibault 提交于
This adds two console functions, qemu_console_set_window_id and qemu_graphic_console_get_window_id, to let graphical backend record the window id in the QemuConsole structure, and let the baum driver read it. Signed-off-by: NSamuel Thibault <samuel.thibault@ens-lyon.org> Message-id: 20161221003806.22412-2-samuel.thibault@ens-lyon.org Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Daniel P. Berrange 提交于
Wayland always uses evdev as its input source, so QEMU can use the existing evdev keymap data Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Tested-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 20161201094117.16407-1-berrange@redhat.com Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Hervé Poussineau 提交于
This patch fixes a segfault at QEMU startup, introduced in a0815632. gd_vc_find_current() return NULL, which is dereferenced without checking it. While at it, disable the whole 'View' menu if no console exists. Reproducer: qemu-system-i386 -M none -nodefaults Signed-off-by: NHervé Poussineau <hpoussin@reactos.org> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 1483263585-8101-1-git-send-email-hpoussin@reactos.org Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 05 1月, 2017 3 次提交
-
-
由 Peter Maydell 提交于
# gpg: Signature made Wed 04 Jan 2017 13:29:09 GMT # gpg: using RSA key 0x9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: iothread: add poll-grow and poll-shrink parameters aio: self-tune polling time virtio: disable virtqueue notifications during polling aio: add .io_poll_begin/end() callbacks virtio: turn vq->notification into a nested counter virtio-scsi: suppress virtqueue kick during processing virtio-blk: suppress virtqueue kick during processing iothread: add polling parameters linux-aio: poll ring for completions virtio: poll virtqueues for new buffers aio: add polling mode to AioContext aio: add AioPollFn and io_poll() interface aio: add flag to skip fds to aio_dispatch() HACKING: document #include order Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
- transport specific callbacks (for Xen) - fix crash (2.8 regression) - 9p functional tests # gpg: Signature made Tue 03 Jan 2017 17:30:58 GMT # gpg: using DSA key 0x02FC3AEB0101DBC2 # gpg: Good signature from "Greg Kurz <groug@kaod.org>" # gpg: aka "Greg Kurz <groug@free.fr>" # gpg: aka "Greg Kurz <gkurz@fr.ibm.com>" # gpg: aka "Greg Kurz <gkurz@linux.vnet.ibm.com>" # gpg: aka "Gregory Kurz (Groug) <groug@free.fr>" # gpg: aka "Gregory Kurz (Cimai Technology) <gkurz@cimai.com>" # gpg: aka "Gregory Kurz (Meiosys Technology) <gkurz@meiosys.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 2BD4 3B44 535E C0A7 9894 DBA2 02FC 3AEB 0101 DBC2 * remotes/gkurz/tags/for-upstream: tests: virtio-9p: ".." cannot be used to walk out of the shared directory tests: virtio-9p: no slash in path elements during walk tests: virtio-9p: add walk operation test tests: virtio-9p: add attach operation test tests: virtio-9p: add version operation test 9pfs: fix P9_NOTAG and P9_NOFID macros tests: virtio-9p: code refactoring tests: virtio-9p: rename PCI configuration test 9pfs: fix crash when fsdev is missing 9pfs: introduce init_out/in_iov_from_pdu 9pfs: call v9fs_init_qiov_from_pdu before v9fs_pack 9pfs: introduce transport specific callbacks 9pfs: move pdus to V9fsState Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
virtio-gpu: misc bugfixes. # gpg: Signature made Tue 03 Jan 2017 14:48:04 GMT # gpg: using RSA key 0x4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/pull-vga-20170103-1: virtio-gpu: fix memory leak in resource attach backing virtio-gpu-3d: fix memory leak in resource attach backing virtio-gpu: call cleanup mapping function in resource destroy virtio-gpu: track and limit host memory allocations display: virtio-gpu-3d: check virgl capabilities max_size Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 04 1月, 2017 27 次提交
-
-
由 Stefan Hajnoczi 提交于
These parameters control the poll time self-tuning algorithm. They are optional and will default to sane values if omitted. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Message-id: 20161201192652.9509-14-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
This patch is based on the algorithm for the kvm.ko halt_poll_ns parameter in Linux. The initial polling time is zero. If the event loop is woken up within the maximum polling time it means polling could be effective, so grow polling time. If the event loop is woken up beyond the maximum polling time it means polling is not effective, so shrink polling time. If the event loop makes progress within the current polling time then the sweet spot has been reached. This algorithm adjusts the polling time so it can adapt to variations in workloads. The goal is to reach the sweet spot while also recognizing when polling would hurt more than help. Two new trace events, poll_grow and poll_shrink, are added for observing polling time adjustment. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Message-id: 20161201192652.9509-13-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
This is a performance optimization to eliminate vmexits during polling. It also avoids spurious ioeventfd processing after polling ends. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Message-id: 20161201192652.9509-12-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
The begin and end callbacks can be used to prepare for the polling loop and clean up when polling stops. Note that they may only be called once for multiple aio_poll() calls if polling continues to succeed. Once polling fails the end callback is invoked before aio_poll() resumes file descriptor monitoring. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Message-id: 20161201192652.9509-11-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
Polling should disable virtqueue notifications but that requires nested virtio_queue_set_notification() calls. Turn vq->notification into a counter so it is possible to do nesting. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Message-id: 20161201192652.9509-10-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
The guest does not need to kick the virtqueue while we are processing it. This reduces the number of vmexits during periods of heavy I/O. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Message-id: 20161201192652.9509-9-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
The guest does not need to kick the virtqueue while we are processing it. This reduces the number of vmexits during periods of heavy I/O. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Message-id: 20161201192652.9509-8-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
Poll mode can be configured with -object iothread,poll-max-ns=NUM. Polling is disabled with a value of 0 nanoseconds. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Message-id: 20161201192652.9509-7-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
The Linux AIO userspace ABI includes a ring that is shared with the kernel. This allows userspace programs to process completions without system calls. Add an AioContext poll handler to check for completions in the ring. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Message-id: 20161201192652.9509-6-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
Add an AioContext poll handler to detect new virtqueue buffers without waiting for a guest->host notification. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Message-id: 20161201192652.9509-5-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
The AioContext event loop uses ppoll(2) or epoll_wait(2) to monitor file descriptors or until a timer expires. In cases like virtqueues, Linux AIO, and ThreadPool it is technically possible to wait for events via polling (i.e. continuously checking for events without blocking). Polling can be faster than blocking syscalls because file descriptors, the process scheduler, and system calls are bypassed. The main disadvantage to polling is that it increases CPU utilization. In classic polling configuration a full host CPU thread might run at 100% to respond to events as quickly as possible. This patch implements a timeout so we fall back to blocking syscalls if polling detects no activity. After the timeout no CPU cycles are wasted on polling until the next event loop iteration. The run_poll_handlers_begin() and run_poll_handlers_end() trace events are added to aid performance analysis and troubleshooting. If you need to know whether polling mode is being used, trace these events to find out. Note that the AioContext is now re-acquired before disabling notify_me in the non-polling case. This makes the code cleaner since notify_me was enabled outside the non-polling AioContext release region. This change is correct since it's safe to keep notify_me enabled longer (disabling is an optimization) but potentially causes unnecessary event_notifer_set() calls. I think the chance of performance regression is small here. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Message-id: 20161201192652.9509-4-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
The new AioPollFn io_poll() argument to aio_set_fd_handler() and aio_set_event_handler() is used in the next patch. Keep this code change separate due to the number of files it touches. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Message-id: 20161201192652.9509-3-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
Polling mode will not call ppoll(2)/epoll_wait(2). Therefore we know there are no fds ready and should avoid looping over fd handlers in aio_dispatch(). Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Message-id: 20161201192652.9509-2-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
It was not obvious to me why "qemu/osdep.h" must be the first #include. This documents the rationale and the overall #include order. Cc: Fam Zheng <famz@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Cc: Eric Blake <eblake@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Message-id: 1479307161-24658-1-git-send-email-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Greg Kurz 提交于
According to the 9P spec at http://man.cat-v.org/plan_9/5/intro, the parent directory of the root directory of a server's tree is itself. This test hence checks that the qid of the root directory as returned by attach is the same as the qid of ".." when walking from the root directory. Signed-off-by: NGreg Kurz <groug@kaod.org>
-
由 Greg Kurz 提交于
The walk operation is expected to fail and to return ENOENT. Signed-off-by: NGreg Kurz <groug@kaod.org>
-
由 Greg Kurz 提交于
The walk operation is used to traverse the directory tree and to associate paths to fids. A single walk can be used to traverse up to P9_MAXWELEM path elements at the same time. The test creates a path with P9_MAXWELEM elements on the backend (à la 'mkdir -p') and issues a walk operation. The walk is expected to succeed without error. Reference: http://man.cat-v.org/plan_9/5/walkSigned-off-by: NGreg Kurz <groug@kaod.org>
-
由 Greg Kurz 提交于
The attach operation is used to establish a connection between the client and the server. After this, the client is able to access the underlying filesystem and do I/O. This test simply ensures the operation succeeds without error. Reference: http://man.cat-v.org/plan_9/5/attachSigned-off-by: NGreg Kurz <groug@kaod.org>
-
由 Greg Kurz 提交于
This patch lays the foundations to be able to test 9P operations and provides a test for the version operation as a first example. A 9P request is composed of a T-message sent by the client (guest) to the server (QEMU), and a R-message sent by the server back to the client. The following general calls are available to implement requests for any 9P operations: v9fs_req_init(): allocates the request structure and the guest memory for the T-message v9fs_req_send(): allocates the guest memory for the R-message and sends the T-message to QEMU v9fs_req_recv(): waits for QEMU to answer and does some sanity checks on the returned R-message header v9fs_req_free(): releases the guest memory and the request structure Helpers are provided, to be used by each specific 9P operation to copy data to/from the guest memory. The version operation is used to negotiate the 9P protocol version to be used and the maximum buffer size for exchanged data. It is necessarily the first message of a 9P session. For simplicity, the maximum buffer size is hardcoded to 4k, which should be enough for functional tests. The test simply advertises the "9P2000.L" version to QEMU and expects QEMU to answer it is supported. References: http://man.cat-v.org/plan_9/5/intro http://man.cat-v.org/plan_9/5/versionSigned-off-by: NGreg Kurz <groug@kaod.org>
-
由 Greg Kurz 提交于
The u16 and u32 types don't exist in QEMU common headers. It never broke build because these two macros aren't use by the current code, but this is about to change with the future addition of functional tests for 9P. Also, these should have enclosing parenthesis to be usable in any syntactical situation. As suggested by Eric Blake, let's use UINT16_MAX and UINT32_MAX to address both issues. Signed-off-by: NGreg Kurz <groug@kaod.org>
-
由 Greg Kurz 提交于
This moves the test_share static and the QOSState into the QVirtIO9P structure, and put PCI related code in functions with a _pci_ name. This will avoid code duplication in future tests, and allow to add support for non-PCI platforms. Signed-off-by: NGreg Kurz <groug@kaod.org>
-
由 Greg Kurz 提交于
Signed-off-by: NGreg Kurz <groug@kaod.org>
-
由 Greg Kurz 提交于
If the user passes -device virtio-9p without the corresponding -fsdev, QEMU dereferences a NULL pointer and crashes. This is a 2.8 regression introduced by commit 702dbcc2. Signed-off-by: NGreg Kurz <groug@kaod.org> Reviewed-by: NLi Qiang <liq3ea@gmail.com>
-
由 Stefano Stabellini 提交于
Not all 9pfs transports share memory between request and response. For those who don't, it is necessary to know how much memory is required in the response. Split the existing init_iov_from_pdu function in two: init_out_iov_from_pdu (for writes) and init_in_iov_from_pdu (for reads). init_in_iov_from_pdu takes an additional size parameter to specify the memory required for the response message. Signed-off-by: NStefano Stabellini <sstabellini@kernel.org> Reviewed-by: NGreg Kurz <groug@kaod.org> Signed-off-by: NGreg Kurz <groug@kaod.org>
-
由 Stefano Stabellini 提交于
v9fs_xattr_read should not access VirtQueueElement elems directly. Move v9fs_init_qiov_from_pdu up in the file and call v9fs_init_qiov_from_pdu before v9fs_pack. Use v9fs_pack on the new iovec. Signed-off-by: NStefano Stabellini <sstabellini@kernel.org> Reviewed-by: NGreg Kurz <groug@kaod.org> Signed-off-by: NGreg Kurz <groug@kaod.org>
-
由 Stefano Stabellini 提交于
Don't call virtio functions from 9pfs generic code, use generic function callbacks instead. Signed-off-by: NStefano Stabellini <sstabellini@kernel.org> Reviewed-by: NGreg Kurz <groug@kaod.org> Signed-off-by: NGreg Kurz <groug@kaod.org>
-
由 Stefano Stabellini 提交于
pdus are initialized and used in 9pfs common code. Move the array from V9fsVirtioState to V9fsState. Signed-off-by: NStefano Stabellini <sstabellini@kernel.org> Reviewed-by: NGreg Kurz <groug@kaod.org> Signed-off-by: NGreg Kurz <groug@kaod.org>
-
- 03 1月, 2017 1 次提交
-
-
由 Li Qiang 提交于
In the resource attach backing function, everytime it will allocate 'res->iov' thus can leading a memory leak. This patch avoid this. Signed-off-by: NLi Qiang <liq3ea@gmail.com> Message-id: 1483003721-65360-1-git-send-email-liq3ea@gmail.com Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-