Skip to content
Snippets Groups Projects
  • Pranith Kumar's avatar
    b32dc337
    tcg: Implement implicit ordering semantics · b32dc337
    Pranith Kumar authored
    
    Currently, we cannot use mttcg for running strong memory model guests
    on weak memory model hosts due to missing ordering semantics.
    
    We implicitly generate fence instructions for stronger guests if an
    ordering mismatch is detected. We generate fences only for the orders
    for which fence instructions are necessary, for example a fence is not
    necessary between a store and a subsequent load on x86 since its
    absence in the guest binary tells that ordering need not be
    ensured. Also note that if we find multiple subsequent fence
    instructions in the generated IR, we combine them in the TCG
    optimization pass.
    
    This patch allows us to boot an x86 guest on ARM64 hosts using mttcg.
    
    Signed-off-by: default avatarPranith Kumar <bobby.prani@gmail.com>
    Message-Id: <20170829063313.10237-4-bobby.prani@gmail.com>
    Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    b32dc337
    History
    tcg: Implement implicit ordering semantics
    Pranith Kumar authored
    
    Currently, we cannot use mttcg for running strong memory model guests
    on weak memory model hosts due to missing ordering semantics.
    
    We implicitly generate fence instructions for stronger guests if an
    ordering mismatch is detected. We generate fences only for the orders
    for which fence instructions are necessary, for example a fence is not
    necessary between a store and a subsequent load on x86 since its
    absence in the guest binary tells that ordering need not be
    ensured. Also note that if we find multiple subsequent fence
    instructions in the generated IR, we combine them in the TCG
    optimization pass.
    
    This patch allows us to boot an x86 guest on ARM64 hosts using mttcg.
    
    Signed-off-by: default avatarPranith Kumar <bobby.prani@gmail.com>
    Message-Id: <20170829063313.10237-4-bobby.prani@gmail.com>
    Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>