From 246d822cd39a0c9ee0cac082e64a20ea6d49b1c9 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Mon, 12 Nov 2018 01:28:34 +0000 Subject: [PATCH 03/16] target/ppc: Add one reg id for ptcr RH-Author: David Gibson Message-id: <20181112012835.21863-4-dgibson@redhat.com> Patchwork-id: 82979 O-Subject: [RHEL-8 qemu-kvm PATCH 3/4] target/ppc: Add one reg id for ptcr Bugzilla: 1639069 RH-Acked-by: Laurent Vivier RH-Acked-by: Serhii Popovych RH-Acked-by: Thomas Huth From: Suraj Jitindar Singh The ptcr (partition table control register) is used to store the address and size of the partition table. For nested kvm-hv we have a level 1 guest register the location of it's partition table with the hypervisor. Thus to support migration we need to be able to read this out of kvm and restore it post migration. Add the one reg id for the ptcr. Signed-off-by: Suraj Jitindar Singh Signed-off-by: David Gibson (cherry picked from commit 56de52cad954a94530953bf979007db84c5f4dbb) Signed-off-by: Danilo C. L. de Paula Conflicts: target/ppc/translate_init.inc.c Adjusting for an upstream rename / code rearrangement that we don't have downstream. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1639069 Signed-off-by: David Gibson --- target/ppc/translate_init.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c index 926efbc..db9df8a 100644 --- a/target/ppc/translate_init.c +++ b/target/ppc/translate_init.c @@ -8176,11 +8176,11 @@ static void gen_spr_power9_mmu(CPUPPCState *env) { #if !defined(CONFIG_USER_ONLY) /* Partition Table Control */ - spr_register_hv(env, SPR_PTCR, "PTCR", - SPR_NOACCESS, SPR_NOACCESS, - SPR_NOACCESS, SPR_NOACCESS, - &spr_read_generic, &spr_write_ptcr, - 0x00000000); + spr_register_kvm_hv(env, SPR_PTCR, "PTCR", + SPR_NOACCESS, SPR_NOACCESS, + SPR_NOACCESS, SPR_NOACCESS, + &spr_read_generic, &spr_write_ptcr, + KVM_REG_PPC_PTCR, 0x00000000); #endif } -- 1.8.3.1