qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [PATCH 3/5] hyperv: factor out arch-independent API into hw/hyperv
       [not found] ` <20180921082041.29380-4-rkagan@virtuozzo.com>
@ 2018-10-03 10:56   ` Paolo Bonzini
  2018-10-03 11:34     ` Roman Kagan
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2018-10-03 10:56 UTC (permalink / raw)
  To: Roman Kagan, qemu-devel
  Cc: Vijayabhaskar Balakrishna, Eduardo Habkost, Michael S. Tsirkin,
	Konrad Rzeszutek Wilk, Venu Busireddy, Liran Alon, Igor Mammedov,
	Si-Wei Liu, Boris Ostrovsky, Karl Heubaum

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 <rkagan@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
@@ -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/
diff --git a/hw/hyperv/Makefile.objs b/hw/hyperv/Makefile.objs
index 19928b726e..edaca2f763 100644
--- a/hw/hyperv/Makefile.objs
+++ b/hw/hyperv/Makefile.objs
@@ -1 +1,2 @@
-obj-$(CONFIG_HYPERV) += hyperv.o
+obj-y += hyperv.o
+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


Paolo

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

* Re: [Qemu-devel] [PATCH 4/5] default-configs: collect CONFIG_HYPERV* in hyperv.mak
       [not found] ` <20180921082041.29380-5-rkagan@virtuozzo.com>
@ 2018-10-03 11:01   ` Paolo Bonzini
  0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2018-10-03 11:01 UTC (permalink / raw)
  To: Roman Kagan, qemu-devel
  Cc: Vijayabhaskar Balakrishna, Eduardo Habkost, Michael S. Tsirkin,
	Konrad Rzeszutek Wilk, Venu Busireddy, Liran Alon, Igor Mammedov,
	Si-Wei Liu, Boris Ostrovsky, Karl Heubaum

On 21/09/2018 10:20, Roman Kagan wrote:
> diff --git a/default-configs/hyperv.mak b/default-configs/hyperv.mak
> new file mode 100644
> index 0000000000..3d45e28403
> --- /dev/null
> +++ b/default-configs/hyperv.mak
> @@ -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

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

* Re: [Qemu-devel] [PATCH 3/5] hyperv: factor out arch-independent API into hw/hyperv
  2018-10-03 10:56   ` [Qemu-devel] [PATCH 3/5] hyperv: factor out arch-independent API into hw/hyperv Paolo Bonzini
@ 2018-10-03 11:34     ` Roman Kagan
  2018-10-03 11:47       ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: Roman Kagan @ 2018-10-03 11:34 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: qemu-devel@nongnu.org, Vijayabhaskar Balakrishna, Eduardo Habkost,
	Michael S. Tsirkin, Konrad Rzeszutek Wilk, Venu Busireddy,
	Liran Alon, Igor Mammedov, Si-Wei Liu, Boris Ostrovsky,
	Karl Heubaum

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 <rkagan@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?

> +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.

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

* Re: [Qemu-devel] [PATCH 3/5] hyperv: factor out arch-independent API into hw/hyperv
  2018-10-03 11:34     ` Roman Kagan
@ 2018-10-03 11:47       ` Paolo Bonzini
  0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2018-10-03 11:47 UTC (permalink / raw)
  To: Roman Kagan, qemu-devel, Vijayabhaskar Balakrishna,
	Eduardo Habkost, Michael S. Tsirkin, Konrad Rzeszutek Wilk,
	Venu Busireddy, Liran Alon, Igor Mammedov, Si-Wei Liu,
	Boris Ostrovsky, Karl Heubaum

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 <rkagan@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

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

end of thread, other threads:[~2018-10-03 11:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20180921082041.29380-1-rkagan@virtuozzo.com>
     [not found] ` <20180921082041.29380-4-rkagan@virtuozzo.com>
2018-10-03 10:56   ` [Qemu-devel] [PATCH 3/5] hyperv: factor out arch-independent API into hw/hyperv Paolo Bonzini
2018-10-03 11:34     ` Roman Kagan
2018-10-03 11:47       ` Paolo Bonzini
     [not found] ` <20180921082041.29380-5-rkagan@virtuozzo.com>
2018-10-03 11:01   ` [Qemu-devel] [PATCH 4/5] default-configs: collect CONFIG_HYPERV* in hyperv.mak Paolo Bonzini

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).