[Qemu-devel] [PATCH v5 0/2] [PATCH v4] Add arm SBSA reference machine

Hongbo Zhang posted 2 patches 5 years, 4 months ago
Test checkpatch passed
Test docker-quick@centos7 failed
Test docker-clang@ubuntu failed
Test docker-mingw@fedora failed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1544173675-14217-1-git-send-email-hongbo.zhang@linaro.org
hw/arm/Makefile.objs  |   2 +-
hw/arm/sbsa-ref.c     | 698 ++++++++++++++++++++++++++++++++++++++++++++++++++
include/hw/arm/virt.h |   1 +
3 files changed, 700 insertions(+), 1 deletion(-)
create mode 100644 hw/arm/sbsa-ref.c
[Qemu-devel] [PATCH v5 0/2] [PATCH v4] Add arm SBSA reference machine
Posted by Hongbo Zhang 5 years, 4 months ago
For the Aarch64, there is one machine 'virt', it is primarily meant to
run on KVM and execute virtualization workloads, but we need an
environment as faithful as possible to physical hardware,  to support
firmware and OS development for pysical Aarch64 machines.

This machine comes with:
 - Re-designed memory map.
 - CPU cortex-a57.
 - EL2 and EL3 enabled.
 - GIC version 3.
 - System bus AHCI controller.
 - System bus XHCI controller(TBD).
 - CDROM and hard disc on AHCI bus.
 - E1000E ethernet card on PCIE bus.
 - VGA display adaptor on PCIE bus.
 - Only minimal device tree nodes.
And without:
 - virtio deivces.
 - fw_cfg device.
 - ACPI tables.

Arm Trusted Firmware and UEFI porting to this are done accordingly, and
it should supply ACPI tables to load OS, the minimal device tree nodes
supplied from this platform are only to pass the dynamic info reflecting
command line input to firmware, not for loading OS.

v5 changes:
 - removed more lines derived from virt.c
 - designed a new memory map
 - splitted former one patch into two for easier review
 - cancled previous EHCI and new HXCI coming later separately

V4 changes:
 - rebased to v3.0.0
 - removed timer, uart, rtc, *hci device tree nodes
   (others were removerd in v3)
 - other minore codes clean up, mainly unsed header files, comments etc.

V3 changes:
 - rename the platform 'sbsa-ref'
 - move all the codes to a separate file sbsa-ref.c
 - remove paravirtualized fw_cfg device
 - do not supply ACPI tables, since firmware will do it
 - supply only necessary DT nodes
 - and other minor code clean up

In the previous v4 cover letter,
https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg04282.html
I mentioned I had to revert two commits temperarily to run:
 Revert "target/arm: Implement new do_transaction_failed hook"
 Revert "device_tree: Increase FDT_MAX_SIZE to 1 MiB"

Now the 1st one is fixed by Ard Biesheuvel in the edk2 side, and for
the 2nd one, a simple change in firmware side can fix it, so I won't
mention these issues in details in the cover letter any more.

I also put a branch here:
http://git.linaro.org/people/hongbo.zhang/qemu-enterprise.git/log/?h=sbsa-upstream-v5
with the last 3 workaroud we can test using legacy firmware
but gicv3 needs to be enabled in ATF:
http://git.linaro.org/people/hongbo.zhang/atf-sbsa.git/log/?h=sbsa_gicv3

Hongbo Zhang (2):
  hw/arm: Add arm SBSA reference machine, skeleton part
  hw/arm: add Arm SBSA reference machine, devices part

 hw/arm/Makefile.objs  |   2 +-
 hw/arm/sbsa-ref.c     | 698 ++++++++++++++++++++++++++++++++++++++++++++++++++
 include/hw/arm/virt.h |   1 +
 3 files changed, 700 insertions(+), 1 deletion(-)
 create mode 100644 hw/arm/sbsa-ref.c

-- 
2.7.4


Re: [Qemu-devel] [PATCH v5 0/2] [PATCH v4] Add arm SBSA reference machine
Posted by Hongbo Zhang 5 years, 4 months ago
Sorry for the redundant "[PATCH v4]" in the title line, it was due to
copy-paste from last iteration, that should be only "[PATCH v5 0/2]".

On Fri, 7 Dec 2018 at 17:08, Hongbo Zhang <hongbo.zhang@linaro.org> wrote:
>
> For the Aarch64, there is one machine 'virt', it is primarily meant to
> run on KVM and execute virtualization workloads, but we need an
> environment as faithful as possible to physical hardware,  to support
> firmware and OS development for pysical Aarch64 machines.
>
> This machine comes with:
>  - Re-designed memory map.
>  - CPU cortex-a57.
>  - EL2 and EL3 enabled.
>  - GIC version 3.
>  - System bus AHCI controller.
>  - System bus XHCI controller(TBD).
>  - CDROM and hard disc on AHCI bus.
>  - E1000E ethernet card on PCIE bus.
>  - VGA display adaptor on PCIE bus.
>  - Only minimal device tree nodes.
> And without:
>  - virtio deivces.
>  - fw_cfg device.
>  - ACPI tables.
>
> Arm Trusted Firmware and UEFI porting to this are done accordingly, and
> it should supply ACPI tables to load OS, the minimal device tree nodes
> supplied from this platform are only to pass the dynamic info reflecting
> command line input to firmware, not for loading OS.
>
> v5 changes:
>  - removed more lines derived from virt.c
>  - designed a new memory map
>  - splitted former one patch into two for easier review
>  - cancled previous EHCI and new HXCI coming later separately
>
> V4 changes:
>  - rebased to v3.0.0
>  - removed timer, uart, rtc, *hci device tree nodes
>    (others were removerd in v3)
>  - other minore codes clean up, mainly unsed header files, comments etc.
>
> V3 changes:
>  - rename the platform 'sbsa-ref'
>  - move all the codes to a separate file sbsa-ref.c
>  - remove paravirtualized fw_cfg device
>  - do not supply ACPI tables, since firmware will do it
>  - supply only necessary DT nodes
>  - and other minor code clean up
>
> In the previous v4 cover letter,
> https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg04282.html
> I mentioned I had to revert two commits temperarily to run:
>  Revert "target/arm: Implement new do_transaction_failed hook"
>  Revert "device_tree: Increase FDT_MAX_SIZE to 1 MiB"
>
> Now the 1st one is fixed by Ard Biesheuvel in the edk2 side, and for
> the 2nd one, a simple change in firmware side can fix it, so I won't
> mention these issues in details in the cover letter any more.
>
> I also put a branch here:
> http://git.linaro.org/people/hongbo.zhang/qemu-enterprise.git/log/?h=sbsa-upstream-v5
> with the last 3 workaroud we can test using legacy firmware
> but gicv3 needs to be enabled in ATF:
> http://git.linaro.org/people/hongbo.zhang/atf-sbsa.git/log/?h=sbsa_gicv3
>
> Hongbo Zhang (2):
>   hw/arm: Add arm SBSA reference machine, skeleton part
>   hw/arm: add Arm SBSA reference machine, devices part
>
>  hw/arm/Makefile.objs  |   2 +-
>  hw/arm/sbsa-ref.c     | 698 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  include/hw/arm/virt.h |   1 +
>  3 files changed, 700 insertions(+), 1 deletion(-)
>  create mode 100644 hw/arm/sbsa-ref.c
>
> --
> 2.7.4
>

Re: [Qemu-devel] [PATCH v5 0/2] [PATCH v4] Add arm SBSA reference machine
Posted by no-reply@patchew.org 5 years, 4 months ago
Patchew URL: https://patchew.org/QEMU/1544173675-14217-1-git-send-email-hongbo.zhang@linaro.org/



Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-mingw@fedora SHOW_ENV=1 J=8
=== TEST SCRIPT END ===

  GEN     trace/generated-helpers.c
  CC      aarch64-softmmu/trace/control-target.o
/tmp/qemu-test/src/hw/arm/sbsa-ref.c: In function 'create_gic':
/tmp/qemu-test/src/hw/arm/sbsa-ref.c:289:56: error: 'ARCH_GICV3_MAINT_IRQ' undeclared (first use in this function); did you mean 'ARCH_GIC_MAINT_IRQ'?
                                                      + ARCH_GICV3_MAINT_IRQ));
                                                        ^~~~~~~~~~~~~~~~~~~~
                                                        ARCH_GIC_MAINT_IRQ


The full log is available at
http://patchew.org/logs/1544173675-14217-1-git-send-email-hongbo.zhang@linaro.org/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [Qemu-devel] [PATCH v5 0/2] [PATCH v4] Add arm SBSA reference machine
Posted by no-reply@patchew.org 5 years, 4 months ago
Patchew URL: https://patchew.org/QEMU/1544173675-14217-1-git-send-email-hongbo.zhang@linaro.org/



Hi,

This series failed the docker-quick@centos7 build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-quick@centos7 SHOW_ENV=1 J=8
=== TEST SCRIPT END ===

libpmem support   no
libudev           no

WARNING: Use of SDL 1.2 is deprecated and will be removed in
WARNING: future releases. Please switch to using SDL 2.0

NOTE: cross-compilers enabled:  'cc'
  GEN     x86_64-softmmu/config-devices.mak.tmp
---
  CC      aarch64-softmmu/hw/arm/microbit.o
  CC      aarch64-softmmu/target/arm/arm-semi.o
/tmp/qemu-test/src/hw/arm/sbsa-ref.c: In function 'create_gic':
/tmp/qemu-test/src/hw/arm/sbsa-ref.c:289:56: error: 'ARCH_GICV3_MAINT_IRQ' undeclared (first use in this function)
                                                      + ARCH_GICV3_MAINT_IRQ));
                                                        ^
/tmp/qemu-test/src/hw/arm/sbsa-ref.c:289:56: note: each undeclared identifier is reported only once for each function it appears in


The full log is available at
http://patchew.org/logs/1544173675-14217-1-git-send-email-hongbo.zhang@linaro.org/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com