[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 25/29] tcg_i386_funcs: Add x86_register_ferr_irq to TCGI386Module
From: |
Gerd Hoffmann |
Subject: |
[PATCH 25/29] tcg_i386_funcs: Add x86_register_ferr_irq to TCGI386ModuleOps |
Date: |
Tue, 31 Aug 2021 14:15:41 +0200 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
include/tcg/tcg-module-i386.h | 2 +-
target/i386/cpu.h | 1 -
accel/tcg/tcg-module-i386.c | 5 +++++
hw/i386/pc_piix.c | 2 +-
hw/i386/pc_q35.c | 2 +-
target/i386/tcg/sysemu/fpu_helper.c | 9 ++++++++-
6 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/include/tcg/tcg-module-i386.h b/include/tcg/tcg-module-i386.h
index 576e0a63f01f..7b99b9836a20 100644
--- a/include/tcg/tcg-module-i386.h
+++ b/include/tcg/tcg-module-i386.h
@@ -5,7 +5,7 @@ struct TCGI386ModuleOps {
void (*update_fp_status)(CPUX86State *env);
void (*update_mxcsr_status)(CPUX86State *env);
void (*update_mxcsr_from_sse_status)(CPUX86State *env);
-
+ void (*x86_register_ferr_irq)(qemu_irq irq);
};
extern struct TCGI386ModuleOps tcg_i386;
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index deba8eb04d1f..d1819166ae11 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -1835,7 +1835,6 @@ int cpu_x86_support_mca_broadcast(CPUX86State *env);
int cpu_get_pic_interrupt(CPUX86State *s);
/* MSDOS compatibility mode FPU exception support */
-void x86_register_ferr_irq(qemu_irq irq);
void fpu_check_raise_ferr_irq(CPUX86State *s);
void cpu_set_ignne(void);
void cpu_clear_ignne(void);
diff --git a/accel/tcg/tcg-module-i386.c b/accel/tcg/tcg-module-i386.c
index 6908fe34cef6..f6d367912c17 100644
--- a/accel/tcg/tcg-module-i386.c
+++ b/accel/tcg/tcg-module-i386.c
@@ -5,8 +5,13 @@ static void i386_update_cpu_stub(CPUX86State *cpu)
{
}
+static void x86_register_ferr_irq_stub(qemu_irq irq)
+{
+}
+
struct TCGI386ModuleOps tcg_i386 = {
.update_fp_status = i386_update_cpu_stub,
.update_mxcsr_status = i386_update_cpu_stub,
.update_mxcsr_from_sse_status = i386_update_cpu_stub,
+ .x86_register_ferr_irq = x86_register_ferr_irq_stub,
};
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 1bc30167acc0..d02edaa7e611 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -224,7 +224,7 @@ static void pc_init1(MachineState *machine,
}
if (tcg_enabled()) {
- x86_register_ferr_irq(x86ms->gsi[13]);
+ tcg_i386.x86_register_ferr_irq(x86ms->gsi[13]);
}
pc_vga_init(isa_bus, pcmc->pci_enabled ? pci_bus : NULL);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index eeb0b185b118..9c2623fe61e0 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -266,7 +266,7 @@ static void pc_q35_init(MachineState *machine)
}
if (tcg_enabled()) {
- x86_register_ferr_irq(x86ms->gsi[13]);
+ tcg_i386.x86_register_ferr_irq(x86ms->gsi[13]);
}
assert(pcms->vmport != ON_OFF_AUTO__MAX);
diff --git a/target/i386/tcg/sysemu/fpu_helper.c
b/target/i386/tcg/sysemu/fpu_helper.c
index 1c3610da3b91..9caf164a7269 100644
--- a/target/i386/tcg/sysemu/fpu_helper.c
+++ b/target/i386/tcg/sysemu/fpu_helper.c
@@ -23,7 +23,7 @@
static qemu_irq ferr_irq;
-void x86_register_ferr_irq(qemu_irq irq)
+static void x86_register_ferr_irq(qemu_irq irq)
{
ferr_irq = irq;
}
@@ -55,3 +55,10 @@ void cpu_set_ignne(void)
*/
qemu_irq_lower(ferr_irq);
}
+
+static void tcgi386_module_ops_fpu_sys(void)
+{
+ tcg_i386.x86_register_ferr_irq = x86_register_ferr_irq;
+}
+
+type_init(tcgi386_module_ops_fpu_sys);
--
2.31.1
- [PATCH 16/29] tcg: use tb_page_addr_t for tb_invalidate_phys_range(), (continued)
- [PATCH 16/29] tcg: use tb_page_addr_t for tb_invalidate_phys_range(), Gerd Hoffmann, 2021/08/31
- [PATCH 18/29] tcg_funcs: Add tb_invalidate_phys_range to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 19/29] tcg_funcs: Add tb_check_watchpoint to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 21/29] tcg_funcs: Add curr_cflags to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 20/29] tcg_funcs: Add cpu_restore_state to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 23/29] tcg_i386_funcs: Add update_mxcsr_status to TCGI386ModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 22/29] tcg_i386_funcs: Add update_fp_status to TCGI386ModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 24/29] tcg_i386_funcs: Add update_mxcsr_from_sse_status to TCGI386ModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 26/29] tcg_i386_funcs: Add cpu_set_ignne to TCGI386ModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 25/29] tcg_i386_funcs: Add x86_register_ferr_irq to TCGI386ModuleOps,
Gerd Hoffmann <=
- [PATCH 28/29] tcg_i386_funcs: Add cpu_cc_compute_all to TCGI386ModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 27/29] tcg_i386_funcs: Add cpu_x86_update_dr7 to TCGI386ModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 29/29] Revert "build: temporarily disable modular tcg", Gerd Hoffmann, 2021/08/31