qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	peter.maydell@linaro.org
Cc: Alistair Francis <alistair.francis@wdc.com>, qemu-devel@nongnu.org
Subject: Re: [PULL 13/18] hw/core: implement a guest-loader to support static hypervisor guests
Date: Mon, 15 Mar 2021 17:44:00 +0100	[thread overview]
Message-ID: <e690a377-2f3e-0774-03f8-813f2631e4f0@redhat.com> (raw)
In-Reply-To: <2bcd9ae8-b304-a9a1-9f14-d238a9b2f6a2@de.ibm.com>

On 3/15/21 5:16 PM, Christian Borntraeger wrote:
> 
> 
> On 08.03.21 14:50, Alex Bennée wrote:
>> Hypervisors, especially type-1 ones, need the firmware/bootcode to put
>> their initial guest somewhere in memory and pass the information to it
>> via platform data. The guest-loader is modelled after the generic
>> loader for exactly this sort of purpose:
>>
>>    $QEMU $ARGS  -kernel ~/xen.git/xen/xen \
>>      -append "dom0_mem=1G,max:1G loglvl=all guest_loglvl=all" \
>>      -device
>> guest-loader,addr=0x42000000,kernel=Image,bootargs="root=/dev/sda2 ro
>> console=hvc0 earlyprintk=xen" \
>>      -device guest-loader,addr=0x47000000,initrd=rootfs.cpio
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> Message-Id: <20210303173642.3805-5-alex.bennee@linaro.org>
>>
> 
> This now results in
> 
>     /usr/bin/ld: libcommon.fa.p/hw_core_guest-loader.c.o: in function
> `loader_insert_platform_data':
>     build/../hw/core/guest-loader.c:56: undefined reference to
> `qemu_fdt_add_subnode'
>     /usr/bin/ld: build/../hw/core/guest-loader.c:57: undefined reference
> to `qemu_fdt_setprop'
>     /usr/bin/ld: build/../hw/core/guest-loader.c:61: undefined reference
> to `qemu_fdt_setprop_string_array'
>     /usr/bin/ld: build/../hw/core/guest-loader.c:68: undefined reference
> to `qemu_fdt_setprop_string'
>     /usr/bin/ld: build/../hw/core/guest-loader.c:74: undefined reference
> to `qemu_fdt_setprop_string_array'
>     collect2: error: ld returned 1 exit status
>     ninja: build stopped: subcommand failed.
> 
> when building s390-softmmu on s390 with  --disable-fdt, which was in my
> build script.
>

Oops. Quick fix:

-- >8 --
diff --git a/hw/core/meson.build b/hw/core/meson.build
index 9cd72edf513..5827996206e 100644
--- a/hw/core/meson.build
+++ b/hw/core/meson.build
@@ -37,7 +37,7 @@
   'clock-vmstate.c',
 ))

-softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('guest-loader.c'))
+softmmu_ss.add(when: ['CONFIG_TCG', fdt], if_true: files('guest-loader.c'))

 specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files(
   'machine-qmp-cmds.c',

---

But better is a Kconfig entry to be able to deselect this
device.



  reply	other threads:[~2021-03-15 16:49 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 13:50 [PULL 00/18] testing, docs, semihosting move and guest-loader Alex Bennée
2021-03-08 13:50 ` [PULL 01/18] docs/system: add a gentle prompt for the complexity to come Alex Bennée
2021-03-08 13:50 ` [PULL 02/18] tests/docker: add a test-tcg for building then running check-tcg Alex Bennée
2021-03-08 13:50 ` [PULL 03/18] docker: Add Hexagon image Alex Bennée
2021-03-08 13:50 ` [PULL 04/18] tests/tcg: Use Hexagon Docker image Alex Bennée
2021-03-08 13:50 ` [PULL 05/18] gitlab: add build-user-hexagon test Alex Bennée
2021-03-08 13:50 ` [PULL 06/18] gitlab-ci.yml: Allow custom # of parallel linkers Alex Bennée
2021-03-08 13:50 ` [PULL 07/18] gitlab-ci.yml: Add jobs to test CFI flags Alex Bennée
2021-03-08 13:50 ` [PULL 08/18] tests/docker: Use --arch-only when building Debian cross image Alex Bennée
2021-03-08 13:50 ` [PULL 09/18] .editorconfig: update the automatic mode setting for Emacs Alex Bennée
2021-03-08 13:50 ` [PULL 10/18] hw/board: promote fdt from ARM VirtMachineState to MachineState Alex Bennée
2021-03-08 13:50 ` [PULL 11/18] hw/riscv: migrate fdt field to generic MachineState Alex Bennée
2021-03-08 13:50 ` [PULL 12/18] device_tree: add qemu_fdt_setprop_string_array helper Alex Bennée
2021-03-08 13:50 ` [PULL 13/18] hw/core: implement a guest-loader to support static hypervisor guests Alex Bennée
2021-03-15 16:16   ` Christian Borntraeger
2021-03-15 16:44     ` Philippe Mathieu-Daudé [this message]
2021-03-15 16:51       ` Philippe Mathieu-Daudé
2021-03-15 16:59         ` Christian Borntraeger
2021-03-15 17:05           ` Philippe Mathieu-Daudé
2021-03-15 18:01             ` Alex Bennée
2021-03-15 16:52       ` Christian Borntraeger
2021-03-08 13:51 ` [PULL 14/18] docs: move generic-loader documentation into the main manual Alex Bennée
2021-03-08 13:51 ` [PULL 15/18] docs: add some documentation for the guest-loader Alex Bennée
2021-03-08 13:51 ` [PULL 16/18] tests/avocado: add boot_xen tests Alex Bennée
2021-03-08 13:51 ` [PULL 17/18] semihosting: Move include/hw/semihosting/ -> include/semihosting/ Alex Bennée
2021-03-08 13:51 ` [PULL 18/18] semihosting: Move hw/semihosting/ -> semihosting/ Alex Bennée
2021-03-08 14:39 ` [PULL 00/18] testing, docs, semihosting move and guest-loader no-reply
2021-03-09 18:11 ` Peter Maydell
2021-03-09 18:37   ` Alex Bennée
2021-03-09 21:33     ` Peter Maydell
2021-03-09 22:26     ` Philippe Mathieu-Daudé
2021-03-10 10:41   ` Alex Bennée
2021-03-10 11:10     ` Peter Maydell
2021-03-10 13:27       ` Alex Bennée
2021-03-10 13:53         ` Philippe Mathieu-Daudé
2021-03-10 15:47           ` Alex Bennée

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=e690a377-2f3e-0774-03f8-813f2631e4f0@redhat.com \
    --to=philmd@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=borntraeger@de.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).