Re: [PATCH v2] hw/net: npcm7xx_emc: set MAC in register space

2023-04-25 Thread Philippe Mathieu-Daudé via
Hi, On 3/10/22 19:38, Patrick Venture wrote: The MAC address set from Qemu wasn't being saved into the register space. Reviewed-by: Hao Wu Signed-off-by: Patrick Venture --- v2: only set the registers from qemu on reset once registers set, only read and write to them ---

Re: [PATCH] include/hw/scsi/scsi.h: Remove unused scsi_legacy_handle_cmdline() prototype

2022-10-13 Thread Philippe Mathieu-Daudé via
On 13/10/22 15:05, Peter Maydell wrote: In commit 1454509726719e0933c80 we removed the function scsi_legacy_handle_cmdline() and all of its callers, but forgot to delete the prototype from the header function. Delete the prototype too. Signed-off-by: Peter Maydell --- include/hw/scsi/scsi.h

Re: [PATCH] quorum: Remove unnecessary forward declaration

2022-10-06 Thread Philippe Mathieu-Daudé via
On 6/10/22 14:26, Kevin Wolf wrote: Signed-off-by: Kevin Wolf --- block/quorum.c | 2 -- 1 file changed, 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] gitmodules: recurse by default

2022-10-06 Thread Philippe Mathieu-Daudé via
Hi Michael, On 6/10/22 13:39, Michael S. Tsirkin wrote: The most commmon complaint about submodules is that Typo "common" they don't follow when one switches branches in the main repo. Enable recursing into submodules by default to address that. Signed-off-by: Michael S. Tsirkin ---

Re: [PATCH] docs/nuvoton: Update URL for images

2022-10-06 Thread Philippe Mathieu-Daudé via
On 4/10/22 07:00, Joel Stanley wrote: openpower.xyz was retired some time ago. The OpenBMC Jenkins is where images can be found these days. Signed-off-by: Joel Stanley --- docs/system/arm/nuvoton.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Tested-by: Philippe

Re: [PATCH] linux-user: Fix more MIPS n32 syscall ABI issues

2022-10-06 Thread Philippe Mathieu-Daudé via
On 6/10/22 10:55, WANG Xuerui wrote: In commit 80f0fe3a85 ("linux-user: Fix syscall parameter handling for MIPS n32") the ABI problem regarding offset64 on MIPS n32 was fixed, but still some cases remain where the n32 is incorrectly treated as any other 32-bit ABI that passes 64-bit arguments in

Re: [PATCH RESEND] linux-user: Fix struct statfs ABI on loongarch64

2022-10-06 Thread Philippe Mathieu-Daudé via
On 6/10/22 12:07, WANG Xuerui wrote: Previously the 32-bit version was incorrectly chosen, leading to funny but incorrect output from e.g. df(1). Simply select the version corresponding to the 64-bit asm-generic definition. For reference, this program should produce the same output no matter

Re: [PATCH] linux-user: Fix struct statfs ABI on loongarch64

2022-10-06 Thread Philippe Mathieu-Daudé via
On 6/10/22 11:58, WANG Xuerui wrote: Previously the 32-bit version was incorrectly chosen, leading to funny but incorrect output from e.g. df(1). Simply select the version corresponding to the 64-bit asm-generic definition. For reference, this program should produce the same output no matter

Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var

2022-10-03 Thread Philippe Mathieu-Daudé via
Hi Jason, Per https://www.qemu.org/docs/master/devel/submitting-a-patch.html#when-resending-patches-add-a-version-tag: Send each new revision as a new top-level thread, rather than burying it in-reply-to an earlier revision, as many reviewers are not looking inside deep threads for new

Re: [PATCH v2 07/13] hw/ppc/e500: Remove if statement which is now always true

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 22:31, Bernhard Beschow wrote: Now that the MPC8544DS board also has a platform bus, the if statement is always true. Signed-off-by: Bernhard Beschow Reviewed-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé --- hw/ppc/e500.c | 30 ++

Re: [PATCH v2 12/13] hw/sd/sdhci: Implement Freescale eSDHC device model

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 22:31, Bernhard Beschow wrote: Will allow e500 boards to access SD cards using just their own devices. Signed-off-by: Bernhard Beschow --- hw/sd/sdhci.c | 147 +- include/hw/sd/sdhci.h | 3 + 2 files changed, 149 insertions(+), 1

Re: [PATCH v2 13/13] hw/ppc/e500: Add Freescale eSDHC to e500 boards

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 22:31, Bernhard Beschow wrote: Adds missing functionality to emulated e500 SOCs which increases the chance of given "real" firmware images to access SD cards. Signed-off-by: Bernhard Beschow --- docs/system/ppc/ppce500.rst | 13 + hw/ppc/Kconfig | 1 +

Re: [PATCH v2 09/13] hw/ppc/e500: Implement pflash handling

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 22:31, Bernhard Beschow wrote: Allows e500 boards to have their root file system reside on flash using only builtin devices located in the eLBC memory region. Note that the flash memory area is only created when a -pflash argument is given, and that the size is determined by the

Re: [PATCH v2 00/13] ppc/e500: Add support for two types of flash, cleanup

2022-10-03 Thread Philippe Mathieu-Daudé via
Hi Daniel, On 3/10/22 22:31, Bernhard Beschow wrote: Cover letter: ~ This series adds support for -pflash and direct SD card access to the PPC e500 boards. The idea is to increase compatibility with "real" firmware images where only the bare minimum of drivers is compiled in.

Re: [PATCH v2 08/13] hw/block/pflash_cfi01: Error out if device length isn't a power of two

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 22:31, Bernhard Beschow wrote: According to the JEDEC standard the device length is communicated to an OS as an exponent (power of two). Signed-off-by: Bernhard Beschow Reviewed-by: Bin Meng --- hw/block/pflash_cfi01.c | 8 ++-- 1 file changed, 6 insertions(+), 2

Re: [PATCH v2 04/13] hw/ppc/e500: Reduce usage of sysbus API

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 22:31, Bernhard Beschow wrote: PlatformBusDevice has an mmio attribute which gets aliased to SysBusDevice::mmio[0]. So PlatformbusDevice::mmio can be used directly, avoiding the sysbus API. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH v2 05/13] hw/ppc/mpc8544ds: Rename wrongly named method

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 22:31, Bernhard Beschow wrote: Signed-off-by: Bernhard Beschow --- hw/ppc/mpc8544ds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] Hexagon (gen_tcg_funcs.py): avoid duplicated tcg code on A_CVI_NEW

2022-10-03 Thread Philippe Mathieu-Daudé via
On 30/9/22 22:08, Matheus Tavares Bernardino wrote: Hexagon instructions with the A_CVI_NEW attribute produce a vector value that can be used in the same packet. The python function responsible for generating code for such instructions has a typo ("if" instead of "elif"), which makes

Re: [PATCH v5 4/9] target/arm: Change gen_exception_insn* to work on displacements

2022-10-03 Thread Philippe Mathieu-Daudé via
On 1/10/22 00:03, Richard Henderson wrote: In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Signed-off-by: Richard Henderson --- target/arm/translate.h| 5 +++-- target/arm/translate-a64.c| 28 ++- target/arm/translate-m-nocp.c | 6

Re: [PATCH v5 5/9] target/arm: Remove gen_exception_internal_insn pc argument

2022-10-03 Thread Philippe Mathieu-Daudé via
On 1/10/22 00:03, Richard Henderson wrote: In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Since we always pass dc->pc_curr, fold the arithmetic to zero displacement. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 6 +++--- target/arm/translate.c

Re: [PATCH v5 3/9] target/arm: Change gen_*set_pc_im to gen_*update_pc

2022-10-03 Thread Philippe Mathieu-Daudé via
On 1/10/22 00:03, Richard Henderson wrote: In preparation for TARGET_TB_PCREL, reduce reliance on absolute values by passing in pc difference. Signed-off-by: Richard Henderson --- target/arm/translate-a32.h | 2 +- target/arm/translate.h | 6 ++-- target/arm/translate-a64.c | 32

Re: [PATCH v1 6/7] contrib/gitdm: add Université Grenoble Alpes

2022-10-03 Thread Philippe Mathieu-Daudé via
On 26/9/22 15:46, Alex Bennée wrote: again to the academic group map. Signed-off-by: Alex Bennée Cc: Frédéric Pétrot --- contrib/gitdm/group-map-academics | 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2 06/13] mac_newworld: Simplify creation of Uninorth devices

2022-10-03 Thread Philippe Mathieu-Daudé via
Cc'ing CLI refactor team. On 29/9/22 09:39, Mark Cave-Ayland wrote: On 25/09/2022 13:38, BALATON Zoltan wrote: Avoid open coding sysbus_mmio_map() and map regions in ascending otder. Reorganise code a bit to avoid some casts. Signed-off-by: BALATON Zoltan ---   hw/ppc/mac_newworld.c | 42

Re: [PATCH 1/2] crypto: check for and report errors setting PSK credentials

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 12:27, Daniel P. Berrangé wrote: If setting credentials fails, the handshake will later fail to complete with an obscure error message which is hard to diagnose. Signed-off-by: Daniel P. Berrangé --- crypto/tlscredspsk.c | 16 +--- 1 file changed, 13 insertions(+), 3

Re: [PATCH 2/2] tests: avoid DOS line endings in PSK file

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 12:27, Daniel P. Berrangé wrote: Using FILE * APIs for writing the PSK file results in translation from UNIX to DOS line endings on Windows. When the crypto PSK code later loads the credentials the stray \r will result in failure to load the PSK credentials into GNUTLS. Rather than

Re: [PATCH v3 1/2] hw/intc: Fix LoongArch extioi function

2022-10-03 Thread Philippe Mathieu-Daudé via
Hi, On 30/9/22 09:10, Xiaojuan Yang wrote: 1.When cpu read or write extioi COREISR reg, it should access the reg belonged to itself, so the index of 's->coreisr' is current cpu number. Using MemTxAttrs' requester_type and id to get the cpu index. 2.Remove the unused extioi system memory region

Re: Question about RISC-V brom register a1 set value

2022-10-03 Thread Philippe Mathieu-Daudé via
Cc'ing the RISC-V specific mailing list. On 1/10/22 01:48, Eric Chan wrote: Hi, qemu As I know, brom will pass 3 parameters to the next stage bootloader, ex: openSBI. a0 will pass hartid, a2 will pass fw_dynamic_info start address. although a1 doesn't use directly in openSBI. a1 read value

Re: [PATCH] tests/avocado: Add missing require_netdev('user') checks

2022-10-03 Thread Philippe Mathieu-Daudé via
On 1/10/22 21:52, Peter Maydell wrote: Some avocado tests fail if QEMU was built without libslirp. Add require_netdev('user') checks where necessary: These tests try to ping 10.0.2.2 and expect it to succeed: boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2

Re: If your networking is failing after updating to the latest git version of QEMU...

2022-09-28 Thread Philippe Mathieu-Daudé via
On 28/9/22 10:27, Thomas Huth wrote: ... it might have happened due to the removal of the "slirp" submodule from the git repository. For example if you see an error message like this:  Parameter 'type' expects a netdev backend type this likely means that the "user" mode backend type is not

Re: [PATCH] linux-user: Add guest memory layout to exception dump

2022-09-27 Thread Philippe Mathieu-Daudé via
Hi Helge, On Tue, Sep 27, 2022 at 12:09 PM Helge Deller wrote: > > When the emulation stops with a hard exception it's very useful for > debugging purposes to dump the current guest memory layout (for an > example see /proc/self/maps) beside the CPU registers. > > The open_self_maps() function

Re: [RFC PATCH 0/3] MIPS decodetree conversion attempt

2022-09-26 Thread Philippe Mathieu-Daudé via
Hi Jiaxun, On Mon, Sep 26, 2022 at 4:44 PM Jiaxun Yang wrote: > > 2022年9月21日 13:41,Jiaxun Yang 写道: > > > > Hi, > > > > This is my attempt of converting MIPS translation code into decodetree. > > > > Currently only MIPS I to MIPS Release 5 arithmatic functions are converted. > > Old decoding

Re: [PATCH 1/2] target/m68k: increase size of m68k CPU features from uint32_t to uint64_t

2022-09-25 Thread Philippe Mathieu-Daudé via
On Sun, Sep 25, 2022 at 3:53 PM Mark Cave-Ayland wrote: > > There are already 32 feature bits in use, so change the size of the m68k > CPU features to uint64_t (along with the associated m68k_feature() > functions) to allow up to 64 feature bits to be used. > > At the same time make use of the

Re: [PATCH v2] hw/display/tcx: Mark the VRAM dirty upon reset

2022-09-25 Thread Philippe Mathieu-Daudé via
On Sun, Feb 6, 2022 at 11:44 AM Peter Maydell wrote: > > On Sun, 6 Feb 2022 at 09:30, Mark Cave-Ayland > wrote: > > > > On 05/02/2022 15:39, Peter Maydell wrote: > > > The handling of the vram buffer seems weird in this device overall, > > > though -- the memory block is divided into three parts

Re: [PATCH v2] block: Refactor get_tmp_filename()

2022-09-24 Thread Philippe Mathieu-Daudé via
On 24/9/22 13:45, Bin Meng wrote: From: Bin Meng At present there are two callers of get_tmp_filename() and they are inconsistent. One does: /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char *tmp_filename = g_malloc0(PATH_MAX + 1); ... ret =

Re: [PATCH v6 5/5] accel: abort if we fail to load the accelerator plugin

2022-09-24 Thread Philippe Mathieu-Daudé via
On 24/9/22 01:21, Claudio Fontana wrote: if QEMU is configured with modules enabled, it is possible that the load of an accelerator module will fail. Abort in this case, relying on module_object_class_by_name to report the specific load error if any. Signed-off-by: Claudio Fontana Reviewed-by:

Re: [PATCH v11 06/15] target/hexagon: expose next PC in DisasContext

2022-09-24 Thread Philippe Mathieu-Daudé via
On 4/8/22 13:55, Anton Johansson via wrote: From: Paolo Montesel Missing the rationale. "The idef-parser will use it with IMM_NPC". But I feel I'm missing something, what is the diff between IMM_PC/IMM_NPC? Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Reviewed-by:

Re: [PATCH v11 05/15] target/hexagon: introduce new helper functions

2022-09-24 Thread Philippe Mathieu-Daudé via
On 4/8/22 13:55, Anton Johansson via wrote: From: Niccolò Izzo These helpers will be employed by the idef-parser generated code, to correctly implement instruction semantics. "Helper" functions, in the context of this patch, refers to functions which provide a manual TCG implementation of

Re: [PATCH v11 04/15] target/hexagon: make helper functions non-static

2022-09-24 Thread Philippe Mathieu-Daudé via
On 4/8/22 13:55, Anton Johansson via wrote: From: Paolo Montesel Make certain helper functions non-static, making them available outside genptr.c. These functions are required by code generated by the idef-parser. This commit also makes some functions in op_helper.c non-static in order to

Re: [PATCH v11 03/15] target/hexagon: make slot number an unsigned

2022-09-24 Thread Philippe Mathieu-Daudé via
On 4/8/22 13:55, Anton Johansson via wrote: From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Acked-by: Richard Henderson Reviewed-by: Taylor Simpson --- target/hexagon/genptr.c | 24 +--- target/hexagon/macros.h | 2 +- 2

Re: [PATCH v5 3/4] module: add Error arguments to module_load and module_load_qom

2022-09-23 Thread Philippe Mathieu-Daudé via
On 23/9/22 16:51, Claudio Fontana wrote: improve error handling during module load, by changing: bool module_load(const char *prefix, const char *lib_name); void module_load_qom(const char *type); to: int module_load(const char *prefix, const char *name, Error **errp); int

Re: [PATCH v5 4/4] accel: abort if we fail to load the accelerator plugin

2022-09-23 Thread Philippe Mathieu-Daudé via
On 23/9/22 16:51, Claudio Fontana wrote: if QEMU is configured with modules enabled, it is possible that the load of an accelerator module will fail. Abort in this case, relying on module_object_class_by_name to report the specific load error if any. Signed-off-by: Claudio Fontana Reviewed-by:

Re: [PATCH v5 2/4] module: rename module_load_one to module_load

2022-09-23 Thread Philippe Mathieu-Daudé via
On 23/9/22 16:51, Claudio Fontana wrote: Signed-off-by: Claudio Fontana --- audio/audio.c | 2 +- block.c | 4 ++-- block/dmg.c | 4 ++-- hw/core/qdev.c| 2 +- include/qemu/module.h | 10 +- qom/object.c | 4 ++--

Re: [PATCH 1/3] hw/core: Tidy up unnecessary casting away of const

2022-09-23 Thread Philippe Mathieu-Daudé via
On Fri, Sep 23, 2022 at 2:30 PM Markus Armbruster wrote: > > Signed-off-by: Markus Armbruster > --- > hw/core/sysbus-fdt.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] Drop superfluous conditionals around g_free()

2022-09-23 Thread Philippe Mathieu-Daudé via
On Fri, Sep 23, 2022 at 11:13 AM Markus Armbruster wrote: > > There is no need to guard g_free(P) with if (P): g_free(NULL) is safe. > > Signed-off-by: Markus Armbruster > --- > replay/replay.c | 6 ++ > target/i386/kvm/kvm.c | 12 >

Re: [PATCH v4 15/22] tests/qtest: add a timeout for subprocess_run_one_test

2022-09-22 Thread Philippe Mathieu-Daudé via
On 2/8/22 11:50, Alex Bennée wrote: Hangs have been observed in the tests and currently we don't timeout if a subprocess hangs. Rectify that. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth --- v3 - expand timeout to 180 at Thomas' suggestion v4 - fix merge conflict with earlier

Re: [PATCH v4 06/22] include/hw: document vhost_dev feature life-cycle

2022-09-22 Thread Philippe Mathieu-Daudé via
On 2/8/22 11:49, Alex Bennée wrote: Try and explicitly document the various state of feature bits as related to the vhost_dev structure. Importantly the backend_features can advertise things like VHOST_USER_F_PROTOCOL_FEATURES which is never exposed to the driver and is only present in the

Re: [PATCH v4 09/22] hw/virtio: add some vhost-user trace events

2022-09-22 Thread Philippe Mathieu-Daudé via
On 2/8/22 11:49, Alex Bennée wrote: These are useful for tracing the lifetime of vhost-user connections. Signed-off-by: Alex Bennée --- hw/virtio/vhost.c | 6 ++ hw/virtio/trace-events | 4 2 files changed, 10 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v4 07/22] hw/virtio: fix some coding style issues

2022-09-22 Thread Philippe Mathieu-Daudé via
On 2/8/22 11:49, Alex Bennée wrote: Signed-off-by: Alex Bennée Acked-by: Jason Wang --- hw/virtio/vhost-user.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v4 02/22] hw/virtio: gracefully handle unset vhost_dev vdev

2022-09-22 Thread Philippe Mathieu-Daudé via
On 2/8/22 11:49, Alex Bennée wrote: I've noticed asserts firing because we query the status of vdev after a vhost connection is closed down. Rather than faulting on the NULL indirect just quietly reply false. Signed-off-by: Alex Bennée Message-Id:

Re: [PATCH v4 01/22] hw/virtio: incorporate backend features in features

2022-09-22 Thread Philippe Mathieu-Daudé via
On 2/8/22 11:49, Alex Bennée wrote: There are some extra bits used over a vhost-user connection which are hidden from the device itself. We need to set them here to ensure we enable things like the protocol extensions. Currently net/vhost-user.c has it's own inscrutable way of persisting this

Re: [PATCH] KVM: dirty ring: Add memory barrier when marking pfn collected

2022-09-22 Thread Philippe Mathieu-Daudé via
On 22/9/22 23:35, Peter Xu wrote: Following commit 4802bf910eee9, add the other missing barrier when marking the PFN as collected. This will also be required just like 4802bf910eee9 on weak ordering architectures like aarch64. Cc: Marc Zyngier Cc: Gavin Shan Cc: Paolo Bonzini Signed-off-by:

Re: [PATCH v1 9/9] gdbstub: move guest debug support check to ops

2022-09-22 Thread Philippe Mathieu-Daudé via
On 22/9/22 16:58, Alex Bennée wrote: This removes the final hard coding of kvm_enabled() in gdbstub and moves the check to an AccelOps. Signed-off-by: Alex Bennée Cc: Mads Ynddal --- accel/kvm/kvm-cpus.h | 1 + gdbstub/internals.h| 1 + include/sysemu/accel-ops.h | 1 +

Re: [PATCH v1 7/9] gdbstub: move sstep flags probing into AccelClass

2022-09-22 Thread Philippe Mathieu-Daudé via
On 22/9/22 16:58, Alex Bennée wrote: The support of single-stepping is very much dependent on support from the accelerator we are using. To avoid special casing in gdbstub move the probing out to an AccelClass function so future accelerators can put their code there. Signed-off-by: Alex Bennée

Re: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mtime

2022-09-22 Thread Philippe Mathieu-Daudé via
On 22/9/22 17:58, Tyler Ng wrote: 1. Adds fields to hold the value of mtime in timer_upper0 and timer_lower0. 2. Changes the read and write functions to use the mtime fields. 3. Updates the value of mtime in update_mtime() by extrapolating the time elapsed. This will need to change if/when the

Re: [PATCH v2 2/3] hw/intc: sifive_plic.c: Fix interrupt priority index.

2022-09-22 Thread Philippe Mathieu-Daudé via
On 22/9/22 17:58, Tyler Ng wrote: Fixes a bug in which the index of the interrupt priority is off by 1. For example, using an IRQ number of 3 with a priority of 1 is supposed to set plic->source_priority[2] = 1, but instead it sets plic->source_priority[3] = 1. When an interrupt is claimed to

Re: [PATCH] watchdog: remove -watchdog option

2022-09-22 Thread Philippe Mathieu-Daudé via
On 22/9/22 11:29, Paolo Bonzini wrote: This was deprecated in 6.2 and is ready to go. It removes quite a bit of code that handled the registration of watchdog models. Signed-off-by: Paolo Bonzini --- docs/about/deprecated.rst | 5 docs/about/removed-features.rst | 5

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Philippe Mathieu-Daudé via
On Thu, Sep 22, 2022 at 3:20 PM Markus Armbruster wrote: > > Claudio Fontana writes: > > [...] > > > I think it would be better to completely make the return value separate > > from the Error, > > and really treat Error as an exception and not mix it up with the regular > > execution, > > > >

Re: [PATCH 14/27] qapi migration: Elide redundant has_FOO in generated C

2022-09-22 Thread Philippe Mathieu-Daudé via
On Thu, Sep 15, 2022 at 10:52 PM Markus Armbruster wrote: > > The has_FOO for pointer-valued FOO are redundant, except for arrays. > They are also a nuisance to work with. Recent commit "qapi: Start to > elide redundant has_FOO in generated C" provided the means to elide > them step by step.

Re: [PATCH v7 00/14] QMP/HMP: introduce 'dumpdtb'

2022-09-22 Thread Philippe Mathieu-Daudé via
Hi Daniel, On 8/9/22 21:40, Daniel Henrique Barboza wrote: Hi, This new version implements all change requests from the v6. - patch 5: - change bamboo_load_device_tree() to use a MachineState pointer - patch 7: - change xilinx_load_device_tree() to use a MachineState pointer - patch 14:

Re: [PATCH v7 14/14] qmp/hmp, device_tree.c: introduce dumpdtb

2022-09-22 Thread Philippe Mathieu-Daudé via
On 22/9/22 12:47, Philippe Mathieu-Daudé wrote: On 8/9/22 21:40, Daniel Henrique Barboza wrote: To save the FDT blob we have the '-machine dumpdtb=' property. With this property set, the machine saves the FDT in and exit. The created file can then be converted to plain text dts format using

Re: [PATCH v7 08/14] hw/ppc: set machine->fdt in pegasos2_machine_reset()

2022-09-22 Thread Philippe Mathieu-Daudé via
On 8/9/22 21:58, BALATON Zoltan wrote: On Thu, 8 Sep 2022, Daniel Henrique Barboza wrote: We'll introduce a QMP/HMP command that requires machine->fdt to be set properly. Cc: BALATON Zoltan Cc: qemu-...@nongnu.org Signed-off-by: Daniel Henrique Barboza Reviewed-by: BALATON Zoltan ---

Re: [PATCH v7 07/14] hw/ppc: set machine->fdt in xilinx_load_device_tree()

2022-09-22 Thread Philippe Mathieu-Daudé via
On 8/9/22 21:40, Daniel Henrique Barboza wrote: This will enable support for 'dumpdtb' QMP/HMP command for the virtex_ml507 machine. Setting machine->fdt requires a MachineState pointer to be used inside xilinx_load_device_tree(). Let's change the function to receive this pointer from the

Re: [PATCH v7 10/14] hw/ppc: set machine->fdt in spapr machine

2022-09-22 Thread Philippe Mathieu-Daudé via
On 8/9/22 21:40, Daniel Henrique Barboza wrote: The pSeries machine never bothered with the common machine->fdt attribute. We do all the FDT related work using spapr->fdt_blob. We're going to introduce a QMP/HMP command to dump the FDT, which will rely on setting machine->fdt properly to work

Re: [PATCH v7 04/14] hw/ppc: set machine->fdt in ppce500_load_device_tree()

2022-09-22 Thread Philippe Mathieu-Daudé via
+David/Peter On 8/9/22 21:40, Daniel Henrique Barboza wrote: This will enable support for 'dumpdtb' QMP/HMP command for the e500 machine. Cc: Cédric Le Goater Signed-off-by: Daniel Henrique Barboza --- hw/ppc/e500.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff

Re: [PATCH v7 11/14] hw/riscv: set machine->fdt in sifive_u_machine_init()

2022-09-22 Thread Philippe Mathieu-Daudé via
On 8/9/22 21:40, Daniel Henrique Barboza wrote: This will enable support for 'dumpdtb' QMP/HMP command for the sifive_u machine. Cc: Alistair Francis Cc: Bin Meng Cc: Palmer Dabbelt Reviewed-by: Alistair Francis Signed-off-by: Daniel Henrique Barboza --- hw/riscv/sifive_u.c | 3 +++ 1

Re: [PATCH v7 14/14] qmp/hmp, device_tree.c: introduce dumpdtb

2022-09-22 Thread Philippe Mathieu-Daudé via
On 8/9/22 21:40, Daniel Henrique Barboza wrote: To save the FDT blob we have the '-machine dumpdtb=' property. With this property set, the machine saves the FDT in and exit. The created file can then be converted to plain text dts format using 'dtc'. There's nothing particularly sophisticated

Re: [PATCH v7 06/14] hw/ppc: set machine->fdt in sam460ex_load_device_tree()

2022-09-22 Thread Philippe Mathieu-Daudé via
On 8/9/22 21:40, Daniel Henrique Barboza wrote: This will enable support for 'dumpdtb' QMP/HMP command for the sam460ex machine. Setting machine->fdt requires a MachineState pointer to be used inside sam460ex_load_device_tree(). Let's change the function to receive this pointer from the caller.

Re: [PATCH v7 12/14] hw/riscv: set machine->fdt in spike_board_init()

2022-09-22 Thread Philippe Mathieu-Daudé via
On 8/9/22 21:40, Daniel Henrique Barboza wrote: This will enable support for the 'dumpdtb' QMP/HMP command for the spike machine. Cc: Palmer Dabbelt Cc: Alistair Francis Cc: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Daniel Henrique Barboza --- hw/riscv/spike.c | 6 ++ 1

Re: [PATCH v7 03/14] hw/nios2: set machine->fdt in nios2_load_dtb()

2022-09-22 Thread Philippe Mathieu-Daudé via
On 8/9/22 21:40, Daniel Henrique Barboza wrote: This will enable support for 'dumpdtb' QMP/HMP command for all nios2 machines that uses nios2_load_dtb(). Cc: Chris Wulff Cc: Marek Vasut Signed-off-by: Daniel Henrique Barboza --- hw/nios2/boot.c | 8 +++- hw/nios2/meson.build | 2

Re: [PULL 00/12] Publish1 patches

2022-09-21 Thread Philippe Mathieu-Daudé via
Hi Helge, On 20/9/22 19:31, Helge Deller wrote: The following changes since commit 621da7789083b80d6f1ff1c0fb499334007b4f51: Update version for v7.1.0 release (2022-08-30 09:40:11 -0700) are available in the Git repository at: https://github.com/hdeller/qemu-hppa.git

Re: [PATCH v2 02/23] target/i386: Return bool from disas_insn

2022-09-21 Thread Philippe Mathieu-Daudé via
On 8/9/22 14:14, Richard Henderson wrote: On 9/6/22 15:42, Philippe Mathieu-Daudé wrote: On 6/9/22 12:09, Richard Henderson wrote: Instead of returning the new pc, which is present in DisasContext, return true if an insn was translated. This is false when we detect a page crossing and must

Re: [PATCH v1 06/10] plugins: Assert mmu_idx in range before use in qemu_plugin_get_hwaddr

2022-09-21 Thread Philippe Mathieu-Daudé via
On 21/9/22 18:07, Alex Bennée wrote: From: Richard Henderson Coverity reports out-of-bound accesses here. This should be a false positive due to how the index is decoded from MemOpIdx. Fixes: Coverity CID 1487201 Signed-off-by: Richard Henderson Reviewed-by: Damien Hedde Message-Id:

Re: [PATCH v1 07/10] docs/devel: clean-up qemu invocations in tcg-plugins

2022-09-21 Thread Philippe Mathieu-Daudé via
On 21/9/22 18:07, Alex Bennée wrote: We currently have the final binaries in the root of the build dir so the build prefix is superfluous. Additionally add a shell prompt to be more in line with the rest of the code. Signed-off-by: Alex Bennée --- docs/devel/tcg-plugins.rst | 18

Re: [PATCH v1 08/10] docs/devel: move API to end of tcg-plugins.rst

2022-09-21 Thread Philippe Mathieu-Daudé via
On 21/9/22 18:07, Alex Bennée wrote: The API documentation is quite dry and doesn't flow nicely with the rest of the document. Move it to its own section at the bottom along with a little leader text to remind people to update it. Signed-off-by: Alex Bennée --- docs/devel/tcg-plugins.rst |

Re: [PATCH v1 09/10] contrib/plugins: reset skip when matching in execlog

2022-09-21 Thread Philippe Mathieu-Daudé via
On 21/9/22 18:08, Alex Bennée wrote: The purpose of the matches was to only track the execution of instructions we care about. Without resetting skip to the value at the start of the block we end up dumping all instructions after the match with the consequent load on the instrumentation.

Re: [PATCH v1 03/10] disas: use result of ->read_memory_func

2022-09-21 Thread Philippe Mathieu-Daudé via
On 21/9/22 18:07, Alex Bennée wrote: This gets especially confusing if you start plugging in host addresses from a trace and you wonder why the output keeps changing. Report when read_memory_func fails instead of blindly disassembling the buffer contents. Signed-off-by: Alex Bennée

Re: [PATCH v1 01/10] monitor: expose monitor_puts to rest of code

2022-09-21 Thread Philippe Mathieu-Daudé via
On 21/9/22 18:07, Alex Bennée wrote: This helps us construct strings elsewhere before echoing to the monitor. It avoids having to jump through hoops like: monitor_printf(mon, "%s", s->str); It will be useful in following patches but for now convert all existing plain "%s" printfs to use the

Re: [Phishing Risk] [External] Re: [PATCH 0/3] Add a host power device

2022-09-20 Thread Philippe Mathieu-Daudé via
On 20/9/22 17:17, Zhang Jian wrote: Hi Philippe, Thanks for your reply. On Tue, Sep 20, 2022 at 7:09 AM Philippe Mathieu-Daudé wrote: Hi Jian, On 19/9/22 19:21, Jian Zhang wrote: This patchset adds a host power device and added it into the g220a mahcine. The BMC have a important is to

Re: [PATCH] checkpatch: ignore target/hexagon/imported/* files

2022-09-20 Thread Philippe Mathieu-Daudé via
On 20/9/22 15:42, Matheus Tavares Bernardino wrote: These files come from an external project (the hexagon archlib), so they deliberately do not follow QEMU's coding style. To avoid false positives from checkpatch.pl, let's disable the checking for those. Signed-off-by: Matheus Tavares

Re: [PATCH 4/4] target/m68k: always call gen_exit_tb() after writes to SR

2022-09-20 Thread Philippe Mathieu-Daudé via
On 19/9/22 10:13, Richard Henderson wrote: On 9/18/22 00:29, Philippe Mathieu-Daudé wrote: On 17/9/22 13:25, Mark Cave-Ayland wrote: Any write to SR can change the security state so always call gen_exit_tb() when this occurs. In particular MacOS makes use of andiw/oriw in a few places to

Re: [PATCH 2/4] target/m68k: increase size of m68k CPU features from uint32_t to uint64_t

2022-09-20 Thread Philippe Mathieu-Daudé via
On Tue, Sep 20, 2022 at 6:30 PM Mark Cave-Ayland wrote: > On 17/09/2022 23:27, Philippe Mathieu-Daudé via wrote: > > On 17/9/22 14:09, BALATON Zoltan wrote: > >> On Sat, 17 Sep 2022, Mark Cave-Ayland wrote: > >>> There are already 32 feature bits in use, so change

Re: [PATCH] linux-user: use 'max' instead of 'qemu32' / 'qemu64' by defualt

2022-09-20 Thread Philippe Mathieu-Daudé via
Typo "default" in subject line. On Fri, Aug 26, 2022 at 1:46 PM Daniel P. Berrangé wrote: > > The 'qemu64' CPU model implements the least featureful x86_64 CPU that's > possible. Historically this hasn't been an issue since it was rare for > OS distros to build with a higher mandatory CPU

Re: [PATCH 5/9] exec/address-spaces: Wrap address space singletons into functions

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: In the next steps, these singletons will be resolved by turning them into attributes of the system bus. The system bus is already accessible via the global current_machine variable which will be made use of later in the wrapper functions. All changes

Re: [PATCH 9/9] exec/address-spaces: Inline legacy functions

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 07:15, Philippe Mathieu-Daudé wrote: On 20/9/22 01:17, Bernhard Beschow wrote: The functions just access a global pointer and perform some pointer arithmetic on top. Allow the compiler to see through this by inlining. I thought about this while reviewing the previous patch, ...

Re: [PATCH 9/9] exec/address-spaces: Inline legacy functions

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: The functions just access a global pointer and perform some pointer arithmetic on top. Allow the compiler to see through this by inlining. I thought about this while reviewing the previous patch, ... Signed-off-by: Bernhard Beschow ---

Re: [PATCH 8/9] softmmu/physmem: Let SysBusState absorb memory region and address space singletons

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: These singletons are actually properties of the system bus but so far it hasn't been modelled that way. Fix this to make this relationship very obvious. The idea of the patch is to restrain futher proliferation of the use of get_system_memory() and

Re: [PATCH 6/9] target/loongarch/cpu: Remove unneeded include directive

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: The cpu is used in both user and system emulation context while sysbus.h is system-only. Remove it since it's not needed anyway. Furthermore, it would cause a compile error in the next commit. Signed-off-by: Bernhard Beschow ---

Re: [PATCH 3/9] hw/core/sysbus: Resolve main_system_bus singleton

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: In QEMU, a machine and the main_system_bus always go togehter. Usually the bus is part of the machine which suggsts to host it there. "together", "suggests" Since tere is already a current_machine singleton, all code that accesses the main_system_bus

Re: [PATCH 2/9] exec/hwaddr.h: Add missing include

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: The next commit would not compile w/o the include directive. Signed-off-by: Bernhard Beschow --- include/exec/hwaddr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/exec/hwaddr.h b/include/exec/hwaddr.h index 8f16d179a8..616255317c

Re: [PATCH 1/9] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to inherit from TYPE_MACHINE. This is an inconsistency which can cause undefined behavior such as memory corruption. Change SiFiveEState to inherit from MachineState since it is

Re: [PATCH 0/3] Add a host power device

2022-09-19 Thread Philippe Mathieu-Daudé via
Hi Jian, On 19/9/22 19:21, Jian Zhang wrote: This patchset adds a host power device and added it into the g220a mahcine. The BMC have a important is to control the power of the host, usually it is nessary in a hardware platform. The BMC(soc) usually had a output pin to control the power of the

[RFC PATCH] libvduse: Do not truncate terminating NUL character with strncpy()

2022-09-19 Thread Philippe Mathieu-Daudé via
GCC 8 added a -Wstringop-truncation warning: The -Wstringop-truncation warning added in GCC 8.0 via r254630 for bug 81117 is specifically intended to highlight likely unintended uses of the strncpy function that truncate the terminating NUL character from the source string. Here the next

[PATCH] block/qcow2-bitmap: Add missing cast to silent GCC error

2022-09-19 Thread Philippe Mathieu-Daudé via
Commit d1258dd0c8 ("qcow2: autoloading dirty bitmaps") added the set_readonly_helper() GFunc handler, correctly casting the gpointer user_data in both the g_slist_foreach() caller and the handler. Few commits later (commit 1b6b0562db), the handler is reused in qcow2_reopen_bitmaps_rw() but missing

Re: [PATCH v2 08/11] vfio/migration: Remove VFIO migration protocol v1

2022-09-19 Thread Philippe Mathieu-Daudé via
On Mon, Sep 19, 2022 at 1:57 PM Alex Williamson wrote: > > On Mon, 19 Sep 2022 16:35:49 +0800 > liulongfang wrote: > > > On 2022/5/31 1:07, Avihai Horon Wrote: > > > Now that v2 protocol implementation has been added, remove the > > > deprecated v1 implementation. > > > "struct

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-19 Thread Philippe Mathieu-Daudé via
On 16/9/22 11:27, Markus Armbruster wrote: Claudio Fontana writes: improve error handling during module load, by changing: bool module_load_one(const char *prefix, const char *lib_name); void module_load_qom_one(const char *type); to: bool module_load_one(const char *prefix, const char

Re: [PATCH v2 08/11] vfio/migration: Remove VFIO migration protocol v1

2022-09-19 Thread Philippe Mathieu-Daudé via
On Mon, May 30, 2022 at 7:56 PM Avihai Horon wrote: > > Now that v2 protocol implementation has been added, remove the > deprecated v1 implementation. Worth a note in docs/about/deprecated.rst? > Signed-off-by: Avihai Horon > --- > hw/vfio/common.c | 19 +- > hw/vfio/migration.c

Re: [PATCH v5 16/21] ppc4xx_sdram: Move ppc4xx DDR and DDR2 SDRAM controller models together

2022-09-18 Thread Philippe Mathieu-Daudé via
On 18/9/22 23:24, BALATON Zoltan wrote: On Sun, 18 Sep 2022, Philippe Mathieu-Daudé wrote: Hi Zoltan, On 18/9/22 22:24, BALATON Zoltan wrote: Move the PPC4xx DDR and DDR2 SDRAM contrller models into a new file called ppc4xx_sdram to separate from other device models and put them in one place

Re: [PATCH v5 16/21] ppc4xx_sdram: Move ppc4xx DDR and DDR2 SDRAM controller models together

2022-09-18 Thread Philippe Mathieu-Daudé via
Hi Zoltan, On 18/9/22 22:24, BALATON Zoltan wrote: Move the PPC4xx DDR and DDR2 SDRAM contrller models into a new file called ppc4xx_sdram to separate from other device models and put them in one place allowing sharing some code between them. Signed-off-by: BALATON Zoltan ---

Re: [PATCH v5 18/21] ppc4xx_sdram: Rename local state variable for brevity

2022-09-18 Thread Philippe Mathieu-Daudé via
On 18/9/22 22:24, BALATON Zoltan wrote: Rename the sdram local state variable to s in dcr read/write functions and reset methods for better readability and to match realize methods. Other places not converted will be changed or removed in subsequent patches. Signed-off-by: BALATON Zoltan ---

Re: [PATCH v3 07/12] linux-user: Fix strace of chmod() if mode == 0

2022-09-18 Thread Philippe Mathieu-Daudé via
On 18/9/22 21:45, Helge Deller wrote: If the mode parameter of chmod() is zero, this value isn't shown when stracing a program: chmod("filename",) This patch fixes it up to show the zero-value as well: chmod("filename",000) Signed-off-by: Helge Deller --- linux-user/strace.c | 5

  1   2   3   4   5   6   7   8   9   10   >