Re: [PATCH 08/11] target/i386: fix INHIBIT_IRQ/TF/RF handling for PAUSE

2024-06-04 Thread Richard Henderson
On 6/4/24 09:10, Paolo Bonzini wrote: On Tue, Jun 4, 2024 at 3:49 PM Richard Henderson wrote: Oh, based on the next patch, it would appear that PAUSE does not single-step properly because it sets EXCP_INTERRUPT, and end-of-insn single-step depends on exception_index == -1. I'm thinking of

Re: [PATCH 08/11] target/i386: fix INHIBIT_IRQ/TF/RF handling for PAUSE

2024-06-04 Thread Paolo Bonzini
On Tue, Jun 4, 2024 at 3:49 PM Richard Henderson wrote: > Oh, based on the next patch, it would appear that PAUSE does not single-step > properly > because it sets EXCP_INTERRUPT, and end-of-insn single-step depends on > exception_index == > -1. I'm thinking of the bottom of cpu_tb_exec().

Re: [PATCH 08/11] target/i386: fix INHIBIT_IRQ/TF/RF handling for PAUSE

2024-06-04 Thread Richard Henderson
On 6/4/24 08:44, Richard Henderson wrote: On 6/4/24 02:18, Paolo Bonzini wrote: PAUSE uses DISAS_NORETURN because the corresponding helper calls cpu_loop_exit().  However, while HLT clear HF_INHIBIT_IRQ_MASK to correctly handle "STI; HLT", the same is missing from PAUSE. And also gen_eob()

Re: [PATCH 08/11] target/i386: fix INHIBIT_IRQ/TF/RF handling for PAUSE

2024-06-04 Thread Richard Henderson
On 6/4/24 02:18, Paolo Bonzini wrote: PAUSE uses DISAS_NORETURN because the corresponding helper calls cpu_loop_exit(). However, while HLT clear HF_INHIBIT_IRQ_MASK to correctly handle "STI; HLT", the same is missing from PAUSE. And also gen_eob() clears HF_RF_MASK and synthesizes a #DB

[PATCH 08/11] target/i386: fix INHIBIT_IRQ/TF/RF handling for PAUSE

2024-06-04 Thread Paolo Bonzini
PAUSE uses DISAS_NORETURN because the corresponding helper calls cpu_loop_exit(). However, while HLT clear HF_INHIBIT_IRQ_MASK to correctly handle "STI; HLT", the same is missing from PAUSE. And also gen_eob() clears HF_RF_MASK and synthesizes a #DB exception if single-step is active; none of