diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2024-06-17 09:12:10 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-07-16 18:18:24 +0200 |
commit | 059368bcf589f4c6cba860516f57cec0b51c1fa1 (patch) | |
tree | 08e7354d53c49b47b72d1541ec52b801614be07b /target/i386/kvm/hyperv-proto.h | |
parent | 312ef3243e3bae07e49314efb2854f6f17080ec5 (diff) |
target/i386/tcg: Reorg push/pop within seg_helper.c
Interrupts and call gates should use accesses with the DPL as
the privilege level. While computing the applicable MMU index
is easy, the harder thing is how to plumb it in the code.
One possibility could be to add a single argument to the PUSH* macros
for the privilege level, but this is repetitive and risks confusion
between the involved privilege levels.
Another possibility is to pass both CPL and DPL, and adjusting both
PUSH* and POP* to use specific privilege levels (instead of using
cpu_{ld,st}*_data). This makes the code more symmetric.
However, a more complicated but much nicer approach is to use a structure
to contain the stack parameters, env, unwind return address, and rewrite
the macros into functions. The struct provides an easy home for the MMU
index as well.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Link: https://lore.kernel.org/r/20240617161210.4639-4-richard.henderson@linaro.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/kvm/hyperv-proto.h')
0 files changed, 0 insertions, 0 deletions