On Wed, Oct 03, 2018 at 12:56:00PM +0200, Paolo Bonzini wrote: > On 21/09/2018 10:20, Roman Kagan wrote: > > A significant part of hyperv.c is not actually tied to x86, and can > > be moved to hw/. > > > > This will allow to maintain most of Hyper-V and VMBus > > target-independent, and to avoid conflicts with inclusion of > > arch-specific headers down the road in VMBus implementation. > > > > Also this stuff can now be opt-out with CONFIG_HYPERV. > > > > Signed-off-by: Roman Kagan <[email protected]> > > We can squash this in too: > > diff --git a/hw/Makefile.objs b/hw/Makefile.objs > index b8f4675219..30722ccf98 100644 > --- a/hw/Makefile.objs > +++ b/hw/Makefile.objs ... > -devices-dirs-$(CONFIG_SOFTMMU) += hyperv/ > +devices-dirs-$(CONFIG_HYPERV) += hyperv/ ... > --- a/hw/hyperv/Makefile.objs > +++ b/hw/hyperv/Makefile.objs ... > -obj-$(CONFIG_HYPERV) += hyperv.o > +obj-y += hyperv.o
Actually I did it this way at first, but then decided to follow the pattern of virtio/, xen/, and most other subdirectories there just for consistency. Is there any preference for this? > +obj-$(CONFIG_HYPERV_TESTDEV) += hyperv_testdev.o > diff --git a/hw/misc/hyperv_testdev.c b/hw/hyperv/hyperv_testdev.c > similarity index 100% > rename from hw/misc/hyperv_testdev.c > rename to hw/hyperv/hyperv_testdev.c > diff --git a/hw/misc/Makefile.objs b/hw/misc/Makefile.objs > index 6d50b03cfd..680350b3c3 100644 > --- a/hw/misc/Makefile.objs > +++ b/hw/misc/Makefile.objs > @@ -71,7 +71,6 @@ obj-$(CONFIG_IOTKIT_SYSCTL) += iotkit-sysctl.o > obj-$(CONFIG_IOTKIT_SYSINFO) += iotkit-sysinfo.o > > obj-$(CONFIG_PVPANIC) += pvpanic.o > -obj-$(CONFIG_HYPERV_TESTDEV) += hyperv_testdev.o > obj-$(CONFIG_AUX) += auxbus.o > obj-$(CONFIG_ASPEED_SOC) += aspeed_scu.o aspeed_sdmc.o > obj-$(CONFIG_MSF2) += msf2-sysreg.o Fine by me. Thanks, Roman.
