Skip to content
  • Peter Maydell's avatar
    27266271
    exec.c: Factor out before/after actions for notdirty memory writes · 27266271
    Peter Maydell authored
    
    
    The function notdirty_mem_write() has a sequence of actions
    it has to do before and after the actual business of writing
    data to host RAM to ensure that dirty flags are correctly
    updated and we flush any TCG translations for the region.
    We need to do this also in other places that write directly
    to host RAM, most notably the TCG atomic helper functions.
    Pull out the before and after pieces into their own functions.
    
    We use an API where the prepare function stashes the various
    bits of information about the write into a struct for the
    complete function to use, because in the calls for the atomic
    helpers the place where the complete function will be called
    doesn't have the information to hand.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Message-id: 1511201308-23580-2-git-send-email-peter.maydell@linaro.org
    27266271
    exec.c: Factor out before/after actions for notdirty memory writes
    Peter Maydell authored
    
    
    The function notdirty_mem_write() has a sequence of actions
    it has to do before and after the actual business of writing
    data to host RAM to ensure that dirty flags are correctly
    updated and we flush any TCG translations for the region.
    We need to do this also in other places that write directly
    to host RAM, most notably the TCG atomic helper functions.
    Pull out the before and after pieces into their own functions.
    
    We use an API where the prepare function stashes the various
    bits of information about the write into a struct for the
    complete function to use, because in the calls for the atomic
    helpers the place where the complete function will be called
    doesn't have the information to hand.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Message-id: 1511201308-23580-2-git-send-email-peter.maydell@linaro.org
Loading