Re: [PATCH v4 24/24] ppc/ppc405: Add check on minimum RAM size

2022-08-10 Thread Cédric Le Goater
On 8/9/22 19:55, BALATON Zoltan wrote: On Tue, 9 Aug 2022, Cédric Le Goater wrote: The check on invalid RAM size is now performed in the SDRAM controller but not all values will boot a machine. A minimum of 2*16 is required. 2*16 or 16 MiB? The code has the latter which does not match commit

Re: [PATCH v4 18/24] ppc/ppc405: QOM'ify MAL

2022-08-10 Thread Cédric Le Goater
On 8/9/22 19:34, BALATON Zoltan wrote: On Tue, 9 Aug 2022, Cédric Le Goater wrote: The Memory Access Layer (MAL) controller is currently modeled as a DCR device with 4 IRQs. Also drop the ppc4xx_mal_init() helper and adapt the sam460ex machine. Reviewed-by: Daniel Henrique Barboza

Re: [PATCH] backends/hostmem: Fix support of memory-backend-memfd in qemu_maxrampagesize()

2022-08-10 Thread David Hildenbrand
On 10.08.22 08:32, Thomas Huth wrote: > It is currently not possible yet to use "memory-backend-memfd" on s390x > with hugepages enabled. This problem is caused by qemu_maxrampagesize() > not taking memory-backend-memfd objects into account yet, so the code > in s390_memory_init() fails to enable

Re: [PATCH v7 08/14] KVM: Rename mmu_notifier_*

2022-08-10 Thread Chao Peng
On Fri, Aug 05, 2022 at 09:54:35PM +0200, Paolo Bonzini wrote: > On 7/29/22 21:02, Sean Christopherson wrote: > > If we really want a different name, I'd vote for nomenclature that captures > > the > > invalidation aspect, which is really what the variables are all trackng, > > e.g. > > > >

Re: [PATCH] linux-user: Don't assume 0 is not a valid host timer_t value

2022-08-10 Thread Laurent Vivier
Le 09/08/2022 à 11:51, Peter Maydell a écrit : Laurent, ping ? Sorry, I didn't see your message. I'm going to apply it if it's ok to go into rc3? Thanks, Laurent thanks -- PMM On Mon, 1 Aug 2022 at 12:43, Peter Maydell wrote: On Mon, 25 Jul 2022 at 12:13, Daniel P. Berrangé wrote:

Re: [PATCH v4 19/24] ppc/ppc405: QOM'ify FPGA

2022-08-10 Thread Cédric Le Goater
On 8/9/22 19:37, BALATON Zoltan wrote: On Tue, 9 Aug 2022, Cédric Le Goater wrote: Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405_boards.c | 55 +- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git

[PATCH] backends/hostmem: Fix support of memory-backend-memfd in qemu_maxrampagesize()

2022-08-10 Thread Thomas Huth
It is currently not possible yet to use "memory-backend-memfd" on s390x with hugepages enabled. This problem is caused by qemu_maxrampagesize() not taking memory-backend-memfd objects into account yet, so the code in s390_memory_init() fails to enable the huge page support there via

Re: [PATCH RFC 0/7] hostmem: NUMA-aware memory preallocation using ThreadContext

2022-08-10 Thread Michal Prívozník
On 8/9/22 20:06, David Hildenbrand wrote: > On 09.08.22 12:56, Joao Martins wrote: >> On 7/21/22 13:07, David Hildenbrand wrote: >>> This is a follow-up on "util: NUMA aware memory preallocation" [1] by >>> Michal. >>> >>> Setting the CPU affinity of threads from inside QEMU usually isn't >>>

Re: [PATCH] backends/hostmem: Fix support of memory-backend-memfd in qemu_maxrampagesize()

2022-08-10 Thread David Hildenbrand
On 10.08.22 10:11, Thomas Huth wrote: > On 10/08/2022 09.32, David Hildenbrand wrote: >> On 10.08.22 08:32, Thomas Huth wrote: >>> It is currently not possible yet to use "memory-backend-memfd" on s390x >>> with hugepages enabled. This problem is caused by qemu_maxrampagesize() >>> not taking

Re: [PATCH v7 07/14] KVM: Use gfn instead of hva for mmu_notifier_retry

2022-08-10 Thread Chao Peng
On Thu, Aug 04, 2022 at 12:10:44AM -0700, Isaku Yamahata wrote: > On Wed, Jul 06, 2022 at 04:20:09PM +0800, > Chao Peng wrote: > > > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h > > index 0bdb6044e316..e9153b54e2a4 100644 > > --- a/include/linux/kvm_host.h > > +++

Re: [PATCH v4 23/24] ppc/ppc405: QOM'ify SDRAM

2022-08-10 Thread Cédric Le Goater
On 8/9/22 19:53, BALATON Zoltan wrote: On Tue, 9 Aug 2022, Cédric Le Goater wrote: This is an initial change of the SDRAM controller preserving the compatibility with the current modeling. Further cleanup will be possible after conversion of the ppc4xx_sdram_banks() and ppc4xx_sdram_init()

Re: [PATCH] backends/hostmem: Fix support of memory-backend-memfd in qemu_maxrampagesize()

2022-08-10 Thread Thomas Huth
On 10/08/2022 09.32, David Hildenbrand wrote: On 10.08.22 08:32, Thomas Huth wrote: It is currently not possible yet to use "memory-backend-memfd" on s390x with hugepages enabled. This problem is caused by qemu_maxrampagesize() not taking memory-backend-memfd objects into account yet, so the

Re: [PATCH v7 03/14] mm: Introduce memfile_notifier

2022-08-10 Thread David Hildenbrand
On 10.08.22 11:22, Chao Peng wrote: > On Fri, Aug 05, 2022 at 03:22:58PM +0200, David Hildenbrand wrote: >> On 06.07.22 10:20, Chao Peng wrote: >>> This patch introduces memfile_notifier facility so existing memory file >>> subsystems (e.g. tmpfs/hugetlbfs) can provide memory pages to allow a >>>

Shared memory between host and guest

2022-08-10 Thread Lu, Jingdong
Hi experts, I have some basic questions regarding shared memory between host and guest based on QEMU/KVM: 1, Can host and guest share the same block of physical memory? Ivshmem? Is it continuous physical memory? 2, More specifically, is there any way to support the following operations? 1.

Re: [PATCH v4 1/6] device_tree: add qemu_fdt_setprop_strings() helper

2022-08-10 Thread Andrew Jones
On Tue, Aug 09, 2022 at 07:56:35PM +0100, Ben Dooks wrote: > Add a helper to set a property from a set of strings > to reduce the following code: > > static const char * const clint_compat[2] = { > "sifive,clint0", "riscv,clint0" > }; > > qemu_fdt_setprop_string_array(fdt,

Re: [PATCH v3 1/5] device_tree: add qemu_fdt_setprop_strings() helper

2022-08-10 Thread Andrew Jones
On Thu, Jul 28, 2022 at 11:22:27AM +0200, Andrew Jones wrote: > On Wed, Jul 27, 2022 at 11:39:01PM +0100, Ben Dooks wrote: > > Add a helper to set a property from a set of strings > > to reduce the following code: > > > > static const char * const clint_compat[2] = { > >

Re: [PATCH] tests/unit: fix a -Wformat-trunction warning

2022-08-10 Thread Markus Armbruster
Typo in subject, it's -Wformat-truncation marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > ../tests/test-qobject-input-visitor.c: In function ‘test_visitor_in_list’: > ../tests/test-qobject-input-visitor.c:454:49: warning: ‘%d’ directive output > may be truncated writing

[PATCH v3 02/16] error-report: introduce "detailed" variable

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Let's use a more explicit variable "detailed" instead of calling monitor_cur() multiple times. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- util/error-report.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH v3 07/16] qapi: remove QEMU-specific monitor dependency from dispatch

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau The monitor is specific to QEMU. Instead of passing a Monitor type argument to the exec handler, use a generic void* pointer. This simplify also the unit dependency, as now the dispatching code is free from QEMU-specifics. Signed-off-by: Marc-André Lureau ---

[PATCH v3 15/16] mtest2make.py: teach suite name that are just "PROJECT"

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau A subproject test may be simply in the "PROJECT" suite (such as "qemu-common" with the following patches) Signed-off-by: Marc-André Lureau --- scripts/mtest2make.py | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/mtest2make.py

Re: [PATCH for-7.2 v3 04/11] ppc/pnv: add helpers for pnv-phb user devices

2022-08-10 Thread Cédric Le Goater
On 8/10/22 12:05, Daniel Henrique Barboza wrote: pnv_parent_qom_fixup() and pnv_parent_bus_fixup() are versions of the helpers that were reverted by commit 9c10d86fee "ppc/pnv: Remove user-created PHB{3,4,5} devices". They are needed to amend the QOM and bus hierarchies of user created pnv-phbs,

Re: [PATCH 27/62] target/arm: Add is_secure parameter to get_phys_addr_pmsav5

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Remove the use of regime_is_secure from get_phys_addr_pmsav5. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH for-7.2 v3 06/11] ppc/pnv: enable user created pnv-phb for powernv8

2022-08-10 Thread Cédric Le Goater
On 8/10/22 12:05, Daniel Henrique Barboza wrote: The bulk of the work was already done by previous patches. Use defaults_enabled() to determine whether we need to create the default devices or not. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb.c | 9 +++-- hw/ppc/pnv.c

Re: [PATCH v2 2/3] softmmu/physmem: Remove the ifdef __linux__ around the pagesize functions

2022-08-10 Thread Claudio Imbrenda
On Wed, 10 Aug 2022 14:57:19 +0200 Thomas Huth wrote: > Now that host_memory_backend_pagesize() is not depending on the hugetlb > memory path handling anymore, we can also remove the #ifdef and the > TOCTTOU comment from the calling functions - the code should now work > equally well on all host

Re: Using QEMU for VRChat

2022-08-10 Thread Daniel P . Berrangé
On Wed, Aug 10, 2022 at 01:06:59PM +0200, danko babro wrote: > Dear QEMU dev team, > Recently a game called VRChat got a security update, implementing Easy Anti > Cheat into their game (pretty much spyware that logs everything happening > on the users PC) which made me want to install their game

Re: [PATCH v8 3/3] target/riscv: Add vstimecmp support

2022-08-10 Thread Weiwei Li
在 2022/8/10 下午1:45, Atish Kumar Patra 写道: On Tue, Aug 9, 2022 at 6:33 PM Weiwei Li > wrote: 在 2022/8/10 上午3:34, Atish Kumar Patra 写道: On Tue, Aug 9, 2022 at 12:01 AM Weiwei Li mailto:liwei...@iscas.ac.cn>> wrote: 在 2022/8/9 上午1:20, Atish

[PATCH for-7.2 v3 07/11] ppc/pnv: add PHB4 helpers for user created pnv-phb

2022-08-10 Thread Daniel Henrique Barboza
The PHB4 backend relies on a link with the corresponding PEC element. This is trivial to do during machine_init() time for default devices, but not so much for user created ones. pnv_phb4_get_pec() is a small variation of the function that was reverted by commit 9c10d86fee "ppc/pnv: Remove

Re: [PATCH v4 23/24] ppc/ppc405: QOM'ify SDRAM

2022-08-10 Thread BALATON Zoltan
On Wed, 10 Aug 2022, Cédric Le Goater wrote: On 8/9/22 19:53, BALATON Zoltan wrote: On Tue, 9 Aug 2022, Cédric Le Goater wrote: This is an initial change of the SDRAM controller preserving the compatibility with the current modeling. Further cleanup will be possible after conversion of the

Re: [PATCH v4 3/6] hw/riscv: use qemu_fdt_setprop_strings() for string arrays

2022-08-10 Thread Andrew Jones
On Tue, Aug 09, 2022 at 07:56:37PM +0100, Ben Dooks wrote: > Use the qemu_fdt_setprop_strings() in sifve_u.c to simplify the code. > > Signed-off-by: Ben Dooks > --- > hw/riscv/sifive_u.c | 18 +- > hw/riscv/spike.c| 7 ++- > hw/riscv/virt.c | 32

[PATCH v3 03/16] error-report: simplify print_loc()

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Pass the program name as "prefix" argument to print_loc() if printing with "details". This allows to get rid of monitor_cur() call in print_loc(). Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- util/error-report.c | 8 1 file changed, 4

Re: [PATCH 12/62] target/arm: Use GetPhysAddrResult in get_phys_addr_v5

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Using QEMU for VRChat

2022-08-10 Thread danko babro
Dear QEMU dev team, Recently a game called VRChat got a security update, implementing Easy Anti Cheat into their game (pretty much spyware that logs everything happening on the users PC) which made me want to install their game on a virtual machine. The problem now is, that the anti cheat detects

[PATCH v3 13/16] qemu-common: move glib-compat.h

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau qemu-common will have compatible dependency requirements with QEMU. Since qemu-common won't have a toplevel qemu/osdep.h which would include various system headers, include stdbool.h (bool is used for some declarations here). Replace getenv() with g_getenv() to avoid

Re: [PATCH 14/62] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav7

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 08/62] target/arm: Create GetPhysAddrResult

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Combine 5 output pointer argument from get_phys_addr > into a single struct. Adjust all callers. This looks to be an improvement - I guess the real benefit is the compiler isn't jamming so many closely aligned pointers on the stack frame for all the return values?

Re: [PATCH 18/62] target/arm: Add is_secure parameter to v8m_security_lookup

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Remove the use of regime_is_secure from v8m_security_lookup. s/./ and pass its status down to the lookup instead./ ? Anyway: Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 24/62] target/arm: Add is_secure parameter to get_phys_addr_lpae

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Remove the use of regime_is_secure from get_phys_addr_lpae. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 25/62] target/arm: Add is_secure parameter to get_phys_addr_pmsav7

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Remove the use of regime_is_secure from get_phys_addr_pmsav7 > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v2 1/3] backends/hostmem: Fix support of memory-backend-memfd in qemu_maxrampagesize()

2022-08-10 Thread Claudio Imbrenda
On Wed, 10 Aug 2022 14:57:18 +0200 Thomas Huth wrote: > It is currently not possible yet to use "memory-backend-memfd" on s390x > with hugepages enabled. This problem is caused by qemu_maxrampagesize() > not taking memory-backend-memfd objects into account yet, so the code > in

Re: [PATCH v4 08/24] ppc/ppc4xx: Introduce a DCR device model

2022-08-10 Thread BALATON Zoltan
On Wed, 10 Aug 2022, Cédric Le Goater wrote: On 8/9/22 19:21, BALATON Zoltan wrote: On Tue, 9 Aug 2022, Cédric Le Goater wrote: The Device Control Registers (DCR) of on-SoC devices are accessed by software through the use of the mtdcr and mfdcr instructions. These are converted in transactions

[PATCH RFC v1 0/2] i386: KVM: Fix 'system_reset' failures when vCPU is in VMX root operation

2022-08-10 Thread Vitaly Kuznetsov
It was discovered that Windows 11 with WSL2 (Hyper-V) enabled guests fail to reboot when QEMU's 'system_reset' command is issued. The problem appears to be that KVM_SET_SREGS2 fails because zeroed CR4 register value doesn't pass vmx_is_valid_cr4() check in KVM as certain bits can't be zero while

Re: [PATCH v7 01/14] mm: Add F_SEAL_AUTO_ALLOCATE seal to memfd

2022-08-10 Thread Chao Peng
On Fri, Aug 05, 2022 at 08:06:03PM +0200, David Hildenbrand wrote: > On 05.08.22 19:55, Paolo Bonzini wrote: > > On 7/21/22 11:44, David Hildenbrand wrote: > >> > >> Also, I*think* you can place pages via userfaultfd into shmem. Not > >> sure if that would count "auto alloc", but it would

[PATCH for-7.2 v3 04/11] ppc/pnv: add helpers for pnv-phb user devices

2022-08-10 Thread Daniel Henrique Barboza
pnv_parent_qom_fixup() and pnv_parent_bus_fixup() are versions of the helpers that were reverted by commit 9c10d86fee "ppc/pnv: Remove user-created PHB{3,4,5} devices". They are needed to amend the QOM and bus hierarchies of user created pnv-phbs, matching them with default pnv-phbs. A new helper

[PATCH for-7.2 v3 06/11] ppc/pnv: enable user created pnv-phb for powernv8

2022-08-10 Thread Daniel Henrique Barboza
The bulk of the work was already done by previous patches. Use defaults_enabled() to determine whether we need to create the default devices or not. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb.c | 9 +++-- hw/ppc/pnv.c | 6 ++ 2 files changed, 13

[PATCH for-7.2 v3 11/11] ppc/pnv: fix QOM parenting of user creatable root ports

2022-08-10 Thread Daniel Henrique Barboza
User creatable root ports are being parented by the 'peripheral' or the 'peripheral-anon' container. This happens because this is the regular QOM schema for sysbus devices that are added via the command line. Let's make this QOM hierarchy similar to what we have with default root ports, i.e. the

[PATCH v3 05/16] stubs: remove needless error_vprintf_unless_qmp()

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- stubs/error-printf.c | 5 - 1 file changed, 5 deletions(-) diff --git a/stubs/error-printf.c b/stubs/error-printf.c index 0e326d8010..1afa0f62ca 100644 --- a/stubs/error-printf.c +++

[PATCH v3 04/16] error-report: introduce overridable error_is_detailed()

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Remove the direct dependency from error-report to monitor code. This will allow to move error-report to a subproject. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Reviewed-by: Warner Losh --- include/qemu/error-report.h | 2 ++ softmmu/vl.c

[PATCH v3 08/16] scripts/qapi-gen: add -i option

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Replace hard-coded "qemu/osdep.h" include with a qapi-gen option to specify the headers to include. This will allow to substitute QEMU osdep.h with glib.h for example, for projects with different global headers. For historical reasons, we can keep the default as

[PATCH v3 06/16] qapi: move QEMU-specific dispatch code in monitor

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Make QMP-dispatch code free from QEMU-specific OOB dispatch/async coroutine handling. This will allow to move the base code to qemu-common, and clear other users from potential mis-ususe (QGA doesn't have OOB or coroutines). Introduce an overridable qmp_dispatch_exec()

[PATCH v2 2/3] softmmu/physmem: Remove the ifdef __linux__ around the pagesize functions

2022-08-10 Thread Thomas Huth
Now that host_memory_backend_pagesize() is not depending on the hugetlb memory path handling anymore, we can also remove the #ifdef and the TOCTTOU comment from the calling functions - the code should now work equally well on all host architectures. Signed-off-by: Thomas Huth ---

[PATCH v3 12/16] qemu-common: move scripts/qapi

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau This is just moving qapi-gen.py and related subdir to qemu-common, to ease review and proceed step by step. The following patches will move related necessary code, tests etc. Signed-off-by: Marc-André Lureau --- docs/conf.py | 2 +-

[PATCH v2 0/3] Fix hugepages with memfd on s390x and clean up related code

2022-08-10 Thread Thomas Huth
The first patch fixes the problem that hugepages cannot be used via the "memory-backend-memfd" object on s390x. The second and third patch are some clean-ups that can be done after generalizing the code in the first patch. v2: - Use qemu_ram_pagesize(memdev->mr.ram_block) instead of adding

Re: [PATCH 15/62] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav8

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

[PATCH] migration/multifd: Remove redundant copy of page offsets during send

2022-08-10 Thread Nikolay Borisov
All pages which are going to be migrated are first added to MultiFDSendParams::MultiFDPages_t::offset array by the main migration thread and are subsequently copied to MultiFDSendParams::normal by the multifd thread. This is really unnecessary as the MultiFDPages_t is guaranteed to be stable since

[PATCH v2 1/3] backends/hostmem: Fix support of memory-backend-memfd in qemu_maxrampagesize()

2022-08-10 Thread Thomas Huth
It is currently not possible yet to use "memory-backend-memfd" on s390x with hugepages enabled. This problem is caused by qemu_maxrampagesize() not taking memory-backend-memfd objects into account yet, so the code in s390_memory_init() fails to enable the huge page support there via

Re: [PATCH v2 3/3] util/mmap-alloc: Remove qemu_mempath_getpagesize()

2022-08-10 Thread David Hildenbrand
On 10.08.22 14:57, Thomas Huth wrote: > The last user of this function has just been removed, so we can > drop this function now, too. > > Signed-off-by: Thomas Huth Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH 16/62] target/arm: Use GetPhysAddrResult in pmsav8_mpu_lookup

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 19/62] target/arm: Add is_secure parameter to pmsav8_mpu_lookup

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Remove the use of regime_is_secure from pmsav8_mpu_lookup. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH for-7.2 v3 06/11] ppc/pnv: enable user created pnv-phb for powernv8

2022-08-10 Thread Cédric Le Goater
On 8/10/22 12:05, Daniel Henrique Barboza wrote: The bulk of the work was already done by previous patches. Use defaults_enabled() to determine whether we need to create the default devices or not. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Cédric Le Goater Thanks, C. ---

[PATCH for-7.2 v3 09/11] ppc/pnv: change pnv_phb4_get_pec() to also retrieve chip10->pecs

2022-08-10 Thread Daniel Henrique Barboza
The function assumes that we're always dealing with a PNV9_CHIP() object. This is not the case when the pnv-phb device belongs to a powernv10 machine. Change pnv_phb4_get_pec() to be able to work with PNV10_CHIP() if necessary. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb.c |

[PATCH for-7.2 v3 03/11] ppc/pnv: set root port chassis and slot using Bus properties

2022-08-10 Thread Daniel Henrique Barboza
For default root ports we have a way of accessing chassis and slot, before root_port_realize(), via pnv_phb_attach_root_port(). For the future user created root ports this won't be the case: we can't use this helper because we don't have access to the PHB phb-id/chip-id values. In earlier patches

[PATCH for-7.2 v3 08/11] ppc/pnv: enable user created pnv-phb powernv9

2022-08-10 Thread Daniel Henrique Barboza
Enable pnv-phb user created devices for powernv9 now that we have everything in place. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb.c | 2 +- hw/pci-host/pnv_phb4_pec.c | 6 -- hw/ppc/pnv.c | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff

[PATCH v3 10/16] util: move 256-by-128 division helpers to int128

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Break a cyclic dependency between int128 and host-utils. Signed-off-by: Marc-André Lureau Reviewed-by: Lucas Mateus Castro --- include/qemu/host-utils.h | 3 - include/qemu/int128.h | 3 + util/host-utils.c | 180 --

[PATCH v3 16/16] qemu-common: add error-report test

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Add new tests to check the behaviour of error reporting functions. Signed-off-by: Marc-André Lureau --- .../qemu-common/tests/test-error-report.c | 120 ++ subprojects/qemu-common/meson.build | 2 +

[PATCH v2 3/3] util/mmap-alloc: Remove qemu_mempath_getpagesize()

2022-08-10 Thread Thomas Huth
The last user of this function has just been removed, so we can drop this function now, too. Signed-off-by: Thomas Huth --- include/qemu/mmap-alloc.h | 2 -- util/mmap-alloc.c | 31 --- 2 files changed, 33 deletions(-) diff --git a/include/qemu/mmap-alloc.h

Re: [PATCH v2 2/3] softmmu/physmem: Remove the ifdef __linux__ around the pagesize functions

2022-08-10 Thread David Hildenbrand
On 10.08.22 14:57, Thomas Huth wrote: > Now that host_memory_backend_pagesize() is not depending on the hugetlb > memory path handling anymore, we can also remove the #ifdef and the > TOCTTOU comment from the calling functions - the code should now work > equally well on all host architectures. >

Re: [PATCH 13/62] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav5

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 17/62] target/arm: Remove is_subpage argument to pmsav8_mpu_lookup

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > This can be made redundant with result->page_size, by moving > the basic set of page_size from get_phys_addr_pmsav8. We still > need to overwrite page_size when v8m_security_lookup signals > a subpage. > > Signed-off-by: Richard Henderson > --- > > ret =

Re: [PATCH 21/62] target/arm: Add is_secure parameter to get_phys_addr_v6

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Remove the use of regime_is_secure from get_phys_addr_v6. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 23/62] target/arm: Add is_secure parameter to pmsav7_use_background_region

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Remove the use of regime_is_secure from pmsav7_use_background_region. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 26/62] target/arm: Add is_secure parameter to regime_translation_disabled

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Remove the use of regime_is_secure from regime_translation_disabled. > > This fixes a bug in S1_ptw_translate and get_phys_addr where we had > passed ARMMMUIdx_Stage2 and not ARMMMUIdx_Stage2_S to determine if > Stage2 is disabled, affecting FEAT_SEL2. > >

[PATCH RFC v1 2/2] i386: reorder kvm_put_sregs2() and kvm_put_nested_state() when vCPU is reset

2022-08-10 Thread Vitaly Kuznetsov
Setting nested state upon migration needs to happen after kvm_put_sregs2() to e.g. have EFER.SVME set. This, however, doesn't work for vCPU reset: when vCPU is in VMX root operation, certain CR bits are locked and kvm_put_sregs2() may fail. As nested state is fully cleaned up upon vCPU reset

Re: [PATCH v7 05/14] mm/memfd: Introduce MFD_INACCESSIBLE flag

2022-08-10 Thread Chao Peng
On Fri, Aug 05, 2022 at 03:28:50PM +0200, David Hildenbrand wrote: > On 06.07.22 10:20, Chao Peng wrote: > > Introduce a new memfd_create() flag indicating the content of the > > created memfd is inaccessible from userspace through ordinary MMU > > access (e.g., read/write/mmap). However, the file

[PATCH v3 00/16] Preliminary patches for subproject split

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Hi, Here is another subset of the large "subproject(qga)" series I intend to send soon after (https://gitlab.com/marcandre.lureau/qemu/-/commits/qga). Thanks v3: - use overriable qmp_dispatch_exec() stub, instead of extra callback - qapi-gen "-i file.h" will always

[PATCH v3 14/16] qemu-common: move error-report

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- .../qemu-common/include}/qemu/error-report.h | 2 ++ .../qemu-common/src}/error-is-detailed.c | 1 - .../qemu-common/src}/error-report.c | 4 +++- .../qemu-common/src/error-vprintf.c | 5 ++---

[PATCH v3 11/16] qemu-common: introduce a common subproject

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Add a new meson subproject to provide common code and scripts for QEMU and tools. Initially, it will offer QAPI/QMP code generation and common utilities. libvhost-user & libvduse will make use of the subproject to avoid having include/ links to common headers. The other

[PATCH v3 09/16] scripts/qapi: add required system includes to visitor

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau The generated visitor code includes abort() & assert(), we shouldn't rely on the global "-i" headers to include the necessary system headers. Signed-off-by: Marc-André Lureau Reviewed-by: Warner Losh --- scripts/qapi/visit.py | 2 ++ 1 file changed, 2 insertions(+)

Re: [PATCH v2 1/3] backends/hostmem: Fix support of memory-backend-memfd in qemu_maxrampagesize()

2022-08-10 Thread David Hildenbrand
On 10.08.22 14:57, Thomas Huth wrote: > It is currently not possible yet to use "memory-backend-memfd" on s390x > with hugepages enabled. This problem is caused by qemu_maxrampagesize() > not taking memory-backend-memfd objects into account yet, so the code > in s390_memory_init() fails to enable

Re: [PATCH 10/62] target/arm: Use GetPhysAddrResult in get_phys_addr_lpae

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 29/62] target/arm: Add is_secure parameter to v7m_read_half_insn

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Remove the use of regime_is_secure from v7m_read_half_insn. > As it happens, both callers pass true, but that is a detail > of v7m_handle_execute_nsc we need not expose to the callee. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH for 7.1] linux-user: fix compat with glibc >= 2.36 sys/mount.h

2022-08-10 Thread Daniel P . Berrangé
Laurent: ping, Can you consider queuing this so 7.1 isn't broken with latest glibc releases. On Tue, Aug 02, 2022 at 12:41:34PM -0400, Daniel P. Berrangé wrote: > The latest glibc 2.36 has extended sys/mount.h so that it > defines the FSCONFIG_* enum constants. These are historically > defined

[PATCH for-7.2 v3 10/11] ppc/pnv: user creatable pnv-phb for powernv10

2022-08-10 Thread Daniel Henrique Barboza
Given that powernv9 and powernv10 uses the same pnv-phb backend, the logic to allow user created pnv-phbs for powernv10 is already in place. Let's flip the switch. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/pnv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/pnv.c

Re: [PATCH v4 4/6] hw/core: use qemu_fdt_setprop_strings()

2022-08-10 Thread Andrew Jones
On Tue, Aug 09, 2022 at 07:56:38PM +0100, Ben Dooks wrote: > Change to using the qemu_fdt_setprop_strings() helper in > hw/core code. > > Signed-off-by: Ben Dooks > --- > hw/core/guest-loader.c | 13 + > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git

Re: [PATCH v4 08/24] ppc/ppc4xx: Introduce a DCR device model

2022-08-10 Thread Cédric Le Goater
On 8/9/22 19:21, BALATON Zoltan wrote: On Tue, 9 Aug 2022, Cédric Le Goater wrote: The Device Control Registers (DCR) of on-SoC devices are accessed by software through the use of the mtdcr and mfdcr instructions. These are converted in transactions on a side band bus, the DCR bus, which

Re: [PATCH v4 6/6] hw/arm: change to use qemu_fdt_setprop_strings()

2022-08-10 Thread Andrew Jones
On Tue, Aug 09, 2022 at 07:56:40PM +0100, Ben Dooks wrote: > Change to using qemu_fdt_setprop_strings() instead of using > \0 separated string arrays. Note, also there were a few places > where qemu_fdt_setprop_string() can be used in the same areas. > > Signed-off-by: Ben Dooks > --- > v4: > -

Re: [PATCH v4 5/6] hw/mips: use qemu_fdt_setprop_strings()

2022-08-10 Thread Andrew Jones
On Tue, Aug 09, 2022 at 07:56:39PM +0100, Ben Dooks wrote: > Change to using qemu_fdt_setprop_strings() helper in hw/mips. > > Signed-off-by: Ben Dooks > Reviewed-by: Peter Maydell > --- > hw/mips/boston.c | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git

Re: [PATCH 22/62] target/arm: Add secure parameter to get_phys_addr_pmsav8

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Remove the use of regime_is_secure from get_phys_addr_pmsav8. > Since we already had a local variable named secure, use that. > > Signed-off-by: Richard Henderson > --- > target/arm/ptw.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git

Re: [PATCH 20/62] target/arm: Add is_secure parameter to get_phys_addr_v5

2022-08-10 Thread Alex Bennée
Richard Henderson writes: > Remove the use of regime_is_secure from get_phys_addr_v5. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v2 3/3] util/mmap-alloc: Remove qemu_mempath_getpagesize()

2022-08-10 Thread Claudio Imbrenda
On Wed, 10 Aug 2022 14:57:20 +0200 Thomas Huth wrote: > The last user of this function has just been removed, so we can > drop this function now, too. > > Signed-off-by: Thomas Huth Reviewed-by: Claudio Imbrenda > --- > include/qemu/mmap-alloc.h | 2 -- > util/mmap-alloc.c | 31

Re: [PATCH v2 0/3] Fix hugepages with memfd on s390x and clean up related code

2022-08-10 Thread Claudio Imbrenda
On Wed, 10 Aug 2022 14:57:17 +0200 Thomas Huth wrote: > The first patch fixes the problem that hugepages cannot be used via > the "memory-backend-memfd" object on s390x. The second and third patch > are some clean-ups that can be done after generalizing the code in the > first patch. thanks for

Re: [PATCH] backends/hostmem: Fix support of memory-backend-memfd in qemu_maxrampagesize()

2022-08-10 Thread Thomas Huth
On 10/08/2022 10.31, David Hildenbrand wrote: On 10.08.22 10:11, Thomas Huth wrote: On 10/08/2022 09.32, David Hildenbrand wrote: On 10.08.22 08:32, Thomas Huth wrote: It is currently not possible yet to use "memory-backend-memfd" on s390x with hugepages enabled. This problem is caused by

Re: [PATCH v7 03/14] mm: Introduce memfile_notifier

2022-08-10 Thread Chao Peng
On Fri, Aug 05, 2022 at 03:22:58PM +0200, David Hildenbrand wrote: > On 06.07.22 10:20, Chao Peng wrote: > > This patch introduces memfile_notifier facility so existing memory file > > subsystems (e.g. tmpfs/hugetlbfs) can provide memory pages to allow a > > third kernel component to make use of

Re: [PATCH v7 01/14] mm: Add F_SEAL_AUTO_ALLOCATE seal to memfd

2022-08-10 Thread Chao Peng
On Fri, Aug 05, 2022 at 07:55:38PM +0200, Paolo Bonzini wrote: > On 7/21/22 11:44, David Hildenbrand wrote: > > > > Also, I*think* you can place pages via userfaultfd into shmem. Not > > sure if that would count "auto alloc", but it would certainly bypass > > fallocate(). > > Yeah,

Re: [PATCH v7 05/14] mm/memfd: Introduce MFD_INACCESSIBLE flag

2022-08-10 Thread David Hildenbrand
On 10.08.22 11:37, Chao Peng wrote: > On Fri, Aug 05, 2022 at 03:28:50PM +0200, David Hildenbrand wrote: >> On 06.07.22 10:20, Chao Peng wrote: >>> Introduce a new memfd_create() flag indicating the content of the >>> created memfd is inaccessible from userspace through ordinary MMU >>> access

[PATCH for-7.2 v3 00/11] enable pnv-phb user created devices

2022-08-10 Thread Daniel Henrique Barboza
Hi, This new version contains a new patch (11) to handle the QOM parenting of user created root ports. A small change in patch 5 was made as well based on Frederic's comments. The series is based on top of the ppc-7.2 branch: https://gitlab.com/danielhb/qemu/-/tree/ppc-7.2 Changes from v2: -

[PATCH for-7.2 v3 01/11] ppc/pnv: add phb-id/chip-id PnvPHB3RootBus properties

2022-08-10 Thread Daniel Henrique Barboza
We rely on the phb-id and chip-id, which are PHB properties, to assign chassis and slot to the root port. For default devices this is no big deal: the root port is being created under pnv_phb_realize() and the values are being passed on via the 'index' and 'chip-id' of the

[PATCH for-7.2 v3 05/11] ppc/pnv: turn chip8->phbs[] into a PnvPHB* array

2022-08-10 Thread Daniel Henrique Barboza
When enabling user created PHBs (a change reverted by commit 9c10d86fee) we were handling PHBs created by default versus by the user in different manners. The only difference between these PHBs is that one will have a valid phb3->chip that is assigned during pnv_chip_power8_realize(), while the

[PATCH for-7.2 v3 02/11] ppc/pnv: add phb-id/chip-id PnvPHB4RootBus properties

2022-08-10 Thread Daniel Henrique Barboza
The same rationale provided in the PHB3 bus case applies here. Note: we could have merged both buses in a single object, like we did with the root ports, and spare some boilerplate. The reason we opted to preserve both buses objects is twofold: - there's not user side advantage in doing so.

Re: [PATCH v2 00/11] Refactor bdrv_try_set_aio_context using transactions

2022-08-10 Thread Paolo Bonzini
On 8/6/22 17:32, Vladimir Sementsov-Ogievskiy wrote: if I understand correctly you suggest: .prepare = check and then change aiocontext .abort = revert aiocontext change .commit = nothing Yes. And that's is how it used actually now in transactions, for example:   bdrv_attach_child_common

Re: [PATCH v4 19/24] ppc/ppc405: QOM'ify FPGA

2022-08-10 Thread BALATON Zoltan
On Wed, 10 Aug 2022, Cédric Le Goater wrote: On 8/9/22 19:37, BALATON Zoltan wrote: On Tue, 9 Aug 2022, Cédric Le Goater wrote: Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405_boards.c | 55 +- 1 file changed, 38

  1   2   >