summary refs log tree commit diff stats
path: root/hw/misc/pvpanic.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-01-29 12:15:15 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2017-02-16 14:06:56 +0100
commita70fe14b7dddcb944fbd6c9f3739cd3a22089af5 (patch)
tree37ff276d712d82f5e8c46d72cd181c9bd906ecfc /hw/misc/pvpanic.c
parent43d70ddf9f96b3ad037abe4d5f9f2768196b8c92 (diff)
downloadfocaccia-qemu-a70fe14b7dddcb944fbd6c9f3739cd3a22089af5.tar.gz
focaccia-qemu-a70fe14b7dddcb944fbd6c9f3739cd3a22089af5.zip
cpu-exec: tighten barrier on TCG_EXIT_REQUESTED
This seems to have worked just fine so far on weakly-ordered
architectures, but I don't see anything that prevents the
reordering from:

    store 1 to exit_request
    store 1 to tcg_exit_req
                                 load tcg_exit_req
                                 store 0 to tcg_exit_req
                                 load exit_request
                                 store 0 to exit_request
    store 1 to exit_request
    store 1 to tcg_exit_req

to this:

    store 1 to exit_request
    store 1 to tcg_exit_req
                                 load tcg_exit_req
                                 load exit_request
    store 1 to exit_request
    store 1 to tcg_exit_req
                                 store 0 to tcg_exit_req
                                 store 0 to exit_request

therefore losing a request.  It's possible that other memory barriers
(e.g. in rcu_read_unlock) are hiding it, but better safe than
sorry.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/misc/pvpanic.c')
0 files changed, 0 insertions, 0 deletions