[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] f18793: compiler: add a sizeof_field() macro
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] f18793: compiler: add a sizeof_field() macro |
Date: |
Thu, 28 Jun 2018 09:35:51 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: f18793b096e69c7acfce66cded483ba9fc01762a
https://github.com/qemu/qemu/commit/f18793b096e69c7acfce66cded483ba9fc01762a
Author: Stefan Hajnoczi <address@hidden>
Date: 2018-06-27 (Wed, 27 Jun 2018)
Changed paths:
M accel/tcg/translate-all.c
M hw/display/xenfb.c
M hw/net/rocker/rocker_of_dpa.c
M hw/net/virtio-net.c
M include/hw/xen/io/ring.h
M include/qemu/compiler.h
M target/i386/kvm.c
M target/ppc/arch_dump.c
M target/s390x/arch_dump.c
Log Message:
-----------
compiler: add a sizeof_field() macro
Determining the size of a field is useful when you don't have a struct
variable handy. Open-coding this is ugly.
This patch adds the sizeof_field() macro, which is similar to
typeof_field(). Existing instances are updated to use the macro.
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: John Snow <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Commit: ed6e2161715c527330f936d44af4c547f25f687e
https://github.com/qemu/qemu/commit/ed6e2161715c527330f936d44af4c547f25f687e
Author: Nishanth Aravamudan <address@hidden>
Date: 2018-06-27 (Wed, 27 Jun 2018)
Changed paths:
M block/file-posix.c
M block/linux-aio.c
M include/block/aio.h
M include/block/raw-aio.h
M stubs/linux-aio.c
M util/async.c
Log Message:
-----------
linux-aio: properly bubble up errors from initialization
laio_init() can fail for a couple of reasons, which will lead to a NULL
pointer dereference in laio_attach_aio_context().
To solve this, add a aio_setup_linux_aio() function which is called
early in raw_open_common. If this fails, propagate the error up. The
signature of aio_get_linux_aio() was not modified, because it seems
preferable to return the actual errno from the possible failing
initialization calls.
Additionally, when the AioContext changes, we need to associate a
LinuxAioState with the new AioContext. Use the bdrv_attach_aio_context
callback and call the new aio_setup_linux_aio(), which will allocate a
new AioContext if needed, and return errors on failures. If it fails for
any reason, fallback to threaded AIO with an error message, as the
device is already in-use by the guest.
Add an assert that aio_get_linux_aio() cannot return NULL.
Signed-off-by: Nishanth Aravamudan <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Commit: 7106a87d96c58a2ad7a4669781e58b22a3081004
https://github.com/qemu/qemu/commit/7106a87d96c58a2ad7a4669781e58b22a3081004
Author: Peter Maydell <address@hidden>
Date: 2018-06-28 (Thu, 28 Jun 2018)
Changed paths:
M accel/tcg/translate-all.c
M block/file-posix.c
M block/linux-aio.c
M hw/display/xenfb.c
M hw/net/rocker/rocker_of_dpa.c
M hw/net/virtio-net.c
M include/block/aio.h
M include/block/raw-aio.h
M include/hw/xen/io/ring.h
M include/qemu/compiler.h
M stubs/linux-aio.c
M target/i386/kvm.c
M target/ppc/arch_dump.c
M target/s390x/arch_dump.c
M util/async.c
Log Message:
-----------
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into
staging
Pull request
* Gracefully handle Linux AIO init failure
# gpg: Signature made Wed 27 Jun 2018 15:48:28 BST
# gpg: using RSA key 9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <address@hidden>"
# gpg: aka "Stefan Hajnoczi <address@hidden>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/block-pull-request:
linux-aio: properly bubble up errors from initialization
compiler: add a sizeof_field() macro
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/4a83bf2f339d...7106a87d96c5
**NOTE:** This service been marked for deprecation:
https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] f18793: compiler: add a sizeof_field() macro,
GitHub <=