qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Laurent Vivier <laurent@vivier.eu>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [PULL 5/5] m68k: add Virtual M68k Machine
Date: Thu, 18 Mar 2021 10:19:18 +0100	[thread overview]
Message-ID: <2730eee0-6f1b-2139-f93c-6a0a64727e29@redhat.com> (raw)
In-Reply-To: <20210315204226.3481044-6-laurent@vivier.eu>

Hi Laurent,

+Paolo / Thomas

On 3/15/21 9:42 PM, Laurent Vivier wrote:
> The machine is based on Goldfish interfaces defined by Google
> for Android simulator. It uses Goldfish-rtc (timer and RTC),
> Goldfish-pic (PIC) and Goldfish-tty (for serial port and early tty).
> 
> The machine is created with 128 virtio-mmio bus, and they can
> be used to use serial console, GPU, disk, NIC, HID, ...
> 
> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Message-Id: <20210312214145.2936082-6-laurent@vivier.eu>
> ---
>  default-configs/devices/m68k-softmmu.mak      |   1 +
>  .../standard-headers/asm-m68k/bootinfo-virt.h |  18 +
>  hw/m68k/virt.c                                | 313 ++++++++++++++++++
>  MAINTAINERS                                   |  13 +
>  hw/m68k/Kconfig                               |   9 +
>  hw/m68k/meson.build                           |   1 +
>  6 files changed, 355 insertions(+)
>  create mode 100644 include/standard-headers/asm-m68k/bootinfo-virt.h
>  create mode 100644 hw/m68k/virt.c

> diff --git a/hw/m68k/Kconfig b/hw/m68k/Kconfig
> index 60d7bcfb8f2b..f839f8a03064 100644
> --- a/hw/m68k/Kconfig
> +++ b/hw/m68k/Kconfig
> @@ -23,3 +23,12 @@ config Q800
>      select ESP
>      select DP8393X
>      select OR_IRQ
> +
> +config M68K_VIRT
> +    bool
> +    select M68K_IRQC
> +    select VIRT_CTRL
> +    select GOLDFISH_PIC
> +    select GOLDFISH_TTY
> +    select GOLDFISH_RTC
> +    select VIRTIO_MMIO

I had this error on gitlab:

(qemu) QEMU_PROG: -drive driver=IMGFMT,file=TEST_DIR/t.IMGFMT,if=virtio:
'virtio-blk-pci' is not a valid device model name
job: check-system-fedora
https://gitlab.com/philmd/qemu/-/jobs/1106469724

I bisected locally to this commit.

check-system-fedora uses build-system-fedora:

build-system-fedora:
    CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
             --enable-fdt=system --enable-slirp=system
             --enable-capstone=system

I'm confused because the machine provides a VIRTIO bus
via MMIO:

config VIRTIO_MMIO
    bool
    select VIRTIO

I remember I tested your machine with virtio-blk-device.

config VIRTIO_BLK
    bool
    default y
    depends on VIRTIO

Ah, this is virtio-blk-pci, which has:

virtio_pci_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true:
files('virtio-blk-pci.c'))
virtio_ss.add_all(when: 'CONFIG_VIRTIO_PCI', if_true: virtio_pci_ss)

And VIRTIO_PCI isn't selected...

Are the tests incorrect then?

libqos isn't restricted to PCI:

tests/qtest/libqos/virtio-blk.c:24:#include "virtio-blk.h"
tests/qtest/libqos/virtio-blk.c:29:/* virtio-blk-device */
tests/qtest/libqos/virtio-blk.c:33:    if (!g_strcmp0(interface,
"virtio-blk")) {
tests/qtest/libqos/virtio-blk.c:40:    fprintf(stderr, "%s not present
in virtio-blk-device\n", interface);
tests/qtest/libqos/virtio-blk.c:109:    /* virtio-blk-device */
tests/qtest/libqos/virtio-blk.c:111:
qos_node_create_driver("virtio-blk-device", virtio_blk_device_create);
tests/qtest/libqos/virtio-blk.c:112:
qos_node_consumes("virtio-blk-device", "virtio-bus", &opts);
tests/qtest/libqos/virtio-blk.c:113:
qos_node_produces("virtio-blk-device", "virtio-blk");

But qemu-iotests / qtests do use virtio-blk-pci. Maybe they should
use a generic virtio-blk-device instead, hoping it get plugged correctly
to the virtio bus...



  reply	other threads:[~2021-03-18  9:24 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 20:42 [PULL 0/5] M68k for 6.0 patches Laurent Vivier
2021-03-15 20:42 ` [PULL 1/5] hw/char: add goldfish-tty Laurent Vivier
2021-03-15 20:42 ` [PULL 2/5] hw/intc: add goldfish-pic Laurent Vivier
2021-03-15 20:42 ` [PULL 3/5] m68k: add an interrupt controller Laurent Vivier
2021-03-15 20:42 ` [PULL 4/5] m68k: add a system controller Laurent Vivier
2021-03-15 20:42 ` [PULL 5/5] m68k: add Virtual M68k Machine Laurent Vivier
2021-03-18  9:19   ` Philippe Mathieu-Daudé [this message]
2021-03-18  9:52     ` Laurent Vivier
2021-03-18 10:02       ` Philippe Mathieu-Daudé
2021-03-18 10:06         ` Laurent Vivier
2021-03-18 10:35           ` Paolo Bonzini
2021-03-18 10:40             ` Peter Maydell
2021-03-18 10:45               ` Paolo Bonzini
2021-03-18 11:10                 ` Peter Maydell
2021-03-18 11:20                   ` Philippe Mathieu-Daudé
2021-03-18 15:36           ` Philippe Mathieu-Daudé
2021-03-18 15:51             ` Laurent Vivier
2021-03-18 15:56               ` Laurent Vivier
2021-03-18 16:25                 ` Philippe Mathieu-Daudé
2021-03-18 17:28                   ` Max Reitz
2021-03-19  6:32                     ` Thomas Huth
2021-03-19  9:20                       ` Max Reitz
2021-03-19  9:29                         ` Paolo Bonzini
2021-03-19 10:51                           ` Laurent Vivier
2021-03-19 11:08                             ` Paolo Bonzini
2021-03-19 10:50                         ` Laurent Vivier
2021-03-19 10:51                           ` Max Reitz
2021-03-19 10:57                             ` Max Reitz
2021-03-19 10:55                           ` Thomas Huth
2021-03-18 16:50             ` Paolo Bonzini
2021-03-17 13:34 ` [PULL 0/5] M68k for 6.0 patches Peter Maydell

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=2730eee0-6f1b-2139-f93c-6a0a64727e29@redhat.com \
    --to=philmd@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.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).