[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFCv2 5/6] pseries: Enable HPT resizing for 2.6
From: |
David Gibson |
Subject: |
[Qemu-devel] [RFCv2 5/6] pseries: Enable HPT resizing for 2.6 |
Date: |
Fri, 29 Jan 2016 17:42:23 +1100 |
We've now implemented a PAPR extensions which allows PAPR guests (i.e.
"pseries" machine type) to resize their hash page table during runtime.
However, that extension is only enabled if explicitly chosen on the
command line. This patch enables it by default for qemu-2.6, but leaves it
disabled (by default) for older machine types.
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index ddd8b99..0d2759a 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2137,12 +2137,17 @@ static void spapr_machine_initfn(Object *obj)
sPAPRMachineState *spapr = SPAPR_MACHINE(obj);
spapr->htab_fd = -1;
+
object_property_add_str(obj, "kvm-type",
spapr_get_kvm_type, spapr_set_kvm_type, NULL);
object_property_set_description(obj, "kvm-type",
"Specifies the KVM virtualization mode
(HV, PR)",
NULL);
+ if (!kvm_enabled()) {
+ /* No KVM implementation of HPT resizing yet */
+ spapr->resize_hpt = SPAPR_RESIZE_HPT_ENABLED;
+ }
object_property_add_str(obj, "resize-hpt",
spapr_get_resize_hpt, spapr_set_resize_hpt, NULL);
object_property_set_description(obj, "resize-hpt",
@@ -2412,6 +2417,10 @@ DEFINE_SPAPR_MACHINE(2_6, "2.6", true);
static void spapr_machine_2_5_instance_options(MachineState *machine)
{
+ sPAPRMachineState *spapr = SPAPR_MACHINE(machine);
+
+ spapr_machine_2_6_instance_options(machine);
+ spapr->resize_hpt = SPAPR_RESIZE_HPT_DISABLED;
}
static void spapr_machine_2_5_class_options(MachineClass *mc)
--
2.5.0
- [Qemu-devel] [RFCv2 0/6] PAPR hash page table resizing, David Gibson, 2016/01/29
- [Qemu-devel] [RFCv2 4/6] pseries: Implement HPT resizing, David Gibson, 2016/01/29
- [Qemu-devel] [RFCv2 2/6] pseries: Move hash page table allocation to reset time, David Gibson, 2016/01/29
- [Qemu-devel] [RFCv2 5/6] pseries: Enable HPT resizing for 2.6,
David Gibson <=
- [Qemu-devel] [RFCv2 1/6] pseries: Simplify handling of the hash page table fd, David Gibson, 2016/01/29
- [Qemu-devel] [RFCv2 3/6] pseries: Stubs for HPT resizing, David Gibson, 2016/01/29
- [Qemu-devel] [RFCv2 6/6] pseries: Use smaller default hash page tables when guest can resize, David Gibson, 2016/01/29