[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 18/49] hw/ppc/mac_newworld: Drop useless CONFIG_KVM i
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 18/49] hw/ppc/mac_newworld: Drop useless CONFIG_KVM ifdefery |
Date: |
Tue, 2 Jul 2019 16:08:26 +1000 |
From: Greg Kurz <address@hidden>
kvm_enabled() expands to (0) when CONFIG_KVM is not defined. The first
CONFIG_KVM guard is thus useless and it is likely that the compiler
will optimize the code out in the case of the second guard. And even
if it doesn't, we have a stub for kvmppc_get_hypercall().
Signed-off-by: Greg Kurz <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/mac_newworld.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index 4d835f32b5..c8d3245524 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -437,13 +437,11 @@ static void ppc_core99_init(MachineState *machine)
}
/* The NewWorld NVRAM is not located in the MacIO device */
-#ifdef CONFIG_KVM
if (kvm_enabled() && getpagesize() > 4096) {
/* We can't combine read-write and read-only in a single page, so
move the NVRAM out of ROM again for KVM */
nvram_addr = 0xFFE00000;
}
-#endif
dev = qdev_create(NULL, TYPE_MACIO_NVRAM);
qdev_prop_set_uint32(dev, "size", 0x2000);
qdev_prop_set_uint32(dev, "it_shift", 1);
@@ -488,14 +486,12 @@ static void ppc_core99_init(MachineState *machine)
fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_IS_KVM, kvm_enabled());
if (kvm_enabled()) {
-#ifdef CONFIG_KVM
uint8_t *hypercall;
hypercall = g_malloc(16);
kvmppc_get_hypercall(env, hypercall, 16);
fw_cfg_add_bytes(fw_cfg, FW_CFG_PPC_KVM_HC, hypercall, 16);
fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_KVM_PID, getpid());
-#endif
}
fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_TBFREQ, tbfreq);
/* Mac OS X requires a "known good" clock-frequency value; pass it one. */
--
2.21.0
- [Qemu-devel] [PULL 00/49] ppc-for-4.1 queue 20190702, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 01/49] spapr/rtas: Force big endian compile for rtas, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 03/49] ppc/pnv: fix StoreEOI activation, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 02/49] docs: updates on the POWER9 XIVE interrupt controller documentation, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 07/49] xics/spapr: Prevent RTAS/hypercalls emulation to be used by in-kernel XICS, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 09/49] xics/spapr: Detect old KVM XICS on POWER9 hosts, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 05/49] ppc/pnv: remove xscom_base field from PnvChip, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 04/49] ppc/pnv: fix XSCOM MMIO base address for P9 machines with multiple chips, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 10/49] target/ppc: fix compile error in kvmppc_define_rtas_kernel_token(), David Gibson, 2019/07/02
- [Qemu-devel] [PULL 14/49] spapr_pci: Fix DRC owner in spapr_dt_pci_bus(), David Gibson, 2019/07/02
- [Qemu-devel] [PULL 18/49] hw/ppc/mac_newworld: Drop useless CONFIG_KVM ifdefery,
David Gibson <=
- [Qemu-devel] [PULL 16/49] spapr_pci: Drop useless CONFIG_KVM ifdefery, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 06/49] spapr_pci: Fix potential NULL pointer dereference in spapr_dt_pci_bus(), David Gibson, 2019/07/02
- [Qemu-devel] [PULL 13/49] target/ppc: remove getVSR()/putVSR() from mem_helper.c, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 08/49] xics/spapr: Register RTAS/hypercalls once at machine init, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 17/49] hw/ppc/mac_oldworld: Drop useless CONFIG_KVM ifdefery, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 15/49] xics/spapr: Only emulated XICS should use RTAS/hypercalls emulation, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 29/49] target/ppc: remove getVSR()/putVSR() from int_helper.c, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 25/49] xics/kvm: Add error propagation to ic*_set_kvm_state() functions, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 22/49] xics/spapr: Rename xics_kvm_init(), David Gibson, 2019/07/02
- [Qemu-devel] [PULL 11/49] xics: Add comment about CPU hotplug, David Gibson, 2019/07/02