Il lun 12 dic 2022, 23:23 David Woodhouse <dw...@infradead.org> ha scritto:

> On Mon, 2022-12-12 at 18:07 +0100, Paolo Bonzini wrote:
> > On 12/9/22 10:55, David Woodhouse wrote:
> > >   config KVM
> > >       bool
> > > +    imply XEN_EMU if (I386 || X86_64)
> >
> > No need for the "imply", just make it "default y" below and it will have
> > the same effect.
> >
> > >
> > > diff --git a/target/Kconfig b/target/Kconfig
> > > index 83da0bd293..e19c9d77b5 100644
> > > --- a/target/Kconfig
> > > +++ b/target/Kconfig
> > > @@ -18,3 +18,7 @@ source sh4/Kconfig
> > >  source sparc/Kconfig
> > >  source tricore/Kconfig
> > >  source xtensa/Kconfig
> > > +
> > > +config XEN_EMU
> > > +    bool
> > > +    depends on KVM && (I386 || X86_64)
> >
> > Please place it in hw/xen/Kconfig.
>
> Perhaps I misunderstand, but I'm not sure that is consistent with what
> Philippe was asking for in
>
> https://lore.kernel.org/qemu-devel/d203e13d-e2f9-5816-030d-c1449bde3...@linaro.org/
> specifically:
>
> >> I rather have hw/ and target/ features disentangled, so I'd use
> >> CONFIG_XEN_EMU under target/ and CONFIG_XENFV_MACHINE under hw/,
> >> eventually having CONFIG_XEN_EMU depending on CONFIG_XENFV_MACHINE
> >> and -- for now -- CONFIG_KVM.
>

However the dependency of the xenfv machine is misguided. In principle
there is no reason to depend on KVM as opposed to TCG, too, which is why I
didn't suggest hw/i386/kvm for either the devices or the Kconfig file.

The idea there seems to be that XEN_EMU is a *target* feature since it
> covers the support in target/i386/kvm.
>
> But yes, it *also* covers the devices I'm adding to hw/i386/kvm. Do I
> want a *separate* config symbol for that? Or just make those depend on
> XENFV_MACHINE && XEN_EMU ?
>
> I'll move XEN_EMU to hw/i386/Kconfig for now, thereby doing what
> *neither* of you said (I don't think hw/xen/Kconfig is the best choice
> when the *code* it enables is under hw/i386/kvm?)
>

Yeah there is no especially better match. I guess hw/i386 is fine, since
there will be code in mc->kvm_type. It would be either there or in
target/i386/Kconfig, but not target/Kconfig.

Paolo

>

Reply via email to