From 6ac0d8d44c0966225b200cc25f8c5270f1191ec0 Mon Sep 17 00:00:00 2001 From: Amit Shah Date: Mon, 12 Jan 2015 17:30:14 +0530 Subject: ich9: add disable_s3, disable_s4, s4_val properties PIIX4 has disable_s3 and disable_s4 properties to enable or disable PM functions. Add such properties to the ICH9 chipset as well for the Q35 machine type. S3 / S4 are not guaranteed to always work (needs work in the guest as well as QEMU for things to work properly), and disabling advertising of these features ensures guests don't go into zombie state if something isn't working right. The defaults are kept the same as in PIIX4: both S3 and S4 are enabled by default. These can be disabled via the cmdline: ... -global ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 Note: some guests can fake hibernation by writing a hibernate image and doing a shutdown instead of S4 if S4 isn't available; there's nothing we can do guests to stop doing this, and this patch can't affect that functionality. Signed-off-by: Amit Shah Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- include/hw/acpi/ich9.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/hw') diff --git a/include/hw/acpi/ich9.h b/include/hw/acpi/ich9.h index fe975e6..12d7a7a 100644 --- a/include/hw/acpi/ich9.h +++ b/include/hw/acpi/ich9.h @@ -49,6 +49,10 @@ typedef struct ICH9LPCPMRegs { AcpiCpuHotplug gpe_cpu; MemHotplugState acpi_memory_hotplug; + + uint8_t disable_s3; + uint8_t disable_s4; + uint8_t s4_val; } ICH9LPCPMRegs; void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, -- cgit v1.1 From 27fb9688f9162515901ebf29e3879788fd326ea7 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 6 Jan 2015 17:03:08 +0100 Subject: pci: Split pcie_host_mmcfg_map() The mmcfg space is a memory region that allows access to PCI config space in the PCIe world. To maintain abstraction layers, I would like to expose the mmcfg space as a sysbus mmio region rather than have it mapped straight into the system's memory address space though. So this patch splits the initialization of the mmcfg space from the actual mapping, allowing us to only have an mmfg memory region without the map. Signed-off-by: Alexander Graf Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Claudio Fontana --- include/hw/pci/pcie_host.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hw') diff --git a/include/hw/pci/pcie_host.h b/include/hw/pci/pcie_host.h index ff44ef6..4d23c80 100644 --- a/include/hw/pci/pcie_host.h +++ b/include/hw/pci/pcie_host.h @@ -50,6 +50,7 @@ struct PCIExpressHost { }; void pcie_host_mmcfg_unmap(PCIExpressHost *e); +void pcie_host_mmcfg_init(PCIExpressHost *e, uint32_t size); void pcie_host_mmcfg_map(PCIExpressHost *e, hwaddr addr, uint32_t size); void pcie_host_mmcfg_update(PCIExpressHost *e, int enable, -- cgit v1.1 From 0058ae1d9483f5f96c7798e2ae51cce42c69abfb Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Mon, 19 Jan 2015 23:58:55 +0200 Subject: bios-linker-loader: move header to common location Will be usable by MIPS, ARM. Signed-off-by: Michael S. Tsirkin --- include/hw/acpi/bios-linker-loader.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 include/hw/acpi/bios-linker-loader.h (limited to 'include/hw') diff --git a/include/hw/acpi/bios-linker-loader.h b/include/hw/acpi/bios-linker-loader.h new file mode 100644 index 0000000..498c0af --- /dev/null +++ b/include/hw/acpi/bios-linker-loader.h @@ -0,0 +1,27 @@ +#ifndef BIOS_LINKER_LOADER_H +#define BIOS_LINKER_LOADER_H + +#include +#include +#include + +GArray *bios_linker_loader_init(void); + +void bios_linker_loader_alloc(GArray *linker, + const char *file, + uint32_t alloc_align, + bool alloc_fseg); + +void bios_linker_loader_add_checksum(GArray *linker, const char *file, + void *table, + void *start, unsigned size, + uint8_t *checksum); + +void bios_linker_loader_add_pointer(GArray *linker, + const char *dest_file, + const char *src_file, + GArray *table, void *pointer, + uint8_t pointer_size); + +void *bios_linker_loader_cleanup(GArray *linker); +#endif -- cgit v1.1 From 9967c94957f60c2d1cadbe0bfd4373a13fb1a226 Mon Sep 17 00:00:00 2001 From: Bharata B Rao Date: Tue, 27 Jan 2015 09:35:01 +0530 Subject: pc-dimm: Make pc_existing_dimms_capacity global Move pc_existing_dimms_capacity() to pc-dimm.c since it would be needed by PowerPC memory hotplug code too. Signed-off-by: Bharata B Rao Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/mem/pc-dimm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hw') diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h index e1dcbbc..bbfa53f 100644 --- a/include/hw/mem/pc-dimm.h +++ b/include/hw/mem/pc-dimm.h @@ -78,4 +78,5 @@ uint64_t pc_dimm_get_free_addr(uint64_t address_space_start, int pc_dimm_get_free_slot(const int *hint, int max_slots, Error **errp); int qmp_pc_dimm_device_list(Object *obj, void *opaque); +int pc_existing_dimms_capacity(Object *obj, void *opaque); #endif -- cgit v1.1 From 37153450436f58449ce7e41d13a23821611e889e Mon Sep 17 00:00:00 2001 From: Bharata B Rao Date: Tue, 27 Jan 2015 09:35:02 +0530 Subject: pc-dimm: Add Error argument to pc_existing_dimms_capacity Now that pc_existing_dimms_capacity() is an API, include Error pointer as an argument and modify the caller appropriately. Suggested-by: Igor Mammedov Signed-off-by: Bharata B Rao Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov --- include/hw/mem/pc-dimm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hw') diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h index bbfa53f..f7b80b4 100644 --- a/include/hw/mem/pc-dimm.h +++ b/include/hw/mem/pc-dimm.h @@ -78,5 +78,5 @@ uint64_t pc_dimm_get_free_addr(uint64_t address_space_start, int pc_dimm_get_free_slot(const int *hint, int max_slots, Error **errp); int qmp_pc_dimm_device_list(Object *obj, void *opaque); -int pc_existing_dimms_capacity(Object *obj, void *opaque); +uint64_t pc_existing_dimms_capacity(Error **errp); #endif -- cgit v1.1