diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2020-09-24 18:48:45 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2020-09-24 18:48:45 +0100 |
| commit | 8c1c07929feae876202ba26f07a540c5115c18cd (patch) | |
| tree | 20f6c8e2ac556bfb3c88a98c0d0cb2689de0263e /hw/hyperv/hyperv.c | |
| parent | 1bd5556f6686365e76f7ff67fe67260c449e8345 (diff) | |
| parent | d73415a315471ac0b127ed3fad45c8ec5d711de1 (diff) | |
| download | focaccia-qemu-8c1c07929feae876202ba26f07a540c5115c18cd.tar.gz focaccia-qemu-8c1c07929feae876202ba26f07a540c5115c18cd.zip | |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Pull request This includes the atomic_ -> qatomic_ rename that touches many files and is prone to conflicts. # gpg: Signature made Wed 23 Sep 2020 17:08:43 BST # gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full] # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full] # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: qemu/atomic.h: rename atomic_ to qatomic_ tests: add test-fdmon-epoll fdmon-poll: reset npfd when upgrading to fdmon-epoll gitmodules: add qemu.org vbootrom submodule gitmodules: switch to qemu.org meson mirror gitmodules: switch to qemu.org qboot mirror docs/system: clarify deprecation schedule virtio-crypto: don't modify elem->in/out_sg virtio-blk: undo destructive iov_discard_*() operations util/iov: add iov_discard_undo() virtio: add vhost-user-fs-ccw device libvhost-user: handle endianness as mandated by the spec MAINTAINERS: add Stefan Hajnoczi as block/nvme.c maintainer Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/hyperv/hyperv.c')
| -rw-r--r-- | hw/hyperv/hyperv.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index 4b26db1365..cb1074f234 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv/hyperv.c @@ -231,7 +231,7 @@ static void sint_msg_bh(void *opaque) HvSintRoute *sint_route = opaque; HvSintStagedMessage *staged_msg = sint_route->staged_msg; - if (atomic_read(&staged_msg->state) != HV_STAGED_MSG_POSTED) { + if (qatomic_read(&staged_msg->state) != HV_STAGED_MSG_POSTED) { /* status nor ready yet (spurious ack from guest?), ignore */ return; } @@ -240,7 +240,7 @@ static void sint_msg_bh(void *opaque) staged_msg->status = 0; /* staged message processing finished, ready to start over */ - atomic_set(&staged_msg->state, HV_STAGED_MSG_FREE); + qatomic_set(&staged_msg->state, HV_STAGED_MSG_FREE); /* drop the reference taken in hyperv_post_msg */ hyperv_sint_route_unref(sint_route); } @@ -278,7 +278,7 @@ static void cpu_post_msg(CPUState *cs, run_on_cpu_data data) memory_region_set_dirty(&synic->msg_page_mr, 0, sizeof(*synic->msg_page)); posted: - atomic_set(&staged_msg->state, HV_STAGED_MSG_POSTED); + qatomic_set(&staged_msg->state, HV_STAGED_MSG_POSTED); /* * Notify the msg originator of the progress made; if the slot was busy we * set msg_pending flag in it so it will be the guest who will do EOM and @@ -301,7 +301,7 @@ int hyperv_post_msg(HvSintRoute *sint_route, struct hyperv_message *src_msg) assert(staged_msg); /* grab the staging area */ - if (atomic_cmpxchg(&staged_msg->state, HV_STAGED_MSG_FREE, + if (qatomic_cmpxchg(&staged_msg->state, HV_STAGED_MSG_FREE, HV_STAGED_MSG_BUSY) != HV_STAGED_MSG_FREE) { return -EAGAIN; } @@ -351,7 +351,7 @@ int hyperv_set_event_flag(HvSintRoute *sint_route, unsigned eventno) set_mask = BIT_MASK(eventno); flags = synic->event_page->slot[sint_route->sint].flags; - if ((atomic_fetch_or(&flags[set_idx], set_mask) & set_mask) != set_mask) { + if ((qatomic_fetch_or(&flags[set_idx], set_mask) & set_mask) != set_mask) { memory_region_set_dirty(&synic->event_page_mr, 0, sizeof(*synic->event_page)); ret = hyperv_sint_route_set_sint(sint_route); |