qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Srivatsa Vaddagiri <quic_svaddagi@quicinc.com>
To: Alex Benn?e <alex.bennee@linaro.org>
Cc: <peter.maydell@linaro.org>, <qemu-devel@nongnu.org>,
	<qemu-arm@nongnu.org>, <quic_tsoni@quicinc.com>,
	<quic_pheragu@quicinc.com>, <quic_eberman@quicinc.com>,
	<quic_yvasi@quicinc.com>, <quic_cvanscha@quicinc.com>,
	<quic_mnalajal@quicinc.com>
Subject: Re: [RFC/PATCH v0 03/12] gunyah: Basic support
Date: Fri, 1 Dec 2023 16:03:29 +0530	[thread overview]
Message-ID: <20231201103329.GA3618015@quicinc.com> (raw)
In-Reply-To: <87cyvs8pmh.fsf@draig.linaro.org>

* Alex Benn?e <alex.bennee@linaro.org> [2023-11-29 16:56:38]:

> Srivatsa Vaddagiri <quic_svaddagi@quicinc.com> writes:
> 
> > Add a new accelerator, gunyah, with basic functionality of creating a
> > VM. Subsequent patches will add support for other functions required to
> > run a VM.
> >
> > Signed-off-by: Srivatsa Vaddagiri <quic_svaddagi@quicinc.com>
> 
> Hmm this failed to build:
> 
>   FAILED: libqemu-aarch64-softmmu.fa.p/accel_gunyah_gunyah-all.c.o 
>   cc -m64 -mcx16 -Ilibqemu-aarch64-softmmu.fa.p -I. -I../.. -Itarget/arm -I../../target/arm -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/capstone -I/usr/include/spice-server -I/usr/include/spice-1 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -fstack-protector-strong -Wundef -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -Wshadow=local -isystem /home/alex/lsrc/qemu.git/linux-headers -isystem linux-headers -iquote . -iquote /home/alex/lsrc/qemu.git -iquote /home/alex/lsrc/qemu.git/include -iquote /home/alex/lsrc/qemu.git/host/include/x86_64 -iquote /home/alex/lsrc/qemu.git/host/include/generic -iquote /home/alex/lsrc/qemu.git/tcg/i386 -pthread -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -fPIE -isystem../../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="aarch64-softmmu-config-target.h"' '-DCONFIG_DEVICES="aarch64-softmmu-config-devices.h"' -MD -MQ libqemu-aarch64-softmmu.fa.p/accel_gunyah_gunyah-all.c.o -MF libqemu-aarch64-softmmu.fa.p/accel_gunyah_gunyah-all.c.o.d -o libqemu-aarch64-softmmu.fa.p/accel_gunyah_gunyah-all.c.o -c ../../accel/gunyah/gunyah-all.c
>   ../../accel/gunyah/gunyah-all.c:21:10: fatal error: linux-headers/linux/gunyah.h: No such file or directory
>      21 | #include "linux-headers/linux/gunyah.h"
>         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   compilation terminated.
> 
> Easiest solution:
> 
>   add PATCH after 02 importing headers
> 
> I usually add a !MERGE to the summary just to remind myself that we'll
> need to properly update the headers before we merge. e.g: linux-headers: update to v6.6-with-gunyah (!MERGE)

I had run update-linux-headers.sh after Patch 02 before trying to compile rest of
the patch series. It was run against a Linux kernel tree having the Gunyah
patches. If it helps, I can include the actual header itself as a Patch (with
!MERGE noted), so that it saves some trouble.

> There are some other merge failures bellow so perhaps its time to do a
> re-base and send v1?

Yes working on v1. I have tested virtio-pci working I think, testing SMP now after
which will send out v1 (hopefully early next week).

> Whats the current state of the kernel merge?

The kernel patches are being reworked to avoid pinning of memory and to allow
on-demand allocation of VM memory. That should address the major feedback
received. We expect the next version of kernel patches to be published later
this month, and a potential merge in kernel.org hopefully before April (6.9)?!

It will also require some rework in Qemu support to use the new guest
memfd APIs for allocating VM memory (for confidential VMs). I will publish
support for it in v2 (could be a month away I think).

> <snip>
> > diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
> > index 9da3fe299b..0c95f79645 100644
> > --- a/scripts/meson-buildoptions.sh
> > +++ b/scripts/meson-buildoptions.sh
> > @@ -112,6 +112,7 @@ meson_options_help() {
> >    printf "%s\n" '  guest-agent-msi Build MSI package for the QEMU Guest Agent'
> >    printf "%s\n" '  hax             HAX acceleration support'
> >    printf "%s\n" '  hvf             HVF acceleration support'
> > +  printf "%s\n" '  gunyah          Gunyah acceleration support'
> 
> need rebasing due to hax drop
> 
> >    printf "%s\n" '  iconv           Font glyph conversion support'
> >    printf "%s\n" '  jack            JACK sound support'
> >    printf "%s\n" '  keyring         Linux keyring support'
> > @@ -312,6 +313,8 @@ _meson_option_parse() {
> >      --disable-guest-agent) printf "%s" -Dguest_agent=disabled ;;
> >      --enable-guest-agent-msi) printf "%s" -Dguest_agent_msi=enabled ;;
> >      --disable-guest-agent-msi) printf "%s" -Dguest_agent_msi=disabled ;;
> > +    --enable-gunyah) printf "%s" -Dgunyah=enabled ;;
> > +    --disable-gunyah) printf "%s" -Dgunyah=disabled ;;
> 
> ditto.
> 
> >      --enable-hax) printf "%s" -Dhax=enabled ;;
> >      --disable-hax) printf "%s" -Dhax=disabled ;;
> >      --enable-hexagon-idef-parser) printf "%s" -Dhexagon_idef_parser=true ;;
> > diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
> > index 96158093cc..a712f1a3b3 100644
> > --- a/target/arm/cpu64.c
> > +++ b/target/arm/cpu64.c
> > @@ -33,6 +33,7 @@
> >  #include "hw/qdev-properties.h"
> >  #include "internals.h"
> >  #include "cpregs.h"
> > +#include "sysemu/gunyah.h"
> 
> This should be moved up next to the other accelerator includes.

Sure thanks for this feedback. Will incorporate them in v1.

- vatsa


  reply	other threads:[~2023-12-01 10:34 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11 16:52 [RFC/PATCH v0 00/12] Gunyah hypervisor support Srivatsa Vaddagiri
2023-10-11 16:52 ` [RFC/PATCH v0 01/12] hw/arm/virt: Avoid NULL pointer de-reference Srivatsa Vaddagiri
2023-10-12  4:30   ` Philippe Mathieu-Daudé
2023-10-12  5:02     ` Markus Armbruster
2023-10-12 12:24     ` Srivatsa Vaddagiri
2023-10-11 16:52 ` [RFC/PATCH v0 02/12] update-linux-headers: Include gunyah.h Srivatsa Vaddagiri
2023-10-11 16:57   ` Srivatsa Vaddagiri
2023-11-29 16:44   ` Alex Bennée
2023-12-01 10:35     ` Srivatsa Vaddagiri
2023-10-11 16:52 ` [RFC/PATCH v0 03/12] gunyah: Basic support Srivatsa Vaddagiri
2023-10-12  4:33   ` Philippe Mathieu-Daudé
2023-10-12 11:32     ` Alex Bennée
2023-10-12 12:24       ` Srivatsa Vaddagiri
2023-11-29 16:56   ` Alex Bennée
2023-12-01 10:33     ` Srivatsa Vaddagiri [this message]
2023-10-11 16:52 ` [RFC/PATCH v0 04/12] gunyah: Add VM properties Srivatsa Vaddagiri
2023-10-11 16:52 ` [RFC/PATCH v0 05/12] gunyah: Support memory assignment Srivatsa Vaddagiri
2023-10-11 16:52 ` [RFC/PATCH v0 06/12] gunyah: Add IRQFD and IOEVENTFD functions Srivatsa Vaddagiri
2023-10-11 16:52 ` [RFC/PATCH v0 07/12] gunyah: Add gicv3 interrupt controller Srivatsa Vaddagiri
2023-10-11 16:52 ` [RFC/PATCH v0 08/12] gunyah: Specific device-tree location Srivatsa Vaddagiri
2023-10-12  4:35   ` Philippe Mathieu-Daudé
2023-10-11 16:52 ` [RFC/PATCH v0 09/12] gunyah: Customize device-tree Srivatsa Vaddagiri
2023-10-12  4:36   ` Philippe Mathieu-Daudé
2023-10-11 16:52 ` [RFC/PATCH v0 10/12] gunyah: CPU execution loop Srivatsa Vaddagiri
2023-10-12  4:43   ` Philippe Mathieu-Daudé
2023-10-12 12:25     ` Srivatsa Vaddagiri
2023-10-11 16:52 ` [RFC/PATCH v0 11/12] gunyah: Workarounds (NOT FOR MERGE) Srivatsa Vaddagiri
2023-10-11 16:52 ` [RFC/PATCH v0 12/12] gunyah: Documentation Srivatsa Vaddagiri
2023-10-12  4:52   ` Philippe Mathieu-Daudé
2023-10-12 12:33     ` Srivatsa Vaddagiri
2023-10-12 14:55       ` Alex Bennée
2023-10-17  9:21         ` Srivatsa Vaddagiri
2023-10-18 15:54           ` Alex Bennée
2023-10-18 16:40 ` [RFC/PATCH v0 00/12] Gunyah hypervisor support Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231201103329.GA3618015@quicinc.com \
    --to=quic_svaddagi@quicinc.com \
    --cc=alex.bennee@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quic_cvanscha@quicinc.com \
    --cc=quic_eberman@quicinc.com \
    --cc=quic_mnalajal@quicinc.com \
    --cc=quic_pheragu@quicinc.com \
    --cc=quic_tsoni@quicinc.com \
    --cc=quic_yvasi@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).