yeahuh / rpms / qemu-kvm

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