From: Thomas Huth <thuth@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PULL 10/16] target/i386: implement TSS trap bit
Date: Wed, 10 Sep 2025 07:50:13 +0200 [thread overview]
Message-ID: <23d92164-5f1c-4905-a2c9-12ae2db580f5@redhat.com> (raw)
In-Reply-To: <20250512190524.179419-11-pbonzini@redhat.com>
On 12/05/2025 21.05, Paolo Bonzini wrote:
> Now that we can do so after the error code has been pushed, raising
> the #DB exception for task-switch traps is trivial.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> target/i386/tcg/seg_helper.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/target/i386/tcg/seg_helper.c b/target/i386/tcg/seg_helper.c
> index cb90ccd2adc..071f3fbd83d 100644
> --- a/target/i386/tcg/seg_helper.c
> +++ b/target/i386/tcg/seg_helper.c
> @@ -473,10 +473,6 @@ static void switch_tss_ra(CPUX86State *env, int tss_selector,
> new_segs[R_GS] = 0;
> new_trap = 0;
> }
> - /* XXX: avoid a compiler warning, see
> - http://support.amd.com/us/Processor_TechDocs/24593.pdf
> - chapters 12.2.5 and 13.2.4 on how to implement TSS Trap bit */
> - (void)new_trap;
>
> /* clear busy bit (it is restartable) */
> if (source == SWITCH_TSS_JMP || source == SWITCH_TSS_IRET) {
> @@ -622,6 +618,11 @@ static void switch_tss_ra(CPUX86State *env, int tss_selector,
> }
> SET_ESP(sa.sp, sa.sp_mask);
> }
> +
> + if (new_trap) {
> + env->dr[6] |= DR6_BT;
> + raise_exception_ra(env, EXCP01_DB, retaddr);
> + }
> }
Hi Paolo,
as already quickly mentioned in IRC, the kvm-unit-tests CI had a regression
after homebrew updated its QEMU from 10.0 to 10.1, the "eventinj" and the
"taskwitch" test started failing:
10.0: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/jobs/10871048973
10.1: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/jobs/11282832498
I've now bisected the problem (painfully in the terminal window of the
cirrus-ci), and it seems to be this commit here that is causing the issue:
ad441b8b7913a26b18edbc076c74ca0cdbfa4ee5 is the first bad commit
commit ad441b8b7913a26b18edbc076c74ca0cdbfa4ee5
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: Wed Aug 14 12:33:02 2024 +0200
target/i386: implement TSS trap bit
Could you please have a look?
Thanks,
Thomas
next prev parent reply other threads:[~2025-09-10 5:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 19:05 [PULL 00/16] Meson, x86, Rust patches for 2025-05-12 Paolo Bonzini
2025-05-12 19:05 ` [PULL 01/16] meson: drop --enable-avx* options Paolo Bonzini
2025-05-12 19:05 ` [PULL 02/16] meson: do not check supported TCG architecture if no emulators built Paolo Bonzini
2025-05-12 19:05 ` [PULL 03/16] meson: remove unnecessary dependencies from specific_ss Paolo Bonzini
2025-05-12 19:05 ` [PULL 04/16] modinfo: lookup compile_commands.json by object Paolo Bonzini
2025-05-12 19:05 ` [PULL 05/16] rust: pl011: Rename RX FIFO methods Paolo Bonzini
2025-05-12 19:05 ` [PULL 06/16] rust: pl011: Really use RX FIFO depth Paolo Bonzini
2025-05-12 19:05 ` [PULL 07/16] target/i386: ignore misplaced REX prefixes Paolo Bonzini
2025-05-12 19:05 ` [PULL 08/16] target/i386: list TCG-supported features for CPUID[80000021h].EAX Paolo Bonzini
2025-05-12 19:05 ` [PULL 09/16] target/i386: move push of error code to switch_tss_ra Paolo Bonzini
2025-05-12 19:05 ` [PULL 10/16] target/i386: implement TSS trap bit Paolo Bonzini
2025-09-10 5:50 ` Thomas Huth [this message]
2025-09-10 8:01 ` Mark Cave-Ayland
2025-09-10 9:07 ` Thomas Huth
2025-05-12 19:05 ` [PULL 11/16] target/i386/emulate: stop overloading decode->op[N].ptr Paolo Bonzini
2025-05-12 19:05 ` [PULL 12/16] target/i386/emulate: mostly rewrite flags handling Paolo Bonzini
2025-05-12 19:05 ` [PULL 13/16] target/i386: remove lflags Paolo Bonzini
2025-05-12 19:05 ` [PULL 14/16] linux-headers: update from 6.15 + kvm/next Paolo Bonzini
2025-05-12 19:05 ` [PULL 15/16] hw/audio/cs4231a: fix assertion error in isa_bus_get_irq Paolo Bonzini
2025-05-12 19:05 ` [PULL 16/16] target/i386: Make ITS_NO available to guests Paolo Bonzini
2025-05-14 13:18 ` [PULL 00/16] Meson, x86, Rust patches for 2025-05-12 Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=23d92164-5f1c-4905-a2c9-12ae2db580f5@redhat.com \
--to=thuth@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).