[PATCH v6 08/41] Connect SD controller to BCM2838 GPIO

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin Reviewed-by: Peter Maydell --- hw/gpio/bcm2838_gpio.c | 52 +- include/hw/gpio/bcm2838_gpio.h | 5 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/hw/gpio/bcm2838_gpio.c b/hw/gpio/bcm2838_gpio.c index

[PATCH v6 37/41] Add mailbox property tests. Part 2

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin --- tests/qtest/bcm2838-mbox-property-test.c | 196 ++- 1 file changed, 195 insertions(+), 1 deletion(-) diff --git a/tests/qtest/bcm2838-mbox-property-test.c b/tests/qtest/bcm2838-mbox-property-test.c index acb421915b..b251d3f552 100644 ---

[PATCH v6 21/41] Add GENET register structs. Part 2

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin --- hw/net/bcm2838_genet.c | 89 ++ include/hw/net/bcm2838_genet.h | 89 ++ 2 files changed, 178 insertions(+) diff --git a/hw/net/bcm2838_genet.c b/hw/net/bcm2838_genet.c index

[PATCH v6 25/41] Implement GENET register ops

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin --- hw/net/bcm2838_genet.c | 189 +++-- include/hw/net/bcm2838_genet.h | 2 + 2 files changed, 182 insertions(+), 9 deletions(-) diff --git a/hw/net/bcm2838_genet.c b/hw/net/bcm2838_genet.c index be899b68f8..56ff6a6f39 100644

[PATCH v6 31/41] Add mailbox test stub

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin --- tests/qtest/bcm2838-mailbox.c | 60 +++ tests/qtest/bcm2838-mailbox.h | 37 + tests/qtest/meson.build | 1 + 3 files changed, 98 insertions(+) create mode 100644 tests/qtest/bcm2838-mailbox.c create

[PATCH v6 07/41] Implement BCM2838 GPIO functionality

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin Reviewed-by: Peter Maydell --- hw/gpio/bcm2838_gpio.c | 193 - 1 file changed, 190 insertions(+), 3 deletions(-) diff --git a/hw/gpio/bcm2838_gpio.c b/hw/gpio/bcm2838_gpio.c index a312490bbd..69d15dbb49 100644 ---

[PATCH v6 32/41] Add mailbox test constants

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin --- tests/qtest/bcm2838-mailbox.c | 1 + tests/qtest/bcm2838-mailbox.h | 88 +++ 2 files changed, 89 insertions(+) diff --git a/tests/qtest/bcm2838-mailbox.c b/tests/qtest/bcm2838-mailbox.c index 0928a3dff8..1efd3c628a 100644 ---

[PATCH v6 01/41] Split out common part of BCM283X classes

2024-02-25 Thread Sergey Kambalin
Pre setup for BCM2838 introduction Signed-off-by: Sergey Kambalin Reviewed-by: Peter Maydell --- hw/arm/bcm2836.c | 103 ++- hw/arm/raspi.c | 2 +- include/hw/arm/bcm2836.h | 26 +- 3 files changed, 84 insertions(+), 47

[PATCH v6 35/41] Add mailbox tests tags. Part 3

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin --- tests/qtest/bcm2838-mailbox.h | 78 +++ 1 file changed, 78 insertions(+) diff --git a/tests/qtest/bcm2838-mailbox.h b/tests/qtest/bcm2838-mailbox.h index b4f7b7b314..d753f17fb2 100644 --- a/tests/qtest/bcm2838-mailbox.h +++

[PATCH v6 00/41] Raspberry Pi 4B machine

2024-02-25 Thread Sergey Kambalin
Introducing Raspberry Pi 4B model. It contains new BCM2838 SoC, PCIE subsystem, RNG200, Thermal sensor and Genet network controller. It can work with recent linux kernels 6.x.x. Two avocado tests was added to check that. Unit tests has been made as read/write operations via mailbox properties.

[PATCH v6 17/41] Implement BCM2838 thermal sensor

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin Reviewed-by: Peter Maydell --- hw/arm/bcm2838_peripherals.c | 11 hw/arm/raspi4b.c | 1 - hw/misc/bcm2838_thermal.c| 98 hw/misc/meson.build | 1 +

[PATCH v6 15/41] Enable BCM2838 PCIE

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin --- hw/arm/bcm2838.c | 9 + hw/arm/bcm2838_peripherals.c | 24 hw/arm/meson.build | 7 --- hw/arm/raspi4b.c | 1 - include/hw/arm/bcm2838_peripherals.h | 2 ++

[PATCH v6 10/41] Introduce Raspberry PI 4 machine

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin Reviewed-by: Peter Maydell --- hw/arm/bcm2835_peripherals.c| 17 ++-- hw/arm/bcm2836.c| 2 + hw/arm/bcm2838.c| 2 + hw/arm/meson.build | 2 +- hw/arm/raspi.c | 27 -

[PATCH v6 24/41] Add GENET register access macros

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin --- include/hw/net/bcm2838_genet.h | 76 ++ 1 file changed, 76 insertions(+) diff --git a/include/hw/net/bcm2838_genet.h b/include/hw/net/bcm2838_genet.h index 94c2f3ebca..e7a76cda81 100644 --- a/include/hw/net/bcm2838_genet.h +++

[PATCH v6 38/41] Add mailbox property tests. Part 3

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin --- tests/qtest/bcm2838-mbox-property-test.c | 213 ++- 1 file changed, 212 insertions(+), 1 deletion(-) diff --git a/tests/qtest/bcm2838-mbox-property-test.c b/tests/qtest/bcm2838-mbox-property-test.c index b251d3f552..c96a9ba3f3 100644 ---

[PATCH v6 04/41] Introduce BCM2838 SoC

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin Reviewed-by: Peter Maydell --- hw/arm/bcm2838.c | 98 hw/arm/bcm2838_peripherals.c | 72 hw/arm/meson.build | 2 + include/hw/arm/bcm2838.h | 29

[PATCH v6 05/41] Add GIC-400 to BCM2838 SoC

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin Reviewed-by: Peter Maydell --- hw/arm/bcm2838.c | 167 ++- hw/arm/trace-events | 3 + include/hw/arm/bcm2838.h | 2 + include/hw/arm/bcm2838_peripherals.h | 37 ++ 4 files changed,

[PATCH v6 28/41] Implement GENET RX path

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin --- hw/net/bcm2838_genet.c | 265 - include/hw/net/bcm2838_genet.h | 1 + 2 files changed, 265 insertions(+), 1 deletion(-) diff --git a/hw/net/bcm2838_genet.c b/hw/net/bcm2838_genet.c index 4c9b39a3ca..61c1981e10 100644

[PATCH v6 19/41] Add GENET stub

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin --- hw/misc/bcm2838_thermal.c| 2 +- hw/net/bcm2838_genet.c | 99 hw/net/meson.build | 2 + hw/net/trace-events | 16 + include/hw/arm/bcm2838_peripherals.h | 2 +

[PATCH v6 22/41] Add GENET register structs. Part 3

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin --- hw/net/bcm2838_genet.c | 88 ++ include/hw/net/bcm2838_genet.h | 88 ++ 2 files changed, 176 insertions(+) diff --git a/hw/net/bcm2838_genet.c b/hw/net/bcm2838_genet.c index

[PATCH v6 03/41] Split out raspi machine common part

2024-02-25 Thread Sergey Kambalin
Pre-setup for raspberry pi 4 introduction Signed-off-by: Sergey Kambalin Reviewed-by: Peter Maydell --- hw/arm/raspi.c | 112 ++-- include/hw/arm/raspi_platform.h | 21 ++ 2 files changed, 85 insertions(+), 48 deletions(-) diff --git

[PATCH v6 09/41] Add GPIO and SD to BCM2838 periph

2024-02-25 Thread Sergey Kambalin
Signed-off-by: Sergey Kambalin Reviewed-by: Peter Maydell --- hw/arm/bcm2838_peripherals.c | 143 +++ include/hw/arm/bcm2838_peripherals.h | 8 ++ 2 files changed, 151 insertions(+) diff --git a/hw/arm/bcm2838_peripherals.c b/hw/arm/bcm2838_peripherals.c index

Re: support on risc-v 128bits

2024-02-25 Thread Alistair Francis
On Mon, Feb 26, 2024 at 9:30 AM Jean-Christophe Énée wrote: > > hi, > i would like developpe my OS on risc-v 128 bits. > after search the support isn´t fully operational We have some basic 128-bit support, but it isn't complete. The RISC-V spec states: ``` The design of the RV128I base ISA is

support on risc-v 128bits

2024-02-25 Thread Jean-Christophe Énée
hi, i would like developpe my OS on risc-v 128 bits. after search the support isn´t fully operational how can i help, and in the same learn risc-v 128 bits my coding skill is beginner, but i motivate and i learn spead. i'm waiting the complete guide of C to delanoy can you give me simple task

Re: [PATCH 1/2] hw/xen: detect when running inside stubdomain

2024-02-25 Thread Jason Andryuk
On Tue, Feb 20, 2024 at 1:50 AM Philippe Mathieu-Daudé wrote: > > On 19/2/24 19:16, Marek Marczykowski-Górecki wrote: > > Introduce global xen_is_stubdomain variable when qemu is running inside > > a stubdomain instead of dom0. This will be relevant for subsequent > > patches, as few things like

Re: [PATCH 1/2] hw/xen: detect when running inside stubdomain

2024-02-25 Thread Jason Andryuk
On Mon, Feb 19, 2024 at 1:17 PM Marek Marczykowski-Górecki wrote: > > Introduce global xen_is_stubdomain variable when qemu is running inside > a stubdomain instead of dom0. This will be relevant for subsequent > patches, as few things like accessing PCI config space need to be done >

Re: [PATCH] hw/us/bus.c PCAP adding 0xA in Windows version

2024-02-25 Thread BALATON Zoltan
On Sun, 25 Feb 2024, benl...@fysnet.net wrote: Since Windows text files use CRLFs for all \n, the Windows version of QEMU inserts a CR in the PCAP stream when a LF is encountered when using USB PCAP files. This is due to the fact that the PCAP file is opened as TEXT instead of BINARY. To show

Intention to work on GSoC project

2024-02-25 Thread Sahil
Hi, My name is Sahil and I go by the pseudonym 'valdaarhun' on Github. I have never contributed to QEMU before but I have used it a few times as an end user. I developed an interest in virtualization during my internship at VMware and would like to dive deeper in this subfield. My current

possible race condition in qemu nat layer or virtio-net

2024-02-25 Thread g1pi
Hi all. I believe I spotted a race condition in virtio-net or qemu/kvm (but only when virtio-net is involved). To replicate, one needs a virtualization environment similar to Host: - debian 12 x86_64, kernel 6.1.0-18-amd64 - caching name server listening on 127.0.0.1 - qemu version 7.2.9

[PATCH] hw/us/bus.c PCAP adding 0xA in Windows version

2024-02-25 Thread benlunt
Since Windows text files use CRLFs for all \n, the Windows version of QEMU inserts a CR in the PCAP stream when a LF is encountered when using USB PCAP files. This is due to the fact that the PCAP file is opened as TEXT instead of BINARY. To show an example, when using a very common protocol to

Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path

2024-02-25 Thread BALATON Zoltan
On Sun, 25 Feb 2024, Philippe Mathieu-Daudé wrote: Rename "internal.h" as "ide_internal.h", and include Is there a convention about using underscore or dash in file names? The headers Thomas added are using - as well as ahci-allwinner.c, only ahci_internal.h has _ (but there are others

[Bug 2054889] Re: pcap streams are text files which insert 0xD in Windows version

2024-02-25 Thread Benjamin David Lunt
I have sent a patch as directed. I hope it is correctly done. Thank you. Ben -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/2054889 Title: pcap streams are text files which insert 0xD in Windows

Re: [PULL 14/25] hw/i386/pc: Confine system flash handling to pc_sysfw

2024-02-25 Thread Bernhard Beschow
Am 25. Februar 2024 13:03:46 UTC schrieb "Volker Rümelin" : >Am 21.02.24 um 22:16 schrieb Philippe Mathieu-Daudé: >> From: Bernhard Beschow >> >> Rather than distributing PC system flash handling across three files, let's >> confine it to one. Now, pc_system_firmware_init() creates, configures

[PATCH v3] target/riscv: Fix shift count overflow

2024-02-25 Thread demin.han
The result of (8 - 3 - vlmul) is negative when vlmul >= 6, and results in wrong vill. Signed-off-by: demin.han --- Changes in v2: - Add vlen var Changes in v3: - Fix commit msg typo target/riscv/vector_helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

Re: [PATCH 3/7] scripts/nsis.py: Automatically package required DLLs of QEMU executables

2024-02-25 Thread Stefan Weil via
Am 10.09.22 um 02:37 schrieb Bin Meng: On Sat, Sep 10, 2022 at 12:49 AM Mark Cave-Ayland wrote: On 08/09/2022 14:28, Bin Meng wrote: From: Bin Meng At present packaging the required DLLs of QEMU executables is a manual process, and error prone. Actually build/config-host.mak contains a

Re: [PATCH v2 1/3] hw/arm/sbsa-ref: Do not open-code ahci_ide_create_devs()

2024-02-25 Thread Philippe Mathieu-Daudé
On 25/2/24 18:16, Philippe Mathieu-Daudé wrote: Use ahci_ide_create_devs() instead of open-coding it. Not accessing AHCIDevice internals anymore allows to remove "hw/ide/ahci_internal.h" (which isn't really a public header). Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/sbsa-ref.c | 9

Re: [PATCH] hw/ide: Remove last two uses of ide/internal.h outside of hw/ide

2024-02-25 Thread Philippe Mathieu-Daudé
On 25/2/24 18:08, BALATON Zoltan wrote: On Sun, 25 Feb 2024, Philippe Mathieu-Daudé wrote: On 23/2/24 15:26, BALATON Zoltan wrote: Remove last two includes of hw/ide/intarnal.h outside of hw/ide and replace them with newly added public header to allow moving internal.h into hw/ide to really

[PATCH v2 0/3] hw/ide: Make "ide_internal.h" really internal

2024-02-25 Thread Philippe Mathieu-Daudé
Since v1: - Remove use of "ahci_internal.h" in SBSA-Ref - Rename "internal.h" -> "ide_internal.h" Supersedes: <20240223142633.933694e6...@zero.eik.bme.hu> BALATON Zoltan (1): hw/ide: Remove last two uses of ide/internal.h outside of hw/ide/ Philippe Mathieu-Daudé (2): hw/arm/sbsa-ref: Do

[PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path

2024-02-25 Thread Philippe Mathieu-Daudé
Rename "internal.h" as "ide_internal.h", and include it via its relative local path, instead of absolute to the project root path. Mechanical patch doing: $ sed -i -e 's#hw/ide/internal.h#ide_internal.h#' \ $(git grep -l hw/ide/internal) $ git mv hw/ide/internal.h

[PATCH v2 2/3] hw/ide: Remove last two uses of ide/internal.h outside of hw/ide/

2024-02-25 Thread Philippe Mathieu-Daudé
From: BALATON Zoltan Remove last two includes of hw/ide/intarnal.h outside of hw/ide and replace them with newly added public header to allow moving internal.h into hw/ide to really stop exposing it. Fixes: a11f439a0e (hw/ide: Stop exposing internal.h to non-IDE files) Signed-off-by: BALATON

[PATCH v2 1/3] hw/arm/sbsa-ref: Do not open-code ahci_ide_create_devs()

2024-02-25 Thread Philippe Mathieu-Daudé
Use ahci_ide_create_devs() instead of open-coding it. Not accessing AHCIDevice internals anymore allows to remove "hw/ide/ahci_internal.h" (which isn't really a public header). Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/sbsa-ref.c | 9 + 1 file changed, 1 insertion(+), 8

Re: [PATCH] hw/ide: Remove last two uses of ide/internal.h outside of hw/ide

2024-02-25 Thread Philippe Mathieu-Daudé
On 23/2/24 15:26, BALATON Zoltan wrote: Remove last two includes of hw/ide/intarnal.h outside of hw/ide and replace them with newly added public header to allow moving internal.h into hw/ide to really stop exposing it. Fixes: a11f439a0e (hw/ide: Stop exposing internal.h to non-IDE files)

[Bug 2054889] Re: pcap streams are text files which insert 0xD in Windows version

2024-02-25 Thread Philippe Mathieu-Daudé
Hi Benjamin, QEMU bug tracker is on GitLab: https://gitlab.com/qemu-project/qemu/-/issues But instead of re-opening the issue there, since you already figured the problem, do you mind directly post your patch? See guidelines there: https://www.qemu.org/docs/master/devel/submitting-a-patch.html

Files without license statement

2024-02-25 Thread Stefan Weil via
Hi Paolo, I just noticed that scripts/fix-multiline-comments.sh has a copyright statement, but no license statement. Should that be fixed? It looks like there exist more files with the same problem (if it is a problem), for example docs/devel/loads-stores.rst (written by Peter). LICENSE

Re: [PATCH v2] target/riscv: Fix shift count overflow

2024-02-25 Thread Philippe Mathieu-Daudé
On 25/2/24 04:27, demin.han wrote: The result of (8 - 3 - vlmul) is negtive when vlmul >= 6, Typo "negative". and results in wrong vill. Signed-off-by: demin.han --- target/riscv/vector_helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

Re: [PATCH v5 2/3] hw/arm: Connect BSC to BCM2835 board as I2C0, I2C1 and I2C2

2024-02-25 Thread Philippe Mathieu-Daudé
On 24/2/24 20:10, Rayhan Faizel wrote: BCM2835 has three I2C controllers. All of them share the same interrupt line. Signed-off-by: Rayhan Faizel --- hw/arm/Kconfig | 1 + hw/arm/bcm2835_peripherals.c | 45 ++--

Re: [PATCH v2 4/6] hw/i386/pc: Remove unneeded class attribute "kvmclock_enabled"

2024-02-25 Thread Philippe Mathieu-Daudé
On 24/2/24 14:58, Bernhard Beschow wrote: PCMachineClass introduces the attribute into the class hierarchy and sets it to true. There is no sub class overriding the attribute. Commit 30d2a17b46e9 "hw/i386: Remove the deprecated machines 0.12 up to 0.15" removed the last overrides of this

Re: [PATCH V2 1/1] loongarch: Change the UEFI loading mode to loongarch

2024-02-25 Thread Laszlo Ersek
On 2/22/24 16:49, Andrea Bolognani wrote: > On Thu, Feb 22, 2024 at 04:10:20PM +0100, Philippe Mathieu-Daudé wrote: >> On 19/2/24 11:34, Xianglai Li wrote: >>> The UEFI loading mode in loongarch is very different >>> from that in other architectures:loongarch's UEFI code >>> is in rom, while other

Re: [PULL 14/25] hw/i386/pc: Confine system flash handling to pc_sysfw

2024-02-25 Thread Volker Rümelin
Am 21.02.24 um 22:16 schrieb Philippe Mathieu-Daudé: > From: Bernhard Beschow > > Rather than distributing PC system flash handling across three files, let's > confine it to one. Now, pc_system_firmware_init() creates, configures and > cleans > up the system flash which makes the code easier to

Re: [PULL 00/11] Test and misc patches

2024-02-25 Thread Peter Maydell
On Fri, 23 Feb 2024 at 19:10, Thomas Huth wrote: > > Hi Peter! > > The following changes since commit 3d54cbf269d63ff1d500b35b2bcf4565ff8ad485: > > Merge tag 'hw-misc-20240222' of https://github.com/philmd/qemu into staging > (2024-02-22 15:44:29 +) > > are available in the Git repository

Re: [PATCH v2] target/riscv: Fix shift count overflow

2024-02-25 Thread Daniel Henrique Barboza
On 2/25/24 00:27, demin.han wrote: The result of (8 - 3 - vlmul) is negtive when vlmul >= 6, and results in wrong vill. Signed-off-by: demin.han --- Reviewed-by: Daniel Henrique Barboza target/riscv/vector_helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff

Re: [PATCH 9/9] hw/i386/pc_{piix, q35}: Eliminate local pci_bus/pci_host variables

2024-02-25 Thread Bernhard Beschow
Am 21. Februar 2024 15:50:33 UTC schrieb "Philippe Mathieu-Daudé" : >On 8/2/24 23:03, Bernhard Beschow wrote: >> There is no advantage in having these local variables which 1/ needlessly >> have >> different identifiers in both machines and 2/ which are redundant to >> pcms->bus >> which is

Re: Trying to write data to i2c bus

2024-02-25 Thread Paz Offer
Thank you Corey, * You can look at the git commits in hw/i2c around 37fa5ca42623 "hw/i2c: support multiple masters" for the changes that were done to support this. I saw a very good presentation in youtube about implementing i2c multi-master (I2C Multi-master and Controller Slave Mode in

<    1   2