- 30 6月, 2017 4 次提交
-
-
由 Stefan Hajnoczi 提交于
Use the new used ring APIs instead of assuming ISR being set means the request has completed. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Tested-by: NEric Blake <eblake@redhat.com> Tested-by: NKevin Wolf <kwolf@redhat.com> Message-id: 20170628184724.21378-5-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
Use the new used ring APIs instead of assuming ISR being set means the request has completed. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Tested-by: NEric Blake <eblake@redhat.com> Tested-by: NKevin Wolf <kwolf@redhat.com> Message-id: 20170628184724.21378-4-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
Existing tests do not touch the virtqueue used ring. Instead they poll the virtqueue ISR register and peek into their request's device-specific status field. It turns out that the virtqueue ISR register can be set to 1 more than once for a single notification (see commit 83d768b5 "virtio: set ISR on dataplane notifications"). This causes problems for tests that assume a 1:1 correspondence between the ISR being 1 and request completion. Peeking at device-specific status fields is also problematic if the device has no field that can be abused for EINPROGRESS polling semantics. This is the case if all the field's values may be set by the device; there's no magic constant left for polling. It's time to process the used ring for completed requests, just like a real virtio guest driver. This patch adds the necessary APIs. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Tested-by: NEric Blake <eblake@redhat.com> Tested-by: NKevin Wolf <kwolf@redhat.com> Message-id: 20170628184724.21378-3-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Tested-by: NEric Blake <eblake@redhat.com> Tested-by: NKevin Wolf <kwolf@redhat.com> Message-id: 20170628184724.21378-2-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 29 6月, 2017 3 次提交
-
-
由 Stefan Hajnoczi 提交于
It is hard to analyze trace logs with multiple virtio-blk devices because none of the trace events include the VirtIODevice *vdev. This patch adds vdev so it's clear which device a request is associated with. I considered using VirtIOBlock *s instead but VirtIODevice *vdev is more general and may be correlated with generic virtio trace events like virtio_set_status. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-id: 20170614092930.11234-1-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Peter Maydell 提交于
Xen 2017/06/27 # gpg: Signature made Tue 27 Jun 2017 23:02:43 BST # gpg: using RSA key 0x894F8F4870E1AE90 # gpg: Good signature from "Stefano Stabellini <stefano.stabellini@eu.citrix.com>" # gpg: aka "Stefano Stabellini <sstabellini@kernel.org>" # Primary key fingerprint: D04E 33AB A51F 67BA 07D3 0AEA 894F 8F48 70E1 AE90 * remotes/sstabellini/tags/xen-20170627-tag: xen-disk: add support for multi-page shared rings xen-disk: only advertize feature-persistent if grant copy is not available xen/disk: don't leak stack data via response ring Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
The 32-bit PPC auxv is a bit complicated because in the mists of time it used to be 16-aligned rather than directly after the environment. Older glibc versions had code to try to probe for whether it needed alignment or not: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c;hb=e84eabb3871c9b39e59323bf3f6b98c2ca9d1cd0 and the kernel has code which puts some magic entries at the bottom to ensure that the alignment probe fails: http://elixir.free-electrons.com/linux/latest/source/arch/powerpc/include/asm/elf.h#L158 QEMU has similar code too, but it was broken by commit 7c4ee5bc, which changed elfload.c from filling in the auxv starting at the highest address and working down to starting at the lowest address and working up. This means that the ARCH_DLINFO hook must now be invoked first rather than last, and the entries in it for PPC must be reversed so that the magic AT_IGNOREPPC entries come at the lowest address in the auxv as they should. The effect of this was that if running a guest binary that used an old glibc with the alignment probing the guest ld.so code would segfault if the size of the guest environment and argv happened to put the auxv at an address that triggered the alignment code in the guest glibc. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NRichard Henderson <rth@twiddle.net> Tested-by: NRichard Henderson <rth@twiddle.net> Message-id: 1498582198-6649-1-git-send-email-peter.maydell@linaro.org
-
- 28 6月, 2017 3 次提交
-
-
由 Paul Durrant 提交于
The blkif protocol has had provision for negotiation of multi-page shared rings for some time now and many guest OS have support in their frontend drivers. This patch makes the necessary modifications to xen-disk support a shared ring up to order 4 (i.e. 16 pages). Signed-off-by: NPaul Durrant <paul.durrant@citrix.com> Signed-off-by: NStefano Stabellini <sstabellini@kernel.org> Reviewed-by: NStefano Stabellini <sstabellini@kernel.org>
-
由 Paul Durrant 提交于
If grant copy is available then it will always be used in preference to persistent maps. In this case feature-persistent should not be advertized to the frontend, otherwise it may needlessly copy data into persistently granted buffers. Signed-off-by: NPaul Durrant <paul.durrant@citrix.com> Signed-off-by: NStefano Stabellini <sstabellini@kernel.org> Reviewed-by: NStefano Stabellini <sstabellini@kernel.org>
-
由 Stefano Stabellini 提交于
Rather than constructing a local structure instance on the stack, fill the fields directly on the shared ring, just like other (Linux) backends do. Build on the fact that all response structure flavors are actually identical (aside from alignment and padding at the end). This is XSA-216. Reported by: Anthony Perard <anthony.perard@citrix.com> Signed-off-by: NJan Beulich <jbeulich@suse.com> Signed-off-by: NStefano Stabellini <sstabellini@kernel.org> Acked-by: NAnthony PERARD <anthony.perard@citrix.com>
-
- 27 6月, 2017 8 次提交
-
-
由 Peter Maydell 提交于
edgar/mmio-exec-v2.for-upstream # gpg: Signature made Tue 27 Jun 2017 16:22:30 BST # gpg: using RSA key 0x29C596780F6BCA83 # gpg: Good signature from "Edgar E. Iglesias (Xilinx key) <edgar.iglesias@xilinx.com>" # gpg: aka "Edgar E. Iglesias <edgar.iglesias@gmail.com>" # Primary key fingerprint: AC44 FEDC 14F7 F1EB EDBF 4151 29C5 9678 0F6B CA83 * remotes/edgar/tags/edgar/mmio-exec-v2.for-upstream: xilinx_spips: allow mmio execution exec: allow to get a pointer for some mmio memory region introduce mmio_interface qdev: add MemoryRegion property cputlb: fix the way get_page_addr_code fills the tlb cputlb: move get_page_addr_code cputlb: cleanup get_page_addr_code to use VICTIM_TLB_HIT Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 KONRAD Frederic 提交于
This allows to execute from the lqspi area. When the request_ptr is called the device loads 1024bytes from the SPI device. Then this code can be executed by the guest. Tested-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
-
由 KONRAD Frederic 提交于
This introduces a special callback which allows to run code from some MMIO devices. SysBusDevice with a MemoryRegion which implements the request_ptr callback will be notified when the guest try to execute code from their offset. Then it will be able to eg: pre-load some code from an SPI device or ask a pointer from an external simulator, etc.. When the pointer or the data in it are no longer valid the device has to invalidate it. Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
-
由 KONRAD Frederic 提交于
This introduces mmio_interface object which contains a MemoryRegion and can be hotplugged/hotunplugged. Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
-
由 KONRAD Frederic 提交于
We need to pass a pointer to a MemoryRegion for mmio_interface. So this just adds that. Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
-
由 KONRAD Frederic 提交于
get_page_addr_code(..) does a cpu_ldub_code to fill the tlb: This can lead to some side effects if a device is mapped at this address. So this patch replaces the cpu_memory_ld by a tlb_fill. Reviewed-by: NRichard Henderson <rth@twiddle.net> Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
-
由 KONRAD Frederic 提交于
This just moves the code before VICTIM_TLB_HIT macro definition so we can use it. Reviewed-by: NRichard Henderson <rth@twiddle.net> Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
-
由 KONRAD Frederic 提交于
This replaces env1 and page_index variables by env and index so we can use VICTIM_TLB_HIT macro later. Reviewed-by: NRichard Henderson <rth@twiddle.net> Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
-
- 26 6月, 2017 22 次提交
-
-
由 Peter Maydell 提交于
Block layer patches # gpg: Signature made Mon 26 Jun 2017 14:07:32 BST # gpg: using RSA key 0x7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: (60 commits) qemu-img: don't shadow opts variable in img_dd() block: Do not strcmp() with NULL uri->scheme blkverify: Catch bs->exact_filename overflow blkdebug: Catch bs->exact_filename overflow fix: avoid an infinite loop or a dangling pointer problem in img_commit block: change variable names in BlockDriverState block: Remove bdrv_aio_readv/writev/flush() qed: Use bdrv_co_* for coroutine_fns qed: Add coroutine_fn to I/O path functions qed: Use a coroutine for need_check_timer qed: Simplify request handling qed: Use CoQueue for serialising allocations qed: Implement .bdrv_co_readv/writev qed: Remove recursion in qed_aio_next_io() qed: Remove ret argument from qed_aio_next_io() qed: Add return value to qed_aio_read/write_data() qed: Add return value to qed_aio_write_inplace/alloc() qed: Add return value to qed_aio_write_cow() qed: Add return value to qed_aio_write_main() qed: Add return value to qed_aio_write_l2_update() ... Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Kevin Wolf 提交于
Block patches for the block queue # gpg: Signature made Mon Jun 26 14:56:24 2017 CEST # gpg: using RSA key 0xF407DB0061D5CF40 # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40 * mreitz/tags/pull-block-2017-06-26: qemu-img: don't shadow opts variable in img_dd() block: Do not strcmp() with NULL uri->scheme blkverify: Catch bs->exact_filename overflow blkdebug: Catch bs->exact_filename overflow fix: avoid an infinite loop or a dangling pointer problem in img_commit block: change variable names in BlockDriverState Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Stefan Hajnoczi 提交于
It's confusing when two different variables have the same name in one function. Cc: Reda Sallahi <fullmanet@gmail.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 20170619150002.3033-1-stefanha@redhat.com Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
由 Max Reitz 提交于
uri_parse(...)->scheme may be NULL. In fact, probably every field may be NULL, and the callers do test this for all of the other fields but not for scheme (except for block/gluster.c; block/vxhs.c does not access that field at all). We can easily fix this by using g_strcmp0() instead of strcmp(). Cc: qemu-stable@nongnu.org Signed-off-by: NMax Reitz <mreitz@redhat.com> Message-id: 20170613205726.13544-1-mreitz@redhat.com Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
由 Max Reitz 提交于
The bs->exact_filename field may not be sufficient to store the full blkverify node filename. In this case, we should not generate a filename at all instead of an unusable one. Cc: qemu-stable@nongnu.org Reported-by: NQu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: NMax Reitz <mreitz@redhat.com> Message-id: 20170613172006.19685-3-mreitz@redhat.com Reviewed-by: NAlberto Garcia <berto@igalia.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
由 Max Reitz 提交于
The bs->exact_filename field may not be sufficient to store the full blkdebug node filename. In this case, we should not generate a filename at all instead of an unusable one. Cc: qemu-stable@nongnu.org Reported-by: NQu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: NMax Reitz <mreitz@redhat.com> Message-id: 20170613172006.19685-2-mreitz@redhat.com Reviewed-by: NAlberto Garcia <berto@igalia.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
由 sochin.jiang 提交于
img_commit could fall into an infinite loop calling run_block_job() if its blockjob fails on any I/O error, fix this already known problem. Signed-off-by: Nsochin.jiang <sochin.jiang@huawei.com> Message-id: 1497509253-28941-1-git-send-email-sochin.jiang@huawei.com Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
由 Manos Pitsidianakis 提交于
Change the 'int count' parameter in *pwrite_zeros, *pdiscard related functions (and some others) to 'int bytes', as they both refer to bytes. This helps with code legibility. Signed-off-by: NManos Pitsidianakis <el13635@mail.ntua.gr> Message-id: 20170609101808.13506-1-el13635@mail.ntua.gr Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
由 Kevin Wolf 提交于
These functions are unused now. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Kevin Wolf 提交于
All functions that are marked coroutine_fn can directly call the bdrv_co_* version of functions instead of going through the wrapper. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NManos Pitsidianakis <el13635@mail.ntua.gr> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Kevin Wolf 提交于
Now that we stay in coroutine context for the whole request when doing reads or writes, we can add coroutine_fn annotations to many functions that can do I/O or yield directly. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Kevin Wolf 提交于
This fixes the last place where we degraded from AIO to actual blocking synchronous I/O requests. Putting it into a coroutine means that instead of blocking, the coroutine simply yields while doing I/O. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Kevin Wolf 提交于
Now that we process a request in the same coroutine from beginning to end and don't drop out of it any more, we can look like a proper coroutine-based driver and simply call qed_aio_next_io() and get a return value from it instead of spawning an additional coroutine that reenters the parent when it's done. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Kevin Wolf 提交于
Now that we're running in coroutine context, the ad-hoc serialisation code (which drops a request that has to wait out of coroutine context) can be replaced by a CoQueue. This means that when we resume a serialised request, it is running in coroutine context again and its I/O isn't blocking any more. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Kevin Wolf 提交于
Most of the qed code is now synchronous and matches the coroutine model. One notable exception is the serialisation between requests which can still schedule a callback. Before we can replace this with coroutine locks, let's convert the driver's external interfaces to the coroutine versions. We need to be careful to handle both requests that call the completion callback directly from the calling coroutine (i.e. fully synchronous code) and requests that involve some callback, so that we need to yield and wait for the completion callback coming from outside the coroutine. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NManos Pitsidianakis <el13635@mail.ntua.gr> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Kevin Wolf 提交于
Instead of calling itself recursively as the last thing, just convert qed_aio_next_io() into a loop. This patch is best reviewed with 'git show -w' because most of it is just whitespace changes. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Kevin Wolf 提交于
All callers pass ret = 0, so we can just remove it. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Kevin Wolf 提交于
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Kevin Wolf 提交于
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Kevin Wolf 提交于
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. While refactoring qed_aio_write_alloc() to accomodate the change, qed_aio_write_zero_cluster() ended up with a single line, so I chose to inline that line and remove the function completely. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Kevin Wolf 提交于
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Kevin Wolf 提交于
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-