Skip to contentSkip to conversation

target/i386: Include 'hw/i386/apic.h' locally

PATCH Applied Philippe Mathieu-Daudé 3 participants 9 messages Sep 2, 2021 – Sep 29, 2021 KVM

v1 of 3 Applied Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/i386: Include 'hw/i386/apic.h' locally

Instead of including a sysemu-specific header in "cpu.h" (which is shared with user-mode emulations), include it locally when required.

---
Based-on: <[email protected]> "accel/tcg: Restrict TCGCPUOps::cpu_exec_interrupt() to sysemu"

---
 target/i386/cpu.h                    | 4 ----
 hw/i386/kvmvapic.c                   | 1 +
 hw/i386/x86.c                        | 1 +
 target/i386/cpu-sysemu.c             | 1 +
 target/i386/cpu.c                    | 1 +
 target/i386/gdbstub.c                | 4 ++++
 target/i386/hax/hax-all.c            | 1 +
 target/i386/helper.c                 | 1 +
 target/i386/hvf/x86_emu.c            | 1 +
 target/i386/nvmm/nvmm-all.c          | 1 +
 target/i386/tcg/seg_helper.c         | 4 ++++
 target/i386/tcg/sysemu/misc_helper.c | 1 +
 target/i386/whpx/whpx-all.c          | 1 +
 13 files changed, 18 insertions(+), 4 deletions(-)
target/i386/cpu.h +0 -4
index c7cc65e92d5..eddafd1acd5 100644
@@ -2046,10 +2046,6 @@ typedef X86CPU ArchCPU;
 #include "exec/cpu-all.h"
 #include "svm.h"
 
-#if !defined(CONFIG_USER_ONLY)
-#include "hw/i386/apic.h"
-#endif
-
 static inline void cpu_get_tb_cpu_state(CPUX86State *env, target_ulong *pc,
                                         target_ulong *cs_base, uint32_t *flags)
 {
hw/i386/kvmvapic.c +1 -0
index 43f8a8f679e..7333818bdd1 100644
@@ -16,6 +16,7 @@
 #include "sysemu/hw_accel.h"
 #include "sysemu/kvm.h"
 #include "sysemu/runstate.h"
+#include "hw/i386/apic.h"
 #include "hw/i386/apic_internal.h"
 #include "hw/sysbus.h"
 #include "hw/boards.h"
hw/i386/x86.c +1 -0
index 00448ed55aa..e0218f8791f 100644
@@ -43,6 +43,7 @@
 #include "target/i386/cpu.h"
 #include "hw/i386/topology.h"
 #include "hw/i386/fw_cfg.h"
+#include "hw/i386/apic.h"
 #include "hw/intc/i8259.h"
 #include "hw/rtc/mc146818rtc.h"
 
target/i386/cpu-sysemu.c +1 -0
index 1078e3d157f..65709e41903 100644
@@ -30,6 +30,7 @@
 #include "hw/qdev-properties.h"
 
 #include "exec/address-spaces.h"
+#include "hw/i386/apic.h"
 #include "hw/i386/apic_internal.h"
 
 #include "cpu-internal.h"
target/i386/cpu.c +1 -0
index 97e250e8760..04f59043804 100644
@@ -33,6 +33,7 @@
 #include "standard-headers/asm-x86/kvm_para.h"
 #include "hw/qdev-properties.h"
 #include "hw/i386/topology.h"
+#include "hw/i386/apic.h"
 #ifndef CONFIG_USER_ONLY
 #include "exec/address-spaces.h"
 #include "hw/boards.h"
target/i386/gdbstub.c +4 -0
index 098a2ad15a9..5438229c1a9 100644
@@ -21,6 +21,10 @@
 #include "cpu.h"
 #include "exec/gdbstub.h"
 
+#ifndef CONFIG_USER_ONLY
+#include "hw/i386/apic.h"
+#endif
+
 #ifdef TARGET_X86_64
 static const int gpr_map[16] = {
     R_EAX, R_EBX, R_ECX, R_EDX, R_ESI, R_EDI, R_EBP, R_ESP,
target/i386/hax/hax-all.c +1 -0
index bf65ed6fa92..cd89e3233a9 100644
@@ -32,6 +32,7 @@
 #include "sysemu/reset.h"
 #include "sysemu/runstate.h"
 #include "hw/boards.h"
+#include "hw/i386/apic.h"
 
 #include "hax-accel-ops.h"
 
target/i386/helper.c +1 -0
index 533b29cb91b..874beda98ae 100644
@@ -26,6 +26,7 @@
 #ifndef CONFIG_USER_ONLY
 #include "sysemu/hw_accel.h"
 #include "monitor/monitor.h"
+#include "hw/i386/apic.h"
 #endif
 
 void cpu_sync_bndcs_hflags(CPUX86State *env)
target/i386/hvf/x86_emu.c +1 -0
index 7c8203b21fb..fb3e88959d4 100644
@@ -45,6 +45,7 @@
 #include "x86_flags.h"
 #include "vmcs.h"
 #include "vmx.h"
+#include "hw/i386/apic.h"
 
 void hvf_handle_io(struct CPUState *cpu, uint16_t port, void *data,
                    int direction, int size, uint32_t count);
target/i386/nvmm/nvmm-all.c +1 -0
index 28dee4c5ee3..4c07cfc7194 100644
@@ -22,6 +22,7 @@
 #include "qemu/queue.h"
 #include "migration/blocker.h"
 #include "strings.h"
+#include "hw/i386/apic.h"
 
 #include "nvmm-accel-ops.h"
 
target/i386/tcg/seg_helper.c +4 -0
index 13c6e6ee62e..71fd2bf8d06 100644
@@ -28,6 +28,10 @@
 #include "helper-tcg.h"
 #include "seg_helper.h"
 
+#ifndef CONFIG_USER_ONLY
+#include "hw/i386/apic.h"
+#endif
+
 /* return non zero if error */
 static inline int load_segment_ra(CPUX86State *env, uint32_t *e1_ptr,
                                uint32_t *e2_ptr, int selector,
target/i386/tcg/sysemu/misc_helper.c +1 -0
index e7a2ebde813..dbeda8d0b0f 100644
@@ -24,6 +24,7 @@
 #include "exec/cpu_ldst.h"
 #include "exec/address-spaces.h"
 #include "tcg/helper-tcg.h"
+#include "hw/i386/apic.h"
 
 void helper_outb(CPUX86State *env, uint32_t port, uint32_t data)
 {
target/i386/whpx/whpx-all.c +1 -0
index 3e925b9da70..9ab844fd05d 100644
@@ -20,6 +20,7 @@
 #include "qemu/main-loop.h"
 #include "hw/boards.h"
 #include "hw/i386/ioapic.h"
+#include "hw/i386/apic.h"
 #include "hw/i386/apic_internal.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
Signature · 1 line
2.31.1
#1 lore raw
Quoted 6 lines · Philippe Mathieu-Daudé

Instead of including a sysemu-specific header in "cpu.h" (which is shared with user-mode emulations), include it locally when required.

---

Ping?

Quoted 182 lines
---
 target/i386/cpu.h                    | 4 ----
 hw/i386/kvmvapic.c                   | 1 +
 hw/i386/x86.c                        | 1 +
 target/i386/cpu-sysemu.c             | 1 +
 target/i386/cpu.c                    | 1 +
 target/i386/gdbstub.c                | 4 ++++
 target/i386/hax/hax-all.c            | 1 +
 target/i386/helper.c                 | 1 +
 target/i386/hvf/x86_emu.c            | 1 +
 target/i386/nvmm/nvmm-all.c          | 1 +
 target/i386/tcg/seg_helper.c         | 4 ++++
 target/i386/tcg/sysemu/misc_helper.c | 1 +
 target/i386/whpx/whpx-all.c          | 1 +
 13 files changed, 18 insertions(+), 4 deletions(-)
target/i386/cpu.h +0 -4
index c7cc65e92d5..eddafd1acd5 100644
@@ -2046,10 +2046,6 @@ typedef X86CPU ArchCPU;
 #include "exec/cpu-all.h"
 #include "svm.h"
 
-#if !defined(CONFIG_USER_ONLY)
-#include "hw/i386/apic.h"
-#endif
-
 static inline void cpu_get_tb_cpu_state(CPUX86State *env, target_ulong *pc,
                                         target_ulong *cs_base, uint32_t *flags)
 {
hw/i386/kvmvapic.c +1 -0
index 43f8a8f679e..7333818bdd1 100644
@@ -16,6 +16,7 @@
 #include "sysemu/hw_accel.h"
 #include "sysemu/kvm.h"
 #include "sysemu/runstate.h"
+#include "hw/i386/apic.h"
 #include "hw/i386/apic_internal.h"
 #include "hw/sysbus.h"
 #include "hw/boards.h"
hw/i386/x86.c +1 -0
index 00448ed55aa..e0218f8791f 100644
@@ -43,6 +43,7 @@
 #include "target/i386/cpu.h"
 #include "hw/i386/topology.h"
 #include "hw/i386/fw_cfg.h"
+#include "hw/i386/apic.h"
 #include "hw/intc/i8259.h"
 #include "hw/rtc/mc146818rtc.h"
 
target/i386/cpu-sysemu.c +1 -0
index 1078e3d157f..65709e41903 100644
@@ -30,6 +30,7 @@
 #include "hw/qdev-properties.h"
 
 #include "exec/address-spaces.h"
+#include "hw/i386/apic.h"
 #include "hw/i386/apic_internal.h"
 
 #include "cpu-internal.h"
target/i386/cpu.c +1 -0
index 97e250e8760..04f59043804 100644
@@ -33,6 +33,7 @@
 #include "standard-headers/asm-x86/kvm_para.h"
 #include "hw/qdev-properties.h"
 #include "hw/i386/topology.h"
+#include "hw/i386/apic.h"
 #ifndef CONFIG_USER_ONLY
 #include "exec/address-spaces.h"
 #include "hw/boards.h"
target/i386/gdbstub.c +4 -0
index 098a2ad15a9..5438229c1a9 100644
@@ -21,6 +21,10 @@
 #include "cpu.h"
 #include "exec/gdbstub.h"
 
+#ifndef CONFIG_USER_ONLY
+#include "hw/i386/apic.h"
+#endif
+
 #ifdef TARGET_X86_64
 static const int gpr_map[16] = {
     R_EAX, R_EBX, R_ECX, R_EDX, R_ESI, R_EDI, R_EBP, R_ESP,
target/i386/hax/hax-all.c +1 -0
index bf65ed6fa92..cd89e3233a9 100644
@@ -32,6 +32,7 @@
 #include "sysemu/reset.h"
 #include "sysemu/runstate.h"
 #include "hw/boards.h"
+#include "hw/i386/apic.h"
 
 #include "hax-accel-ops.h"
 
target/i386/helper.c +1 -0
index 533b29cb91b..874beda98ae 100644
@@ -26,6 +26,7 @@
 #ifndef CONFIG_USER_ONLY
 #include "sysemu/hw_accel.h"
 #include "monitor/monitor.h"
+#include "hw/i386/apic.h"
 #endif
 
 void cpu_sync_bndcs_hflags(CPUX86State *env)
target/i386/hvf/x86_emu.c +1 -0
index 7c8203b21fb..fb3e88959d4 100644
@@ -45,6 +45,7 @@
 #include "x86_flags.h"
 #include "vmcs.h"
 #include "vmx.h"
+#include "hw/i386/apic.h"
 
 void hvf_handle_io(struct CPUState *cpu, uint16_t port, void *data,
                    int direction, int size, uint32_t count);
target/i386/nvmm/nvmm-all.c +1 -0
index 28dee4c5ee3..4c07cfc7194 100644
@@ -22,6 +22,7 @@
 #include "qemu/queue.h"
 #include "migration/blocker.h"
 #include "strings.h"
+#include "hw/i386/apic.h"
 
 #include "nvmm-accel-ops.h"
 
target/i386/tcg/seg_helper.c +4 -0
index 13c6e6ee62e..71fd2bf8d06 100644
@@ -28,6 +28,10 @@
 #include "helper-tcg.h"
 #include "seg_helper.h"
 
+#ifndef CONFIG_USER_ONLY
+#include "hw/i386/apic.h"
+#endif
+
 /* return non zero if error */
 static inline int load_segment_ra(CPUX86State *env, uint32_t *e1_ptr,
                                uint32_t *e2_ptr, int selector,
target/i386/tcg/sysemu/misc_helper.c +1 -0
index e7a2ebde813..dbeda8d0b0f 100644
@@ -24,6 +24,7 @@
 #include "exec/cpu_ldst.h"
 #include "exec/address-spaces.h"
 #include "tcg/helper-tcg.h"
+#include "hw/i386/apic.h"
 
 void helper_outb(CPUX86State *env, uint32_t port, uint32_t data)
 {
target/i386/whpx/whpx-all.c +1 -0
index 3e925b9da70..9ab844fd05d 100644
@@ -20,6 +20,7 @@
 #include "qemu/main-loop.h"
 #include "hw/boards.h"
 #include "hw/i386/ioapic.h"
+#include "hw/i386/apic.h"
 #include "hw/i386/apic_internal.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 8 lines · Philippe Mathieu-Daudé

Instead of including a sysemu-specific header in "cpu.h" (which is shared with user-mode emulations), include it locally when required.

---
Based-on: <[email protected]> "accel/tcg: Restrict TCGCPUOps::cpu_exec_interrupt() to sysemu"

Paolo

Quoted 182 lines
---
  target/i386/cpu.h                    | 4 ----
  hw/i386/kvmvapic.c                   | 1 +
  hw/i386/x86.c                        | 1 +
  target/i386/cpu-sysemu.c             | 1 +
  target/i386/cpu.c                    | 1 +
  target/i386/gdbstub.c                | 4 ++++
  target/i386/hax/hax-all.c            | 1 +
  target/i386/helper.c                 | 1 +
  target/i386/hvf/x86_emu.c            | 1 +
  target/i386/nvmm/nvmm-all.c          | 1 +
  target/i386/tcg/seg_helper.c         | 4 ++++
  target/i386/tcg/sysemu/misc_helper.c | 1 +
  target/i386/whpx/whpx-all.c          | 1 +
  13 files changed, 18 insertions(+), 4 deletions(-)
target/i386/cpu.h +0 -4
index c7cc65e92d5..eddafd1acd5 100644
@@ -2046,10 +2046,6 @@ typedef X86CPU ArchCPU;
  #include "exec/cpu-all.h"
  #include "svm.h"
 
-#if !defined(CONFIG_USER_ONLY)
-#include "hw/i386/apic.h"
-#endif
-
  static inline void cpu_get_tb_cpu_state(CPUX86State *env, target_ulong *pc,
                                          target_ulong *cs_base, uint32_t *flags)
  {
hw/i386/kvmvapic.c +1 -0
index 43f8a8f679e..7333818bdd1 100644
@@ -16,6 +16,7 @@
  #include "sysemu/hw_accel.h"
  #include "sysemu/kvm.h"
  #include "sysemu/runstate.h"
+#include "hw/i386/apic.h"
  #include "hw/i386/apic_internal.h"
  #include "hw/sysbus.h"
  #include "hw/boards.h"
hw/i386/x86.c +1 -0
index 00448ed55aa..e0218f8791f 100644
@@ -43,6 +43,7 @@
  #include "target/i386/cpu.h"
  #include "hw/i386/topology.h"
  #include "hw/i386/fw_cfg.h"
+#include "hw/i386/apic.h"
  #include "hw/intc/i8259.h"
  #include "hw/rtc/mc146818rtc.h"
 
target/i386/cpu-sysemu.c +1 -0
index 1078e3d157f..65709e41903 100644
@@ -30,6 +30,7 @@
  #include "hw/qdev-properties.h"
 
  #include "exec/address-spaces.h"
+#include "hw/i386/apic.h"
  #include "hw/i386/apic_internal.h"
 
  #include "cpu-internal.h"
target/i386/cpu.c +1 -0
index 97e250e8760..04f59043804 100644
@@ -33,6 +33,7 @@
  #include "standard-headers/asm-x86/kvm_para.h"
  #include "hw/qdev-properties.h"
  #include "hw/i386/topology.h"
+#include "hw/i386/apic.h"
  #ifndef CONFIG_USER_ONLY
  #include "exec/address-spaces.h"
  #include "hw/boards.h"
target/i386/gdbstub.c +4 -0
index 098a2ad15a9..5438229c1a9 100644
@@ -21,6 +21,10 @@
  #include "cpu.h"
  #include "exec/gdbstub.h"
 
+#ifndef CONFIG_USER_ONLY
+#include "hw/i386/apic.h"
+#endif
+
  #ifdef TARGET_X86_64
  static const int gpr_map[16] = {
      R_EAX, R_EBX, R_ECX, R_EDX, R_ESI, R_EDI, R_EBP, R_ESP,
target/i386/hax/hax-all.c +1 -0
index bf65ed6fa92..cd89e3233a9 100644
@@ -32,6 +32,7 @@
  #include "sysemu/reset.h"
  #include "sysemu/runstate.h"
  #include "hw/boards.h"
+#include "hw/i386/apic.h"
 
  #include "hax-accel-ops.h"
 
target/i386/helper.c +1 -0
index 533b29cb91b..874beda98ae 100644
@@ -26,6 +26,7 @@
  #ifndef CONFIG_USER_ONLY
  #include "sysemu/hw_accel.h"
  #include "monitor/monitor.h"
+#include "hw/i386/apic.h"
  #endif
 
  void cpu_sync_bndcs_hflags(CPUX86State *env)
target/i386/hvf/x86_emu.c +1 -0
index 7c8203b21fb..fb3e88959d4 100644
@@ -45,6 +45,7 @@
  #include "x86_flags.h"
  #include "vmcs.h"
  #include "vmx.h"
+#include "hw/i386/apic.h"
 
  void hvf_handle_io(struct CPUState *cpu, uint16_t port, void *data,
                     int direction, int size, uint32_t count);
target/i386/nvmm/nvmm-all.c +1 -0
index 28dee4c5ee3..4c07cfc7194 100644
@@ -22,6 +22,7 @@
  #include "qemu/queue.h"
  #include "migration/blocker.h"
  #include "strings.h"
+#include "hw/i386/apic.h"
 
  #include "nvmm-accel-ops.h"
 
target/i386/tcg/seg_helper.c +4 -0
index 13c6e6ee62e..71fd2bf8d06 100644
@@ -28,6 +28,10 @@
  #include "helper-tcg.h"
  #include "seg_helper.h"
 
+#ifndef CONFIG_USER_ONLY
+#include "hw/i386/apic.h"
+#endif
+
  /* return non zero if error */
  static inline int load_segment_ra(CPUX86State *env, uint32_t *e1_ptr,
                                 uint32_t *e2_ptr, int selector,
target/i386/tcg/sysemu/misc_helper.c +1 -0
index e7a2ebde813..dbeda8d0b0f 100644
@@ -24,6 +24,7 @@
  #include "exec/cpu_ldst.h"
  #include "exec/address-spaces.h"
  #include "tcg/helper-tcg.h"
+#include "hw/i386/apic.h"
 
  void helper_outb(CPUX86State *env, uint32_t port, uint32_t data)
  {
target/i386/whpx/whpx-all.c +1 -0
index 3e925b9da70..9ab844fd05d 100644
@@ -20,6 +20,7 @@
  #include "qemu/main-loop.h"
  #include "hw/boards.h"
  #include "hw/i386/ioapic.h"
+#include "hw/i386/apic.h"
  #include "hw/i386/apic_internal.h"
  #include "qemu/error-report.h"
  #include "qapi/error.h"
#4 lore raw

Le 29/09/2021 à 16:08, Philippe Mathieu-Daudé a écrit :

Quoted 6 lines · Paolo Bonzini
Quoted 5 lines · Philippe Mathieu-Daudé
Quoted 4 lines

Instead of including a sysemu-specific header in "cpu.h" (which is shared with user-mode emulations), include it locally when required.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

---

Thank you, Cc'ing qemu-trivial@ :)

Applied to my trivial-patches branch.

Thanks,
Laurent

#5 lore raw

Le 29/09/2021 à 17:00, Laurent Vivier a écrit :

Quoted 10 lines

Le 29/09/2021 à 16:08, Philippe Mathieu-Daudé a écrit :

Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 6 lines

Instead of including a sysemu-specific header in "cpu.h" (which is shared with user-mode emulations), include it locally when required.

---

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Thank you, Cc'ing qemu-trivial@ :)

Applied to my trivial-patches branch.

We have a problem:

.../target/i386/tcg/sysemu/seg_helper.c:145:9: error: implicit declaration of function 'apic_poll_irq' [-Werror=implicit-function-declaration]

  145 |         apic_poll_irq(cpu->apic_state);
      |         ^~~~~~~~~~~~~

.../target/i386/tcg/sysemu/seg_helper.c:145:9: error: nested extern declaration of 'apic_poll_irq' [-Werror=nested-externs]

#6 lore raw
Quoted 19 lines · Laurent Vivier

Le 29/09/2021 à 17:00, Laurent Vivier a écrit :

Quoted 10 lines

Le 29/09/2021 à 16:08, Philippe Mathieu-Daudé a écrit :

Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 6 lines

Instead of including a sysemu-specific header in "cpu.h" (which is shared with user-mode emulations), include it locally when required.

---

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Thank you, Cc'ing qemu-trivial@ :)

Applied to my trivial-patches branch.

Quoted 8 lines

We have a problem:

.../target/i386/tcg/sysemu/seg_helper.c:145:9: error: implicit declaration of function 'apic_poll_irq' [-Werror=implicit-function-declaration]

  145 |         apic_poll_irq(cpu->apic_state);
      |         ^~~~~~~~~~~~~

.../target/i386/tcg/sysemu/seg_helper.c:145:9: error: nested extern declaration of 'apic_poll_irq' [-Werror=nested-externs]

Hmm I'll check what changed since I sent that. It was working the day Paolo Acked, because have the patch rebased / tested on top of commit c99e34e537f ("Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.2-pull-request' into staging").

I should have rebased/retested today before Cc'ing you, sorry.

#7 lore raw

Le 29/09/2021 à 18:06, Philippe Mathieu-Daudé a écrit :

Quoted 29 lines · Laurent Vivier
Quoted 19 lines

Le 29/09/2021 à 17:00, Laurent Vivier a écrit :

Quoted 10 lines

Le 29/09/2021 à 16:08, Philippe Mathieu-Daudé a écrit :

Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 6 lines

Instead of including a sysemu-specific header in "cpu.h" (which is shared with user-mode emulations), include it locally when required.

---

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Thank you, Cc'ing qemu-trivial@ :)

Applied to my trivial-patches branch.

Quoted 8 lines

We have a problem:

.../target/i386/tcg/sysemu/seg_helper.c:145:9: error: implicit declaration of function 'apic_poll_irq' [-Werror=implicit-function-declaration]

  145 |         apic_poll_irq(cpu->apic_state);
      |         ^~~~~~~~~~~~~

.../target/i386/tcg/sysemu/seg_helper.c:145:9: error: nested extern declaration of 'apic_poll_irq' [-Werror=nested-externs]

Quoted 7 lines

Hmm I'll check what changed since I sent that. It was working the day Paolo Acked, because have the patch rebased / tested on top of commit c99e34e537f ("Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.2-pull-request' into staging").

I should have rebased/retested today before Cc'ing you, sorry.

On top of c99e34e537f I have the same error...

Thanks,
Laurent

#8 lore raw
Quoted 35 lines · Laurent Vivier

Le 29/09/2021 à 18:06, Philippe Mathieu-Daudé a écrit :

Quoted 34 lines · Laurent Vivier
Quoted 19 lines

Le 29/09/2021 à 17:00, Laurent Vivier a écrit :

Quoted 10 lines

Le 29/09/2021 à 16:08, Philippe Mathieu-Daudé a écrit :

Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 6 lines

Instead of including a sysemu-specific header in "cpu.h" (which is shared with user-mode emulations), include it locally when required.

---

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Thank you, Cc'ing qemu-trivial@ :)

Applied to my trivial-patches branch.

Quoted 8 lines

We have a problem:

.../target/i386/tcg/sysemu/seg_helper.c:145:9: error: implicit declaration of function 'apic_poll_irq' [-Werror=implicit-function-declaration]

  145 |         apic_poll_irq(cpu->apic_state);
      |         ^~~~~~~~~~~~~

.../target/i386/tcg/sysemu/seg_helper.c:145:9: error: nested extern declaration of 'apic_poll_irq' [-Werror=nested-externs]

Hmm I'll check what changed since I sent that. It was working the day Paolo Acked, because have the patch rebased / tested on top of commit c99e34e537f ("Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.2-pull-request' into staging").

Quoted 4 lines
Quoted 2 lines

I should have rebased/retested today before Cc'ing you, sorry.

On top of c99e34e537f I have the same error...

The problem is 0792e6c88d4 ("target/i386: Move
x86_cpu_exec_interrupt() under sysemu/ folder").