[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 5/5] m68k: add Virtual M68k Machine
From: |
Laurent Vivier |
Subject: |
Re: [PULL 5/5] m68k: add Virtual M68k Machine |
Date: |
Thu, 18 Mar 2021 10:52:32 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 |
Le 18/03/2021 à 10:19, Philippe Mathieu-Daudé a écrit :
> 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...
This machine doesn't have virtio-pci, but only virtio-mmio buses.
> 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...
Yes, it's how the machine work: it has 128 virtio-mmio buses and virtio-devices
are plugged directly
in the first free ones.
I think the fix would be to disable the virtio-blk-pci test for the machines
without PCI bus.
Why is it executed for now?
Thanks,
Laurent
- [PULL 0/5] M68k for 6.0 patches, Laurent Vivier, 2021/03/15
- [PULL 4/5] m68k: add a system controller, Laurent Vivier, 2021/03/15
- [PULL 2/5] hw/intc: add goldfish-pic, Laurent Vivier, 2021/03/15
- [PULL 1/5] hw/char: add goldfish-tty, Laurent Vivier, 2021/03/15
- [PULL 5/5] m68k: add Virtual M68k Machine, Laurent Vivier, 2021/03/15
- Re: [PULL 5/5] m68k: add Virtual M68k Machine, Philippe Mathieu-Daudé, 2021/03/18
- Re: [PULL 5/5] m68k: add Virtual M68k Machine,
Laurent Vivier <=
- Re: [PULL 5/5] m68k: add Virtual M68k Machine, Philippe Mathieu-Daudé, 2021/03/18
- Re: [PULL 5/5] m68k: add Virtual M68k Machine, Laurent Vivier, 2021/03/18
- Re: [PULL 5/5] m68k: add Virtual M68k Machine, Paolo Bonzini, 2021/03/18
- Re: [PULL 5/5] m68k: add Virtual M68k Machine, Peter Maydell, 2021/03/18
- Re: [PULL 5/5] m68k: add Virtual M68k Machine, Paolo Bonzini, 2021/03/18
- Re: [PULL 5/5] m68k: add Virtual M68k Machine, Peter Maydell, 2021/03/18
- Re: [PULL 5/5] m68k: add Virtual M68k Machine, Philippe Mathieu-Daudé, 2021/03/18
- Re: [PULL 5/5] m68k: add Virtual M68k Machine, Philippe Mathieu-Daudé, 2021/03/18
- Re: [PULL 5/5] m68k: add Virtual M68k Machine, Laurent Vivier, 2021/03/18
- Re: [PULL 5/5] m68k: add Virtual M68k Machine, Laurent Vivier, 2021/03/18