PPC: e500: advertise 4.2 MPIC only if KVM supports EPR
PATCH 1/1 PPC: e500: advertise 4.2 MPIC only if KVM supports EPR
From: Stuart Yoder <[email protected]>
Signed-off-by Stuart Yoder <[email protected]>
--- hw/ppc/e500plat.c | 5 +++++ 1 file changed, 5 insertions(+)
hw/ppc/e500plat.c +5 -0
@@ -16,6 +16,7 @@#include "sysemu/device_tree.h" #include "hw/pci/pci.h" #include "hw/openpic.h" +#include "sysemu/kvm.h" static void e500plat_fixup_devtree (PPCE500Params *params,void *fdt) {
@@ -48,6 +49,10 @@ static void e500plat_init(QEMUMachineInitArgs *args) .mpic_version = OPENPIC_MODEL_FSL_MPIC_42, }; +if (kvm_enabled () && !kvm_check_extension (kvm_state,KVM_CAP_PPC_EPR )) { + params.mpic_version =OPENPIC_MODEL_FSL_MPIC_20 ; + } +ppce500_init (¶ms); }
Signature · 1 line
1.7.9.7
Quoted 1 line · Stuart Yoder
From: Stuart Yoder <[email protected]>
Missing patch description
Quoted 19 lines
Signed-off-by Stuart Yoder <[email protected]>---
hw/ppc/e500plat.c| 5 +++++1 file changed, 5 insertions(+)hw/ppc/e500plat.c +1
-0@@ -16,6 +16,7 @@#include "sysemu/device_tree.h" #include "hw/pci/pci.h" #include "hw/openpic.h" +#include "sysemu/kvm.h" static void e500plat_fixup_devtree (PPCE500Params *params,void *fdt) {
hw/ppc/e500plat.c static void e500plat_init(QEMUMachineInitArgs *args) · line 51
Quoted 3 lines
hw/ppc/e500plat.c +0
-0@@ -48,6 +49,10 @@ static void e500plat_init(QEMUMachineInitArgs *args) .mpic_version = OPENPIC_MODEL_FSL_MPIC_42, };
Missing comment
hw/ppc/e500plat.c static void e500plat_init(QEMUMachineInitArgs *args) · line 52
Quoted 1 line
hw/ppc/e500plat.c +1
-0+if (kvm_enabled () && !kvm_check_extension (kvm_state,KVM_CAP_PPC_EPR )) {
This should go through target-ppc/kvm_ppc.c. That way we don't need to have any kvm specific headers included here and guarantee that everything compiles just fine without kvm enabled.
I've fixed those up for you and applied the patch to ppc-next.
Alex
Quoted 10 lines
hw/ppc/e500plat.c +3
-0+ params.mpic_version =OPENPIC_MODEL_FSL_MPIC_20 ; + } +ppce500_init (¶ms); }Signature · 1 line
1.7.9.7