qemu/hw/isa
Laszlo Ersek 3c23402d40 hw/isa/lpc_ich9: inject the SMI on the VCPU that is writing to APM_CNT
Commit 4d00636e97 ("ich9: Add the lpc chip", Nov 14 2012) added the
ich9_apm_ctrl_changed() ioport write callback function such that it would
inject the SMI, in response to a write to the APM_CNT register, on the
first CPU, invariably.

Since this register is used by guest code to trigger an SMI synchronously,
the interrupt should be injected on the VCPU that is performing the write.

apm_ioport_writeb() is the .write callback of the "apm_ops"
MemoryRegionOps [hw/isa/apm.c]; it is parametrized to call
ich9_apm_ctrl_changed() by ich9_lpc_init() [hw/isa/lpc_ich9.c], via
apm_init(). Therefore this change affects no other board.

ich9_generate_smi() is an unrelated function that is called by the TCO
watchdog; a watchdog is likely in its right to (asynchronously) inject
interrupts on the first CPU only.

This patch allows the combined edk2/OVMF SMM driver stack to work with
multiple VCPUs on TCG, using both qemu-system-i386 and qemu-system-x86_64.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2015-10-22 14:39:09 +03:00
..
Makefile.objs isa_mmio: delete 2013-07-25 08:12:27 -05:00
apm.c Fix debug print warning 2014-09-02 22:38:16 +04:00
i82378.c i8257: remove cpu_request_exit irq 2015-09-09 15:34:53 +02:00
isa-bus.c virtio-vga: add '-vga virtio' support 2015-06-12 10:13:23 +02:00
lpc_ich9.c hw/isa/lpc_ich9: inject the SMI on the VCPU that is writing to APM_CNT 2015-10-22 14:39:09 +03:00
pc87312.c hw: Mark devices picking up char backends actively FIXME 2015-04-02 15:30:28 +02:00
piix4.c piix4: QOMify 2015-06-23 19:57:28 +03:00
vt82c686.c vt82c686: QOMify 2015-06-23 19:57:28 +03:00