[PATCH] i386: removes microvm from default build since microvm doesn't support Xen accel.

Will Gyda posted 1 patch 5 months, 3 weeks ago
Failed in applying to current master (apply log)
configs/devices/i386-softmmu/default.mak | 1 -
hw/i386/Kconfig                          | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
[PATCH] i386: removes microvm from default build since microvm doesn't support Xen accel.
Posted by Will Gyda 5 months, 3 weeks ago
i386: removes microvm from default build since microvm doesn't support Xen accel.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2294

Signed-off-by: Will Gyda <vilhelmgyda@gmail.com>

---
 configs/devices/i386-softmmu/default.mak | 1 -
 hw/i386/Kconfig                          | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/configs/devices/i386-softmmu/default.mak b/configs/devices/i386-softmmu/default.mak
index 598c6646df..6f4f5ab9eb 100644
--- a/configs/devices/i386-softmmu/default.mak
+++ b/configs/devices/i386-softmmu/default.mak
@@ -29,4 +29,3 @@
 CONFIG_ISAPC=y
 CONFIG_I440FX=y
 CONFIG_Q35=y
-CONFIG_MICROVM=y
diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index a6ee052f9a..95bcd922a5 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -108,6 +108,8 @@ config Q35
 
 config MICROVM
     bool
+    default y
+    depends on KVM || WHPX || NVMM || HVF || TCG
     select SERIAL_ISA # for serial_hds_isa_init()
     select ISA_BUS
     select APIC
-- 
2.25.1
Re: [PATCH] i386: removes microvm from default build since microvm doesn't support Xen accel.
Posted by Paolo Bonzini 5 months, 3 weeks ago
On 6/2/24 12:38, Will Gyda wrote:
> i386: removes microvm from default build since microvm doesn't support Xen accel.
> 
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2294

This is already done in (what will be) QEMU 9.1; 
configs/devices/i386-softmmu.mak has:

# Boards are selected by default, uncomment to keep out of the build.
# CONFIG_ISAPC=n
# CONFIG_I440FX=n
# CONFIG_Q35=n
# CONFIG_MICROVM=n

So we would only have to add the "depends on".  I don't oppose that, but 
also I don't see why microvm cannot support Xen.

Paolo
Re: [PATCH] i386: removes microvm from default build since microvm doesn't support Xen accel.
Posted by Vilhelm Gyda 5 months, 3 weeks ago
On Mon, Jun 3, 2024 at 11:53 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 6/2/24 12:38, Will Gyda wrote:
> > i386: removes microvm from default build since microvm doesn't support Xen accel.
> >
> > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2294
>
> This is already done in (what will be) QEMU 9.1;
> configs/devices/i386-softmmu.mak has:
>
> # Boards are selected by default, uncomment to keep out of the build.
> # CONFIG_ISAPC=n
> # CONFIG_I440FX=n
> # CONFIG_Q35=n
> # CONFIG_MICROVM=n
>
> So we would only have to add the "depends on".  I don't oppose that, but
> also I don't see why microvm cannot support Xen.

Yeah, this is to be discussed. If it is worth it to do so. Manos wrote
about this here:
https://mail.gnu.org/archive/html/qemu-devel/2024-05/msg05842.html

>
> Paolo
>
Re: [PATCH] i386: removes microvm from default build since microvm doesn't support Xen accel.
Posted by Michael Tokarev 5 months, 3 weeks ago
02.06.2024 13:38, Will Gyda wrote:
> i386: removes microvm from default build since microvm doesn't support Xen accel.

Hm.  Maybe we should remove xen from default build instead?

Thanks,

/mjt
Re: [PATCH] i386: removes microvm from default build since microvm doesn't support Xen accel.
Posted by Vilhelm Gyda 5 months, 3 weeks ago
We can remove Xen from default build too. Though, I think, regardless
of Xen being in our out of default build, the "depends on" change in
`hw/i386/Kconfig` is essential in itself to cover the case when a user
builds with Xen only. In case of a Xen only build by user, without the
proposed Kconfig changes, microvm can be ran with Xen accel. Something
that doesn't work currently.

On Sun, Jun 2, 2024 at 5:43 PM Michael Tokarev <mjt@tls.msk.ru> wrote:
>
> 02.06.2024 13:38, Will Gyda wrote:
> > i386: removes microvm from default build since microvm doesn't support Xen accel.
>
> Hm.  Maybe we should remove xen from default build instead?
>
> Thanks,
>
> /mjt
Re: [PATCH] i386: removes microvm from default build since microvm doesn't support Xen accel.
Posted by Michael Tokarev 5 months, 3 weeks ago
03.06.2024 10:31, Vilhelm Gyda wrote:
> We can remove Xen from default build too. Though, I think, regardless
> of Xen being in our out of default build, the "depends on" change in
> `hw/i386/Kconfig` is essential in itself to cover the case when a user
> builds with Xen only. In case of a Xen only build by user, without the
> proposed Kconfig changes, microvm can be ran with Xen accel. Something
> that doesn't work currently.

FWIW, I love to have some minimal xen-only build too, also microvm-only
build.  I do this on Debian with a few tricks plus trial-and-error when
choosing which devices/features to enable/omit.  9.1 will have microvm-
config already which is good.

Yes, either depends or fixing microvm to work under xen is a good thing
for sure.

/mjt
-- 
GPG Key transition (from rsa2048 to rsa4096) since 2024-04-24.
New key: rsa4096/61AD3D98ECDF2C8E  9D8B E14E 3F2A 9DD7 9199  28F1 61AD 3D98 ECDF 2C8E
Old key: rsa2048/457CE0A0804465C5  6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
Transition statement: http://www.corpit.ru/mjt/gpg-transition-2024.txt
Re: [PATCH] i386: removes microvm from default build since microvm doesn't support Xen accel.
Posted by Vilhelm Gyda 5 months, 3 weeks ago
On Mon, Jun 3, 2024 at 1:10 PM Michael Tokarev <mjt@tls.msk.ru> wrote:
>
> 03.06.2024 10:31, Vilhelm Gyda wrote:
> > We can remove Xen from default build too. Though, I think, regardless
> > of Xen being in our out of default build, the "depends on" change in
> > `hw/i386/Kconfig` is essential in itself to cover the case when a user
> > builds with Xen only. In case of a Xen only build by user, without the
> > proposed Kconfig changes, microvm can be ran with Xen accel. Something
> > that doesn't work currently.
>
> FWIW, I love to have some minimal xen-only build too, also microvm-only
> build.  I do this on Debian with a few tricks plus trial-and-error when
> choosing which devices/features to enable/omit.  9.1 will have microvm-
> config already which is good.
>
> Yes, either depends or fixing microvm to work under xen is a good thing
> for sure.

I am new here so I don't know enough to think critically about this.
On my previous submission Manos addressed the idea of making microvm
work under Xen as:

"... Xen machines in qemu already provide PV devices analogously to
what microvm promises to support. What would be the use case for a
"hypervisor agnostic" microvm machine..."

https://mail.gnu.org/archive/html/qemu-devel/2024-05/msg05842.html

Also, in terms of finding things or projects to work on qemu. Gitlab
issues page is the only place, right?



> /mjt
> --
> GPG Key transition (from rsa2048 to rsa4096) since 2024-04-24.
> New key: rsa4096/61AD3D98ECDF2C8E  9D8B E14E 3F2A 9DD7 9199  28F1 61AD 3D98 ECDF 2C8E
> Old key: rsa2048/457CE0A0804465C5  6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
> Transition statement: http://www.corpit.ru/mjt/gpg-transition-2024.txt
>