- 26 1月, 2014 4 次提交
-
-
由 Aurelien Jarno 提交于
The movbe instruction has been added on some Intel Atom CPUs and on recent Intel Haswell CPUs. It allows to load/store a value and at the same time bswap it. This patch detects the avaibility of this instruction and when available use it in the qemu load/store routines in replacement of load/store + bswap. Note that for 16-bit unsigned loads, movbe + movzw is basically the same as movzw + bswap, so the patch doesn't touch this case. Signed-off-by: NAurelien Jarno <aurelien@aurel32.net> [RTH: Reduced the number of conditionals using "movop".] Signed-off-by: NRichard Henderson <rth@twiddle.net>
-
由 Aurelien Jarno 提交于
Add support for three-byte opcodes, starting with the 0x0f 0x38 prefix. Use P_EXT38 as the new constant, and shift all other constants so that P_EXT and P_EXT38 have neighbouring values. Signed-off-by: NAurelien Jarno <aurelien@aurel32.net> [RTH: Changed the name from P_EXT2 to P_EXT38.] Signed-off-by: NRichard Henderson <rth@twiddle.net>
-
由 Aurelien Jarno 提交于
P_REXW is defined has a constant at the beginning of i386/tcg-target.c, but the corresponding bit is later used in a harcoded way, which defeat the purpose of a constant. Fix that by using a conditional expression operator instead of a shift. On x86 this actually makes the code slightly smaller as GCC does in practice (opc >> 8) & 8 instead of (opc & 0x800) >> 8 so the constants are smaller to load. Signed-off-by: NAurelien Jarno <aurelien@aurel32.net> Signed-off-by: NRichard Henderson <rth@twiddle.net>
-
由 Aurelien Jarno 提交于
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net> Signed-off-by: NRichard Henderson <rth@twiddle.net>
-
- 25 1月, 2014 36 次提交
-
-
由 Anthony Liguori 提交于
* qemu-kvm/uq/master: kvm: always update the MPX model specific register KVM: fix addr type for KVM_IOEVENTFD KVM: Retry KVM_CREATE_VM on EINTR mempath prefault: fix off-by-one error kvm: x86: Separately write feature control MSR on reset roms: Flush icache when writing roms to guest memory target-i386: clear guest TSC on reset target-i386: do not special case TSC writeback target-i386: Intel MPX Conflicts: exec.c aliguori: fix trivial merge conflict in exec.c Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
-
由 Anthony Liguori 提交于
* otubo/seccomp: seccomp: add some basic shared memory syscalls to the whitelist seccomp: add mkdir() and fchmod() to the whitelist Message-id: 1390231004-18392-1-git-send-email-otubo@linux.vnet.ibm.com Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
-
由 Anthony Liguori 提交于
Initial patch for QEMU GTK support on Windows # gpg: Signature made Mon 20 Jan 2014 11:37:58 AM PST using RSA key ID FAD62069 # gpg: Can't check signature: public key not found * sweil/tags/for_anthony: gtk: Support keyboard translation for hosts running Windows Message-id: 1390246909-18757-1-git-send-email-sw@weilnetz.de Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
-
由 Anthony Liguori 提交于
hda-codec: disable streams on reset # gpg: Signature made Tue 21 Jan 2014 02:17:12 AM PST using RSA key ID D3E87138 # gpg: Can't check signature: public key not found * kraxel/tags/pull-audio-2: hda-codec: disable streams on reset Message-id: 1390299589-5082-1-git-send-email-kraxel@redhat.com Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
-
由 Anthony Liguori 提交于
usb core+hid: add support for microsoft os descriptors # gpg: Signature made Tue 21 Jan 2014 02:21:29 AM PST using RSA key ID D3E87138 # gpg: Can't check signature: public key not found * kraxel/tags/pull-usb-2: usb-hid: add microsoft os descriptor support usb: add support for microsoft os descriptors Message-id: 1390299772-5368-1-git-send-email-kraxel@redhat.com Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
-
由 Anthony Liguori 提交于
* bonzini/scsi-next: scsi: Support TEST UNIT READY in the dummy LUN0 block: add .bdrv_reopen_prepare() stub for iscsi virtio-scsi: Prevent assertion on missed events virtio-scsi: Cleanup of I/Os that never started scsi: Assign cancel_io vector for scsi_disk_emulate_ops Conflicts: block/iscsi.c aliguori: resolve trivial merge conflict in block/iscsi.c Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
-
由 Anthony Liguori 提交于
Block patches # gpg: Signature made Fri 24 Jan 2014 08:40:53 AM PST using RSA key ID C88F2FD6 # gpg: Can't check signature: public key not found * kwolf/tags/for-anthony: (93 commits) block: Switch bdrv_io_limits_intercept() to byte granularity qemu-iotests: Test pwritev RMW logic qemu-io: New command 'sleep' blkdebug: Make required alignment configurable iscsi: Set bs->request_alignment block: Make bdrv_pwrite() a bdrv_prwv_co() wrapper block: Make bdrv_pread() a bdrv_prwv_co() wrapper block: Change coroutine wrapper to byte granularity block: Assert serialisation assumptions in pwritev block: Align requests in bdrv_co_do_pwritev() block: Allow wait_serialising_requests() at any point block: Make overlap range for serialisation dynamic block: Generalise and optimise COR serialisation block: Make zero-after-EOF work with larger alignment block: Allow waiting for overlapping requests between begin/end block: Switch BdrvTrackedRequest to byte granularity block: Introduce bdrv_co_do_pwritev() block: write: Handle COR dependency after I/O throttling block: Introduce bdrv_aligned_pwritev() block: Introduce bdrv_co_do_preadv() ... Message-id: 1390584136-24703-1-git-send-email-kwolf@redhat.com Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
-
由 Kevin Wolf 提交于
Request sizes used to be rounded down to the next sector boundary, allowing to bypass the I/O limit. Now all requests are accounted for with their exact byte size. Reported-by: NWenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com>
-
由 Kevin Wolf 提交于
Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com>
-
由 Kevin Wolf 提交于
There is no easy way to check that a request correctly waits for a different request. With a sleep command we can at least approximate it. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
The new 'align' option of blkdebug can be used in order to emulate backends with a required 4k alignment on hosts which only really require 512 byte alignment. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Paolo Bonzini 提交于
The iSCSI backend already gets the block size from the READ CAPACITY command it sends. Save it so that the generic block layer gets it too. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com>
-
由 Kevin Wolf 提交于
Instead of implementing the alignment adjustment here, use the now existing functionality of bdrv_co_do_pwritev(). Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com>
-
由 Kevin Wolf 提交于
Instead of implementing the alignment adjustment here, use the now existing functionality of bdrv_co_do_preadv(). Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com>
-
由 Kevin Wolf 提交于
Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com>
-
由 Kevin Wolf 提交于
If a request calls wait_serialising_requests() and actually has to wait in this function (i.e. a coroutine yield), other requests can run and previously read data (like the head or tail buffer) could become outdated. In this case, we would have to restart from the beginning to read in the updated data. However, we're lucky and don't actually need to do that: A request can only wait in the first call of wait_serialising_requests() because we mark it as serialising before that call, so any later requests would wait. So as we don't wait in practice, we don't have to reload the data. This is an important assumption that may not be broken or data corruption will happen. Document it with some assertions. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com>
-
由 Kevin Wolf 提交于
This patch changes bdrv_co_do_pwritev() to actually be what its name promises. If requests aren't properly aligned, it performs a RMW. Requests touching the same block are serialised against the RMW request. Further optimisation of this is possible by differentiating types of requests (concurrent reads should actually be okay here). Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
We can only have a single wait_serialising_requests() call per request because otherwise we can run into deadlocks where requests are waiting for each other. The same is true when wait_serialising_requests() is not at the very beginning of a request, so that other requests can be issued between the start of the tracking and wait_serialising_requests(). Fix this by changing wait_serialising_requests() to ignore requests that are already (directly or indirectly) waiting for the calling request. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
Copy on Read wants to serialise with all requests touching the same cluster, so wait_serialising_requests() rounded to cluster boundaries. Other users like alignment RMW will have different requirements, though (requests touching the same sector), so make it dynamic. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
Change the API so that specific requests can be marked serialising. Only these requests are checked for overlaps then. This means that during a Copy on Read operation, not all requests overlapping other requests are serialised any more, but only those that actually overlap with the specific COR request. Also remove COR from function and variable names because this functionality can be useful in other contexts. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
Odd file sizes could make bdrv_aligned_preadv() shorten the request in non-aligned ways. Fix it by rounding to the required alignment instead of 512 bytes. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
Previously, it was not possible to use wait_for_overlapping_requests() between tracked_request_begin()/end() because it would wait for itself. Ignore the current request in the overlap check and run more of the bdrv_co_do_preadv/pwritev code with a BdrvTrackedRequest present. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
This is going to become the bdrv_co_do_preadv() equivalent for writes. In this patch, however, just a function taking byte offsets is created, it doesn't align anything yet. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
First waiting for all COR requests to complete and calling the throttling function afterwards means that the request could be delayed and we still need to wait for the COR request even if it was issued only after the throttled write request. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
This separates the part of bdrv_co_do_writev() that needs to happen before the request is modified to match the backend alignment, and a part that needs to be executed afterwards and passes the request to the BlockDriver. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
Similar to bdrv_pread(), which aligns byte-aligned request to 512 byte sectors, bdrv_co_do_preadv() takes a byte-aligned request and aligns it to the alignment specified in bs->request_alignment. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
This separates the part of bdrv_co_do_readv() that needs to happen before the request is modified to match the backend alignment, and a part that needs to be executed afterwards and passes the request to the BlockDriver. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NWenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: NMax Reitz <mreitz@redhat.com>
-
由 Paolo Bonzini 提交于
Add a bs->request_alignment field that contains the required offset/length alignment for I/O requests and fill it in the raw block drivers. Use ioctls if possible, else see what alignment it takes for O_DIRECT to succeed. While at it, also expose the memory alignment requirements, which may be (and in practice are) different from the disk alignment requirements. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com>
-
由 Paolo Bonzini 提交于
The alignment field is now set to the value that is promised to the guest, rather than required by the host. The next patches will make QEMU aware of the host-provided values, so make this clear. The alignment is also not about memory buffers, but about the sectors on the disk, change the documentation of the field. At this point, the field is set by the device emulation, but completely ignored by the block layer. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NWenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
bs->buffer_alignment is set by the device emulation and contains the logical block size of the guest device. This isn't something that the block layer should know, and even less something to use for determining the right alignment of buffers to be used for the host. The new BlockLimits field opt_mem_alignment tells the qemu block layer the optimal alignment to be used so that no bounce buffer must be used in the driver. This patch may change the buffer alignment from 4k to 512 for all callers that used qemu_blockalign() with the top-level image format BlockDriverState. The value was never propagated to other levels in the tree, so in particular raw-posix never required anything else than 512. While on disks with 4k sectors direct I/O requires a 4k alignment, memory may still be okay when aligned to 512 byte boundaries. This is what must have happened in practice, because otherwise this would already have failed earlier. Therefore I don't expect regressions even with this intermediate state. Later, raw-posix can implement the hook and expose a different memory alignment requirement. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NWenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: NMax Reitz <mreitz@redhat.com>
-
由 Kevin Wolf 提交于
For an O_DIRECT request to succeed, it's not only necessary that all base addresses in the qiov are aligned, but also that each length in it is aligned. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NWenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: NMax Reitz <mreitz@redhat.com>
-
由 Kevin Wolf 提交于
The functions used by qemu_memalign() require an alignment that is at least sizeof(void*). Adjust it if it is too small. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NWenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NBenoît Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
When reopening with different flags, or when backing files disappear from the chain, the limits may change. Make sure they get updated in these cases. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NWenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NBenoît Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
When there is a format driver between the backend, it's not guaranteed that exposing the opt_transfer_length for the format driver results in the optimal requests (because of fragmentation etc.), but it can't make things worse, so let's just do it. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NWenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NBenoît Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
This function separates filling the BlockLimits from bdrv_open(), which allows it to call it from other operations which may change the limits (e.g. modifications to the backing file chain or bdrv_reopen) Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
-