]> xenbits.xensource.com Git - qemu-xen.git/commit
target/i386: Fix tss access size in switch_tss_ra
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 19 Aug 2024 07:39:55 +0000 (17:39 +1000)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 20 Aug 2024 23:11:26 +0000 (09:11 +1000)
commitded1db48c9f9b35f6d9569e53503e2b345f6d44e
tree83fc56b4e8bd61b1e69492a9c5ecdbd946826e83
parent83a3a20e59fa4b1add714bb4062af0d144b67ab7
target/i386: Fix tss access size in switch_tss_ra

The two limit_max variables represent size - 1, just like the
encoding in the GDT, thus the 'old' access was off by one.
Access the minimal size of the new tss: the complete tss contains
the iopb, which may be a larger block than the access api expects,
and irrelevant because the iopb is not accessed during the
switch itself.

Fixes: 8b131065080a ("target/i386/tcg: use X86Access for TSS access")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2511
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240819074052.207783-1-richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
target/i386/tcg/seg_helper.c