qemu/hw/misc
Laurent Vivier cd8843ff25 mos6522: fix T1 and T2 timers
With the Quadra 800 emulation, mos6522 timers processing can consume
until 70% of the host CPU time with an idle guest (I guess the problem
should also happen with PowerMac emulation).

On a recent system, it can be painless (except if you look at top), but
on an old host like a PowerMac G5 the guest kernel can be terribly slow
during the boot sequence (for instance, unpacking initramfs can take 15
seconds rather than only 3 seconds).

We can avoid this CPU overload by enabling QEMU internal timers only if
the mos6522 counter interrupts are enabled. Sometime the guest kernel
wants to read the counters values, but we don't need the timers to
update the counters.

With this patch applied, an idle Q800 consumes only 3% of host CPU time
(and the guest can boot in a decent time).

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20191102154919.17775-1-laurent@vivier.eu>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
2019-11-18 11:50:49 +01:00
..
macio sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
a9scu.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
applesmc.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
arm11scu.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
arm_integrator_debug.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
arm_l2x0.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
arm_sysctl.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
armsse-cpuid.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
armsse-mhu.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
aspeed_scu.c aspeed/sdmc: Add AST2600 support 2019-10-15 18:09:04 +01:00
aspeed_sdmc.c aspeed/sdmc: Add AST2600 support 2019-10-15 18:09:04 +01:00
aspeed_xdma.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
auxbus.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
bcm2835_mbox.c hw/misc/bcm2835_mbox: Add trace events 2019-10-15 18:09:05 +01:00
bcm2835_property.c hw/misc/bcm2835_mbox: Add trace events 2019-10-15 18:09:05 +01:00
bcm2835_rng.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
bcm2835_thermal.c hw/misc/bcm2835_thermal: Add a dummy BCM2835 thermal sensor 2019-10-25 13:09:27 +01:00
cbus.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
debugexit.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
eccmemctl.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
edu.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
exynos4210_clk.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
exynos4210_pmu.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
exynos4210_rng.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
grlib_ahb_apb_pnp.c leon3: introduce the plug and play mechanism 2019-05-17 09:17:11 +01:00
imx2_wdt.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
imx6_ccm.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
imx6_src.c hw/core: Move cpu.c, cpu.h from qom/ to hw/core/ 2019-08-21 13:24:01 +02:00
imx6ul_ccm.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
imx7_ccm.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
imx7_gpr.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
imx7_snvs.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
imx25_ccm.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
imx31_ccm.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
imx_ccm.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
iotkit-secctl.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
iotkit-sysctl.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
iotkit-sysinfo.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
ivshmem.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
Kconfig hw/m68k: implement ADB bus support for via 2019-10-28 19:06:45 +01:00
mac_via.c hw/m68k: implement ADB bus support for via 2019-10-28 19:06:45 +01:00
Makefile.objs hw/m68k: add VIA support 2019-10-28 19:06:42 +01:00
max111x.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
milkymist-hpdmc.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
milkymist-pfpu.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
mips_cmgcr.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
mips_cpc.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
mips_itu.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
mos6522.c mos6522: fix T1 and T2 timers 2019-11-18 11:50:49 +01:00
mps2-fpgaio.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
mps2-scc.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
msf2-sysreg.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
mst_fpga.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
nrf51_rng.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
omap_clk.c Include hw/irq.h a lot less 2019-08-16 13:31:52 +02:00
omap_gpmc.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
omap_l4.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
omap_sdrc.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
omap_tap.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
pc-testdev.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
pca9552.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
pci-testdev.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
puv3_pm.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
pvpanic.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
sga.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
slavio_misc.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
stm32f2xx_syscfg.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
tmp105.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
tmp105.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
tmp421.c Do not use %m in common code to print error messages 2019-10-22 09:38:42 +02:00
trace-events hw/misc/bcm2835_mbox: Add trace events 2019-10-15 18:09:05 +01:00
tz-mpc.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
tz-msc.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
tz-ppc.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
unimp.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
vmcoreinfo.c hw/misc/vmcoreinfo: Add comment about reset handler 2019-10-15 18:18:08 -03:00
zynq-xadc.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
zynq_slcr.c target-arm queue: 2019-08-16 17:21:40 +01:00