From 459ae5ea5ad682c2b3220beb244d4102c1a4e332 Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Mon, 4 Jun 2012 14:31:55 +0300 Subject: Add PIIX4 properties to control PM system states. This patch adds two things. First it allows QEMU to distinguish between regular powerdown and S4 powerdown. Later separate QMP notification will be added for S4 powerdown. Second it allows S3/S4 states to be disabled from QEMU command line. Some guests known to be broken with regards to power management, but allow to use it anyway. Using new properties management will be able to disable S3/S4 for such guests. Supported system state are passed to a firmware using new fw_cfg file. The file contains 6 byte array. Each byte represents one system state. If byte at offset X has its MSB set it means that system state X is supported and to enter it guest should use the value from lowest 3 bits. Signed-off-by: Gleb Natapov Signed-off-by: Anthony Liguori --- hw/pc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/pc.c') diff --git a/hw/pc.c b/hw/pc.c index 8368701..c7e9ab3 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -970,7 +970,7 @@ void pc_cpus_init(const char *cpu_model) } } -void pc_memory_init(MemoryRegion *system_memory, +void *pc_memory_init(MemoryRegion *system_memory, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, @@ -1029,6 +1029,7 @@ void pc_memory_init(MemoryRegion *system_memory, for (i = 0; i < nb_option_roms; i++) { rom_add_option(option_rom[i].name, option_rom[i].bootindex); } + return fw_cfg; } qemu_irq *pc_allocate_cpu_irq(void) -- cgit v1.1