qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/7] ppc: Get rid of some CONFIG_KVM guards
@ 2019-06-14 11:08 Greg Kurz
  2019-06-14 11:08 ` [Qemu-devel] [PATCH 1/7] spapr_pci: Drop useless CONFIG_KVM ifdefery Greg Kurz
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Greg Kurz @ 2019-06-14 11:08 UTC (permalink / raw)
  To: David Gibson; +Cc: qemu-ppc, qemu-devel

There are several places where CONFIG_KVM is used to guard code that
should only be built when KVM is supported. It is generally preferable
to avoid that and leave such guards in header files for improved
readability.

In many cases, the execution of the code is also conditionned by
kvm_enabled() which expands to (0) when CONFIG_KVM is not defined.
This is likely to cause the compiler to optimize the code out,
and if it doesn't, the right way to address compiling issues is
to add stubs.

Successfuly compile tested on x86_64 and ppc64le linux. Travis shows
this builds fine on OSX as well.

--
Greg

---

Greg Kurz (7):
      spapr_pci: Drop useless CONFIG_KVM ifdefery
      hw/ppc/mac_oldworld: Drop useless CONFIG_KVM ifdefery
      hw/ppc/mac_newworld: Drop useless CONFIG_KVM ifdefery
      hw/ppc/prep: Drop useless CONFIG_KVM ifdefery
      hw/ppc: Drop useless CONFIG_KVM ifdefery
      ppc: Introduce kvmppc_set_reg_tb_offset() helper
      target/ppc/machine: Add kvmppc_pvr_workaround_required() stub


 hw/ppc/mac_newworld.c |    4 ----
 hw/ppc/mac_oldworld.c |    2 --
 hw/ppc/ppc.c          |    7 +------
 hw/ppc/prep.c         |    2 --
 hw/ppc/spapr_pci.c    |    2 --
 target/ppc/kvm.c      |    9 +++++++++
 target/ppc/kvm_ppc.h  |   10 ++++++++++
 target/ppc/machine.c  |    2 --
 8 files changed, 20 insertions(+), 18 deletions(-)



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-06-21 12:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-14 11:08 [Qemu-devel] [PATCH 0/7] ppc: Get rid of some CONFIG_KVM guards Greg Kurz
2019-06-14 11:08 ` [Qemu-devel] [PATCH 1/7] spapr_pci: Drop useless CONFIG_KVM ifdefery Greg Kurz
2019-06-14 11:08 ` [Qemu-devel] [PATCH 2/7] hw/ppc/mac_oldworld: " Greg Kurz
2019-06-14 11:09 ` [Qemu-devel] [PATCH 3/7] hw/ppc/mac_newworld: " Greg Kurz
2019-06-14 11:09 ` [Qemu-devel] [PATCH 4/7] hw/ppc/prep: " Greg Kurz
2019-06-14 11:09 ` [Qemu-devel] [PATCH 5/7] hw/ppc: " Greg Kurz
2019-06-14 11:09 ` [Qemu-devel] [PATCH 6/7] ppc: Introduce kvmppc_set_reg_tb_offset() helper Greg Kurz
2019-06-21 11:58   ` David Gibson
2019-06-14 11:09 ` [Qemu-devel] [PATCH 7/7] target/ppc/machine: Add kvmppc_pvr_workaround_required() stub Greg Kurz
2019-06-21 11:59   ` David Gibson
2019-06-19 11:13 ` [Qemu-devel] [PATCH 0/7] ppc: Get rid of some CONFIG_KVM guards David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).