]> git.ipfire.org Git - thirdparty/qemu.git/commit
i386: Emit correct error code for 64-bit IDT entry
authorJoe Richey <joerichey@google.com>
Sun, 25 Dec 2022 00:16:04 +0000 (16:16 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 11 Jan 2023 08:59:38 +0000 (09:59 +0100)
commitb585edca34a817fdb751dfe94fbd3cde32ffe60d
tree6b154790e20b49c6f1aeed2e7aa427965e3a4c5f
parentacedc9a660f83b362a1dec4b699e85d5dd82a067
i386: Emit correct error code for 64-bit IDT entry

When in 64-bit mode, IDT entiries are 16 bytes, so `intno * 16` is used
for base/limit/offset calculations. However, even in 64-bit mode, the
exception error code still uses bits [3,16) for the invlaid interrupt
index.

This means the error code should still be `intno * 8 + 2` even in 64-bit
mode.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1382
Signed-off-by: Joe Richey <joerichey@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/tcg/seg_helper.c