hyperv: factor out arch-independent API into hw/hyperv
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Roman Kagan
A significant part of
hyperv.cis 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:
hw/Makefile.objs +1 -1
@@ -9,7 +9,7 @@ devices-dirs-$(CONFIG_SOFTMMU) += cpu/ devices-dirs-$(CONFIG_SOFTMMU) += display/ devices-dirs-$(CONFIG_SOFTMMU) += dma/ devices-dirs-$(CONFIG_SOFTMMU) += gpio/ -devices-dirs-$(CONFIG_SOFTMMU) += hyperv/ +devices-dirs-$(CONFIG_HYPERV) += hyperv/ devices-dirs-$(CONFIG_SOFTMMU) += i2c/ devices-dirs-$(CONFIG_SOFTMMU) += ide/ devices-dirs-$(CONFIG_SOFTMMU) += input/
hw/hyperv/Makefile.objs +2 -1
@@ -1 +1,2 @@ -obj-$(CONFIG_HYPERV) += hyperv.o +obj-y += hyperv.o +obj-$(CONFIG_HYPERV_TESTDEV) += hyperv_testdev.o
hw/hyperv/hyperv_testdev.c renamed from hw/misc/hyperv_testdev.c +0 -0
hw/misc/Makefile.objs +0 -1
@@ -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
Paolo
Quoted 18 lines · Paolo Bonzini
Quoted 10 lines · Roman Kagan
A significant part of
hyperv.cis 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:
hw/Makefile.objs +0
-0
...
Quoted 2 lines
hw/Makefile.objs +1
-1-devices-dirs-$(CONFIG_SOFTMMU) += hyperv/ +devices-dirs-$(CONFIG_HYPERV) += hyperv/
...
Quoted 2 lines
hw/hyperv/Makefile.objs +0
-0
...
hw/hyperv/Makefile.objs line 1
Quoted 2 lines
hw/hyperv/Makefile.objs +1
-1-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?
Quoted 10 lines
hw/hyperv/Makefile.objs +1
-0+obj-$(CONFIG_HYPERV_TESTDEV) += hyperv_testdev.ohw/hyperv/hyperv_testdev.c renamed from hw/misc/hyperv_testdev.c +0
-0hw/misc/Makefile.objs +0
-0
hw/misc/Makefile.objs obj-$(CONFIG_IOTKIT_SYSCTL) += iotkit-sysctl.o · line 76
Quoted 7 lines
hw/misc/Makefile.objs +0
-1@@ -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.
Quoted 26 lines · Roman Kagan
Quoted 18 lines · Paolo Bonzini
Quoted 10 lines · Roman Kagan
A significant part of
hyperv.cis 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:
hw/Makefile.objs +0
-0...
Quoted 2 lines
hw/Makefile.objs +1
-1-devices-dirs-$(CONFIG_SOFTMMU) += hyperv/ +devices-dirs-$(CONFIG_HYPERV) += hyperv/...
Quoted 2 lines
hw/hyperv/Makefile.objs +0
-0...
Quoted 6 lines
hw/hyperv/Makefile.objs line 1
Quoted 2 lines
hw/hyperv/Makefile.objs +1
-1-obj-$(CONFIG_HYPERV) += hyperv.o +obj-y += hyperv.oActually 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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [Qemu-devel] [PATCH 4/5] default-configs: collect CONFIG_HYPERV* in hyperv.mak
default-configs/hyperv.mak line 2
Quoted 8 lines · Roman Kagan
default-configs/hyperv.mak new file +2
-0@@ -0,0 +1,2 @@ +CONFIG_HYPERV=$(CONFIG_KVM) +CONFIG_HYPERV_TESTDEV=$(CONFIG_HYPERV)
By moving the test device to hy/hyperv, this can be just CONFIG_HYPERV_TESTDEV=y.
Paolo