yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From 81c5a3cec15194bf75366813274f63d596f04807 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Mon, 15 Nov 2021 05:46:15 -0500
Subject: [PATCH 6/6] Fix for ppc64le build

Although we do not support ppc64 build, there can be some custom builds running
it. Fix code so the ppc64le build is buildable.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/ppc/spapr.c   | 7 +++++--
 target/ppc/kvm.c | 5 ++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 1386e45e70..8699cc3d0c 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4991,7 +4991,6 @@ DEFINE_SPAPR_MACHINE(2_8, "2.8", false);
 /*
  * pseries-2.7
  */
-#endif
 
 static bool phb_placement_2_7(SpaprMachineState *spapr, uint32_t index,
                               uint64_t *buid, hwaddr *pio,
@@ -5047,7 +5046,6 @@ static bool phb_placement_2_7(SpaprMachineState *spapr, uint32_t index,
     return true;
 }
 
-#if 0 /* Disabled for Red Hat Enterprise Linux */
 static void spapr_machine_2_7_class_options(MachineClass *mc)
 {
     SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
@@ -5372,4 +5370,9 @@ static void spapr_machine_rhel760sxxm_class_options(MachineClass *mc)
 
 DEFINE_SPAPR_MACHINE(rhel760sxxm, "rhel7.6.0-sxxm", false);
 
+static void spapr_machine_register_types(void)
+{
+    type_register_static(&spapr_machine_info);
+}
+
 type_init(spapr_machine_register_types)
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index 0f4f072fbd..154888cce5 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -2560,11 +2560,11 @@ int kvmppc_enable_cap_large_decr(PowerPCCPU *cpu, int enable)
     return 0;
 }
 
-<<<<<<< HEAD
 int kvmppc_has_cap_rpt_invalidate(void)
 {
     return cap_rpt_invalidate;
-=======
+}
+
 bool kvmppc_has_cap_secure_guest(void)
 {
     return !!cap_ppc_secure_guest;
@@ -2573,7 +2573,6 @@ bool kvmppc_has_cap_secure_guest(void)
 int kvmppc_enable_cap_secure_guest(void)
 {
     return kvm_vm_enable_cap(kvm_state, KVM_CAP_PPC_SECURE_GUEST, 0, 1);
->>>>>>> 89c02f0e37... Add ppc64 machine types
 }
 
 PowerPCCPUClass *kvm_ppc_get_host_cpu_class(void)
-- 
2.27.0