@@ -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)
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 <david@gibson.dropbear.id.au> --- hw/ppc/spapr.c | 9 +++++++++ 1 file changed, 9 insertions(+)