All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Sherring <pauloasherring@gmail.com>
To: Bertrand Marquis <Bertrand.Marquis@arm.com>
Cc: "meta-virtualization@lists.yoctoproject.org"
	<meta-virtualization@lists.yoctoproject.org>, nd <nd@arm.com>,
	Bruce Ashfield <bruce.ashfield@gmail.com>
Subject: Re: [meta-virtualization] Loading the module xen-gntdev on boot
Date: Tue, 22 Mar 2022 15:01:32 +0000	[thread overview]
Message-ID: <CAG9RwPKbpORfL3FkARJuT=fAM5PZGY-Lkv+PQ-rEjt1+j9qVeQ@mail.gmail.com> (raw)
In-Reply-To: <D673A4B9-BB22-41AA-A13C-E19F1EC52BCF@arm.com>

Hi Bertrand,
One very important piece of information I missed to disclose: I am not
using runqemu,
as it was not being properly set by the resulting bitbake build (the
resulting image was
pointing to the kernel instead of the xen binary).

So, I am launching it "by hand":

./tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/qemu-system-aarch64
\
-nographic  \
-machine virt,gic-version=3 \
-machine virtualization=true \
-cpu cortex-a57 -smp 4 -m 4G -machine type=virt \
-bios ./tmp/deploy/images/qemuarm64/u-boot-qemuarm64.bin \
-device loader,file=./tmp/deploy/images/qemuarm64/xen-qemuarm64,addr=0x45000000
\
-device loader,file=./tmp/deploy/images/qemuarm64/Image--5.10.103+git0+792f1272dd_3aab5bb12b-r0-qemuarm64-20220317212819.bin,addr=0x46000000
\
-device loader,file=./tmp/deploy/images/qemuarm64/Image--5.10.103+git0+792f1272dd_3aab5bb12b-r0-qemuarm64-20220317212819.bin,addr=0x48000000
\
-device loader,file=./virt.dtb,addr=0x44000000 \
-drive id=disk0,file=./tmp/deploy/images/qemuarm64/xen-image-minimal-qemuarm64.ext4,if=none,index=0,format=raw
\
-device virtio-blk-device,drive=disk0 \

And then stop it on u-boot, and setup the fdt:
## Dom0 only:
fdt addr 0x44000000
fdt resize
fdt set /chosen \#address-cells <1>
fdt set /chosen \#size-cells <1>
fdt set /chosen xen,xen-bootargs "dom0_mem=512M"
fdt mknod /chosen module@0
fdt set /chosen/module@0 compatible "xen,linux-zimage" "xen,multiboot-module"
fdt set /chosen/module@0 reg <0x46000000 0x1373a00>
fdt set /chosen/module@0 bootargs "dom0_mem=512M root=/dev/vda rw
earlyprintk=serial,ttyAMA0 console=ttyAMA0,115200n8 earlycon=xenboot"
booti 0x45000000 - 0x44000000

Please find also some more information below:

On Tue, Mar 22, 2022 at 12:59 PM Bertrand Marquis
<Bertrand.Marquis@arm.com> wrote:
>
> Hi Paulo,
>
> Hardknott is long term while honister is not but both are stable releases.
>
> I am not quite sure I get your 4.14 pulling 4.16. The 4.14 recipe is building the latest 4.14 version of Xen.
>
That was just me being silly. I was looking into xen_git.bb which
clearly is not the preferred provider. I am in fact using Xen 4.14, as
you pointed out. Sorry for the mistake.
> From what I see modules to load are in a xen.conf in modules-load.d generated by Xen tools compilation.
> Gntdev is properly listed in the current xen source tree as one of the default modules to actually load on boot.
>
> Can you check the content of modules-load.d/xen.conf (somewhere in /etc in your dom0 roots) ?
>
I have nothing there. But, I did have two hits when searching the rootfs:
/etc/tmpfiles.d/xen.conf
/lib/systemd/modules-load.d/xen.conf
Not sure if there there is some sort of startup script that was
supposed to move around these files
or even if systemd-modules-load.service would be supposed to be
looking elsewhere.

> It could be that this was actually missing in the xen release you are building or that systemd is not actually loading modules listed there.
>
> Cheers
> Bertrand
Cheers, Paulo.

____

> > On 22 Mar 2022, at 13:38, Paulo Sherring <pauloasherring@gmail.com> wrote:
> >
> > Hello Bertrand,
> >
> > On Tue, Mar 22, 2022 at 12:28 PM Bertrand Marquis
> > <Bertrand.Marquis@arm.com> wrote:
> >>
> >> Hi Paulo,
> >>
> >> Please always keep the mailing list in as me asking the questions does not mean I will necessarily be the one working on this.
> >>
> > Oops, my mistake, sorry.
> >
> >> Please see some questions here after.
> >>
> >>> On 22 Mar 2022, at 12:03, Paulo Sherring <pauloasherring@gmail.com> wrote:
> >>>
> >>> Hello Bertrand,
> >>>
> >>> On Tue, Mar 22, 2022 at 10:44 AM Bertrand Marquis
> >>> <Bertrand.Marquis@arm.com> wrote:
> >>>>
> >>>> Hi Paulo,
> >>>>
> >>>>> On 22 Mar 2022, at 11:33, Paulo Sherring via lists.yoctoproject.org <pauloasherring=gmail.com@lists.yoctoproject.org> wrote:
> >>>>>
> >>>>> Hello all,
> >>>>> I am a bit new to meta-virtualization and to the Xen project And to
> >>>>> virtualizations, so please bear with me :)
> >>>>> I've been trying to make use of the xen project, currently targeting
> >>>>> qemu (and later on, rpi4). After messing around, I was able to boot
> >>>>> dom0 and a domU.
> >>>>> But, I had to add the xen-gntdev to the `modules-load.d,` because
> >>>>> `xenstored` was failing to start, due to some missing connection,
> >>>>> probably brought up by xen-gntdev module.
> >>>>>
> >>>>> As I am new to all this, I was just wondering if this is by design, or
> >>>>> this is an issue (and therefore, I should/could submit a patch).
> >>>>
> >>>> No problem at all and thanks a lot for the feedback.
> >>>> This should not happen and should be fixed.
> >>>>
> >>>> Could you tell us what you are building (which image) and what parameters did you set in your local.conf ?
> >>>>
> >>>
> >>> - Baseline is hardknott.
> >>
> >> Any reason not to use honester ?
> >>
> > The main reason was that hardknott is tagged as a stable release and
> > it already includes xen 4.14 or latest (it is actually pulling 4.16),
> > which I wanted/will need for RPi4 support.
>
>


  reply	other threads:[~2022-03-22 15:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22 10:33 Loading the module xen-gntdev on boot Paulo Sherring
2022-03-22 10:44 ` [meta-virtualization] " Bertrand Marquis
     [not found]   ` <CAG9RwPKUk+cY4wOStyFqHchmm9vJYrFZxtjpC0V9iwrQ+9XdYw@mail.gmail.com>
2022-03-22 12:27     ` Bertrand Marquis
2022-03-22 12:38       ` Paulo Sherring
2022-03-22 12:58         ` Bertrand Marquis
2022-03-22 15:01           ` Paulo Sherring [this message]
2022-03-22 15:22             ` Bertrand Marquis
2022-03-22 15:30               ` Diego Sueiro
2022-03-22 15:52                 ` Paulo Sherring
2022-03-23  8:38                   ` Bertrand Marquis
2022-03-23 10:30                     ` Richard Purdie
2022-03-23 21:17                       ` Bruce Ashfield
2022-03-24  8:42                         ` Bertrand Marquis
2022-03-24 12:06                           ` Bruce Ashfield
2022-03-24 13:03                             ` Bertrand Marquis
2022-03-24 13:18                               ` Bruce Ashfield
     [not found]                   ` <16DEF5BD23F06258.15837@lists.yoctoproject.org>
2022-03-23  9:03                     ` Bertrand Marquis

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='CAG9RwPKbpORfL3FkARJuT=fAM5PZGY-Lkv+PQ-rEjt1+j9qVeQ@mail.gmail.com' \
    --to=pauloasherring@gmail.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=bruce.ashfield@gmail.com \
    --cc=meta-virtualization@lists.yoctoproject.org \
    --cc=nd@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.