Skip to contentSkip to conversation

target/i386: Report TPR accesses to HVF

RFC PATCH In review Philippe Mathieu-Daudé 2 participants 4 messages Jun 16, 2025 – Apr 22

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 target/i386: Report TPR accesses to HVF

HVF should be able to handle task priority register accesses.

Cc Sergio Andres Gomez Del Real <[email protected]>

---
RFC: Untested as I don't have access to such setup, noticed during code review.

---
 target/i386/helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/i386/helper.c +1 -1
index e0aaed3c4c4..a0555e74cc6 100644
@@ -549,7 +549,7 @@ void cpu_report_tpr_access(CPUX86State *env, TPRAccess access)
     X86CPU *cpu = env_archcpu(env);
     CPUState *cs = env_cpu(env);
 
-    if (kvm_enabled() || whpx_enabled() || nvmm_enabled()) {
+    if (kvm_enabled() || whpx_enabled() || nvmm_enabled() || hvf_enabled()) {
         env->tpr_access_type = access;
 
         cpu_interrupt(cs, CPU_INTERRUPT_TPR);
Signature · 1 line
2.49.0
#1 lore raw

Ping?

Quoted 24 lines · Philippe Mathieu-Daudé

HVF should be able to handle task priority register accesses.

Cc Sergio Andres Gomez Del Real <[email protected]>

---
RFC: Untested as I don't have access to such setup, noticed during code review.

---
  target/i386/helper.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
target/i386/helper.c +1 -1
index e0aaed3c4c4..a0555e74cc6 100644
@@ -549,7 +549,7 @@ void cpu_report_tpr_access(CPUX86State *env, TPRAccess access)
      X86CPU *cpu = env_archcpu(env);
      CPUState *cs = env_cpu(env);
 
-    if (kvm_enabled() || whpx_enabled() || nvmm_enabled()) {
+    if (kvm_enabled() || whpx_enabled() || nvmm_enabled() || hvf_enabled()) {
          env->tpr_access_type = access;
 
          cpu_interrupt(cs, CPU_INTERRUPT_TPR);
Reviewed-by on v1 1/1
#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 7 lines · Philippe Mathieu-Daudé

Date: Mon, 16 Jun 2025 11:06:32 +0200
From: Philippe Mathieu-Daudé <[email protected]>
Subject: [RFC PATCH] target/i386: Report TPR accesses to HVF
X-Mailer: git-send-email 2.49.0

HVF should be able to handle task priority register accesses.

Quoted 8 lines
Cc Sergio Andres Gomez Del Real <[email protected]>

---
RFC: Untested as I don't have access to such setup, noticed during code review.

---
 target/i386/helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Untested too. But code looks fine for me,

#3 lore raw
Quoted 17 lines · Zhao Liu
Quoted 7 lines · Philippe Mathieu-Daudé

Date: Mon, 16 Jun 2025 11:06:32 +0200
From: Philippe Mathieu-Daudé <[email protected]>
Subject: [RFC PATCH] target/i386: Report TPR accesses to HVF
X-Mailer: git-send-email 2.49.0

HVF should be able to handle task priority register accesses.

Quoted 8 lines
Cc Sergio Andres Gomez Del Real <[email protected]>

---
RFC: Untested as I don't have access to such setup, noticed during code review.

---
  target/i386/helper.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines

Untested too. But code looks fine for me,

Thanks Zhao!