[PATCH v2 06/28] qapi acpi: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
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. This is the step for qapi/acpi.py. Said commit explains the transformat

[PATCH v2 27/28] qapi qga: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
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. This is the step for qga/qapi-schema.json. Said commit explains the tra

[PATCH v2 24/28] qapi transaction: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
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. This is the step for qapi/transaction.json. Said commit explains the tr

[PATCH v2 02/28] qapi: Tidy up whitespace in generated code

2022-10-17 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrangé --- docs/devel/qapi-code-gen.rst | 1 - scripts/qapi/commands.py | 7 +++ scripts/qapi/events.py | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-cod

[PATCH v2 07/28] qapi audio: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
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. This is the step for qapi/audio.json. Said commit explains the transfor

[PATCH v2 12/28] qapi job: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
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. This is the step for qapi/job.json. Said commit explains the transforma

[PATCH v2 28/28] qapi: Drop temporary logic to support conversion step by step

2022-10-17 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrangé --- scripts/qapi/schema.py | 6 -- 1 file changed, 6 deletions(-) diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py index 4594c69d0b..cd8661125c 100644 --- a/scripts/qapi/schema.py +++ b/scripts/qapi/schema.py @@ -7

[PATCH v2 00/28] qapi: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
In QAPI, absent optional members are distinct from any present value. We thus represent an optional schema member FOO as two C members: a FOO with the member's type, and a bool has_FOO. Likewise for function arguments. However, the has_FOO is actually redundant for a pointer-valued FOO, which can

[PATCH v2 15/28] qapi misc: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
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. This is the step for qapi/misc.json. Said commit explains the transform

Re: [PATCH] qga: Fix memory leak in split_list

2022-10-17 Thread Miaoqian Lin
Hi, On 2022/10/18 14:32, Marc-André Lureau wrote: > Hi > > On Tue, Oct 18, 2022 at 8:47 AM Miaoqian Lin wrote: > > We should use g_strfreev to free the memory allocated by g_strsplit(). > Use g_free() will cause a memory leak. > > Signed-off-by: Miaoqian Lin > --- >  qga/main

[PATCH v2 23/28] qapi tpm: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
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. This is the step for qapi/tpm.json. Said commit explains the transforma

[PATCH v2 14/28] qapi migration: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
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. This is the step for qapi/migration.json. Said commit explains the tran

[PATCH v2 03/28] docs/devel/qapi-code-gen: Extend example for next commit's change

2022-10-17 Thread Markus Armbruster
The next commit will change the code generated for some optional members. The example schema contains an optional member affected by the change. Add one that is not affected. Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrangé --- docs/devel/qapi-code-gen.rst | 21 +++

Re: [PATCH v5 7/9] tests/x86: replace snprint() by g_strdup_printf() in drive_del-test

2022-10-17 Thread Philippe Mathieu-Daudé
On 30/9/22 00:35, Michael Labiuk via wrote: Using g_autofree char* and g_strdup_printf(...) instead of ugly snprintf on stack array. Signed-off-by: Michael Labiuk --- tests/qtest/drive_del-test.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) Reviewed-by: Philippe Mathie

Re: [PATCH V3 4/4] intel-iommu: PASID support

2022-10-17 Thread Jason Wang
On Mon, Oct 17, 2022 at 11:13 PM Peter Xu wrote: > > On Mon, Oct 17, 2022 at 03:52:46PM +0800, Jason Wang wrote: > > [...] > > > > > +struct vtd_iotlb_key { > > > > +uint16_t sid; > > > > +uint32_t pasid; > > > > +uint64_t gfn; > > > > +uint32_t level; > > > > }; > > > > > > Nit:

Re: [v2] hw: misc: edu: fix 2 off-by-one errors

2022-10-17 Thread Jiri Slaby
On 17. 10. 22, 15:44, Alexander Bulekov wrote: On 221015 1710, Chris Friedt wrote: From: Christopher Friedt In the case that size1 was zero, because of the explicit 'end1 > addr' check, the range check would fail and the error message would read as shown below. The correct comparison is 'end1

[PATCH v2 20/28] qapi rocker: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
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. This is the step for qapi/rocker.json. Said commit explains the transfo

[PATCH v2 22/28] qapi stats: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
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. This is the step for qapi/stats.json. Said commit explains the transfor

[PATCH v2 13/28] qapi machine: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
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. This is the step for qapi/machine*.json. Said commit explains the trans

Re: [v2] hw: misc: edu: fix 2 off-by-one errors

2022-10-17 Thread Jiri Slaby
On 17. 10. 22, 16:13, Peter Maydell wrote: * for situations where the guest has misprogrammed the device, log that with qemu_log_mask(LOG_GUEST_ERROR, ...) and continue with whatever the real hardware would do, or some reasonable choice if the h/w spec is vague As I wrote in the p

[PATCH v2 10/28] qapi crypto: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
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. This is the step for qapi/crypto.json. Said commit explains the transfo

[PATCH v2 16/28] qapi net: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
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. This is the step for qapi/net.json. Said commit explains the transforma

[PATCH v2 09/28] qapi char: Elide redundant has_FOO in generated C

2022-10-17 Thread Markus Armbruster
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. This is the step for qapi/char.json. Said commit explains the transform

[PATCH v2 01/28] docs/devel/qapi-code-gen: Update example to match current code

2022-10-17 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrangé --- docs/devel/qapi-code-gen.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst index cd9b544376..997313fce7 100644 --- a/docs/devel/qapi-code-gen.rst

Re: [BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-10-17 Thread Ani Sinha
On Tue, Oct 18, 2022 at 5:14 AM Gregory Price wrote: > > Early-boot e820 records will be inserted by the bios/efi/early boot > software and be reported to the kernel via insert_resource. Later, when > CXL drivers iterate through the regions again, they will insert another > resource and make the

Re: [PATCH] vfio/migration: Fix wrong enum usage

2022-10-17 Thread Avihai Horon
On 18/10/2022 5:37, Zhang, Chen wrote: External email: Use caution opening links or attachments -Original Message- From: Qemu-devel On Behalf Of Avihai Horon Sent: Sunday, October 16, 2022 4:58 PM To: qemu-devel@nongnu.org; Alex Williamson ; Kunkun Jiang Cc: Avihai Horon Subject:

Re: [v2] hw: misc: edu: fix 2 off-by-one errors

2022-10-17 Thread Alex Bennée
Chris Friedt writes: >> On Oct 17, 2022, at 1:22 PM, Alex Bennée wrote: >> >> > >> >> Peter Maydell writes: >> On Mon, 17 Oct 2022 at 14:50, Alexander Bulekov wrote: On 221015 1710, Chris Friedt wrote: > From: Christopher Friedt > Reviewed-by: Alexander Bu

Re: Question about TCG backend correctness

2022-10-17 Thread Richard Henderson
On 10/18/22 01:27, LIU Zhiwei wrote: Maybe I can run RISU on qemu-aarch64(x86) and qemu-aarch64(risc-v) to check the RISC-V backend. This is a good start for debugging a tcg backend. It's not comprehensive, because RISU executes one instruction at a time then raises an exception to check the r

[PATCH] qga: Fix memory leak in split_list

2022-10-17 Thread Miaoqian Lin
We should use g_strfreev to free the memory allocated by g_strsplit(). Use g_free() will cause a memory leak. Signed-off-by: Miaoqian Lin --- qga/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/main.c b/qga/main.c index 5a9d8252e075..04902076b25d 100644 --- a/qga/m

Re: [PATCH v4 01/10] acpi/tests/avocado/bits: initial commit of test scripts that are run by biosbits

2022-10-17 Thread Ani Sinha
On Tue, Oct 18, 2022 at 2:43 AM Philippe Mathieu-Daudé wrote: > > On 14/10/22 19:34, Ani Sinha wrote: > > This is initial commit of cpuid, acpi and smbios python test scripts for > > biosbits to execute. No change has been made to them from the original code > > written by the biosbits author Josh

Re: [BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-10-17 Thread Gupta, Pankaj
Early-boot e820 records will be inserted by the bios/efi/early boot software and be reported to the kernel via insert_resource. Later, when CXL drivers iterate through the regions again, they will insert another resource and make the RESERVED memory area a child. This RESERVED memory area cau

RE: [PATCH] vfio/migration: Fix wrong enum usage

2022-10-17 Thread Zhang, Chen
> -Original Message- > From: Qemu-devel > On Behalf Of Avihai Horon > Sent: Sunday, October 16, 2022 4:58 PM > To: qemu-devel@nongnu.org; Alex Williamson > ; Kunkun Jiang > Cc: Avihai Horon > Subject: [PATCH] vfio/migration: Fix wrong enum usage > > vfio_migration_init() initializes

[PATCH] vhost-user: Fix out of order vring host notification handling

2022-10-17 Thread Yajun Wu
vhost backend sends host notification for every VQ. If backend creates VQs in parallel, the VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG may arrive to QEMU in different order than incremental queue index order. For example VQ 1's message arrive earlier than VQ 0's: After alloc VhostUserHostNotifier fo

Re: [PATCH v1] vhost-vdpa : add support for vIOMMU

2022-10-17 Thread Cindy Lu
On Sat, 8 Oct 2022 at 01:11, Eugenio Perez Martin wrote: > > On Thu, Oct 6, 2022 at 7:44 AM Cindy Lu wrote: > > > > Add support for vIOMMU. Register a memory listener to dma_as in > > vhost_vdpa_dev_start > > - during region_add register a specific IOMMU notifier, and store all > > notifiers in

Re: [PATCH 1/1] tcg: add perfmap and jitdump

2022-10-17 Thread Ilya Leoshkevich
On Fri, 2022-10-14 at 07:35 +1100, Richard Henderson wrote: > On 10/12/22 22:18, Ilya Leoshkevich wrote: > > Add ability to dump /tmp/perf-.map and jit-.dump. > > The first one allows the perf tool to map samples to each > > individual > > translation block. The second one adds the ability to resol

Re: [PATCH v1 10/12] hw/arm: introduce xenpv machine

2022-10-17 Thread Stefano Stabellini
On Sun, 16 Oct 2022, Julien Grall wrote: > Hi, > > There seem to be some missing patches on xen-devel (including the cover > letter). Is that expected? > > On 15/10/2022 06:07, Vikram Garhwal wrote: > > Add a new machine xenpv which creates a IOREQ server to register/connect > > with > > Xen Hype

Re: [PATCH] MAINTAINERS: Replace my amsat.org email address

2022-10-17 Thread Bin Meng
On Tue, Oct 18, 2022 at 4:15 AM Philippe Mathieu-Daudé wrote: > > The amsat.org domain is having issues with DMARC / SPF / DKIM: > https://lore.kernel.org/qemu-devel/CAMVc7JUy5NeEN0q=4zfZvn_rppgqn9wicV1z=tsluhks3ry...@mail.gmail.com/ Yeah, I noticed this before, and gmail marks the email as spam,

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-10-17 Thread Sean Christopherson
On Fri, Sep 30, 2022, Fuad Tabba wrote: > > > > > pKVM would also need a way to make an fd accessible again > > > > > when shared back, which I think isn't possible with this patch. > > > > > > > > But does pKVM really want to mmap/munmap a new region at the page-level, > > > > that can cause VMA f

[BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-10-17 Thread Gregory Price
Early-boot e820 records will be inserted by the bios/efi/early boot software and be reported to the kernel via insert_resource. Later, when CXL drivers iterate through the regions again, they will insert another resource and make the RESERVED memory area a child. This RESERVED memory area causes

Re: [PATCH v8 5/8] KVM: Register/unregister the guest private memory regions

2022-10-17 Thread Sean Christopherson
On Mon, Oct 17, 2022, Fuad Tabba wrote: > Hi, > > > > > +#ifdef CONFIG_HAVE_KVM_PRIVATE_MEM > > > > +#define KVM_MEM_ATTR_SHARED0x0001 > > > > +static int kvm_vm_ioctl_set_mem_attr(struct kvm *kvm, gpa_t gpa, gpa_t > > > > size, > > > > +bool is_private) >

Re: [PATCH v4 01/10] acpi/tests/avocado/bits: initial commit of test scripts that are run by biosbits

2022-10-17 Thread Michael S. Tsirkin
On Mon, Oct 17, 2022 at 11:13:55PM +0200, Philippe Mathieu-Daudé wrote: > On 14/10/22 19:34, Ani Sinha wrote: > > This is initial commit of cpuid, acpi and smbios python test scripts for > > biosbits to execute. No change has been made to them from the original code > > written by the biosbits auth

Re: [v2] hw: misc: edu: fix 2 off-by-one errors

2022-10-17 Thread Chris Friedt
> On Oct 17, 2022, at 1:22 PM, Alex Bennée wrote: > > > > > Peter Maydell writes: > >>> On Mon, 17 Oct 2022 at 14:50, Alexander Bulekov wrote: >>> >>> On 221015 1710, Chris Friedt wrote: From: Christopher Friedt >>> Reviewed-by: Alexander Bulekov >>> >>> As a side-note, se

Re: [PATCH v7 9/9] target/arm: Enable TARGET_TB_PCREL

2022-10-17 Thread Richard Henderson
On 10/17/22 23:48, Peter Maydell wrote: -if (use_goto_tb(s, dest)) { -tcg_gen_goto_tb(n); -gen_a64_update_pc(s, diff); +if (use_goto_tb(s, s->pc_curr + diff)) { +if (TARGET_TB_PCREL) { +gen_a64_update_pc(s, diff); +tcg_gen_goto_tb(n); +

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-10-17 Thread Kirill A . Shutemov
On Mon, Oct 17, 2022 at 06:39:06PM +0200, Gupta, Pankaj wrote: > On 10/17/2022 6:19 PM, Kirill A . Shutemov wrote: > > On Mon, Oct 17, 2022 at 03:00:21PM +0200, Vlastimil Babka wrote: > > > On 9/15/22 16:29, Chao Peng wrote: > > > > From: "Kirill A. Shutemov" > > > > > > > > KVM can use memfd-pro

Re: [PATCH v3 2/9] hw/{arm,ppc}: Resolve unreachable code

2022-10-17 Thread Bernhard Beschow
Am 17. Oktober 2022 20:57:06 UTC schrieb "Philippe Mathieu-Daudé" : >On 16/10/22 14:27, Bernhard Beschow wrote: >> pflash_cfi01_register() always returns with a non-NULL pointer (otherwise >> it would crash internally). Therefore, the bodies of the if-statements >> are unreachable. > >This is true

Re: [PATCH v3 00/29] PowerPC interrupt rework

2022-10-17 Thread Daniel Henrique Barboza
Matheus, Nice cleanup and rework. The code is way better now. I send a PR today without this series. As soon as that gets merged I'll push these patches to ppc-next. This will give us more time to test the changes and see if we can detect any unintended changes/bugs. Thanks, Daniel On 10/11/2

Re: [PATCH] hw/ide/microdrive: Use device_cold_reset() for self-resets

2022-10-17 Thread Philippe Mathieu-Daudé
On 13/10/22 19:40, Peter Maydell wrote: Currently the microdrive code uses device_legacy_reset() to reset itself, and has its reset method call reset on the IDE bus as the last thing it does. Switch to using device_cold_reset(). The only concrete microdrive device is the TYPE_DSCM1; it is n

Re: [PATCH] MAINTAINERS: Replace my amsat.org email address

2022-10-17 Thread Stefan Hajnoczi
On Mon, 17 Oct 2022 at 16:16, Philippe Mathieu-Daudé wrote: > > The amsat.org domain is having issues with DMARC / SPF / DKIM: > https://lore.kernel.org/qemu-devel/CAMVc7JUy5NeEN0q=4zfZvn_rppgqn9wicV1z=tsluhks3ry...@mail.gmail.com/ > > Consolidate all of my MAINTAINERS entries on my work address.

Re: MultiFD and default channel out of order mapping on receive side.

2022-10-17 Thread Peter Xu
On Mon, Oct 17, 2022 at 12:38:30PM +0100, Daniel P. Berrangé wrote: > On Mon, Oct 17, 2022 at 01:06:00PM +0530, manish.mishra wrote: > > Hi Daniel, > > > > I was thinking for some solutions for this so wanted to discuss that before > > going ahead. Also added Juan and Peter in loop. > > > > 1. E

Re: [PATCH v4 01/10] acpi/tests/avocado/bits: initial commit of test scripts that are run by biosbits

2022-10-17 Thread Philippe Mathieu-Daudé
On 14/10/22 19:34, Ani Sinha wrote: This is initial commit of cpuid, acpi and smbios python test scripts for biosbits to execute. No change has been made to them from the original code written by the biosbits author Josh Triplett. They are required to be installed into the bits iso file and then

Re: [PATCH 2/2] hw/audio/intel-hda: Drop unnecessary prototype

2022-10-17 Thread Philippe Mathieu-Daudé
On 14/10/22 16:26, Peter Maydell wrote: The only use of intel_hda_reset() is after its definition, so we don't need to separately declare its prototype at the top of the file; drop the unnecessary line. Signed-off-by: Peter Maydell --- hw/audio/intel-hda.c | 2 -- 1 file changed, 2 deletions

Re: [PATCH 1/2] hw/audio/intel-hda: don't reset codecs twice

2022-10-17 Thread Philippe Mathieu-Daudé
On 14/10/22 16:26, Peter Maydell wrote: Currently the intel-hda device has a reset method which manually resets all the codecs by calling device_legacy_reset() on them. This means they get reset twice, once because child devices on a qbus get reset before the parent device's reset method is call

Re: [PATCH] input: Allow to choose console with qemu_input_is_absolute

2022-10-17 Thread Philippe Mathieu-Daudé
On 14/10/22 13:54, Akihiko Odaki wrote: Although an input is routed depending on the console, qemu_input_is_absolute() had no mechanism to specify the console. Accept QemuConsole as an argument for qemu_input_is_absolute, and let the display know the absolute/relative state for a particular cons

Re: [RFC PATCH] virtio: re-order vm_running and use_started checks

2022-10-17 Thread Philippe Mathieu-Daudé
On 14/10/22 15:21, Alex Bennée wrote: During migration the virtio device state can be restored before we restart the VM. As no devices can be running while the VM is paused it makes sense to bail out early in that case. This returns the order introduced in: 9f6bcfd99f (hw/virtio: move vm_runn

Re: [PATCH v3 2/9] hw/{arm,ppc}: Resolve unreachable code

2022-10-17 Thread Philippe Mathieu-Daudé
On 16/10/22 14:27, Bernhard Beschow wrote: pflash_cfi01_register() always returns with a non-NULL pointer (otherwise it would crash internally). Therefore, the bodies of the if-statements are unreachable. This is true, pflash_cfi0X_register() use an hardcoded &error_fatal. Shouldn't it be bett

Re: [PATCH] tcg/aarch64: Remove unused code in tcg_out_op

2022-10-17 Thread Philippe Mathieu-Daudé
On 17/10/22 04:08, Qi Hu wrote: AArch64 defines the TCG_TARGET_HAS_direct_jump. So the "else" block is useless in the case of "INDEX_op_goto_tb" in function "tcg_out_op". Add an assertion and delete these codes for clarity. Suggested-by: WANG Xuerui Signed-off-by: Qi Hu --- tcg/aarch64/tcg-t

[PATCH v4] m68k: write bootinfo as rom section and re-randomize on reboot

2022-10-17 Thread Jason A. Donenfeld
Rather than poking directly into RAM, add the bootinfo block as a proper ROM, so that it's restored when rebooting the system. This way, if the guest corrupts any of the bootinfo items, but then tries to reboot, it'll still be restored back to normal as expected. Then, since the RNG seed needs to

[PATCH] MAINTAINERS: Replace my amsat.org email address

2022-10-17 Thread Philippe Mathieu-Daudé
The amsat.org domain is having issues with DMARC / SPF / DKIM: https://lore.kernel.org/qemu-devel/CAMVc7JUy5NeEN0q=4zfZvn_rppgqn9wicV1z=tsluhks3ry...@mail.gmail.com/ Consolidate all of my MAINTAINERS entries on my work address. Signed-off-by: Philippe Mathieu-Daudé --- .mailmap| 4 +++- MA

[PULL 34/38] hw/ppc: set machine->fdt in pegasos2_machine_reset()

2022-10-17 Thread Daniel Henrique Barboza
We'll introduce a QMP/HMP command that requires machine->fdt to be set properly. Cc: BALATON Zoltan Cc: qemu-...@nongnu.org Reviewed-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel Henrique Barboza Message-Id: <20220926173855.1159396-12-danielhb...@gmail.com> ---

[PULL 38/38] hw/riscv: set machine->fdt in spike_board_init()

2022-10-17 Thread Daniel Henrique Barboza
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 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel Henrique Barboza Message-Id: <20220926173855.1159396-16-danielhb...@g

[PULL 28/38] hw/ppc/spapr_pci.c: Use device_cold_reset() rather than device_legacy_reset()

2022-10-17 Thread Daniel Henrique Barboza
From: Peter Maydell In spapr_phb_children_reset() we call device_legacy_reset() to reset any QOM children of the SPAPR PCI host bridge device. This will not reset any qbus such a child might own. Switch to device_cold_reset(), which will reset both the device and its buses. (If the child has no q

[PULL 32/38] hw/ppc: set machine->fdt in sam460ex_load_device_tree()

2022-10-17 Thread Daniel Henrique Barboza
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. 'ramsize' and 'kernel_cmdline' can be retrieved di

[PULL 26/38] hw/ppc/e500: Remove if statement which is now always true

2022-10-17 Thread Daniel Henrique Barboza
From: Bernhard Beschow 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é Message-Id: <20221003203142.24355-8-shen...@gmail.com> Signed-off-by: Daniel Henrique Barboza

[PULL 21/38] hw/gpio/meson: Introduce dedicated config switch for hw/gpio/mpc8xxx

2022-10-17 Thread Daniel Henrique Barboza
From: Bernhard Beschow Having a dedicated config switch makes dependency handling cleaner. Signed-off-by: Bernhard Beschow Reviewed-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221003203142.24355-3-shen...@gmail.com> Signed-off-by: Daniel Henrique Barboza --- hw/gpio/Kcon

[PULL 33/38] hw/ppc: set machine->fdt in xilinx_load_device_tree()

2022-10-17 Thread Daniel Henrique Barboza
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 caller. kernel_cmdline' can be retrieved directly from t

[PULL 37/38] hw/riscv: set machine->fdt in sifive_u_machine_init()

2022-10-17 Thread Daniel Henrique Barboza
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 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel Henrique Barboza Message-Id: <20220926173855.1159396-15-danielhb...@gm

[PULL 30/38] hw/nios2: set machine->fdt in nios2_load_dtb()

2022-10-17 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' QMP/HMP command for all nios2 machines that uses nios2_load_dtb(). Cc: Chris Wulff Cc: Marek Vasut Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel Henrique Barboza Message-Id: <20220926173855.1159396-7-danielhb...@gmail.com> --- hw/nios2/boot.c

[PULL 16/38] ppc440_sdram: Move RAM size check to ppc440_sdram_init

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan Move the check for valid memory sizes from board to sdram controller init. This adds the missing valid memory sizes of 16 and 8 MiB to the DoC and the board now only checks for additional restrictions imposed by its firmware then sdram init checks for valid sizes for SoC. Si

[PULL 13/38] ppc440_sdram: Get rid of the init RAM hack

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan Remove the do_init parameter of ppc440_sdram_init and enable SDRAM controller from the board. Firmware does this so it may only be needed when booting with -kernel without firmware but we enable SDRAM unconditionally to preserve previous behaviour. Signed-off-by: BALATON Zol

[PULL 20/38] hw/ppc/meson: Allow e500 boards to be enabled separately

2022-10-17 Thread Daniel Henrique Barboza
From: Bernhard Beschow Gives users more fine-grained control over what should be compiled into QEMU. Signed-off-by: Bernhard Beschow Reviewed-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221003203142.24355-2-shen...@gmail.com> Signed-off-by: Daniel Henrique Barboza --- co

[PULL 03/38] ppc440_bamboo: Remove unnecessary memsets

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan In ppc4xx_sdram_init() the struct is allocated with g_new0() so no need to clear its elements. In the bamboo machine init memset can be replaced with array initialiser which is shorter. Signed-off-by: BALATON Zoltan Reviewed-by: Daniel Henrique Barboza Message-Id: <529adc

[PULL 18/38] ppc440_uc.c: Move some macros to ppc4xx.h

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan These are used by both the SDRAM controller model and system DCRs. In preparation to move SDRAM controller in its own file move these macros to the ppc4xx.h header. Signed-off-by: BALATON Zoltan Reviewed-by: Cédric Le Goater Message-Id: <74d9bf4891e2ccceb52bb6ca6b54fd3f37

[PULL 24/38] hw/ppc/mpc8544ds: Rename wrongly named method

2022-10-17 Thread Daniel Henrique Barboza
From: Bernhard Beschow Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221003203142.24355-6-shen...@gmail.com> Signed-off-by: Daniel Henrique Barboza --- hw/ppc/mpc8544ds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/mpc854

[PULL 06/38] ppc4xx: Use Ppc4xxSdramBank in ppc4xx_sdram_banks()

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan Change ppc4xx_sdram_banks() to take one Ppc4xxSdramBank array instead of the separate arrays and adjust ppc4xx_sdram_init() and ppc440_sdram_init() accordingly as well as machines using these. Signed-off-by: BALATON Zoltan Reviewed-by: Cédric Le Goater Message-Id: Signed

[PULL 31/38] hw/ppc: set machine->fdt in bamboo_load_device_tree()

2022-10-17 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' QMP/HMP command for the bamboo machine. Setting machine->fdt requires a MachineState pointer to be used inside bamboo_load_device_tree(). Let's change the function to receive this pointer from the caller. 'ramsize' and 'kernel_cmdline' can be retrieved direct

[PULL 22/38] docs/system/ppc/ppce500: Add heading for networking chapter

2022-10-17 Thread Daniel Henrique Barboza
From: Bernhard Beschow The sudden change of topics is slightly confusing and makes the networking information less visible. So separate the networking chapter to improve comprehensibility. Signed-off-by: Bernhard Beschow Reviewed-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé Message-Id: <2

[PULL 23/38] hw/ppc/e500: Reduce usage of sysbus API

2022-10-17 Thread Daniel Henrique Barboza
From: Bernhard Beschow 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 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Message-Id: <20221003

[PULL 17/38] ppc440_sdram: QOM'ify

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan Change the ppc440_sdram model to a QOM class derived from the PPC4xx-dcr-device and name it ppc4xx-sdram-ddr2. This is mostly modelling the DDR2 SDRAM controller found in the 460EX (used on the sam460ex board). Newer SoCs (regardless of their PPC core, e.g. 405EX) may have th

[PULL 27/38] target/ppc: Fix xvcmp* clearing FI bit

2022-10-17 Thread Daniel Henrique Barboza
From: Víctor Colombo Vector instructions in general are not supposed to change the FI bit. However, xvcmp* instructions are calling gen_helper_float_check_status, which is leading to a cleared FI flag where it should be kept unchanged. As helper_float_check_status only affects inexact, overflow a

[PULL 09/38] ppc4xx_sdram: QOM'ify

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan Change the ppc4xx_sdram model to a QOM class derived from the PPC4xx-dcr-device and name it ppc4xx-sdram-ddr. This is mostly modelling the DDR SDRAM controller found in the 440EP (used on the bamboo board) but also backward compatible with the older DDR controllers on some 40

[PULL 08/38] ppc4xx_sdram: Move size check to ppc4xx_sdram_init()

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan Instead of checking if memory size is valid in board code move this check to ppc4xx_sdram_init() as this is a restriction imposed by the SDRAM controller. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Message-Id: <39e5129dd095b285676a6267c5753786da1bc3

[PULL 36/38] hw/ppc: set machine->fdt in spapr machine

2022-10-17 Thread Daniel Henrique Barboza
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 across all machine archs/types. Let's set machine->

[PULL 15/38] ppc4xx_sdram: Rename functions to prevent name clashes

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan Rename functions to avoid name clashes when moving the DDR2 controller model currently called ppc440_sdram to ppc4xx_devs. This also more clearly shows which function belongs to which model. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Message-Id: <9c

[PULL 11/38] ppc440_sdram: Split off map/unmap of sdram banks for later reuse

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Message-Id: <23560b6a71682d513f3dd8e9ed3852f51d5eb309.1664021647.git.bala...@eik.bme.hu> Signed-off-by: Daniel Henrique Barboza --- hw/ppc/ppc440_uc.c | 33 + 1 file changed

[PULL 07/38] ppc440_bamboo: Add missing 4 MiB valid memory size

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan Signed-off-by: BALATON Zoltan Reviewed-by: Cédric Le Goater Message-Id: <05836e38be84729c1c6b5b609e7aa2ea60435033.1664021647.git.bala...@eik.bme.hu> Signed-off-by: Daniel Henrique Barboza --- hw/ppc/ppc440_bamboo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

[PULL 02/38] target/ppc: restore powerpc_excp_booke doorbell interrupts

2022-10-17 Thread Daniel Henrique Barboza
From: Nicholas Piggin This partially reverts commit 9dc20cc37db9 ("target/ppc: Simplify powerpc_excp_booke"), which removed DOORI and DOORCI interrupts. Without this patch, a -cpu e5500 -smp 2 machine booting Linux crashes with: qemu: fatal: Invalid PowerPC exception 36. Aborting Signed-off-b

[PULL 25/38] hw/ppc/mpc8544ds: Add platform bus

2022-10-17 Thread Daniel Henrique Barboza
From: Bernhard Beschow Models the real device more closely. Address and size values are taken from mpc8544.dts from the linux-5.17.7 tree. The IRQ range is taken from e500plat.c. Signed-off-by: Bernhard Beschow Reviewed-by: Bin Meng Message-Id: <20221003203142.24355-7-shen...@gmail.com> Signe

[PULL 35/38] hw/ppc: set machine->fdt in pnv_reset()

2022-10-17 Thread Daniel Henrique Barboza
This will enable support for the 'dumpdtb' QMP/HMP command for all powernv machines. Reviewed-by: Cédric Le Goater Reviewed-by: Frederic Barrat Signed-off-by: Daniel Henrique Barboza Message-Id: <20220926173855.1159396-13-danielhb...@gmail.com> --- hw/ppc/pnv.c | 8 +++- 1 file changed, 7

[PULL 29/38] qmp/hmp, device_tree.c: introduce dumpdtb

2022-10-17 Thread Daniel Henrique Barboza
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 into saving the FDT that can't be done with the mac

[PULL 19/38] ppc440_uc.c: Remove unneeded parenthesis

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan Remove unneeded parenthesis around case labels. Signed-off-by: BALATON Zoltan Reviewed-by: Cédric Le Goater Message-Id: <19db326bea989c03e08f2853f789315bbe806fe9.1664021647.git.bala...@eik.bme.hu> Signed-off-by: Daniel Henrique Barboza --- hw/ppc/ppc440_uc.c | 20 ++

[PULL 14/38] ppc440_sdram: Rename local variable for readability

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan Rename local sdram variable in ppc440_sdram_init to s for readability. Signed-off-by: BALATON Zoltan Reviewed-by: Cédric Le Goater Message-Id: <7351b80fa321c32a6229e685dfdc940232f8b788.1664021647.git.bala...@eik.bme.hu> Signed-off-by: Daniel Henrique Barboza --- hw/ppc/

[PULL 12/38] ppc440_sdram: Implement enable bit in the DDR2 SDRAM controller

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan To allow removing the do_init hack we need to improve the DDR2 SDRAM controller model to handle the enable/disable bit that it ignored so far. Signed-off-by: BALATON Zoltan Reviewed-by: Daniel Henrique Barboza Message-Id: Signed-off-by: Daniel Henrique Barboza --- hw/p

[PULL 10/38] ppc4xx_sdram: Drop extra zeros for readability

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan Constants that are written zero padded for no good reason are hard to read, it's easier to see what is meant if it's just 0 or 1 instead. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Message-Id: <93974622c3d398c7d3a3488b678b74c3807849de.1664021647.git

[PULL 05/38] ppc4xx_sdram: Get rid of the init RAM hack

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan The do_init parameter of ppc4xx_sdram_init() is used to map memory regions that is normally done by the firmware by programming the SDRAM controller. Do this from board code emulating what firmware would do when booting a kernel directly from -kernel without a firmware so we

[PULL 04/38] ppc4xx: Introduce Ppc4xxSdramBank struct

2022-10-17 Thread Daniel Henrique Barboza
From: BALATON Zoltan Instead of storing sdram bank parameters in unrelated arrays put them in a struct so it's clear they belong to the same bank and simplify the state struct using this bank type. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Message-Id: <5eb82d0424c584b2

[PULL 00/38] ppc queue

2022-10-17 Thread Daniel Henrique Barboza
s/pull-ppc-20221017 for you to fetch changes up to 719b718ce27f52b2da600cc1abf6a41ac54dfa36: hw/riscv: set machine->fdt in spike_board_init() (2022-10-17 16:15:10 -0300) ppc patch queue for 2022-10-17: This queue contains improv

[PULL 01/38] MAINTAINERS: step back from PPC

2022-10-17 Thread Daniel Henrique Barboza
From: Cédric Le Goater I am not active anymore on the PPC maintainership, degrade my self as standard Reviewer. Also degrade PowerNV and XIVE status since I am not funded for this work. Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Reviewed-by: David Gibson Reviewed-by: Alex Bennée

[PATCH v2] nbd/client: Use smarter assert

2022-10-17 Thread Eric Blake
Assigning strlen() to a uint32_t and then asserting that it isn't too large doesn't catch the case of an input string 4G in length. Thankfully, the incoming strings can never be that large: if the export name or query is reflecting a string the client got from the server, we already guarantee that

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-10-17 Thread Fuad Tabba
Hi, > > > Using both private_fd and userspace_addr is only needed in TDX and other > > > confidential computing scenarios, pKVM may only use private_fd if the fd > > > can also be mmaped as a whole to userspace as Sean suggested. > > > > That does work in practice, for now at least, and is what I

Re: [PATCH] nbd/server: Use smarter assert

2022-10-17 Thread Eric Blake
Given the file touched by this patch[1], The subject should use 'nbd/client:' On Mon, Oct 17, 2022 at 12:37:27PM -0500, Eric Blake wrote: > Assigning strlen() to a uint32_t and then asserting that it isn't too > large doesn't catch the case of an input string 4G in length. > Thankfully, the incom

  1   2   3   >