On 2/24/26 00:39, Mohamed Mediouni wrote:
Signed-off-by: Mohamed Mediouni <[email protected]> --- target/i386/whpx/whpx-all.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index 561a48206c..0259782a82 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -1506,6 +1506,26 @@ static void whpx_vcpu_process_async_events(CPUState *cpu) } }+static void whpx_inject_exceptions(CPUState* cpu)+{ + X86CPU *x86_cpu = X86_CPU(cpu); + CPUX86State *env = &x86_cpu->env; + + if (env->exception_injected) { + env->exception_injected = 0; + WHV_REGISTER_VALUE reg = {}; + reg.ExceptionEvent.EventPending = 1; + reg.ExceptionEvent.EventType = WHvX64PendingEventException; + reg.ExceptionEvent.DeliverErrorCode = 1;
I can't find very good documentation of the WHPX API, but does this need to be limited to: 1) #DF/#TS/#NP/#SS/#GP/#PF/#AC vectors; 2) CR0.PE=1?
Thanks, Paolo
