On 03/10/2018 13:34, Roman Kagan wrote: > 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 <rka...@virtuozzo.com> >> >> 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?
It's half-and-half. For example, CONFIG_IPMI, CONFIG_SCSI, CONFIG_VIRTFS work this way. acpi/ and virtio/ use CONFIG_SOFTMMU just because they need to compile acpi-stub.o/ipmi-stub.o/vhost-stub.o unconditionally. xen/ could be changed if one was inclined to do it. Paolo