@@ -148,8 +148,6 @@ GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled);
/* pc.c */
extern int fd_bootchk;
-void pc_acpi_smi_interrupt(void *opaque, int irq, int level);
-
#define PCI_HOST_PROP_RAM_MEM "ram-mem"
#define PCI_HOST_PROP_PCI_MEM "pci-mem"
#define PCI_HOST_PROP_SYSTEM_MEM "system-mem"
@@ -651,15 +651,6 @@ static gboolean pc_init_ne2k_isa(ISABus *bus, NICInfo *nd, Error **errp)
return true;
}
-void pc_acpi_smi_interrupt(void *opaque, int irq, int level)
-{
- X86CPU *cpu = opaque;
-
- if (level) {
- cpu_interrupt(CPU(cpu), CPU_INTERRUPT_SMI);
- }
-}
-
static
void pc_machine_done(Notifier *notifier, void *data)
{
@@ -345,9 +345,9 @@ static void pc_init1(MachineState *machine,
pc_cmos_init(pcms, x86ms->rtc);
if (piix4_pm) {
- smi_irq = qemu_allocate_irq(pc_acpi_smi_interrupt, first_cpu, 0);
-
+ smi_irq = qdev_get_gpio_in_named(DEVICE(first_cpu), "SMI", 0);
qdev_connect_gpio_out_named(DEVICE(piix4_pm), "smi-irq", 0, smi_irq);
+
pcms->smbus = I2C_BUS(qdev_get_child_bus(DEVICE(piix4_pm), "i2c"));
/* TODO: Populate SPD eeprom data. */
smbus_eeprom_init(pcms->smbus, 8, NULL, 0);
Use the CPU "SMI" IRQ, removing a call to cpu_interrupt() from hw/. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/hw/i386/pc.h | 2 -- hw/i386/pc.c | 9 --------- hw/i386/pc_piix.c | 4 ++-- 3 files changed, 2 insertions(+), 13 deletions(-)