Re: [PATCH v3 11/26] hw/i2c/mpc_i2c: Convert DPRINTF to trace events for register access

2024-11-02 Thread Corey Minyard
On Sun, Nov 03, 2024 at 12:08:22AM +0100, BALATON Zoltan wrote: > On Sat, 2 Nov 2024, Corey Minyard wrote: > > On Sat, Nov 02, 2024 at 02:17:00PM +0100, Bernhard Beschow wrote: > > > Reviewed-by: Cédric Le Goater > > > Signed-off-by: Bernhard Beschow > > > > Signed-off-by: Corey Minyard > > Di

Re: [PATCH v4 3/3] tests/qtest/tpm: add unit test to tis-spi

2024-11-02 Thread Stefan Berger
On 11/2/24 10:01 AM, Stefan Berger wrote: On 11/1/24 4:27 PM, dan tan wrote: Add qtest cases to exercise main TPM locality functionality When running `ninja -C build test` I get this output that should have its lines prefixed with '#' 'somehow': 'somehow' = add '-serial null' to t

Re: [PATCH v3 11/26] hw/i2c/mpc_i2c: Convert DPRINTF to trace events for register access

2024-11-02 Thread BALATON Zoltan
On Sat, 2 Nov 2024, Corey Minyard wrote: On Sat, Nov 02, 2024 at 02:17:00PM +0100, Bernhard Beschow wrote: Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow Signed-off-by: Corey Minyard Did you mean Reviewed-by or was it your patch that Bernhard picked up? Regards, BALATON Zo

[PATCH net-next] ptp: Remove 'default y' for VMCLOCK PTP device

2024-11-02 Thread David Woodhouse
From: David Woodhouse The VMCLOCK device gives support for accurate timekeeping even across live migration, unlike the KVM PTP clock. To help ensure that users can always use ptp_vmclock where it's available in preference to ptp_kvm, set it to 'default PTP_1588_CLOCK_VMCLOCK' instead of 'default

[PATCH v3] net/vmnet: Pad short Ethernet frames

2024-11-02 Thread William Hooper
At least on macOS 12.7.2, vmnet doesn't pad Ethernet frames, such as the host's ARP replies, to the minimum size (60 bytes before the frame check sequence) defined in IEEE Std 802.3-2022, so guests' Ethernet device drivers may drop them with "frame too short" errors. This patch calls eth_pad_short

Re: [PATCH] disas: Fix build against Capstone v6 (again)

2024-11-02 Thread Gustavo Romero
Hi Richard, Sorry, I've missed that one and just found it when doing a check before the soft freeze :) On 10/21/24 22:30, Richard Henderson wrote: Like 9971cbac2f3, which set CAPSTONE_AARCH64_COMPAT_HEADER, also set CAPSTONE_SYSTEMZ_COMPAT_HEADER. Fixes the build against capstone v6-alpha. Si

Re: [PATCH v3 12/26] hw/i2c/mpc_i2c: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Corey Minyard
On Sat, Nov 02, 2024 at 02:17:01PM +0100, Bernhard Beschow wrote: > Reviewed-by: Cédric Le Goater > Signed-off-by: Bernhard Beschow > --- > hw/i2c/mpc_i2c.c | 20 > 1 file changed, 8 insertions(+), 12 deletions(-) > > diff --git a/hw/i2c/mpc_i2c.c b/hw/i2c/mpc_i2c.c > index

Re: [PATCH v3 11/26] hw/i2c/mpc_i2c: Convert DPRINTF to trace events for register access

2024-11-02 Thread Corey Minyard
On Sat, Nov 02, 2024 at 02:17:00PM +0100, Bernhard Beschow wrote: > Reviewed-by: Cédric Le Goater > Signed-off-by: Bernhard Beschow Signed-off-by: Corey Minyard > --- > hw/i2c/mpc_i2c.c| 9 + > hw/i2c/trace-events | 5 + > 2 files changed, 10 insertions(+), 4 deletions(-) > >

Re: [PATCH v3 22/26] hw/i2c/smbus_eeprom: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Corey Minyard
On Sat, Nov 2, 2024 at 8:25 AM Bernhard Beschow wrote: > > Reviewed-by: Cédric Le Goater > Signed-off-by: Bernhard Beschow > --- > hw/i2c/smbus_eeprom.c | 19 --- > 1 file changed, 8 insertions(+), 11 deletions(-) > > diff --git a/hw/i2c/smbus_eeprom.c b/hw/i2c/smbus_eeprom.c >

Re: [SPAM] [PATCH v1 8/8] aspeed: Support create flash devices via command line for AST1030

2024-11-02 Thread Cédric Le Goater
On 10/29/24 10:17, Jamin Lin wrote: Add a "if-statement" in aspeed_minibmc_machine_init function. If users add "-nodefaults" in command line, the flash devices should be created by users setting. Otherwise, the flash devices are created at machine init. Signed-off-by: Jamin Lin Reviewed-by:

Re: [PATCH] aspeed: Don't set always boot properties of the emmc device

2024-11-02 Thread Guenter Roeck
On 11/2/24 07:39, Cédric Le Goater wrote: Commit e554e45b4478 ("aspeed: Tune eMMC device properties to reflect HW strapping") added support to boot from an eMMC device by setting the boot properties of the eMMC device. This change made the assumption that the device always has boot areas. Howeve

Inquiry About PC-Relative Code Generation in QEMU

2024-11-02 Thread Coekjan Yip
Dear QEMU Community, I hope this message finds you well. I recently started studying the QEMU TCG code, and I have noticed that QEMU seems to support generating PC-Relative Code (`CF_PCREL`), but this feature seems currently enabled only for System Emulation in version 9.1.0, while it is not avai

Inquiry About PC-Relative Code Generation in QEMU

2024-11-02 Thread Yip Coekjan
Dear QEMU Community, I hope this message finds you well. I recently started studying the QEMU TCG code, and I have noticed that QEMU seems to support generating PC-Relative Code (`CF_PCREL`), but this feature seems currently enabled only for System Emulation in version 9.1.0, while it is not ava

Re: [SPAM] [PATCH v1 6/8] hw/sd/aspeed_sdhci: Introduce Capabilities Register 2 for SD slot 0 and 1

2024-11-02 Thread Cédric Le Goater
On 10/29/24 10:17, Jamin Lin wrote: The size of SDHCI capabilities register is 64bits, so introduces new Capabilities Register 2 for SD slot 0 (0x144) and SD slot1 (0x244). Signed-off-by: Jamin Lin I will fix the code alignment issues. Reviewed-by: Cédric Le Goater Thanks, C. --- hw/s

Re: [PATCH] hw/sd/sdcard: Fix calculation of size when using eMMC boot partitions

2024-11-02 Thread Cédric Le Goater
Philippe, I can take this patch through the aspeed branch. Thanks, C. On 10/28/24 17:23, Jan Luebbe wrote: The sd_bootpart_offset() function calculates the *runtime* offset which changes as the guest switches between accessing the main user data area and the boot partitions by writing to the

Re: [SPAM] [PATCH v1 0/8] Support RTC for AST2700

2024-11-02 Thread Cédric Le Goater
On 10/29/24 10:17, Jamin Lin wrote: change from v1: 1. Support RTC for AST2700. 2. Support SDHCI write protected pin inverted for AST2500 and AST2600. 3. Introduce Capabilities Register 2 for SD slot 0 and 1. 4. Support create flash devices via command line for AST1030. Jamin Lin (8): aspeed/

Re: [SPAM] [PATCH v1 2/8] hw/timer/aspeed: Fix coding style

2024-11-02 Thread Cédric Le Goater
On 10/29/24 10:17, Jamin Lin wrote: Fix coding style issues from checkpatch.pl Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/timer/aspeed_timer.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/timer/aspeed_timer.c b/hw

Re: [SPAM] [PATCH v1 3/8] hw/timer/aspeed: Fix interrupt status does not be cleared for AST2600

2024-11-02 Thread Cédric Le Goater
On 10/29/24 10:17, Jamin Lin wrote: According to the datasheet of AST2600 description, interrupt status set by HW and clear to "0" by software writing "1" on the specific bit. Therefore, if firmware set the specific bit "1" in the interrupt status register(0x34), the specific bit of "s->irq_sts"

Re: [SPAM] [PATCH v1 1/8] aspeed/soc: Support RTC for AST2700

2024-11-02 Thread Cédric Le Goater
On 10/29/24 10:17, Jamin Lin wrote: The RTC controller between AST2600 and AST2700 are identical. Add RTC model for AST2700 RTC support. The RTC controller registers base address is start at 0x12C0_F000 and its alarm interrupt is connected to GICINT13. Signed-off-by: Jamin Lin Reviewed-by: C

Re: [SPAM] [PATCH v1 4/8] hw/sd/sdhci: Fix coding style

2024-11-02 Thread Cédric Le Goater
On 10/29/24 10:17, Jamin Lin wrote: Fix coding style issues from checkpatch.pl Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/sd/sdhci.c | 64 +-- 1 file changed, 42 insertions(+), 22 deletions(-) diff --git

Re: [PATCH 0/2] hw/arm/aspeed_ast27x0: minor IRQ number cleanup

2024-11-02 Thread Cédric Le Goater
On 11/1/24 17:11, Peter Maydell wrote: In the course of a conversation on IRC with somebody who was using the ast27x0 code as a model for a new board, I noticed that the code currently defines a local ARCH_GIC_MAINT_IRQ with a different value from the constant of the same name that we define in t

Re: [PATCH] hw/arm: enable at24c with aspeed

2024-11-02 Thread Cédric Le Goater
On 10/28/24 19:14, Patrick Leis wrote: Enable AT24C with ASPEED in the KConfig because the boards build this device. Signed-off-by: Patrick Leis --- hw/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index e7fd9338d1..1b25e73578 100644 --- a/hw

[PATCH] aspeed: Don't set always boot properties of the emmc device

2024-11-02 Thread Cédric Le Goater
Commit e554e45b4478 ("aspeed: Tune eMMC device properties to reflect HW strapping") added support to boot from an eMMC device by setting the boot properties of the eMMC device. This change made the assumption that the device always has boot areas. However, if the machine boots from the flash devic

Re: [PATCH v4 1/3] tpm/tpm_tis_spi: Support TPM for SPI (Serial Peripheral Interface)

2024-11-02 Thread Stefan Berger
On 11/1/24 4:27 PM, dan tan wrote: Implement support for TPM via SPI interface. The SPI bus master is provided by PowerNV SPI device which is an SSI peripheral. It can uses the tpm_emulator driver backend with the external swtpm. Although the implementation is endian neutral, the SPI bus mast

Re: [PATCH v4 3/3] tests/qtest/tpm: add unit test to tis-spi

2024-11-02 Thread Stefan Berger
On 11/1/24 4:27 PM, dan tan wrote: Add qtest cases to exercise main TPM locality functionality It's not just locality. -> main TPM functionality. The TPM device emulation is provided by swtpm, which is TCG TPM 2.0, and TCG TPM TIS compliant. See https://trustedcomputinggroup.org/wp-content

[PATCH v2 2/2] log: Suggest using -d guest_error, invalid_mem instead of guest_errors

2024-11-02 Thread BALATON Zoltan
Rename guest_errors to guest_error to match the log constant and print a warning for -d guest_errors to remind using guest_error,invalid_mem instead but preserve previous behaviour for convenience. Signed-off-by: BALATON Zoltan --- This patch is optional, only to preserve current behaviour if tha

[PATCH v3 07/26] hw/ppc/e500: Use SysBusDevice API to access TYPE_CCSR's internal resources

2024-11-02 Thread Bernhard Beschow
Rather than accessing the attributes of TYPE_CCSR directly, use the SysBusDevice API which exists exactly for that purpose. Furthermore, registering the memory region with the SysBusDevice API makes it show up in QMP's `info qom-tree` command. Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard B

[PATCH v3 10/26] hw/ppc/mpc8544_guts: Populate POR PLL ratio status register

2024-11-02 Thread Bernhard Beschow
Populate this read-only register with some arbitrary values which avoids U-Boot's get_clocks() to hang(). Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard Beschow --- hw/ppc/mpc8544_guts.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/ppc/mpc8544_guts.c b/hw/ppc/mpc854

[PATCH v3 14/26] hw/pci-host/ppce500: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/pci-host/ppce500.c | 42 ++ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index d7ff2ba778..1ce79ea20c 100644 --- a/hw/pci-

[PATCH v3 08/26] hw/ppc/e500: Extract ppce500_ccsr.c

2024-11-02 Thread Bernhard Beschow
The device model already has a header file, so extract its implementation into an accompanying source file like other e500 devices. While at it rename the header file to reflect the name of the structure defined there. This commit is also a preparation for the next commit. Signed-off-by: Bernhard

[PATCH v3 22/26] hw/i2c/smbus_eeprom: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/i2c/smbus_eeprom.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/hw/i2c/smbus_eeprom.c b/hw/i2c/smbus_eeprom.c index 9e62c27a1a..1d4d9704bf 100644 --- a/hw/i2c/smbus_eeprom.c +++ b/hw/

[PATCH v3 11/26] hw/i2c/mpc_i2c: Convert DPRINTF to trace events for register access

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/i2c/mpc_i2c.c| 9 + hw/i2c/trace-events | 5 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/i2c/mpc_i2c.c b/hw/i2c/mpc_i2c.c index 2467d1a9aa..3d79c15653 100644 --- a/hw/i2c/mpc_i2c.c +++ b

[PATCH v3 17/26] hw/gpio/mpc8xxx: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/gpio/mpc8xxx.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/hw/gpio/mpc8xxx.c b/hw/gpio/mpc8xxx.c index 63b7a5c881..de183c3be5 100644 --- a/hw/gpio/mpc8xxx.c +++ b/hw/gpio/mpc8xxx.

[PATCH v3 13/26] hw/pci-host/ppce500: Reuse TYPE_PPC_E500_PCI_BRIDGE define

2024-11-02 Thread Bernhard Beschow
Prefer a macro rather than a string literal when instantiaging device models. Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard Beschow --- hw/pci-host/ppce500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index 97e5d47cec.

[PATCH v3 18/26] hw/ppc/mpc8544_guts: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/ppc/mpc8544_guts.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/ppc/mpc8544_guts.c b/hw/ppc/mpc8544_guts.c index c02b34ccde..cf2317b3ab 100644 --- a/hw/ppc/mpc8544_guts.c +++ b/hw

[PATCH v3 15/26] hw/net/fsl_etsec/miim: Reuse MII constants

2024-11-02 Thread Bernhard Beschow
Instead of defining redundant constants and using magic numbers reuse the existing MII constants. Signed-off-by: Bernhard Beschow --- hw/net/fsl_etsec/miim.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/hw/net/fsl_etsec/miim.c b/hw/net/fsl_etsec/miim.c

[PATCH v3 12/26] hw/i2c/mpc_i2c: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/i2c/mpc_i2c.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/i2c/mpc_i2c.c b/hw/i2c/mpc_i2c.c index 3d79c15653..16f4309ea9 100644 --- a/hw/i2c/mpc_i2c.c +++ b/hw/i2c/mpc_i2c.c @@ -2

[PATCH v3 03/26] hw/ppc/e500: Prefer QOM cast

2024-11-02 Thread Bernhard Beschow
Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 0683629ac0..964a22c5b7 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -1008,7 +1008,7 @@ void ppce500_init(

[PATCH v3 09/26] hw/ppc/ppce500_ccsr: Trace access to CCSR region

2024-11-02 Thread Bernhard Beschow
The CCSR space is just a container which is meant to be covered by platform device memory regions. However, QEMU only implements a subset of these devices. Add some tracing to see which unimplemented devices a guest attempts to access. Signed-off-by: Bernhard Beschow --- hw/ppc/ppce500_ccsr.c |

[PATCH v3 23/26] hw/rtc/ds1338: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- hw/rtc/ds1338.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/rtc/ds1338.c b/hw/rtc/ds1338.c index a5fe221418..6de13caf99 100644 --- a/hw/rtc/ds1338.c +++ b/hw/rtc/ds1338.c @@ -14,7 +14,6 @@ #include "hw/i2c/i2c.h

[PATCH v3 21/26] hw/block/pflash_cfi01: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Reviewed-by: Kevin Wolf Signed-off-by: Bernhard Beschow --- hw/block/pflash_cfi01.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 7b6ec64442..cf11dada29 100644 ---

[PATCH v3 16/26] hw/net/fsl_etsec/etsec: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/net/fsl_etsec/etsec.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c index 3fdd16ef2e..9bd886b996 100644 --- a/hw/net/fsl_etsec/et

[PATCH v3 02/26] hw/ppc/e500: Remove firstenv variable

2024-11-02 Thread Bernhard Beschow
The firstenv variable is never read, so remove it. The env variable is then only used inside the loop, so move it there to restrict its scope. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500

[PATCH v3 01/26] hw/ppc/e500: Do not leak struct boot_info

2024-11-02 Thread Bernhard Beschow
The struct is allocated once with g_new0() but never free()'d. Fix the leakage by adding an attribute to struct PPCE500MachineState which avoids the allocation. While at it remove the obsolete /*< private >*/ markers. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.h | 9 +++-- hw/ppc/e500

[PATCH v3 06/26] hw/ppc/e500: Reuse TYPE_GPIO_PWR

2024-11-02 Thread Bernhard Beschow
Taking inspiration from the ARM virt machine, port away from qemu_allocate_irq() by reusing TYPE_GPIO_PWR. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 16 hw/ppc/Kconfig | 1 + 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.

[PATCH v3 24/26] hw/usb/hcd-ehci-sysbus: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/usb/hcd-ehci-sysbus.c | 118 +-- 1 file changed, 50 insertions(+), 68 deletions(-) diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c index 2b1652f7a8..87a3bebe3e 100644 --- a/

[PATCH v3 25/26] hw/vfio/platform: Let vfio_start_eventfd_injection() take VFIOPlatformDevice pointer

2024-11-02 Thread Bernhard Beschow
Avoids one downcast, making the code more type-safe. Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/vfio/platform.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index a85c199c76..77bbfbf62c 100644 --- a/

[PATCH v3 19/26] hw/intc: Guard openpic_kvm.c by dedicated OPENPIC_KVM Kconfig switch

2024-11-02 Thread Bernhard Beschow
Allows to clearly mark code sections relying on this device type. Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 2 +- hw/intc/Kconfig | 4 hw/intc/meson.build | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/ppc/e500.c

[PATCH v3 20/26] hw/sd/sdhci: Prefer DEFINE_TYPES() macro

2024-11-02 Thread Bernhard Beschow
Reviewed-by: Cédric Le Goater Signed-off-by: Bernhard Beschow --- hw/sd/sdhci.c | 62 +-- 1 file changed, 26 insertions(+), 36 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index ed01499391..aa89513796 100644 --- a/hw/sd/sdhci.c +++ b/hw

[PATCH v3 26/26] MAINTAINERS: Add hw/gpio/gpio_pwr.c

2024-11-02 Thread Bernhard Beschow
The device is only used in the ARM virt machine and designed to be used on top of pl061 for use cases such as ARM Trusted Firmware. Add it to the same section as hw/gpio/pl061.c. Signed-off-by: Bernhard Beschow --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAI

[PATCH v3 05/26] hw/ppc/e500: Add missing device tree properties to i2c controller node

2024-11-02 Thread Bernhard Beschow
When compiling a decompiled device tree blob created with dumpdtb, dtc complains with: /soc@e000/i2c@3000: incorrect #address-cells for I2C bus /soc@e000/i2c@3000: incorrect #size-cells for I2C bus Fix this by adding the missing device tree properties. Reviewed-by: Cédric Le Goater

[PATCH v3 04/26] hw/ppc/e500: Remove unused "irqs" parameter

2024-11-02 Thread Bernhard Beschow
Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 964a22c5b7..ecaaab1558 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -825,7 +825,7 @@ static DeviceState

[PATCH v3 00/26] E500 Cleanup

2024-11-02 Thread Bernhard Beschow
This series is part of a bigger series exploring data-driven machine creation using device tree blobs on top of the e500 machines [1]. It contains patches to make this exploration easier which are also expected to provide value in themselves. The cleanup starts with the e500 machine class itself,

Re: [PATCH] hw/riscv: fix build error with clang

2024-11-02 Thread Peter Maydell
On Fri, 1 Nov 2024 at 20:46, Daniel Henrique Barboza wrote: > Pierrick, I copied the description of this function from the riscv-isa spec > and put in a comment. This is how it would look like: > > $ git diff > diff --git a/hw/riscv/riscv-iommu.c b/hw/riscv/riscv-iommu.c > index feb650549a..969eb5

[PATCH v3 2/5] hw/net/lan9118_phy: Reuse in imx_fec and consolidate implementations

2024-11-02 Thread Bernhard Beschow
imx_fec models the same PHY as lan9118_phy. The code is almost the same with imx_fec having more logging and tracing. Merge these improvements into lan9118_phy and reuse in imx_fec to fix the code duplication. Some migration state how resides in the new device model which breaks migration compatib

[PATCH v3 4/5] hw/net/lan9118_phy: Reuse MII constants

2024-11-02 Thread Bernhard Beschow
Prefer named constants over magic values for better readability. Reviewed-by: Peter Maydell Signed-off-by: Bernhard Beschow --- include/hw/net/mii.h | 6 + hw/net/lan9118_phy.c | 63 2 files changed, 46 insertions(+), 23 deletions(-) diff --git

[PATCH v3 3/5] hw/net/lan9118_phy: Fix off-by-one error in MII_ANLPAR register

2024-11-02 Thread Bernhard Beschow
Turns 0x70 into 0xe0 (== 0x70 << 1) which adds the missing MII_ANLPAR_TX and fixes the MSB of selector field to be zero, as specified in the datasheet. Fixes: 2a424990170b "LAN9118 emulation" Signed-off-by: Bernhard Beschow --- hw/net/lan9118_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH v3 5/5] hw/net/lan9118_phy: Add missing 100 mbps full duplex advertisement

2024-11-02 Thread Bernhard Beschow
The real device advertises this mode and the device model already advertises 100 mbps half duplex and 10 mbps full+half duplex. So advertise this mode to make the model more realistic. Reviewed-by: Peter Maydell Signed-off-by: Bernhard Beschow --- hw/net/lan9118_phy.c | 4 ++-- 1 file changed,

[PATCH v3 0/5] Consolidate lan9118 phy implementations

2024-11-02 Thread Bernhard Beschow
hw/net/imx_fec and hw/net/lan9118 implement the same Ethernet PHY with similar but not quite the same code. This series consolidates the implementations into one to fix code duplication. It then continues to make the code more readable by reusing some existing constants. Having a dedicated module

[PATCH v3 1/5] hw/net/lan9118: Extract lan9118_phy

2024-11-02 Thread Bernhard Beschow
A very similar implementation of the same device exists in imx_fec. Prepare for a common implementation by extracting a device model into its own files. Some migration state has been moved into the new device model which breaks migration compatibility for the following machines: * smdkc210 * realv

Re: [PATCH v4 2/3] tpm/tpm_tis_spi: activation for the PowerNV machines

2024-11-02 Thread Stefan Berger
On 11/1/24 4:27 PM, dan tan wrote: The addition to ppc/Kconfig is for building this into the qemu-system-ppc64 binary. The enablement requires the following command line argument: -device tpm-tis-spi,tpmdev=tpm0,bus=pnv-spi-bus.4 Signed-off-by: dan tan Reviewed-by: Stefan Berger ---

Re: [PATCH v5 02/15] hw/display/apple-gfx: Introduce ParavirtualizedGraphics.Framework support

2024-11-02 Thread Akihiko Odaki
On 2024/11/02 6:37, Phil Dennis-Jordan wrote: Thanks for taking a look at this latest iteration. Some thoughts on your comments inline: On Thu, 31 Oct 2024 at 10:32, Akihiko Odaki > wrote: On 2024/10/30 5:58, Phil Dennis-Jordan wrote: > MacOS provides

Re: [PATCH 0/2] Consolidate embedded PPC initial mappung functions

2024-11-02 Thread BALATON Zoltan
On Tue, 8 Oct 2024, BALATON Zoltan wrote: On Tue, 16 Jul 2024, BALATON Zoltan wrote: Embedded PPC has always enabled MMU so it needs initial mappings to start. This code is duplicated within machines which this small series aims to consolidate into helper functions to reduce duplicated code and

[PATCH v2 1/2] log: Add separate debug option for logging invalid memory accesses

2024-11-02 Thread BALATON Zoltan
Currently -d guest_errors enables logging of different invalid actions by the guest such as misusing hardware, accessing missing features or invalid memory areas. The memory access logging can be quite verbose which obscures the other messages enabled by this debug switch so separate it by adding a

[PATCH v2 0/2] Separate memory access logs from guest_errors

2024-11-02 Thread BALATON Zoltan
Originally memory access logs were a debug define that then were converted to log messages but were classified as guest_errors which already logs misc errors. As invalid memory access logs can come from accessing not emulated peripherals or memory areas, these often generate a lot of messages that

[PATCH v2] hw/ppc/pegasos2: Fix IRQ routing from pci.0

2024-11-02 Thread BALATON Zoltan
The MV64361 has two PCI buses one of which is used for AGP on PegasosII. So far we only emulated the PCI bus on pci.1 but some graphics cards are only recognised by some guests when connected to pci.0 corresponding to the AGP port. So far the interrupts were not routed from pci.0 so this patch fixe

[PATCH 1/2] chardev/char-mux: shift unsigned long to avoid 32-bit overflow

2024-11-02 Thread Roman Penyaev
Allthough the size of MAX_MUX is equal to 4 and likely will never change, this patch changes type of constant to unsigned long to be on the safe side. Also add a static compile check that MAX_MUX never bigger than `sizeof(d->mux_bitset)`. Signed-off-by: Roman Penyaev Cc: "Marc-André Lureau" Cc:

Re: [PATCH v2 7/8] chardev/mux: implement detach of frontends from mux

2024-11-02 Thread Roman Penyaev
Hi, On Tue, Oct 22, 2024, 07:21 CLEMENT MATHIEU--DRIF < clement.mathieu--d...@eviden.com> wrote: > > > On 14/10/2024 17:24, Roman Penyaev wrote: > > Caution: External email. Do not open attachments or click links, unless > this email comes from a known sender and you know the content is safe. > >

[PATCH 2/2] chardev/char-mux: make boolean bit check instead of find_next_bit()

2024-11-02 Thread Roman Penyaev
This patch simplifies (and makes less confusing) bit checks by replacing `find_next_bit()` calls with boolean AND operation. Resolves: Coverity CID 1563776 Signed-off-by: Roman Penyaev Cc: "Marc-André Lureau" Cc: Peter Maydell Cc: Clément Mathieu--Drif Cc: qemu-devel@nongnu.org --- chardev/ch

[PATCH 0/2] chardev/char-mux: tweak mux bitset operations

2024-11-02 Thread Roman Penyaev
Patchset tweaks bitset operations by changing a constant to unsigned long, introduces a static compile check and simplifies bitset operations. Roman Penyaev (2): chardev/char-mux: shift unsigned long to avoid 32-bit overflow chardev/char-mux: make boolean bit check instead of find_next_bit()

Re: [PULL 7/8] chardev/mux: implement detach of frontends from mux

2024-11-02 Thread Roman Penyaev
Hi Peter, On Fri, Nov 1, 2024 at 4:25 PM Peter Maydell wrote: > > On Tue, 15 Oct 2024 at 09:52, wrote: > > > > From: Roman Penyaev > > > > With bitset management now it becomes feasible to implement > > the logic of detaching frontends from multiplexer. > > > > Signed-off-by: Roman Penyaev > >

Re: [PULL 7/8] chardev/mux: implement detach of frontends from mux

2024-11-02 Thread Marc-André Lureau
Hi On Fri, Nov 1, 2024 at 7:26 PM Peter Maydell wrote: > On Tue, 15 Oct 2024 at 09:52, wrote: > > > > From: Roman Penyaev > > > > With bitset management now it becomes feasible to implement > > the logic of detaching frontends from multiplexer. > > > > Signed-off-by: Roman Penyaev > > Cc: "Ma

Re: [PATCH 20/36] next-cube: rename typedef struct NextRtc to NeXTRTC

2024-11-02 Thread Thomas Huth
Am Wed, 23 Oct 2024 09:58:36 +0100 schrieb Mark Cave-Ayland : > This brings the capitalisation in line with the other NeXTCube definitions. > > Signed-off-by: Mark Cave-Ayland > --- > hw/m68k/next-cube.c | 24 > 1 file changed, 12 insertions(+), 12 deletions(-) Reviewe

Re: [PATCH 19/36] next-cube: convert next-pc device to use Resettable interface

2024-11-02 Thread Thomas Huth
Am Wed, 23 Oct 2024 09:58:35 +0100 schrieb Mark Cave-Ayland : > Signed-off-by: Mark Cave-Ayland > --- > hw/m68k/next-cube.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) Acked-by: Thomas Huth

Re: [PATCH 18/36] next-cube: rearrange NeXTState declarations to improve readability

2024-11-02 Thread Thomas Huth
Am Wed, 23 Oct 2024 09:58:34 +0100 schrieb Mark Cave-Ayland : > Move the NeXTState, next_dma and TYPE_NEXT_MACHINE definition to the same area > at the top of next-cube.c. > > Signed-off-by: Mark Cave-Ayland > --- > hw/m68k/next-cube.c | 64 ++--- > 1 fil

Re: [PATCH 17/36] next-cube: remove unused next.scr memory region

2024-11-02 Thread Thomas Huth
Am Wed, 23 Oct 2024 09:58:33 +0100 schrieb Mark Cave-Ayland : > Now that the next.scr memory region is unused it can be removed and the > next-pc > devices mapped directly within the machine init function. This is the last > remaining overlapping memory region within the NeXTCube machine. > > Si

Re: [PATCH v6 0/3] Add support for the RAPL MSRs series

2024-11-02 Thread Anthony Harivel
Hi Igor, Igor Mammedov, Nov 01, 2024 at 16:09: > On Tue, 22 Oct 2024 16:16:36 +0200 > "Anthony Harivel" wrote: > >> Daniel P. Berrangé, Oct 22, 2024 at 15:15: >> > On Tue, Oct 22, 2024 at 02:46:15PM +0200, Igor Mammedov wrote: >> >> On Fri, 18 Oct 2024 13:59:34 +0100 >> >> Daniel P. Berrangé

Re: [PATCH v3 1/2] next-kbd: convert to use qemu_input_handler_register()

2024-11-02 Thread Thomas Huth
Am Fri, 1 Nov 2024 20:11:05 + schrieb Mark Cave-Ayland : > Convert the next-kbd device from the legacy UI qemu_add_kbd_event_handler() > function to use qemu_input_handler_register(). > > Signed-off-by: Mark Cave-Ayland > --- > hw/m68k/next-kbd.c | 166 ++---

[PULL v2 6/8] linux-headers: Update to Linux v6.12-rc5

2024-11-02 Thread Song Gao
From: Bibo Mao update linux-headers to v6.12-rc5. Pass to compile on aarch64, arm, loongarch64, x86_64, i386, riscv64,riscv32 softmmu and linux-user. Signed-off-by: Bibo Mao Acked-by: Song Gao Message-Id: <20241028023809.1554405-4-maob...@loongson.cn> Signed-off-by: Song Gao --- include/stan

[PULL v2 5/8] linux-headers: loongarch: Add kvm_para.h

2024-11-02 Thread Song Gao
From: Bibo Mao KVM LBT supports on LoongArch depends on the linux-header file kvm_para.h, add header file kvm_para.h here. Signed-off-by: Bibo Mao Acked-by: Song Gao Message-Id: <20241028023809.1554405-3-maob...@loongson.cn> Signed-off-by: Song Gao --- scripts/update-linux-headers.sh | 1 +

[PULL v2 8/8] target/loongarch: Add steal time support on migration

2024-11-02 Thread Song Gao
From: Bibo Mao With pv steal time supported, VM machine needs get physical address of each vcpu and notify new host during migration. Here two functions kvm_get_stealtime/kvm_set_stealtime, and guest steal time physical address is only updated on KVM_PUT_FULL_STATE stage. Signed-off-by: Bibo Mao

[PULL v2 3/8] target/loongarch/kvm: Implement LoongArch PMU extension

2024-11-02 Thread Song Gao
From: Bibo Mao Implement PMU extension for LoongArch kvm mode. Use OnOffAuto type variable pmu to check the PMU feature. If the PMU Feature is not supported with KVM host, it reports error if there is pmu=on command line. If there is no any command line about pmu parameter, it checks whether KVM

[PULL v2 1/8] target/loongarch: Add loongson binary translation feature

2024-11-02 Thread Song Gao
From: Bibo Mao Loongson Binary Translation (LBT) is used to accelerate binary translation, which contains 4 scratch registers (scr0 to scr3), x86/ARM eflags (eflags) and x87 fpu stack pointer (ftop). Now LBT feature is added in kvm mode, not supported in TCG mode since it is not emulated. Featur

[PULL v2 2/8] target/loongarch: Implement lbt registers save/restore function

2024-11-02 Thread Song Gao
From: Bibo Mao Six registers scr0 - scr3, eflags and ftop are added in percpu vmstate. And two functions kvm_loongarch_get_lbt/kvm_loongarch_put_lbt are added to save/restore lbt registers. Signed-off-by: Bibo Mao Reviewed-by: Song Gao Message-Id: <20240929070405.235200-3-maob...@loongson.cn>

[PULL v2 7/8] hw/loongarch/boot: Use warn_report when no kernel filename

2024-11-02 Thread Song Gao
When we run “qemu-system-loongarch64 -qmp stdio -vnc none -S”, we get an error message “Need kernel filename” and then we can't use qmp cmd to query some information. So, we just throw a warning and then the cpus starts running from address VIRT_FLASH0_BASE. Signed-off-by: Song Gao Reviewed-by:

[PULL v2 4/8] linux-headers: Add unistd_64.h

2024-11-02 Thread Song Gao
From: Bibo Mao since 6.11, unistd.h includes header file unistd_64.h directly on some platforms, here add unistd_64.h on these platforms. Affected platforms are ARM64, LoongArch64 and Riscv. Otherwise there will be compiling error such as: linux-headers/asm/unistd.h:3:10: fatal error: asm/unistd

[PULL v2 0/8] loongarch-to-apply queue

2024-11-02 Thread Song Gao
tags/pull-loongarch-20241102 for you to fetch changes up to 47b54e15bbe78722c62dfafc3e04deded820c05e: target/loongarch: Add steal time support on migration (2024-11-02 15:45:45 +0800) pull-loongarch-20241102 V2: Fix no 'asm/uni

Re: [PATCH 15/36] next-cube: move en ethernet MMIO to separate memory region on next-pc device

2024-11-02 Thread Thomas Huth
Am Wed, 23 Oct 2024 09:58:31 +0100 schrieb Mark Cave-Ayland : > Move the en ethernet MMIO accesses to a separate memory region on the next-pc > device instead of being part of the next.scr MMIO memory region. > > Signed-off-by: Mark Cave-Ayland > --- > hw/m68k/next-cube.c | 48 +