Re: Purpose of QOM properties registered at realize time?

2020-10-07 Thread BALATON Zoltan via
On Tue, 6 Oct 2020, Eduardo Habkost wrote: Hi, While trying to understand how QOM properties are used in QEMU, I stumbled upon multiple cases where alias properties are added at realize time. Now, I don't understand why those properties exist. As the properties are added at realize time, I

Re: [PATCH 07/10] tcg: implement bulletproof JIT

2020-10-14 Thread BALATON Zoltan via
On Wed, 14 Oct 2020, Richard Henderson wrote: On 10/14/20 9:03 AM, Joelle van Dyne wrote: static int encode_search(TranslationBlock *tb, uint8_t *block) { -uint8_t *highwater = tcg_ctx->code_gen_highwater; -uint8_t *p = block; +uint8_t *highwater; +uint8_t *p; int i, j, n;

Re: [PATCH 07/10] tcg: implement bulletproof JIT

2020-10-14 Thread BALATON Zoltan via
On Wed, 14 Oct 2020, Joelle van Dyne wrote: Much of the code that uses the macro is like the following (from aarch64/tcg-include.inc.c) *TCG_CODE_PTR_RW(s, code_ptr) = deposit32(*TCG_CODE_PTR_RW(s, code_ptr), 0, 26, offset); Before the change, it was just *code_ptr. I'm

Re: [PATCH 07/10] tcg: implement bulletproof JIT

2020-10-13 Thread BALATON Zoltan via
On Mon, 12 Oct 2020, Joelle van Dyne wrote: From: osy On iOS, we cannot allocate RWX pages without special entitlements. As a workaround, we can a RX region and then mirror map it to a separate RX Missing a verb here: "we can a RX region" region. Then we can write to one region and execute

Re: [PATCH v2 2/3] grackle: use qdev gpios for PCI IRQs

2020-10-13 Thread BALATON Zoltan via
Hello, Not related to this patch but while you're at it could you please take those patches that are already reviewed by you from this series as well? http://patchwork.ozlabs.org/project/qemu-devel/list/?series=186439 That would help cleaning up my tree and see which patches still need

Re: [PATCH 06/10] coroutine: add libucontext as external library

2020-10-13 Thread BALATON Zoltan via
On Tue, 13 Oct 2020, Stefan Hajnoczi wrote: On Mon, Oct 12, 2020 at 04:29:35PM -0700, Joelle van Dyne wrote: From: osy iOS does not support ucontext natively for aarch64 and the sigaltstack is also unsupported (even worse, it fails silently, see: https://openradar.appspot.com/13002712 ) As a

Re: [PATCH 04/10] meson: option to build as shared library

2020-10-13 Thread BALATON Zoltan via
On Tue, 13 Oct 2020, Daniel P. Berrangé wrote: On Tue, Oct 13, 2020 at 08:16:46AM -0700, Joelle van Dyne wrote: I will start a separate conversation of UTM's license compatibility. Regarding the patch, would some sort of warning message in configure (if building as a shared library) regarding

Re: [PATCH 04/10] meson: option to build as shared library

2020-10-13 Thread BALATON Zoltan via
On Tue, 13 Oct 2020, Daniel P. Berrangé wrote: On Tue, Oct 13, 2020 at 04:41:06PM +0200, BALATON Zoltan wrote: On Tue, 13 Oct 2020, Daniel P. Berrangé wrote: On Mon, Oct 12, 2020 at 04:29:33PM -0700, Joelle van Dyne wrote: From: osy On iOS, we cannot fork() new processes, so the best way to

Re: [PATCH v2 3/3] uninorth: use qdev gpios for PCI IRQs

2020-10-13 Thread BALATON Zoltan via
On Tue, 13 Oct 2020, Mark Cave-Ayland wrote: On 13/10/2020 14:38, BALATON Zoltan via wrote: On Tue, 13 Oct 2020, Mark Cave-Ayland wrote: Currently an object link property is used to pass a reference to the OpenPIC into the PCI host bridge so that pci_unin_init_irqs() can connect the PCI IRQs

Re: [PATCH v7 8/8] mac_oldworld: Add SPD data to cover RAM

2020-10-13 Thread BALATON Zoltan via
On Tue, 13 Oct 2020, Philippe Mathieu-Daudé wrote: On 6/29/20 8:55 PM, BALATON Zoltan wrote: OpenBIOS gets RAM size via fw_cfg but rhe original board firmware Typo "the". detects RAM using SPD data so generate and add SDP eeproms to cover as EEPROMs? much RAM as possible to describe

Re: [PATCH v7 8/8] mac_oldworld: Add SPD data to cover RAM

2020-10-13 Thread BALATON Zoltan via
On Wed, 14 Oct 2020, BALATON Zoltan via wrote: On Tue, 13 Oct 2020, Philippe Mathieu-Daudé wrote: On 6/29/20 8:55 PM, BALATON Zoltan wrote: This patch is more complex as it should be which I intend to fix once agreement can be made on how to get back the necessary functionality removed

Re: [PATCH 1/2] softmmu: move more files to softmmu/

2020-10-06 Thread BALATON Zoltan via
On Tue, 6 Oct 2020, Paolo Bonzini wrote: Keep most softmmu_ss files into the system-emulation-specific directory. The name of this dir may be misleading. I think it originally stood for the actual MMU emulation but now it seems everything related to system emulation is dumped here. Is it

Re: [PATCH 1/5] hw/pci-host/bonito: Make PCI_ADDR() macro more readable

2020-10-12 Thread BALATON Zoltan via
On Mon, 12 Oct 2020, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé The PCI_ADDR() macro use generic PCI fields shifted by 8-bit. Rewrite it extracting the shift operation one layer. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 4 ++-- 1 file changed, 2

Re: [PATCH] Deprecate TileGX port

2020-10-12 Thread BALATON Zoltan via
On Mon, 12 Oct 2020, Peter Maydell wrote: Deprecate our TileGX target support: * we have no active maintainer for it * it has had essentially no contributions (other than tree-wide cleanups and similar) since it was first added * the Linux kernel dropped support in 2018, as has glibc Note the

Re: [PATCH qemu v9] spapr: Implement Open Firmware client interface

2020-10-12 Thread BALATON Zoltan via
On Mon, 12 Oct 2020, Alexey Kardashevskiy wrote: On 29/09/2020 20:35, Alexey Kardashevskiy wrote: On 16/07/2020 23:22, David Gibson wrote: On Thu, Jul 16, 2020 at 07:04:56PM +1000, Alexey Kardashevskiy wrote: Ping? I kinda realize it is not going to replace SLOF any time soon but still...

Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set

2020-10-12 Thread BALATON Zoltan via
On Mon, 12 Oct 2020, David Gibson wrote: On Mon, Oct 12, 2020 at 08:21:41AM +0200, Philippe Mathieu-Daudé wrote: On 10/12/20 12:34 AM, David Gibson wrote: On Sun, Oct 11, 2020 at 09:03:32PM +0200, Philippe Mathieu-Daudé wrote: The Grackle PCI host model expects the interrupt controller being

Re: [PATCH v2 3/3] uninorth: use qdev gpios for PCI IRQs

2020-10-13 Thread BALATON Zoltan via
On Tue, 13 Oct 2020, Mark Cave-Ayland wrote: Currently an object link property is used to pass a reference to the OpenPIC into the PCI host bridge so that pci_unin_init_irqs() can connect the PCI IRQs to the PIC itself. This can be simplified by defining the PCI IRQs as qdev gpios and then

Re: [PATCH v8 0/5] Mac Old World ROM experiment (ppc/mac_* clean ups and loading binary ROM)

2020-10-16 Thread BALATON Zoltan via
On Fri, 16 Oct 2020, Mark Cave-Ayland wrote: On 16/10/2020 00:47, BALATON Zoltan via wrote: This is the cut down version of the earlier series omitting unfinished patches that I plan to rework later and rebased to Mark's qemu-macppc branch. Compared to v7 the only change is the cast

Re: [PATCH 4/5] ppc405_boards: use qdev properties instead of legacy m48t59_init() function

2020-10-16 Thread BALATON Zoltan via
On Fri, 16 Oct 2020, Mark Cave-Ayland wrote: Signed-off-by: Mark Cave-Ayland --- hw/ppc/ppc405_boards.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c index 6198ec1035..4687715b15 100644 --- a/hw/ppc/ppc405_boards.c

Re: [PATCH 4/5] ppc405_boards: use qdev properties instead of legacy m48t59_init() function

2020-10-17 Thread BALATON Zoltan via
On Sat, 17 Oct 2020, Philippe Mathieu-Daudé wrote: On 10/16/20 10:38 PM, BALATON Zoltan via wrote: On Fri, 16 Oct 2020, Mark Cave-Ayland wrote: Signed-off-by: Mark Cave-Ayland --- hw/ppc/ppc405_boards.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/ppc

Re: [PATCH v8 0/5] Mac Old World ROM experiment (ppc/mac_* clean ups and loading binary ROM)

2020-10-17 Thread BALATON Zoltan via
On Sat, 17 Oct 2020, Mark Cave-Ayland wrote: On 16/10/2020 13:19, BALATON Zoltan via wrote: On Fri, 16 Oct 2020, Mark Cave-Ayland wrote: On 16/10/2020 00:47, BALATON Zoltan via wrote: This is the cut down version of the earlier series omitting unfinished patches that I plan to rework later

[PATCH 5/6] ppc405_boards: use qdev instead of legacy m48t59_init() function

2020-10-17 Thread BALATON Zoltan via
Signed-off-by: BALATON Zoltan --- hw/ppc/ppc405_boards.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c index 6198ec1035..7a11a38831 100644 --- a/hw/ppc/ppc405_boards.c +++ b/hw/ppc/ppc405_boards.c @@ -28,6 +28,7 @@ #include

[PATCH 2/6] mt48t59: Set default value of base-year property to 1968

2020-10-17 Thread BALATON Zoltan via
All instances set this value explicitely so make it the default to make it simpler to create instances without setting property. Signed-off-by: BALATON Zoltan --- hw/rtc/m48t59.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rtc/m48t59.c b/hw/rtc/m48t59.c index

Re: [PATCH v9] mac_oldworld: Allow loading binary ROM image

2020-10-17 Thread BALATON Zoltan via
On Sat, 17 Oct 2020, Philippe Mathieu-Daudé wrote: +Alistair for loader On 10/17/20 5:47 PM, BALATON Zoltan via wrote: The beige G3 Power Macintosh has a 4MB firmware ROM. Fix the size of the rom region and fall back to loading a binary image with -bios if loading ELF image failed. This allows

Re: [PATCH v8 0/5] Mac Old World ROM experiment (ppc/mac_* clean ups and loading binary ROM)

2020-10-17 Thread BALATON Zoltan via
On Fri, 16 Oct 2020, Philippe Mathieu-Daudé wrote: On 10/16/20 11:58 AM, Mark Cave-Ayland wrote: On 16/10/2020 00:47, BALATON Zoltan via wrote: This is the cut down version of the earlier series omitting unfinished patches that I plan to rework later and rebased to Mark's qemu-macppc branch

[PATCH 1/6] m48t59-isa: remove legacy m48t59_init_isa() function

2020-10-17 Thread BALATON Zoltan via
From: Mark Cave-Ayland This function is no longer used within the codebase. Signed-off-by: Mark Cave-Ayland Reviewed-by: Hervé Poussineau Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- hw/rtc/m48t59-isa.c | 25 -

[PATCH 4/6] sun4u: use qdev instead of legacy m48t59_init() function

2020-10-17 Thread BALATON Zoltan via
Signed-off-by: BALATON Zoltan --- hw/sparc64/sun4u.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index ad5ca2472a..a89ebed6f0 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -671,10 +671,12 @@ static void

[PATCH v9] mac_oldworld: Allow loading binary ROM image

2020-10-17 Thread BALATON Zoltan via
The beige G3 Power Macintosh has a 4MB firmware ROM. Fix the size of the rom region and fall back to loading a binary image with -bios if loading ELF image failed. This allows testing emulation with a ROM image from real hardware as well as using an ELF OpenBIOS image. Signed-off-by: BALATON

[PATCH 3/6] sun4m: use qdev instead of legacy m48t59_init() function

2020-10-17 Thread BALATON Zoltan via
Also declare nvram variable with the correct type. Signed-off-by: BALATON Zoltan --- hw/sparc/sun4m.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 54a2b2f9ef..7f1a48440c 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@

Re: [PATCH v2 2/3] grackle: use qdev gpios for PCI IRQs

2020-10-15 Thread BALATON Zoltan via
On Thu, 15 Oct 2020, Mark Cave-Ayland wrote: I've queued the grackle/uninorth patches to my qemu-macppc branch, however when I try to apply patches from the above series git fails with the following message: Applying: mac_oldworld: Drop a variable, use get_system_memory() directly error: sha1

[PATCH v8 2/5] mac_newworld: Allow loading binary ROM image

2020-10-15 Thread BALATON Zoltan via
Fall back to load binary ROM image if loading ELF fails. This also moves PROM_BASE and PROM_SIZE defines to board as these are matching the ROM size and address on this board and removes the now unused PROM_ADDR and BIOS_SIZE defines from common mac.h. Signed-off-by: BALATON Zoltan Reviewed-by:

[PATCH v8 5/5] mac_oldworld: Change PCI address of macio to match real hardware

2020-10-15 Thread BALATON Zoltan via
The board firmware expect these to be at fixed addresses and programs them without probing, this patch puts the macio device at the expected PCI address. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland --- hw/ppc/mac_oldworld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v8 3/5] mac_oldworld: Drop a variable, use get_system_memory() directly

2020-10-15 Thread BALATON Zoltan via
Half of the occurances already use get_system_memory() directly instead of sysmem variable, convert the two other uses to get_system_memory() too which seems to be more common and drop the variable. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé

[PATCH v8 4/5] mac_oldworld: Drop some variables

2020-10-15 Thread BALATON Zoltan via
Values not used frequently enough may not worth putting in a local variable, especially with names almost as long as the original value because that does not improve readability, to the contrary it makes it harder to see what value is used. Drop a few such variables. Signed-off-by: BALATON Zoltan

[PATCH v8 0/5] Mac Old World ROM experiment (ppc/mac_* clean ups and loading binary ROM)

2020-10-15 Thread BALATON Zoltan via
This is the cut down version of the earlier series omitting unfinished patches that I plan to rework later and rebased to Mark's qemu-macppc branch. Compared to v7 the only change is the cast to (target_ulong) from (uint32_t) as requested by Mark in patch 1. Regards, BALATON Zoltan BALATON

[PATCH v8 1/5] mac_oldworld: Allow loading binary ROM image

2020-10-15 Thread BALATON Zoltan via
The beige G3 Power Macintosh has a 4MB firmware ROM. Fix the size of the rom region and fall back to loading a binary image with -bios if loading ELF image failed. This allows testing emulation with a ROM image from real hardware as well as using an ELF OpenBIOS image. Signed-off-by: BALATON

[PATCH 6/6] m48t59: remove legacy m48t59_init() function

2020-10-17 Thread BALATON Zoltan via
From: Mark Cave-Ayland Now that all of the callers of this function have been switched to use qdev properties, this legacy init function can now be removed. Signed-off-by: Mark Cave-Ayland Reviewed-by: Hervé Poussineau Reviewed-by: Philippe Mathieu-Daudé --- hw/rtc/m48t59.c | 35

[PATCH 0/6] m48t59: remove legacy init functions

2020-10-17 Thread BALATON Zoltan via
This is inspired by Mark's series: https://lists.nongnu.org/archive/html/qemu-ppc/2020-10/msg00251.html and implements what I've suggested in review of that series to simplify it and avoid code churn if implementing my suggestion later. Regards, BALATON Zoltan BALATON Zoltan (4): mt48t59:

Re: [PATCH v9] mac_oldworld: Allow loading binary ROM image

2020-10-17 Thread BALATON Zoltan via
On Sat, 17 Oct 2020, Philippe Mathieu-Daudé wrote: On 10/17/20 6:31 PM, BALATON Zoltan via wrote: On Sat, 17 Oct 2020, Philippe Mathieu-Daudé wrote: +Alistair for loader On 10/17/20 5:47 PM, BALATON Zoltan via wrote: The beige G3 Power Macintosh has a 4MB firmware ROM. Fix the size

Re: [PATCH v2 2/9] configure: cross-compiling without cross_prefix

2020-10-19 Thread BALATON Zoltan via
On Mon, 19 Oct 2020, Thomas Huth wrote: On 19/10/2020 10.07, Thomas Huth wrote: On 19/10/2020 03.39, Joelle van Dyne wrote: From: osy The iOS toolchain does not use the host prefix naming convention. We add a new option `--enable-cross-compile` that forces cross-compile even without a

Re: [PATCH v2 6/9] tcg: implement mirror mapped JIT for iOS

2020-10-19 Thread BALATON Zoltan via
On Sun, 18 Oct 2020, Joelle van Dyne wrote: From: osy On iOS, we cannot allocate RWX pages without special entitlements. As a workaround, we can allocate a RX region and then mirror map it to a separate RX region. Then we can write to one region and execute from the other one. We also define

Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set

2020-10-19 Thread BALATON Zoltan via
On Mon, 19 Oct 2020, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 10/12/20 1:50 PM, BALATON Zoltan via wrote: On Mon, 12 Oct 2020, David Gibson wrote: On Mon, Oct 12, 2020 at 08:21:41AM +0200, Philippe Mathieu-Daudé wrote: On 10/12/20 12:34 AM, David Gibson wrote

Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set

2020-10-19 Thread BALATON Zoltan via
On Mon, 19 Oct 2020, Mark Cave-Ayland wrote: On 19/10/2020 15:00, Markus Armbruster wrote: BALATON Zoltan via writes: On Mon, 19 Oct 2020, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 10/12/20 1:50 PM, BALATON Zoltan via wrote: On Mon, 12 Oct 2020, David Gibson wrote

Re: [PATCH] ati: mask x y display parameter values

2020-10-19 Thread BALATON Zoltan via
On Mon, 19 Oct 2020, P J P wrote: +-- On Sun, 18 Oct 2020, BALATON Zoltan wrote --+ | The s->regs.[src|dst]_[xy] values should not be over 0x3fff because we mask | them on register write in ati.c Yes, those register values are set to zero(0). | and here [src|dst]_[x|y] local variables are

Re: [PATCH] ati: mask x y display parameter values

2020-10-20 Thread BALATON Zoltan via
Hello, On Tue, 20 Oct 2020, P J P wrote: +-- On Mon, 19 Oct 2020, BALATON Zoltan wrote --+ | On Mon, 19 Oct 2020, P J P wrote: | >dst_x = ... (s->regs.dst_x(=0) + 1 - s->regs.dst_width(=16383)) | >dst_y = ... (s->regs.dst_y(=0) + 1 - s->regs.dst_height(=16383)) | > | > ati_2d_blt | >

Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set

2020-10-20 Thread BALATON Zoltan via
On Tue, 20 Oct 2020, Markus Armbruster wrote: Mark Cave-Ayland writes: One thing I have thought about is being able to mark a link property as mandatory so if a value hasn't been set before realize then you A non-null value, I presume. Do you mean something like distinguish between NULL

Re: [PATCH 04/10] meson: option to build as shared library

2020-10-13 Thread BALATON Zoltan via
On Tue, 13 Oct 2020, Daniel P. Berrangé wrote: On Mon, Oct 12, 2020 at 04:29:33PM -0700, Joelle van Dyne wrote: From: osy On iOS, we cannot fork() new processes, so the best way to load QEMU into an app is through a shared library. We add a new configure option `--enable-shared-lib` that will

Re: [PATCH] ati: mask x y display parameter values

2020-10-18 Thread BALATON Zoltan via
On Sun, 18 Oct 2020, P J P wrote: From: Prasad J Pandit The source and destination x,y display parameters in ati_2d_blt() may run off the vga limits if either of s->regs.[src|dst]_[xy] is zero. Mask the register values to avoid potential crash. Reported-by: Gaoning Pan Signed-off-by: Prasad

Re: [PATCH v2 6/9] tcg: implement mirror mapped JIT for iOS

2020-10-19 Thread BALATON Zoltan via
On Mon, 19 Oct 2020, Joelle van Dyne wrote: Explicit cast may not be needed here so this could be a macro if caling it differently helps or why don't you just use tcg_mirror_prr_rw directly everywhere? There are quite a bit of code that depends on tcg_insn_unit * type such as

Re: [PATCH] ati-vga: Fix checks in ati_2d_blt() to avoid crash

2020-08-22 Thread BALATON Zoltan via
On Sat, 22 Aug 2020, Philippe Mathieu-Daudé wrote: On 4/6/20 10:34 PM, BALATON Zoltan wrote: In some corner cases (that never happen during normal operation but a malicious guest could program wrong values) pixman functions were called with parameters that result in a crash. Fix this and add

Re: [PATCH] load_elf: Remove unused address variables from callers

2020-09-23 Thread BALATON Zoltan via
On Wed, 23 Sep 2020, BALATON Zoltan wrote: On Tue, 7 Jul 2020, BALATON Zoltan wrote: On Tue, 7 Jul 2020, Alistair Francis wrote: On Sun, Jul 5, 2020 at 10:41 AM BALATON Zoltan wrote: Several callers of load_elf() pass pointers for lowaddr and highaddr parameters which are then not used for

Re: [PATCH] load_elf: Remove unused address variables from callers

2020-09-23 Thread BALATON Zoltan via
On Tue, 7 Jul 2020, BALATON Zoltan wrote: On Tue, 7 Jul 2020, Alistair Francis wrote: On Sun, Jul 5, 2020 at 10:41 AM BALATON Zoltan wrote: Several callers of load_elf() pass pointers for lowaddr and highaddr parameters which are then not used for anything. This may stem from a

Re: Use of "?" for help has been deprecated for 8 years, can we drop it?

2020-10-01 Thread BALATON Zoltan via
On Thu, 1 Oct 2020, Eric Blake wrote: On 10/1/20 5:35 AM, Markus Armbruster wrote: We deprecated "?" more than eight years ago. We didn't have a deprecation process back then, but we did purge "?" from the documentation and from help texts. Can we finally drop it? I'm asking because there is

Re: [PATCH 5/6] macio: don't reference serial_hd() directly within the device

2020-09-20 Thread BALATON Zoltan via
On Sun, 20 Sep 2020, Mark Cave-Ayland wrote: Instead use qdev_prop_set_chr() to configure the ESCC serial chardevs at the Mac Old World and New World machine level. Also remove the now obsolete comment referring to the use of serial_hd() and change user_createable to true accordingly.

Re: [PATCH 0/6] tests/acceptance: Test the Fuloong 2E machine

2020-10-25 Thread BALATON Zoltan via
On Sun, 25 Oct 2020, Philippe Mathieu-Daudé wrote: On 10/25/20 12:18 PM, Mark Cave-Ayland wrote: On 21/10/2020 11:50, Philippe Mathieu-Daudé wrote: This series add tests for the MIPS Fuloong 2E machine. I have been using these tests for over 1 year now. After recent discussions with Huacai

Re: Problems with irq mapping in qemu v5.2

2020-12-25 Thread BALATON Zoltan via
On Tue, 22 Dec 2020, Guenter Roeck wrote: On 12/22/20 10:23 AM, Mark Cave-Ayland wrote: On 22/12/2020 16:16, Guenter Roeck wrote: Hi, commit 459ca8bfa41 ("pci: Assert irqnum is between 0 and bus->nirqs in pci_bus_change_irq_level") added sanity checks to the interrupt number passed to

[PATCH 2/3] sam460ex: Drop unneeded dependencies

2020-12-25 Thread BALATON Zoltan via
Remove dependencies from KConfig that are not actually needed. Signed-off-by: BALATON Zoltan --- hw/ppc/Kconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index 8548f42b0d..5893f80909 100644 --- a/hw/ppc/Kconfig +++ b/hw/ppc/Kconfig @@ -55,7 +55,6 @@

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-29 Thread BALATON Zoltan via
On Tue, 29 Dec 2020, Mark Cave-Ayland wrote: On 28/12/2020 20:50, BALATON Zoltan via wrote: diff --git a/hw/ide/via.c b/hw/ide/via.c index be09912b33..7d54d7e829 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -26,6 +26,7 @@     #include "qemu/osdep.h"   #include "hw/pci/pci.h

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-29 Thread BALATON Zoltan via
On Tue, 29 Dec 2020, Philippe Mathieu-Daudé wrote: I think this casued problems before because if it's not set to 0x8a (legacy) at start then guests may assume it's already switched to native mode by firmware and won't program the BARs and it will not work. This way, even if it looks odd all

Re: Bug in Bonito? (mips/fuloong2e)

2020-12-29 Thread BALATON Zoltan via
On Tue, 29 Dec 2020, Philippe Mathieu-Daudé wrote: On 12/29/20 6:26 AM, Jiaxun Yang wrote: 在 2020/12/29 上午11:26, BALATON Zoltan 写道: Hello, While continuing with part two of my vt82c686b clean ups I've tried to implement SMBus IO base configuration in the vt82c686b-pm part that I've already

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-29 Thread BALATON Zoltan via
On Tue, 29 Dec 2020, Mark Cave-Ayland wrote: On 28/12/2020 20:50, BALATON Zoltan via wrote: I think leaving the legacy ports enabled is a bad idea for at least two reasons: 1) It may clash with other io ports on other machines, e.g. I'm not sure on PPC where firmware or OS does not expect

[PATCH 3/3] sam460ex: Clean up irq mapping

2020-12-25 Thread BALATON Zoltan via
Avoid mapping multiple interrupts to the same irq. Instead map them to the 4 PCI interrupts and use an or-gate in the board to connect them to the interrupt controller. This does not fix any known problem but does not seem to cause a new problem either and may be cleaner at least. Signed-off-by:

[PATCH 1/3] ppc4xx: Move common dependency on serial to common option

2020-12-25 Thread BALATON Zoltan via
All machines that select SERIAL also select PPC4XX so we can just add this common dependency there once. Signed-off-by: BALATON Zoltan --- hw/ppc/Kconfig | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index dd86e664d2..8548f42b0d 100644

[PATCH 0/3] Clean up sam460ex irq mapping

2020-12-25 Thread BALATON Zoltan via
This cleans up irq mapping in sam460ex inspired by similar changes to other machines recently although there's no known or noticable problem that this fixes. The first two patches are just simplifying dependencies in Kconfig that I've noticed during writing the patch. Regards, BALATON Zoltan

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-29 Thread BALATON Zoltan via
On Tue, 29 Dec 2020, Mark Cave-Ayland wrote: On 29/12/2020 12:01, BALATON Zoltan via wrote: Fortunately with PCI_CLASS_PROG at 0x8a Linux will keep the VIA IDE in compatible mode and not attempt to switch to native mode: therefore if you keep this as-is and add the legacy IDE ioports back

Re: [PATCH 2/2] via-ide: Fix fuloong2e support

2020-12-27 Thread BALATON Zoltan via
On Sun, 27 Dec 2020, Philippe Mathieu-Daudé wrote: On 12/25/20 12:23 AM, BALATON Zoltan wrote: From: Guenter Roeck Fuloong2e needs to use legacy mode for IDE support to work with Linux. Add property to via-ide driver to make the mode configurable, and set legacy mode for Fuloong2e. Fixes:

Re: [PATCH 09/12] vt82c686: Convert debug printf to trace points

2020-12-27 Thread BALATON Zoltan via
On Sun, 27 Dec 2020, Philippe Mathieu-Daudé wrote: On 12/27/20 2:10 AM, BALATON Zoltan via wrote: Signed-off-by: BALATON Zoltan --- hw/isa/trace-events | 6 ++ hw/isa/vt82c686.c | 51 + 2 files changed, 21 insertions(+), 36 deletions

Re: [PATCH 07/12] vt82c686: Remove vt82c686b_isa_init() function

2020-12-27 Thread BALATON Zoltan via
On Sun, 27 Dec 2020, Philippe Mathieu-Daudé wrote: On 12/27/20 2:10 AM, BALATON Zoltan via wrote: Also rename VT82C686B type to lower case to match other device names. If possible do not split the commit description in 2 (one part in subject and the other part here) as this is annoying

Re: [PATCH 06/12] audio/via-ac97: Simplify code and set user_creatable to false

2020-12-27 Thread BALATON Zoltan via
On Sun, 27 Dec 2020, Philippe Mathieu-Daudé wrote: Hi Zoltan, On 12/27/20 2:10 AM, BALATON Zoltan via wrote: Remove some unneded, empty code and set user_creatable to false (besides being not implemented yet, so does nothing anyway) it's also normally part of VIA south bridge chips so no need

Re: [PATCH 03/12] vt82c686: Remove unnecessary _DEVICE suffix from type macros

2020-12-27 Thread BALATON Zoltan via
On Sun, 27 Dec 2020, Philippe Mathieu-Daudé wrote: On 12/27/20 2:10 AM, BALATON Zoltan via wrote: There's no reason to suffix everything with _DEVICE when the names are already unique without it and shorter names are more readable. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 48

[PATCH v2 05/10] vt82c686: Split off via-[am]c97 into separate file in hw/audio

2020-12-27 Thread BALATON Zoltan via
The via-[am]c97 code is supposed to implement the audio part of VIA south bridge chips so it is better placed under hw/audio/. Split it off into a separate file. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- v2: Reworded commit message hw/audio/meson.build | 1 +

[PATCH v2 02/10] vt82c686: Remove unnecessary _DEVICE suffix from type macros

2020-12-27 Thread BALATON Zoltan via
There's no reason to suffix everything with _DEVICE when the names are already unique without it and shorter names are more readable. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 48 +++ 1 file changed, 23

[PATCH v2 10/10] vt82c686: Remove unneeded includes and defines

2020-12-27 Thread BALATON Zoltan via
These are not used or not needed. Signed-off-by: BALATON Zoltan --- v2: Added back a few that we get indirectly but keep it explicit hw/isa/vt82c686.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index d7ce15bf9f..02d6759c00 100644 ---

[PATCH v2 07/10] vt82c686: Remove legacy vt82c686b_isa_init() function

2020-12-27 Thread BALATON Zoltan via
Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- v2: Reworded commit message hw/isa/vt82c686.c | 9 - hw/mips/fuloong2e.c | 4 +++- include/hw/isa/vt82c686.h | 3 +-- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/hw/isa/vt82c686.c

[PATCH v2 09/10] vt82c686: Convert debug printf to trace points

2020-12-27 Thread BALATON Zoltan via
Drop DPRINTF and use trace functions instead. Two debug messages about unimplemented registers could be converted to qemu_log_mask() but in reality all registers are currently unimplemented (we just store and return values of writable regs but do nothing with them). As we already trace register

[PATCH v2 01/10] vt82c686: Rename AC97/MC97 parts from VT82C686B to VIA

2020-12-27 Thread BALATON Zoltan via
These parts are common between VT82C686B and VT8231 so can be shared in the future. Rename them to VIA prefix accordingly. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 28 ++-- 1 file changed, 14 insertions(+), 14

[PATCH v2 04/10] vt82c686: Remove vt82c686b_[am]c97_init() functions

2020-12-27 Thread BALATON Zoltan via
These are legacy init functions that are just equivalent to directly calling pci_create_simple so do that instead. Also rename objects to lower case via-ac97 and via-mc97 matching naming of other devices. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 27

[PATCH v2 08/10] vt82c686: Remove legacy vt82c686b_pm_init() function

2020-12-27 Thread BALATON Zoltan via
Remove legacy vt82c686b_pm_init() function and also rename VT82C686B_PM type name to match other device names. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- v2: Reworded commit message, delete i2c include here hw/isa/vt82c686.c | 18 --

[PATCH v2 06/10] audio/via-ac97: Simplify code and set user_creatable to false

2020-12-27 Thread BALATON Zoltan via
Remove some unneded, empty code and set user_creatable to false (besides being not implemented yet, so does nothing anyway) it's also normally part of VIA south bridge chips so no need to confuse users showing them these devices. Signed-off-by: BALATON Zoltan --- hw/audio/via-ac97.c | 51

[PATCH v2 0/2] Fix via-ide for fuloong2e

2020-12-27 Thread BALATON Zoltan via
This implements the legacy-mode emulation option for via-ide which is needed for Linux on fuloong2e. I've tested that the Debian kernel now finds CD ROM and MorphOS on pegasos2 is not affected by this. v2 adds review tags and fixes BALATON Zoltan (1): ide: Make room for flags in PCIIDEState

Re: [PATCH 01/12] vt82c686: Add APM and ACPI dependencies for VT82C686

2020-12-27 Thread BALATON Zoltan via
Hello, On Mon, 28 Dec 2020, Huacai Chen wrote: Hi, BALATON On Sun, Dec 27, 2020 at 9:21 AM BALATON Zoltan wrote: Compiling vt82c686.c fails without APM and ACPI_PM functions. Add dependency on these in Kconfig to fix this. Signed-off-by: BALATON Zoltan --- hw/isa/Kconfig | 2 ++ 1 file

[PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-27 Thread BALATON Zoltan via
From: Guenter Roeck The IDE legacy mode emulation has been removed in commit 4ea98d317eb ("ide/via: Implement and use native PCI IDE mode") but some Linux kernels (probably including def_config) require legacy mode on the Fuloong2e so only emulating native mode did not turn out feasible. Add

[PATCH v2 1/2] ide: Make room for flags in PCIIDEState and add one for legacy mode

2020-12-27 Thread BALATON Zoltan via
We'll need a flag for implementing some device specific behaviour in via-ide but we already have a currently CMD646 specific field that can be repurposed for this and leave room for further flags if needed in the future. This patch changes the "secondary" field to "flags" and change CMD646 and its

Re: [PATCH 2/2] via-ide: Fix fuloong2e support

2020-12-27 Thread BALATON Zoltan via
On Sun, 27 Dec 2020, Philippe Mathieu-Daudé wrote: On 12/27/20 5:40 PM, BALATON Zoltan via wrote: On Sun, 27 Dec 2020, Philippe Mathieu-Daudé wrote: On 12/25/20 12:23 AM, BALATON Zoltan wrote: From: Guenter Roeck Fuloong2e needs to use legacy mode for IDE support to work with Linux. Add

[PATCH v2 03/10] vt82c686b: Rename VT82C686B to VT82C686B_ISA

2020-12-27 Thread BALATON Zoltan via
This is really the ISA bridge part so name the type accordingly. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 1be1169f83..d40599c7da 100644 ---

[PATCH v2 00/10] Misc vt82c686b clean ups

2020-12-27 Thread BALATON Zoltan via
I'm sending this v2 with tags added and small edits after Philippe's review for now, maybe these are already good to go. I've taken out a few patches that may need some more work but I've run out of free time for now so will have to come back to them later. I still could not cleanly add the VT8231

Re: [PATCH qemu v10] spapr: Implement Open Firmware client interface

2020-12-07 Thread BALATON Zoltan via
On Mon, 7 Dec 2020, Alexey Kardashevskiy wrote: On 05/12/2020 05:32, Greg Kurz wrote: On Tue, 13 Oct 2020 13:19:11 +1100 Alexey Kardashevskiy wrote: +static void readstr(hwaddr pa, char *buf, int size) +{ +cpu_physical_memory_read(pa, buf, size); +if (buf[size - 1] != '\0') { +

Re: [PATCH qemu v10] spapr: Implement Open Firmware client interface

2020-12-07 Thread BALATON Zoltan via
On Mon, 7 Dec 2020, Greg Kurz wrote: On Mon, 7 Dec 2020 18:33:34 +1100 Alexey Kardashevskiy wrote: [...] +} + +return offset; +} + +static uint32_t of_client_finddevice(const void *fdt, uint32_t nodeaddr) +{ +char *node, *unit, *part; If you do this: g_autofree *node =

Re: [PATCH qemu v11] spapr: Implement Open Firmware client interface

2020-12-07 Thread BALATON Zoltan via
On Mon, 7 Dec 2020, Alexey Kardashevskiy wrote: The PAPR platform which describes an OS environment that's presented by a combination of a hypervisor and firmware. The features it specifies require collaboration between the firmware and the hypervisor. Since the beginning, the runtime component

Re: [PATCH qemu v11] spapr: Implement Open Firmware client interface

2020-12-08 Thread BALATON Zoltan via
On Tue, 8 Dec 2020, Alexey Kardashevskiy wrote: On 07/12/2020 22:48, BALATON Zoltan wrote: diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 2e89e36cfbdc..048bf49592aa 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -175,6 +175,13 @@ struct SpaprMachineState

Re: [DISCUSSION] How to set properties of non-pluggable devices?

2020-12-02 Thread BALATON Zoltan via
Hello, On Wed, 2 Dec 2020, Doug Evans wrote: Hi. Suppose I want to set a property of a non-pluggable device that cannot be set after the device has been realized (e.g., I can't use qmp to set the property after QEMU has started). Being non-pluggable means I can't use "-device foo,bar=baz" on

Re: [PATCH 2/8] ppc: Convert PPC UIC to a QOM device

2020-12-14 Thread BALATON Zoltan via
On Sat, 12 Dec 2020, Peter Maydell wrote: Currently the PPC UIC ("Universal Interrupt Controller") is implemented as a non-QOM device in ppc4xx_devs.c. Convert it to a proper QOM device in hw/intc. The ppcuic_init() function is retained for the moment with its current interface; in subsequent

Re: [PATCH 0/8] hw/ppc: Convert UIC device to QOM

2020-12-12 Thread BALATON Zoltan via
On Sat, 12 Dec 2020, Peter Maydell wrote: This patchseries converts the PPC UIC "Universal Interrupt Controller" to a QOM device. My main reason for doing it is that Thanks for doing this clean up. this fixes a couple of long-standing trivial Coverity issues -- the current ppcuic_init()

Re: [PATCH 2/8] ppc: Convert PPC UIC to a QOM device

2020-12-12 Thread BALATON Zoltan via
On Sat, 12 Dec 2020, Peter Maydell wrote: Currently the PPC UIC ("Universal Interrupt Controller") is implemented as a non-QOM device in ppc4xx_devs.c. Convert it to a proper QOM device in hw/intc. The ppcuic_init() function is retained for the moment with its current interface; in subsequent

Re: [PATCH 2/8] ppc: Convert PPC UIC to a QOM device

2020-12-12 Thread BALATON Zoltan via
On Sat, 12 Dec 2020, Peter Maydell wrote: Currently the PPC UIC ("Universal Interrupt Controller") is implemented as a non-QOM device in ppc4xx_devs.c. Convert it to a proper QOM device in hw/intc. The ppcuic_init() function is retained for the moment with its current interface; in subsequent

Re: [PATCH 5/8] hw/ppc/sam460ex: Drop use of ppcuic_init()

2020-12-12 Thread BALATON Zoltan via
On Sat, 12 Dec 2020, Peter Maydell wrote: Switch the sam460ex board to directly creating and configuring the UIC, rather than doing it via the old ppcuic_init() helper function. Signed-off-by: Peter Maydell --- hw/ppc/sam460ex.c | 70 --- 1 file

Re: [PATCH 5/8] hw/ppc/sam460ex: Drop use of ppcuic_init()

2020-12-12 Thread BALATON Zoltan via
On Sat, 12 Dec 2020, Peter Maydell wrote: Switch the sam460ex board to directly creating and configuring the UIC, rather than doing it via the old ppcuic_init() helper function. Signed-off-by: Peter Maydell --- hw/ppc/sam460ex.c | 70 --- 1 file

Re: [PATCH 5/8] hw/ppc/sam460ex: Drop use of ppcuic_init()

2020-12-12 Thread BALATON Zoltan via
On Sat, 12 Dec 2020, Peter Maydell wrote: On Sat, 12 Dec 2020 at 17:17, BALATON Zoltan wrote: On Sat, 12 Dec 2020, Peter Maydell wrote: Switch the sam460ex board to directly creating and configuring the UIC, rather than doing it via the old ppcuic_init() helper function. Signed-off-by:

Re: [PATCH 2/8] ppc: Convert PPC UIC to a QOM device

2020-12-12 Thread BALATON Zoltan via
On Sat, 12 Dec 2020, Peter Maydell wrote: On Sat, 12 Dec 2020 at 18:27, BALATON Zoltan wrote: On Sat, 12 Dec 2020, Peter Maydell wrote: Currently the PPC UIC ("Universal Interrupt Controller") is implemented as a non-QOM device in ppc4xx_devs.c. Convert it to a proper QOM device in hw/intc.

Re: Problems with irq mapping in qemu v5.2

2020-12-23 Thread BALATON Zoltan via
On Wed, 23 Dec 2020, Mark Cave-Ayland wrote: On 22/12/2020 21:23, Guenter Roeck wrote: (Added jiaxun.y...@flygoat.com as CC) Are you sure? It does not show up on cc list for me so unless the list ate it you might have forgotten to copy the address there. Done now just in case, sorry if this

  1   2   3   >