Re: [PATCH v2 4/4] scripts: add script to compare compatible properties

2022-09-15 Thread Markus Armbruster
Maksim Davydov writes: > This script run QEMU to obtain compat_props of machines and default > values of different types and produce appropriate table. This table > can be used to compare machine types to choose the most suitable > machine. Also table in json or csv format should be used to

Re: [PATCH] keyval: Print types on merge inconsistency

2022-09-15 Thread Markus Armbruster
"Dr. David Alan Gilbert (git)" writes: > From: "Dr. David Alan Gilbert" > > When 'keyval_do_merge' checks consistency of types, if they mismatch > print the types so we get a hint of what's going on. > > e.g. > qemu-system-x86_64: Parameter 'memory' used inconsistently (qstring/qdict) > >

Re: [PATCH 01/11] riscv: Add privilege level to DisasContext

2022-09-15 Thread LIU Zhiwei
Reviewed-by: LIU Zhiwei Zhiwei On 2022/9/6 20:22, Christoph Muellner wrote: From: Christoph Müllner This allows privileged instructions to check the required privilege level in the translation without calling a helper. Signed-off-by: Christoph Müllner --- target/riscv/translate.c | 4

Re: [PATCH 02/11] RISC-V: Adding T-Head CMO instructions

2022-09-15 Thread LIU Zhiwei
Reviewed-by: LIU Zhiwei Zhiwei On 2022/9/6 20:22, Christoph Muellner wrote: From: Christoph Müllner This patch adds support for the T-Head CMO instructions. To avoid interfering with standard extensions, decoder and translation are in its own T-Head specific files. Future patches should be

Re: [PATCH 03/11] docs/system/ppc/ppce500: Add heading for networking chapter

2022-09-15 Thread Bin Meng
On Thu, Sep 15, 2022 at 11:29 PM Bernhard Beschow wrote: > > 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 > --- >

Re: [PATCH v2 1/8] target/riscv: debug: Determine the trigger type from tdata1.type

2022-09-15 Thread LIU Zhiwei
On 2022/9/9 21:42, Bin Meng wrote: From: Frank Chang Current RISC-V debug assumes that only type 2 trigger is supported. To allow more types of triggers to be supported in the future (e.g. type 6 trigger, which is similar to type 2 trigger with additional functionality), we should

Re: [PATCH v2 6/8] target/riscv: debug: Create common trigger actions function

2022-09-15 Thread LIU Zhiwei
Reviewed-by: LIU Zhiwei Zhiwei On 2022/9/9 21:42, Bin Meng wrote: From: Frank Chang Trigger actions are shared among all triggers. Extract to a common function. Signed-off-by: Frank Chang Reviewed-by: Bin Meng [bmeng: handle the DBG_ACTION_NONE case] Signed-off-by: Bin Meng ---

Re: [PATCH 02/11] hw/gpio/meson: Introduce dedicated config switch for hw/gpio/mpc8xxx

2022-09-15 Thread Bin Meng
On Thu, Sep 15, 2022 at 11:26 PM Bernhard Beschow wrote: > > Having a dedicated config switch makes dependency handling cleaner. > > Signed-off-by: Bernhard Beschow > --- > hw/gpio/Kconfig | 3 +++ > hw/gpio/meson.build | 2 +- > hw/ppc/Kconfig | 1 + > 3 files changed, 5

Re: [PATCH 01/11] hw/ppc/meson: Allow e500 boards to be enabled separately

2022-09-15 Thread Bin Meng
On Thu, Sep 15, 2022 at 11:25 PM Bernhard Beschow wrote: > > Gives users more fine-grained control over what should be compiled into > QEMU. > > Signed-off-by: Bernhard Beschow > --- > configs/devices/ppc-softmmu/default.mak | 3 ++- > hw/ppc/Kconfig | 8 >

Re: [PATCH v2 5/8] target/riscv: debug: Introduce tinfo CSR

2022-09-15 Thread LIU Zhiwei
Reviewed-by: LIU Zhiwei Zhiwei On 2022/9/9 21:42, Bin Meng wrote: From: Frank Chang tinfo.info: One bit for each possible type enumerated in tdata1. If the bit is set, then that type is supported by the currently selected trigger. Signed-off-by: Frank Chang Reviewed-by: Bin Meng

Re: [PATCH v3 4/5] acpi/nvdimm: Implement ACPI NVDIMM Label Methods

2022-09-15 Thread Robert Hoo
On Fri, 2022-09-09 at 15:39 +0200, Igor Mammedov wrote: ... > looks more or less fine except of excessive use of named variables > which creates global scope variables. > > I'd suggest to store temporary buffers/packages in LocalX variales, > you should be able to do that for everything modulo >

Re: [PATCH v2 3/8] target/riscv: debug: Introduce tdata1, tdata2, and tdata3 CSRs

2022-09-15 Thread LIU Zhiwei
On 2022/9/9 21:42, Bin Meng wrote: From: Frank Chang Replace type2_trigger_t with the real tdata1, tdata2, and tdata3 CSRs, which allows us to support more types of triggers in the future. Signed-off-by: Frank Chang Reviewed-by: Bin Meng Signed-off-by: Bin Meng --- (no changes since v1)

Re: [PATCH v2 4/8] target/riscv: debug: Restrict the range of tselect value can be written

2022-09-15 Thread LIU Zhiwei
Reviewed-by: LIU Zhiwei Zhiwei On 2022/9/9 21:42, Bin Meng wrote: From: Frank Chang The value of tselect CSR can be written should be limited within the range of supported triggers number. Signed-off-by: Frank Chang Reviewed-by: Bin Meng Signed-off-by: Bin Meng --- (no changes since

Re: [PATCH v2 2/8] target/riscv: debug: Introduce build_tdata1() to build tdata1 register content

2022-09-15 Thread LIU Zhiwei
Reviewed-by: LIU Zhiwei Zhiwei On 2022/9/9 21:42, Bin Meng wrote: From: Frank Chang Introduce build_tdata1() to build tdata1 register content, which can be shared among all types of triggers. Signed-off-by: Frank Chang Reviewed-by: Bin Meng [bmeng: moved RV{32,64}_DATA_MASK definition to

Re: [PATCH v2 1/8] target/riscv: debug: Determine the trigger type from tdata1.type

2022-09-15 Thread LIU Zhiwei
Reviewed-by: LIU Zhiwei Zhiwei On 2022/9/9 21:42, Bin Meng wrote: From: Frank Chang Current RISC-V debug assumes that only type 2 trigger is supported. To allow more types of triggers to be supported in the future (e.g. type 6 trigger, which is similar to type 2 trigger with additional

RE: [RFC PATCH v2] gdbstub: only send stop-reply packets when allowed to

2022-09-15 Thread Brian Cain
> -Original Message- > From: Qemu-devel > On Behalf Of Matheus Tavares Bernardino ... > On Wed, 24 Aug 2022 at 14:51, Matheus Tavares Bernardino > wrote: > > > > Instead, let's change gdb_set_stop_cpu() to send stop messages only as a > > response to a previous GDB command, also making

Re: [PATCH 0/7] nsis: gitlab-ci: Improve QEMU Windows installer packaging

2022-09-15 Thread Bin Meng
On Thu, Sep 8, 2022 at 9:28 PM Bin Meng wrote: > > At present packaging the required DLLs of QEMU executables is a > manual process, and error prone. > > Improve scripts/nsis.py by adding a logic to automatically package > required DLLs of QEMU executables. > > 'make installer' is tested in the

[PATCH v2] virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events.

2022-09-15 Thread Venu Busireddy
Section 5.6.6.3 of VirtIO specification states, "Events will also be reported via sense codes..." However, no sense data is sent when VIRTIO_SCSI_EVT_RESET_RESCAN or VIRTIO_SCSI_EVT_RESET_REMOVED events are reported (when disk hotplug/hotunplug events occur). SCSI layer on Solaris depends on this

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

2022-09-15 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

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

2022-09-15 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

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

2022-09-15 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

Re: [PATCH 23/27] qapi tpm: Elide redundant has_FOO in generated C

2022-09-15 Thread Stefan Berger
On 9/15/22 16:43, 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. This is the step for

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

2022-09-15 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

[PATCH 08/27] qapi block: Elide redundant has_FOO in generated C

2022-09-15 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/block*.json. Said commit explains the

[PATCH 25/27] qapi ui: Elide redundant has_FOO in generated C

2022-09-15 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/ui.json. Said commit explains the

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

2022-09-15 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

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

2022-09-15 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

[PATCH 19/27] qapi replay: Elide redundant has_FOO in generated C

2022-09-15 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/replay.json. Said commit explains the

[PATCH 17/27] qapi pci: Elide redundant has_FOO in generated C

2022-09-15 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/pci.json. Said commit explains the

[PATCH 21/27] qapi run-state: Elide redundant has_FOO in generated C

2022-09-15 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/run-state.json. Said commit explains the

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

2022-09-15 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

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

2022-09-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- 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 +++

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

2022-09-15 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

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

2022-09-15 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

[PATCH 18/27] qapi qdev qom: Elide redundant has_FOO in generated C

2022-09-15 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/qdev.json and qapi/qom.json. Said commit

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

2022-09-15 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

[PATCH 11/27] qapi dump: Elide redundant has_FOO in generated C

2022-09-15 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/dump.json. Said commit explains the

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

2022-09-15 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

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

2022-09-15 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 --- docs/devel/qapi-code-gen.rst | 21 - 1 file changed, 20

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

2022-09-15 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

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

2022-09-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- 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-code-gen.rst index

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

2022-09-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- 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 @@ -757,12 +757,6 @@ def

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

2022-09-15 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

[PATCH 04/27] qapi: Start to elide redundant has_FOO in generated C

2022-09-15 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, has_FOO is actually redundant for a pointer-valued FOO, which can be

[PATCH 05/27] qapi tests: Elide redundant has_FOO in generated C

2022-09-15 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 tests/qapi-schema/qapi-schema-test.json. Said

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

2022-09-15 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

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

2022-09-15 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

Re: [PATCH RFC 01/13] migration: Use non-atomic ops for clear log bitmap

2022-09-15 Thread Peter Xu
On Thu, Sep 15, 2022 at 07:49:57PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > Since we already have bitmap_mutex to protect either the dirty bitmap or > > the clear log bitmap, we don't need atomic operations to set/clear/test on > > the clear log bitmap.

Re: [PATCH RFC 02/13] migration: Add postcopy_preempt_active()

2022-09-15 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Add the helper to show that postcopy preempt enabled, meanwhile active. > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH RFC 01/13] migration: Use non-atomic ops for clear log bitmap

2022-09-15 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Since we already have bitmap_mutex to protect either the dirty bitmap or > the clear log bitmap, we don't need atomic operations to set/clear/test on > the clear log bitmap. Switching all ops from atomic to non-atomic > versions, meanwhile touch up the

[PATCH] mem/cxl_type3: fix GPF DVSEC

2022-09-15 Thread Tong Zhang
The structure is for device dvsec not port dvsec. Change type to fix this issue. Signed-off-by: Tong Zhang --- hw/mem/cxl_type3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index 3bf2869573..ada2108fac 100644 ---

[PATCH] vfio/common: Fix vfio_iommu_type1_info use after free

2022-09-15 Thread Alex Williamson
On error, vfio_get_iommu_info() frees and clears *info, but vfio_connect_container() continues to use the pointer regardless of the return value. Restructure the code such that a failure of this function triggers an error and clean up the remainder of the function, including updating an outdated

Re: [PATCH v2 1/4] scripts/ci/setup: ninja missing from build-environment

2022-09-15 Thread Thomas Huth
On 14/09/2022 13.41, Lucas Mateus Castro(alqotel) wrote: From: "Lucas Mateus Castro (alqotel)" ninja-build is missing from the RHEL environment, so a system prepared with that script would still fail to compile QEMU. Tested on a Fedora 36 Signed-off-by: Lucas Mateus Castro (alqotel) ---

[PULL 1/3] monitor: Support specified vCPU registers

2022-09-15 Thread Dr. David Alan Gilbert (git)
From: zhenwei pi Originally we have to get all the vCPU registers and parse the specified one. To improve the performance of this usage, allow user specified vCPU id to query registers. Run a VM with 16 vCPU, use bcc tool to track the latency of 'hmp_info_registers': 'info registers -a' uses

[PULL 3/3] hmp: Fix ordering of text

2022-09-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Fix the ordering of the help text so it's always after the commands being defined. A few had got out of order. Keep 'info' at the end. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Daniel P. Berrangé --- hmp-commands.hx | 46

[PULL 2/3] monitor/hmp: print trace as option in help for log command

2022-09-15 Thread Dr. David Alan Gilbert (git)
From: Dongli Zhang The below is printed when printing help information in qemu-system-x86_64 command line, and when CONFIG_TRACE_LOG is enabled: $ qemu-system-x86_64 -d help ... ... trace:PATTERN enable trace events Use "-d trace:help" to get a list of trace

[PULL 0/3] hmp queue

2022-09-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 79dfa177ae348bb5ab5f97c0915359b13d6186e2: Merge tag 'pull-qapi-2022-09-07' of git://repo.or.cz/qemu/armbru into staging (2022-09-07 13:13:30 -0400) are available in the Git repository at: https://gitlab.com/dagrh/qemu.git

[PATCH 09/11] hw/sd/sdhci: Rename ESDHC_* defines to USDHC_*

2022-09-15 Thread Bernhard Beschow
The device model's functions start with "usdhc_", so rename the defines accordingly for consistency. Signed-off-by: Bernhard Beschow --- hw/sd/sdhci.c | 68 +-- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/hw/sd/sdhci.c

[PATCH 08/11] hw/sd/sdhci-internal: Unexport ESDHC defines

2022-09-15 Thread Bernhard Beschow
These defines aren't used outside of sdhci.c, so can be defined there. Signed-off-by: Bernhard Beschow --- hw/sd/sdhci-internal.h | 20 hw/sd/sdhci.c | 19 +++ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/hw/sd/sdhci-internal.h

[PATCH 05/11] hw/ppc/e500: Remove if statement which is now always true

2022-09-15 Thread Bernhard Beschow
Now that the MPC8544DS board also has a platform bus, the if statement was always true. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 30 ++ hw/ppc/e500.h | 1 - hw/ppc/e500plat.c | 1 - hw/ppc/mpc8544ds.c | 1 - 4 files changed, 14 insertions(+),

[PATCH 07/11] hw/ppc/e500: Implement pflash handling

2022-09-15 Thread Bernhard Beschow
Allows e500 boards to have their root file system reside on flash using only builtin devices. Note that the flash memory area is only created when a -pflash argument is given, and that the size is determined by the given file. The idea is to put users into control. Signed-off-by: Bernhard

[PATCH 11/11] hw/ppc/e500: Add Freescale eSDHC to e500 boards

2022-09-15 Thread Bernhard Beschow
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 + hw/ppc/e500.c | 32

[PATCH 03/11] docs/system/ppc/ppce500: Add heading for networking chapter

2022-09-15 Thread 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 --- docs/system/ppc/ppce500.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 10/11] hw/sd/sdhci: Implement Freescale eSDHC device model

2022-09-15 Thread Bernhard Beschow
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 deletion(-) diff --git a/hw/sd/sdhci.c

[PATCH 04/11] hw/ppc/mpc8544ds: Add platform bus

2022-09-15 Thread Bernhard Beschow
Models the real device more closely. Signed-off-by: Bernhard Beschow --- hw/ppc/mpc8544ds.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/ppc/mpc8544ds.c b/hw/ppc/mpc8544ds.c index 81177505f0..cd6cd04bef 100644 --- a/hw/ppc/mpc8544ds.c +++ b/hw/ppc/mpc8544ds.c @@ -14,6 +14,7 @@

[PATCH 06/11] hw/block/pflash_cfi01: Error out if device length isn't a power of two

2022-09-15 Thread Bernhard Beschow
According to the JEDEC standard the device length is communicated to an OS as an exponent (power of two). Signed-off-by: Bernhard Beschow --- hw/block/pflash_cfi01.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c

[PATCH 02/11] hw/gpio/meson: Introduce dedicated config switch for hw/gpio/mpc8xxx

2022-09-15 Thread Bernhard Beschow
Having a dedicated config switch makes dependency handling cleaner. Signed-off-by: Bernhard Beschow --- hw/gpio/Kconfig | 3 +++ hw/gpio/meson.build | 2 +- hw/ppc/Kconfig | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/gpio/Kconfig b/hw/gpio/Kconfig index

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

2022-09-15 Thread Bernhard Beschow
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. The series is structured as follows: Patches 1-3 perform some general cleanup which

[PATCH 01/11] hw/ppc/meson: Allow e500 boards to be enabled separately

2022-09-15 Thread Bernhard Beschow
Gives users more fine-grained control over what should be compiled into QEMU. Signed-off-by: Bernhard Beschow --- configs/devices/ppc-softmmu/default.mak | 3 ++- hw/ppc/Kconfig | 8 hw/ppc/meson.build | 6 ++ 3 files changed, 12

Re: Maximum QMP reply size

2022-09-15 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Tue, 6 Sept 2022 at 20:41, John Snow wrote: > > Hi, I suspect I have asked this before, but I didn't write it down in > > a comment, so I forget my justification... > > > > In the QMP lib, we need to set a buffering limit for how big a QMP >

Re: [PATCH v11 05/21] job.c: add job_lock/unlock while keeping job.h intact

2022-09-15 Thread Vladimir Sementsov-Ogievskiy
On 8/26/22 16:20, Emanuele Giuseppe Esposito wrote: With "intact" we mean that all job.h functions implicitly take the lock. Therefore API callers are unmodified. This means that: - many static functions that will be always called with job lock held become _locked, and call _locked functions

Re: [PATCH v11 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-09-15 Thread Vladimir Sementsov-Ogievskiy
On 8/26/22 16:21, Emanuele Giuseppe Esposito wrote: Change the job_{lock/unlock} and macros to use job_mutex. Now that they are not nop anymore, remove the aiocontext to avoid deadlocks. Therefore: - when possible, remove completely the aiocontext lock/unlock pair - if it is used by some other

[PATCH v8 7/8] KVM: Handle page fault for private memory

2022-09-15 Thread Chao Peng
A memslot with KVM_MEM_PRIVATE being set can include both fd-based private memory and hva-based shared memory. Architecture code (like TDX code) can tell whether the on-going fault is private or not. This patch adds a 'is_private' field to kvm_page_fault to indicate this and architecture code is

[PATCH v8 8/8] KVM: Enable and expose KVM_MEM_PRIVATE

2022-09-15 Thread Chao Peng
Expose KVM_MEM_PRIVATE and memslot fields private_fd/offset to userspace. KVM will register/unregister private memslot to fd-based memory backing store and response to invalidation event from inaccessible_notifier to zap the existing memory mappings in the secondary page table. Whether

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

2022-09-15 Thread Chao Peng
If CONFIG_HAVE_KVM_PRIVATE_MEM=y, userspace can register/unregister the guest private memory regions through KVM_MEMORY_ENCRYPT_{UN,}REG_REGION ioctls. The patch reuses existing SEV ioctl number but differs that the address in the region for KVM_PRIVATE_MEM case is gpa while for SEV case it's hva.

[PATCH v8 6/8] KVM: Update lpage info when private/shared memory are mixed

2022-09-15 Thread Chao Peng
When private/shared memory are mixed in a large page, the lpage_info may not be accurate and should be updated with this mixed info. A large page has mixed pages can't be really mapped as large page since its private/shared pages are from different physical memory. This patch updates lpage_info

[PATCH v8 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-09-15 Thread Chao Peng
This new KVM exit allows userspace to handle memory-related errors. It indicates an error happens in KVM at guest memory range [gpa, gpa+size). The flags includes additional information for userspace to handle the error. Currently bit 0 is defined as 'private memory' where '1' indicates error

[PATCH v8 4/8] KVM: Use gfn instead of hva for mmu_notifier_retry

2022-09-15 Thread Chao Peng
Currently in mmu_notifier validate path, hva range is recorded and then checked against in the mmu_notifier_retry_hva() of the page fault path. However, for the to be introduced private memory, a page fault may not have a hva associated, checking gfn(gpa) makes more sense. For existing non

[PATCH v8 2/8] KVM: Extend the memslot to support fd-based private memory

2022-09-15 Thread Chao Peng
In memory encryption usage, guest memory may be encrypted with special key and can be accessed only by the VM itself. We call such memory private memory. It's valueless and sometimes can cause problem to allow userspace to access guest private memory. This patch extends the KVM memslot definition

[PATCH v8 0/8] KVM: mm: fd-based approach for supporting KVM

2022-09-15 Thread Chao Peng
This patch series implements KVM guest private memory for confidential computing scenarios like Intel TDX[1]. If a TDX host accesses TDX-protected guest memory, machine check can happen which can further crash the running host system, this is terrible for multi-tenant configurations. The host

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

2022-09-15 Thread Chao Peng
From: "Kirill A. Shutemov" KVM can use memfd-provided memory for guest memory. For normal userspace accessible memory, KVM userspace (e.g. QEMU) mmaps the memfd into its virtual address space and then tells KVM to use the virtual address to setup the mapping in the secondary page table (e.g.

Cannot get Qemu to move past "Booting from ROM"?

2022-09-15 Thread Evan Sherlock
My custom build kernel 4.9.327 with gcc-11.2 is not booting in Qemu and it is stuck on "Booting from ROM". Just like the screenshot here: Custom 64bit 3.10.9 kernel not booting in qemu and stucks on Booting from ROM

Re: [PATCH v2 0/8] AArch64/HMAT support and tests

2022-09-15 Thread Yicong Yang via
On 2022/7/19 17:49, Hesham Almatary wrote: > This patchset adds support for AArch64/HMAT including a test. > It relies on other two patch sets from: > > Brice Goglin: to support -numa without initiators on q35/x86. > https://lore.kernel.org/all/ed23accb-2c8b-90f4-a7a3-f81cc57bf...@inria.fr/ >

[PATCH v3 2/5] tests/x86: Add 'q35' machine type to ivshmem-test

2022-09-15 Thread Michael Labiuk via
Configure pci bridge setting to test ivshmem on 'q35'. Signed-off-by: Michael Labiuk --- tests/qtest/ivshmem-test.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/tests/qtest/ivshmem-test.c b/tests/qtest/ivshmem-test.c index 9611d05eb5..0f9755abc6 100644 ---

[PATCH v3 1/5] tests/x86: Add subtest with 'q35' machine type to device-plug-test

2022-09-15 Thread Michael Labiuk via
Configure pci bridge setting to plug pci device and unplug. Move common code for device removing to function. Signed-off-by: Michael Labiuk --- tests/qtest/device-plug-test.c | 83 -- 1 file changed, 58 insertions(+), 25 deletions(-) diff --git

[PATCH v3 0/5] Add 'q35' machine type to hotplug tests

2022-09-15 Thread Michael Labiuk via
Add pci bridge setting to run hotplug tests on q35 machine type. Hotplug tests was bounded to 'pc' machine type by commit 7b172333f1b Michael Labiuk (5): tests/x86: Add subtest with 'q35' machine type to device-plug-test tests/x86: Add 'q35' machine type to ivshmem-test tests/x86: Add 'q35'

Re: [PATCH] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-15 Thread ho...@yusur.tech
On Tue, Sep 13, 2022 at 17:08 PM Hao Chen wrote: >From: Hao Chen >Date: 2022-09-13 17:08 >To: mst; raphael.norwitz >CC: kwolf; hreitz; jasowang; qemu-block; qemu-devel; houyl; zy; Hao Chen >Subject: [PATCH] hw/virtio/vhost-user: support obtain vdpa device's mac >address

[PATCH v3 5/5] tests/x86: Add 'q35' machine type to override-tests in hd-geo-test

2022-09-15 Thread Michael Labiuk via
Signed-off-by: Michael Labiuk --- tests/qtest/hd-geo-test.c | 105 +++--- 1 file changed, 98 insertions(+), 7 deletions(-) diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index 19354690ae..61a92bdbe1 100644 --- a/tests/qtest/hd-geo-test.c +++

Re: [PATCH] hmp: Fix ordering of text

2022-09-15 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Tue, Sep 13, 2022 at 11:10:41AM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Fix the ordering of the help text so it's always after the commands > > being defined. A few had got out of order. Keep

[PATCH v3 4/5] tests/x86: Add 'q35' machine type to hotplug hd-geo-test

2022-09-15 Thread Michael Labiuk via
Add pci bridge setting to test hotplug. Duplicate tests for plugging scsi and virtio devices for q35 machine type. Signed-off-by: Michael Labiuk --- tests/qtest/hd-geo-test.c | 148 ++ 1 file changed, 148 insertions(+) diff --git a/tests/qtest/hd-geo-test.c

[PATCH v3 3/5] tests/x86: Add 'q35' machine type to drive_del-test

2022-09-15 Thread Michael Labiuk via
Configure pci bridge setting Also run tests on 'q35' machine type. Signed-off-by: Michael Labiuk --- tests/qtest/drive_del-test.c | 111 +++ 1 file changed, 111 insertions(+) diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c index

Re: [PATCH V4 1/3] hw/arm, loongarch: Move load_image_to_fw_cfg() to common location

2022-09-15 Thread gaosong
在 2022/9/15 下午7:59, Sunil V L 写道: Hi, Could maintainers of hw/arm and hw/loongarch to take a look at this? I have addressed Peter's earlier comment. Thanks Sunil On Thu, Sep 08, 2022 at 11:17:52AM +0200, Alistair Francis wrote: On Tue, Sep 6, 2022 at 11:38 AM Sunil V L wrote:

Re: [PATCH V4 1/3] hw/arm, loongarch: Move load_image_to_fw_cfg() to common location

2022-09-15 Thread Sunil V L
Hi, Could maintainers of hw/arm and hw/loongarch to take a look at this? I have addressed Peter's earlier comment. Thanks Sunil On Thu, Sep 08, 2022 at 11:17:52AM +0200, Alistair Francis wrote: > On Tue, Sep 6, 2022 at 11:38 AM Sunil V L wrote: > > > > load_image_to_fw_cfg() is duplicated by

Re: [PATCH] hmp: Fix ordering of text

2022-09-15 Thread Daniel P . Berrangé
On Tue, Sep 13, 2022 at 11:10:41AM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Fix the ordering of the help text so it's always after the commands > being defined. A few had got out of order. Keep 'info' at the end. > > Signed-off-by: Dr. David Alan Gilbert

Re: [PATCH] bugfix:migrate with block-dirty-bitmap (disk size is big enough) can't be finished

2022-09-15 Thread Vladimir Sementsov-Ogievskiy
Post-copy migration of dirty-bitmaps doesn't mean post-copy migration of RAM. To turn on post-copy migration of RAM, you should enable postcopy-ram capability. If you don't enable it, RAM is migrated in pre-copy (i.e. before starting VM on target). migrate-start-postcopy command doesn't

Re: [PATCH v2 3/6] vhost-net: vhost-user: update vhost_net_virtqueue_reset()

2022-09-15 Thread Xuan Zhuo
On Thu, 15 Sep 2022 10:12:11 +0800, Jason Wang wrote: > On Wed, Sep 14, 2022 at 2:21 PM Xuan Zhuo wrote: > > > > On Wed, 14 Sep 2022 11:13:29 +0800, Jason Wang wrote: > > > > > > 在 2022/9/12 11:10, Kangjie Xu 写道: > > > > Update vhost_net_virtqueue_reset() for vhost-user scenario. > > > > > > >

Re: [PATCH v3 1/1] monitor/hmp: print trace as option in help for log command

2022-09-15 Thread Dr. David Alan Gilbert
* Dongli Zhang (dongli.zh...@oracle.com) wrote: > The below is printed when printing help information in qemu-system-x86_64 > command line, and when CONFIG_TRACE_LOG is enabled: > > > $ qemu-system-x86_64 -d help > ... ... > trace:PATTERN enable trace events > >

Re: [PATCH v4 0/1] monitor: Support specified vCPU registers

2022-09-15 Thread Dr. David Alan Gilbert
* zhenwei pi (pizhen...@bytedance.com) wrote: > v3 -> v4: > - Tweake a few document and output '\n' prefix. > > v2 -> v3: > - Add more document in help info. > - Use 'qemu_get_cpu()' to simplify code. > > v1 -> v2: > - Typo fix in commit message. > - Suggested by Darren, use '[-a|vcpu]'

Re: [PATCH v2] tcg/ppc: Optimize 26-bit jumps

2022-09-15 Thread Richard Henderson
On 9/14/22 19:41, Leandro Lupori wrote: PowerPC64 processors handle direct branches better than indirect ones, resulting in less stalled cycles and branch misses. However, PPC's tb_target_set_jmp_target() was only using direct branches for 16-bit jumps, while PowerPC64's unconditional branch

[PATCH v6 2/2] i386: Add notify VM exit support

2022-09-15 Thread Chenyi Qiang
There are cases that malicious virtual machine can cause CPU stuck (due to event windows don't open up), e.g., infinite loop in microcode when nested #AC (CVE-2015-5307). No event window means no event (NMI, SMI and IRQ) can be delivered. It leads the CPU to be unavailable to host or other VMs.

  1   2   >