Re: [PATCH v3 2/2] vhost-user: fix lost reconnect again

2024-05-14 Thread Li Feng
> 2024年5月14日 21:58,Raphael Norwitz 写道: > > Code looks good. Just a question on the error case you're trying to fix. > > On Tue, May 14, 2024 at 2:12 AM Li Feng wrote: >> >> When the vhost-user is reconnecting to the backend, and if the vhost-user >> fails >> at the get_features in

Re: [PATCH v3 1/2] Revert "vhost-user: fix lost reconnect"

2024-05-14 Thread Li Feng
> 2024年5月14日 21:58,Raphael Norwitz 写道: > > The code for these two patches looks fine. Just some questions on the > failure case you're trying to fix. > > > On Tue, May 14, 2024 at 2:12 AM Li Feng wrote: >> >> This reverts commit f02a4b8e6431598612466f76aac64ab492849abf. >> >> Since the

RE: [PATCH v3 07/16] aspeed/smc: fix dma moving incorrect data length issue

2024-05-14 Thread Jamin Lin
Hi Cedric, Sorry reply you late. > On 4/30/24 10:51, Jamin Lin wrote: > > Hi Cedric, > >> On 4/19/24 15:41, Cédric Le Goater wrote: > >>> On 4/16/24 11:18, Jamin Lin wrote: > DMA length is from 1 byte to 32MB for AST2600 and AST10x0 and DMA > length is from 4 bytes to 32MB for AST2500.

[RFC PATCH v2] target/loongarch/kvm: Add pmu support

2024-05-14 Thread Song Gao
This patch adds PMU support, We just sets some cpucfg6 default value to PMU config on kvm mode, and then check the PMU config with kvm ioctl KVM_GET_DEVICE_ATTR. e.g '... -cpu max,pmu=on' (enable PMU)' '... -cpu max,pmu=off' (disable PMU)' Signed-off-by: Song Gao --- v2: - Drop the

[PATCH 08/20] qapi/parser: differentiate intro and outro paragraphs

2024-05-14 Thread John Snow
Add a semantic tag to paragraphs that appear *before* tagged sections/members/features and those that appear after. This will control how they are inlined when doc sections are merged and flattened. Signed-off-by: John Snow --- scripts/qapi/parser.py | 22 +- 1 file changed,

[PATCH 11/20] qapi/schema: add doc_visible property to QAPISchemaDefinition

2024-05-14 Thread John Snow
The intent here is to mark only certain definitions as visible in the end-user docs. All commands and events are inherently visible. Everything else is visible only if it is a member (or a branch member) of a type that is visible, or if it is named as a return type for a command. Notably, this

[PATCH 18/20] qapi: ensure all errors sections are uniformly typset

2024-05-14 Thread John Snow
Transactions have the only instance of an Errors section that isn't a rST list; turn it into one. Signed-off-by: John Snow --- qapi/transaction.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/transaction.json b/qapi/transaction.json index 5749c133d4a..07afc269d54

[PATCH 09/20] qapi/parser: add undocumented stub members to all_sections

2024-05-14 Thread John Snow
This helps simplify the doc generator if it doesn't have to check for undocumented members. Signed-off-by: John Snow --- scripts/qapi/parser.py | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index

[PATCH 05/20] qapi/parser: adjust info location for doc body section

2024-05-14 Thread John Snow
Instead of using the info object for the doc block as a whole, update the info pointer for each call to ensure_untagged_section when the existing section is otherwise empty. This way, Sphinx error information will match precisely to where the text actually starts. Signed-off-by: John Snow ---

[PATCH 19/20] qapi: convert "Note" sections to plain rST

2024-05-14 Thread John Snow
We do not need a dedicated section for notes. By eliminating a specially parsed section, these notes can be treated as normal rST paragraphs in the new QMP reference manual, and can be placed and styled much more flexibly. Update the QAPI parser to now prohibit special "Note" sections while

[PATCH 16/20] qapi: rewrite StatsFilter comment

2024-05-14 Thread John Snow
Rewrite the StatsFilter intro paragraph to be more meaningful to end-users when it is inlined in generated documentation. Signed-off-by: John Snow --- qapi/stats.json | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/qapi/stats.json b/qapi/stats.json index

[PATCH 06/20] qapi/parser: fix comment parsing immediately following a doc block

2024-05-14 Thread John Snow
If a comment immediately follows a doc block, the parser doesn't ignore that token appropriately. Fix that. Signed-off-by: John Snow --- scripts/qapi/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index

[PATCH 07/20] qapi/parser: add semantic 'kind' parameter to QAPIDoc.Section

2024-05-14 Thread John Snow
When iterating all_sections, this is helpful to be able to distinguish "members" from "features"; the only other way to do so is to cross-reference these sections against QAPIDoc.args or QAPIDoc.features, but if the desired end goal for QAPIDoc is to remove everything except all_sections, we need

[PATCH 01/20] [DO-NOT-MERGE]: Add some ad-hoc linting helpers.

2024-05-14 Thread John Snow
These aren't ready for upstream inclusion, because they do not properly manage version dependencies, execution environment and so on. These are just the tools I use in my Own Special Environment :tm: for testing and debugging. They've been tested only on Fedora 38 for right now, which means:

[PATCH 04/20] qapi/parser: preserve indentation in QAPIDoc sections

2024-05-14 Thread John Snow
Prior to this patch, a section like this: @name: lorem ipsum dolor sit amet consectetur adipiscing elit would be parsed as: "lorem ipsum\ndolor sit amet\n consectetur adipiscing elit" We want to preserve the indentation for even the first body line so that the entire block can be

[PATCH 02/20] qapi: linter fixups

2024-05-14 Thread John Snow
Fix minor irritants to pylint/flake8 et al. (Yes, these need to be guarded by the Python tests. That's a work in progress, a series that's quite likely to follow once I finish this Sphinx project. Please pardon the temporary irritation.) Signed-off-by: John Snow --- scripts/qapi/introspect.py

[PATCH 20/20] qapi: convert "Example" sections to rST

2024-05-14 Thread John Snow
Eliminate the "Example" sections in QAPI doc blocks, converting them into QMP example code blocks. This is generally done by converting "Example:" or "Examples:" lines into ".. code-block:: QMP" lines. This patch does also allow for the use of the rST syntax "Example::" by exempting double-colon

[PATCH 14/20] qapi: fix non-compliant JSON examples

2024-05-14 Thread John Snow
If we parse all examples as QMP, we need them to conform to a standard so that they render correctly. Once the QMP lexer is active for examples, these will produce warning messages and fail the build. The QMP lexer still supports elisions, but they must be represented as the value "...", so two

[PATCH 15/20] qapi: remove developer factoring comments from QAPI doc blocks

2024-05-14 Thread John Snow
This is part of a project to overhaul the QMP reference manual. One goal of this overhaul is to "inline" inherited argument sections into command reference sections. A consequence of this design decision is that inherited doc block sections need to be merged with the inheritor's sections. When

[PATCH 17/20] qapi: rewrite BlockExportOptions doc block

2024-05-14 Thread John Snow
Rephrase this paragraph so that it can apply to any commands that inherit from this object. Signed-off-by: John Snow --- qapi/block-export.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qapi/block-export.json b/qapi/block-export.json index

[PATCH 03/20] docs/qapidoc: delint a tiny portion of the module

2024-05-14 Thread John Snow
In the coming patches, it's helpful to have a linting baseline. However, there's no need to shuffle around the deck chairs too much, because most of this code will be removed once the new qapidoc generator (the "transmogrifier") is in place. To ease my pain: just turn off the black auto-formatter

[PATCH 00/20] qapi: new sphinx qapi domain pre-requisites

2024-05-14 Thread John Snow
Howdy - this patch series is the first batch of patches meant to prepare the QAPI documentation for a new Sphinx module that adds cross-references, an index, improved inlining, elision of types unseen on the wire, and other goodies. This series addresses just existing code and documentation that

[PATCH 13/20] docs/qapidoc: fix nested parsing under untagged sections

2024-05-14 Thread John Snow
Sphinx does not like sections without titles, because it wants to convert every section into a reference. When there is no title, it struggles to do this and transforms the tree inproperly. Depending on the rST used, this may result in an assertion error deep in the docutils HTMLWriter. When

[PATCH 10/20] qapi/schema: add __iter__ method to QAPISchemaVariants

2024-05-14 Thread John Snow
This just makes it easier to do something like: for var in variants: ... Instead of the more cumbersome and repetitive: for var in variants.variants: ... Especially in conjunction with entities that aren't guaranteed to have variants. Compare: for var in variants.variants if variants

[PATCH 12/20] qapi/source: allow multi-line QAPISourceInfo advancing

2024-05-14 Thread John Snow
This is for the sake of the new rST generator (the "transmogrifier") so we can advance multiple lines on occasion while keeping the generated<-->source mappings accurate. next_line now simply takes an optional n parameter which chooses the number of lines to advance. Signed-off-by: John Snow

Re: [PATCH v2 41/45] target/hppa: Implement CF_PCREL

2024-05-14 Thread Helge Deller
* Richard Henderson : > Now that the groundwork has been laid, enabling CF_PCREL within the > translator proper is a simple matter of updating copy_iaoq_entry > and install_iaq_entries. > > We also need to modify the unwind info, since we no longer have > absolute addresses to install. > > As

Re: [PATCH v2 40/45] target/hppa: Adjust priv for B,GATE at runtime

2024-05-14 Thread Helge Deller
* Richard Henderson : > Do not compile in the priv change based on the first > translation; look up the PTE at execution time. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 39/45] target/hppa: Drop tlb_entry return from hppa_get_physical_address

2024-05-14 Thread Helge Deller
* Richard Henderson : > The return-by-reference is never used. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 38/45] target/hppa: Implement PSW_X

2024-05-14 Thread Helge Deller
* Richard Henderson : > Use PAGE_WRITE_INV to temporarily enable write permission > on for a given page, driven by PSW_X being set. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 37/45] target/hppa: Implement PSW_B

2024-05-14 Thread Helge Deller
* Richard Henderson : > PSW_B causes B,GATE to trap as an illegal instruction, removing > the sequential execution test that was merely an approximation. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 36/45] target/hppa: Manage PSW_X and PSW_B in translator

2024-05-14 Thread Helge Deller
* Richard Henderson : > PSW_X is cleared after every instruction, and only set by RFI. > PSW_B is cleared after every non-branch, or branch not taken, > and only set by taken branches. We can clear both bits with a > single store, at most once per TB. Taken branches set PSW_B, > at most once per

Re: [PATCH v2 35/45] target/hppa: Split PSW X and B into their own field

2024-05-14 Thread Helge Deller
* Richard Henderson : > Generally, both of these bits are cleared at the end of each > instruction. By separating these, we will be able to clear > both with a single insn, instead of 2 or 3. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 34/45] target/hppa: Improve hppa_cpu_dump_state

2024-05-14 Thread Helge Deller
* Richard Henderson : > Print both raw IAQ_Front and IAQ_Back as well as the GVAs. > Print control registers in system mode. > Print floating point register if CPU_DUMP_FPU. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 33/45] target/hppa: Do not mask in copy_iaoq_entry

2024-05-14 Thread Helge Deller
* Richard Henderson : > As with loads and stores, code offsets are kept intact until the > full gva is formed. In qemu, this is in cpu_get_tb_cpu_state. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 32/45] target/hppa: Store full iaoq_f and page offset of iaoq_b in TB

2024-05-14 Thread Helge Deller
* Richard Henderson : > In preparation for CF_PCREL. store the iaoq_f in 3 parts: high > bits in cs_base, middle bits in pc, and low bits in priv. > For iaoq_b, set a bit for either of space or page differing, > else the page offset. > > Install iaq entries before goto_tb. The change to not

Re: [PATCH v2 03/15] hw/riscv: add RISC-V IOMMU base emulation

2024-05-14 Thread Daniel Henrique Barboza
Hi Jason, On 5/1/24 08:57, Jason Chien wrote: Daniel Henrique Barboza 於 2024/3/8 上午 12:03 寫道: From: Tomasz Jeznach The RISC-V IOMMU specification is now ratified as-per the RISC-V international process. The latest frozen specifcation can be found at:

Re: [PATCH v2 31/45] linux-user/hppa: Force all code addresses to PRIV_USER

2024-05-14 Thread Helge Deller
* Richard Henderson : > The kernel does this along the return path to user mode. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller > linux-user/hppa/target_cpu.h | 4 ++-- > target/hppa/cpu.h| 3 +++ > linux-user/elfload.c | 4 ++-- >

Re: [PATCH v2 30/45] target/hppa: Use delay_excp for conditional trap on overflow

2024-05-14 Thread Helge Deller
* Richard Henderson : > Signed-off-by: Richard Henderson > --- > target/hppa/helper.h | 1 - > target/hppa/int_helper.c | 2 +- > target/hppa/op_helper.c | 7 --- > target/hppa/translate.c | 21 + > 4 files changed, 14 insertions(+), 17 deletions(-) Reviewed-by:

Re: [PATCH v2 29/45] target/hppa: Use delay_excp for conditional traps

2024-05-14 Thread Helge Deller
* Richard Henderson : > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller > target/hppa/helper.h | 1 - > target/hppa/int_helper.c | 2 +- > target/hppa/op_helper.c | 7 --- > target/hppa/translate.c | 41 ++-- > 4 files changed, 32

Re: [PATCH v2 28/45] target/hppa: Introduce DisasDelayException

2024-05-14 Thread Helge Deller
* Richard Henderson : > Allow an exception to be emitted at the end of the TranslationBlock, > leaving only the conditional branch inline. Use it for simple > exception instructions like break, which happen to be nullified. > > Signed-off-by: Richard Henderson > --- > target/hppa/translate.c |

Re: [PATCH v2 27/45] target/hppa: Remove cond_free

2024-05-14 Thread Helge Deller
* Richard Henderson : > Now that we do not need to free tcg temporaries, the only > thing cond_free does is reset the condition to never. > Instead, simply write a new condition over the old, which > may be simply cond_make_f() for the never condition. > > The do_*_cond functions do the right

Re: [PATCH v2 26/45] target/hppa: Use TCG_COND_TST* in trans_ftest

2024-05-14 Thread Helge Deller
* Richard Henderson : > Signed-off-by: Richard Henderson > --- > target/hppa/translate.c | 22 ++ > 1 file changed, 6 insertions(+), 16 deletions(-) Reviewed-by: Helge Deller

Re: [PATCH v2 25/45] target/hppa: Use registerfields.h for FPSR

2024-05-14 Thread Helge Deller
* Richard Henderson : > Define all of the context dependent field definitions. > Use FIELD_EX32 and FIELD_DP32 with named fields instead > of extract32 and deposit32 with raw constants. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller > --- > target/hppa/cpu.h| 25

Re: [PATCH 4/9] migration: Add direct-io parameter

2024-05-14 Thread Fabiano Rosas
Markus Armbruster writes: > Peter Xu writes: > >> On Fri, May 03, 2024 at 05:49:32PM -0300, Fabiano Rosas wrote: >>> Peter Xu writes: >>> >>> > On Fri, Apr 26, 2024 at 11:20:37AM -0300, Fabiano Rosas wrote: >>> >> Add the direct-io migration parameter that tells the migration code to >>> >>

Re: [PATCH 02/11] scripts/update-linux-header.sh: be more src tree friendly

2024-05-14 Thread Pierrick Bouvier
On 5/14/24 10:42, Alex Bennée wrote: Running "install_headers" in the Linux source tree is fairly unfriendly as out-of-tree builds will start complaining about the kernel source being non-pristine. As we have a temporary directory for the install we should also do the build step here. So now we

Re: [PATCH 01/11] tests/tcg: don't append QEMU_OPTS for armv6m-undef test

2024-05-14 Thread Pierrick Bouvier
On 5/14/24 10:42, Alex Bennée wrote: We don't want to build on the default machine setup here but define a custom one for the microbit. Signed-off-by: Alex Bennée --- tests/tcg/arm/Makefile.softmmu-target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 01/11] tests/tcg: don't append QEMU_OPTS for armv6m-undef test

2024-05-14 Thread Alex Bennée
We don't want to build on the default machine setup here but define a custom one for the microbit. Signed-off-by: Alex Bennée --- tests/tcg/arm/Makefile.softmmu-target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tcg/arm/Makefile.softmmu-target

[PATCH 09/11] plugins: distinct types for callbacks

2024-05-14 Thread Alex Bennée
From: Pierrick Bouvier To prevent errors when writing new types of callbacks or inline operations, we split callbacks data to distinct types. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240502211522.346467-8-pierrick.bouv...@linaro.org> Signed-off-by: Alex

[PATCH 11/11] plugins: remove op from qemu_plugin_inline_cb

2024-05-14 Thread Alex Bennée
From: Pierrick Bouvier This field is not needed as the callback type already holds this information. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240502211522.346467-10-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- include/qemu/plugin.h | 1 -

[PATCH 02/11] scripts/update-linux-header.sh: be more src tree friendly

2024-05-14 Thread Alex Bennée
Running "install_headers" in the Linux source tree is fairly unfriendly as out-of-tree builds will start complaining about the kernel source being non-pristine. As we have a temporary directory for the install we should also do the build step here. So now we have: $tmpdir/ $blddir/

[PATCH 05/11] plugins: add new inline op STORE_U64

2024-05-14 Thread Alex Bennée
From: Pierrick Bouvier This new operation can store an immediate u64 value to a given scoreboard. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240502211522.346467-4-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- include/qemu/plugin.h | 1 +

[PATCH 00/11] maintainer updates (plugins, testing) pre-PR

2024-05-14 Thread Alex Bennée
This is mostly plugin related stuff which is all ready to go however I have a few miscellaneous testing updates which would appreciate the review. Thanks. Alex Bennée (2): tests/tcg: don't append QEMU_OPTS for armv6m-undef test scripts/update-linux-header.sh: be more src tree friendly

[PATCH 04/11] plugins: extract generate ptr for qemu_plugin_u64

2024-05-14 Thread Alex Bennée
From: Pierrick Bouvier Plugin operations can access a scoreboard. This function factorizes code generation for accessing entry associated to a given vcpu. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240502211522.346467-3-pierrick.bouv...@linaro.org>

[PATCH 08/11] tests/plugin/inline: add test for conditional callback

2024-05-14 Thread Alex Bennée
From: Pierrick Bouvier Count number of tb and insn executed using a conditional callback. We ensure the callback has been called expected number of time (per vcpu). Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240502211522.346467-7-pierrick.bouv...@linaro.org>

[PATCH 03/11] plugins: prepare introduction of new inline ops

2024-05-14 Thread Alex Bennée
From: Pierrick Bouvier Until now, only add_u64 was available, and all functions assumed this or were named uniquely. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240502211522.346467-2-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée ---

[PATCH 06/11] tests/plugin/inline: add test for STORE_U64 inline op

2024-05-14 Thread Alex Bennée
From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240502211522.346467-5-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- tests/plugin/inline.c | 41 + 1 file changed, 37 insertions(+), 4

[PATCH 07/11] plugins: conditional callbacks

2024-05-14 Thread Alex Bennée
From: Pierrick Bouvier Extend plugins API to support callback called with a given criteria (evaluated inline). Added functions: - qemu_plugin_register_vcpu_tb_exec_cond_cb - qemu_plugin_register_vcpu_insn_exec_cond_cb They expect as parameter a condition, a qemu_plugin_u64_t (op1) and an

[PATCH 10/11] plugins: extract cpu_index generate

2024-05-14 Thread Alex Bennée
From: Pierrick Bouvier Factorizes function to access current cpu index for a given vcpu. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240502211522.346467-9-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- accel/tcg/plugin-gen.c | 24

Re: [PATCH 3/3] qerror: QERR_QGA_COMMAND_FAILED is no longer used, drop

2024-05-14 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Tue, May 14, 2024 at 1:58 PM Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > include/qapi/qmp/qerror.h | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h > index

Re: [PATCH 2/3] qga: Shorten several error messages

2024-05-14 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Tue, May 14, 2024 at 1:58 PM Markus Armbruster wrote: > Some, but not all error messages are of the form > > Guest agent command failed, error was '' > > For instance, command guest-exec can fail with an error message like > > Guest agent command

Re: [PATCH 1/3] qga-win32: Improve guest-set-user-password, guest-file-open errors

2024-05-14 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Tue, May 14, 2024 at 2:03 PM Markus Armbruster wrote: > When guest-set-user-password's argument @password can't be converted > from UTF-8 to UTF-16, we report something like > > Guest agent command failed, error was 'Invalid sequence in conversion >

Re: [PATCH 0/3] Assorted fixes for PMU

2024-05-14 Thread Atish Patra
On Tue, May 14, 2024 at 2:16 AM Peter Maydell wrote: > > On Mon, 29 Apr 2024 at 20:29, Atish Patra wrote: > > > > This series contains few miscallenous fixes related to hpmcounters > > and related code. The first patch fixes an issue with cycle/instret > > counters overcouting while the

Re: [PATCH 0/3] Assorted fixes for PMU

2024-05-14 Thread Atish Patra
On Tue, May 14, 2024 at 3:18 AM Alistair Francis wrote: > > On Tue, May 14, 2024 at 5:15 PM Atish Kumar Patra wrote: > > > > On Mon, May 13, 2024 at 11:29 PM Alistair Francis > > wrote: > > > > > > On Tue, Apr 30, 2024 at 5:29 AM Atish Patra wrote: > > > > > > > > This series contains few

Re: [PATCH v2 24/45] target/hppa: Use TCG_COND_TST* in trans_bb_imm

2024-05-14 Thread Helge Deller
* Richard Henderson : > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller > --- > target/hppa/translate.c | 12 +++- > 1 file changed, 3 insertions(+), 9 deletions(-) > > diff --git a/target/hppa/translate.c b/target/hppa/translate.c > index 47f4b23d1b..d8973a63df 100644 >

Re: [PATCH v2 23/45] target/hppa: Use TCG_COND_TST* in do_unit_addsub

2024-05-14 Thread Helge Deller
* Richard Henderson : > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 22/45] target/hppa: Use TCG_COND_TST* in do_unit_zero_cond

2024-05-14 Thread Helge Deller
* Richard Henderson : > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 21/45] target/hppa: Use TCG_COND_TST* in do_log_cond

2024-05-14 Thread Helge Deller
* Richard Henderson : > We can directly test bits of a 32-bit comparison without > zero or sign-extending an intermediate result. > We can directly test bit 0 for odd/even. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 20/45] target/hppa: Use TCG_COND_TST* in do_cond

2024-05-14 Thread Helge Deller
* Richard Henderson : > We can directly test bits of a 32-bit comparison without > zero or sign-extending an intermediate result. > We can directly test bit 0 for odd/even. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 19/45] target/hppa: Rename cond_make_* helpers

2024-05-14 Thread Helge Deller
* Richard Henderson : > Use 'v' for a variable that needs copying, 't' for a temp that > doesn't need copying, and 'i' for an immediate, and use this > naming for both arguments of the comparison. So: > >cond_make_tmp -> cond_make_tt >cond_make_0_tmp -> cond_make_ti >cond_make_0 ->

Re: [PATCH v9 0/6] Pointer Masking update for Zjpm v1.0

2024-05-14 Thread Alexey Baturo
>The cover letter says that this implements version 1.0 of the spec, this sounds like it doesn't. Yeah, sorry about the confusion. Yes, the patch is actually for v0.8 but as you've correctly mentioned v0.8 has not so much differences to v1.0. > Instead of constantly removing and re-adding the

Re: [PATCH v2 10/11] vfio/cpr: Make vfio_cpr_register_container() return bool

2024-05-14 Thread Cédric Le Goater
On 5/7/24 08:42, Zhenzhong Duan wrote: This is to follow the coding standand to return bool if 'Error **' is used to pass error. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C. --- include/hw/vfio/vfio-common.h | 2 +-

Re: [PATCH v2 11/11] backends/iommufd: Make iommufd_backend_*() return bool

2024-05-14 Thread Cédric Le Goater
On 5/7/24 08:42, Zhenzhong Duan wrote: This is to follow the coding standand to return bool if 'Error **' is used to pass error. The changed functions include: iommufd_backend_connect iommufd_backend_alloc_ioas By this chance, simplify the functions a bit by avoiding duplicate recordings,

Re: [PATCH v2 09/11] vfio/iommufd: Make iommufd_cdev_*() return bool

2024-05-14 Thread Cédric Le Goater
On 5/7/24 08:42, Zhenzhong Duan wrote: This is to follow the coding standand to return bool if 'Error **' is used to pass error. The changed functions include: iommufd_cdev_kvm_device_add iommufd_cdev_connect_and_bind iommufd_cdev_attach_ioas_hwpt iommufd_cdev_detach_ioas_hwpt

Re: [PATCH v2 08/11] vfio/container: Make vfio_get_device() return bool

2024-05-14 Thread Cédric Le Goater
On 5/7/24 08:42, Zhenzhong Duan wrote: This is to follow the coding standand to return bool if 'Error **' is used to pass error. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/container.c | 16

Re: [PATCH v2 06/11] vfio/container: Make vfio_connect_container() return bool

2024-05-14 Thread Cédric Le Goater
On 5/7/24 08:42, Zhenzhong Duan wrote: This is to follow the coding standand to return bool if 'Error **' is used to pass error. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/container.c | 18 +++--- 1

Re: [PATCH v2 07/11] vfio/container: Make vfio_set_iommu() return bool

2024-05-14 Thread Cédric Le Goater
On 5/7/24 08:42, Zhenzhong Duan wrote: This is to follow the coding standand to return bool if 'Error **' is used to pass error. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/container.c | 22 ++

Re: [PATCH v2 18/45] target/hppa: Use displacements in DisasIAQE

2024-05-14 Thread Helge Deller
* Richard Henderson : > This is a first step in enabling CF_PCREL, but for now > we regenerate the absolute address before writeback. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 17/45] target/hppa: Introduce and use DisasIAQE for branch management

2024-05-14 Thread Helge Deller
* Richard Henderson : > Wrap offset and space together in one structure, ensuring > that they're copied together as required. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

Re: [PATCH v2 02/11] vfio/pci: Use g_autofree in iommufd_cdev_get_info_iova_range()

2024-05-14 Thread Cédric Le Goater
On 5/7/24 08:42, Zhenzhong Duan wrote: Local pointer info is freed before return from iommufd_cdev_get_info_iova_range(). Use 'g_autofree' to avoid the g_free() calls. Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/iommufd.c | 4 +--- 1 file

Re: [PATCH v2 01/11] vfio/pci: Use g_autofree in vfio_realize

2024-05-14 Thread Cédric Le Goater
On 5/7/24 08:42, Zhenzhong Duan wrote: Local pointer name is allocated before vfio_attach_device() call and freed after the call. Same for tmp when calling realpath(). Use 'g_autofree' to avoid the g_free() calls. Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH v2 08/45] target/hppa: Add install_link

2024-05-14 Thread Helge Deller
On 5/14/24 16:37, Helge Deller wrote: * Richard Henderson : Add a common routine for writing the return address. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- target/hppa/translate.c | 54 +++-- 1 file changed, 31 insertions(+), 23

Re: [PATCH v2 14/45] target/hppa: Add space argument to do_ibranch

2024-05-14 Thread Helge Deller
* Richard Henderson : > This allows unification of BE, BLR, BV, BVE with a common helper. > Since we can now track space with IAQ_Next, we can now let the > TranslationBlock continue across the delay slot with BE, BVE. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller

[PATCH v6 7/9] memory: Add Error** argument to memory_get_xlat_addr()

2024-05-14 Thread Cédric Le Goater
Let the callers do the reporting. This will be useful in vfio_iommu_map_dirty_notify(). Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: David Hildenbrand Reviewed-by: Peter Xu Signed-off-by: Cédric Le Goater --- Changes in v6: - Fixed memory_get_xlat_addr documentation (Avihai)

[PATCH v6 0/9] vfio: Improve error reporting (part 2

2024-05-14 Thread Cédric Le Goater
Hello, The motivation behind these changes is to improve error reporting to the upper management layer (libvirt) with a more detailed error, this to let it decide, depending on the reported error, whether to try migration again later. It would be useful in cases where migration fails due to lack

[PATCH v6 9/9] vfio: Also trace event failures in vfio_save_complete_precopy()

2024-05-14 Thread Cédric Le Goater
vfio_save_complete_precopy() currently returns before doing the trace event. Change that. Reviewed-by: Avihai Horon Signed-off-by: Cédric Le Goater --- hw/vfio/migration.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c index

Re: CPR/liveupdate: test results using prior bug fix

2024-05-14 Thread Michael Tokarev
14.05.2024 16:54, Michael Tokarev пишет: On 5/14/24 16:39, Michael Galaxy wrote: Steve, OK, so it does not look like this bugfix you wrote was included in 8.2.4 (which was released yesterday). Unfortunately, that means that anyone using CPR in that release will still (eventually) encounter

[PATCH v6 4/9] vfio/migration: Add an Error** argument to vfio_migration_set_state()

2024-05-14 Thread Cédric Le Goater
Add an Error** argument to vfio_migration_set_state() and adjust callers, including vfio_save_setup(). The error will be propagated up to qemu_savevm_state_setup() where the save_setup() handler is executed. Modify vfio_vmstate_change_prepare() and vfio_vmstate_change() to store a reported error

[PATCH v6 2/9] vfio: Add Error** argument to vfio_devices_dma_logging_start()

2024-05-14 Thread Cédric Le Goater
This allows to update the Error argument of the VFIO log_global_start() handler. Errors for container based logging will also be propagated to qemu_savevm_state_setup() when the ram save_setup() handler is executed. The vfio_set_migration_error() call becomes redundant in

[PATCH v6 8/9] vfio: Add Error** argument to .get_dirty_bitmap() handler

2024-05-14 Thread Cédric Le Goater
Let the callers do the error reporting. Add documentation while at it. Signed-off-by: Cédric Le Goater --- Changes in v6: - Fixed the line wrapping (Avihai) - Fixed query_dirty_bitmap documentation (Avihai) Changes in v5: - Replaced error_setg() by error_setg_errno() in

[PATCH v6 6/9] vfio: Reverse test on vfio_get_xlat_addr()

2024-05-14 Thread Cédric Le Goater
It will simplify the changes coming after. Reviewed-by: Avihai Horon Signed-off-by: Cédric Le Goater --- Changes in v6: - Modified title (Avihai) - vfio_iommu_map_dirty_notify() : Modified goto label (Avihai) hw/vfio/common.c | 22 +- 1 file changed, 13

[PATCH v6 3/9] migration: Extend migration_file_set_error() with Error* argument

2024-05-14 Thread Cédric Le Goater
Use it to update the current error of the migration stream if available and if not, simply print out the error. Next changes will update with an error to report. Reviewed-by: Avihai Horon Acked-by: Fabiano Rosas Signed-off-by: Cédric Le Goater --- Changes in v6: - Commit log improvements

[PATCH v6 1/9] vfio: Add Error** argument to .set_dirty_page_tracking() handler

2024-05-14 Thread Cédric Le Goater
We will use the Error object to improve error reporting in the .log_global*() handlers of VFIO. Add documentation while at it. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Avihai Horon Signed-off-by: Cédric Le Goater --- Changes in v5: - Fixed typo in set_dirty_page_tracking

[PATCH v6 5/9] vfio/migration: Add Error** argument to .vfio_save_config() handler

2024-05-14 Thread Cédric Le Goater
Use vmstate_save_state_with_err() to improve error reporting in the callers and store a reported error under the migration stream. Add documentation while at it. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Cédric Le Goater --- Changes in v6: - Modified title (Avihai) -

Re: [PATCH v2 13/45] target/hppa: Add space arguments to install_iaq_entries

2024-05-14 Thread Helge Deller
* Richard Henderson : > Move space assighments to a central location. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller > --- > target/hppa/translate.c | 58 +++-- > 1 file changed, 27 insertions(+), 31 deletions(-) > > diff --git

Re: [PATCH v2 12/45] target/hppa: Add IASQ entries to DisasContext

2024-05-14 Thread Helge Deller
* Richard Henderson : > Add variable to track space changes to IAQ. So far, no such changes > are introduced, but the new checks vs ctx->iasq_b may eliminate an > unnecessary copy to cpu_iasq_f with e.g. BLR. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller > --- >

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-05-14 Thread Yu Zhang
Hello Peter and all, I did a comparison of the VM live-migration speeds between RDMA and TCP/IP on our servers and plotted the results to get an initial impression. Unfortunately, the Ethernet NICs are not the recent ones, therefore, it may not make much sense. I can do it on servers with more

Re: [PATCH v2 11/45] target/hppa: Simplify TB end

2024-05-14 Thread Helge Deller
* Richard Henderson : > Minimize the amount of code in hppa_tr_translate_insn advancing the > insn queue for the next insn. Move the goto_tb path to hppa_tr_tb_stop. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller > --- > target/hppa/translate.c | 109

Re: [PATCH v2 10/45] target/hppa: Skip nullified insns in unconditional dbranch path

2024-05-14 Thread Helge Deller
* Richard Henderson : > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller > --- > target/hppa/translate.c | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/target/hppa/translate.c b/target/hppa/translate.c > index a9196050dc..ca979f4137 100644 > ---

Re: [PATCH v2 09/45] target/hppa: Delay computation of IAQ_Next

2024-05-14 Thread Helge Deller
* Richard Henderson : > We no longer have to allocate a temp and perform an > addition before translation of the rest of the insn. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller > --- > target/hppa/translate.c | 26 ++ > 1 file changed, 10

Re: [PATCH v2 08/45] target/hppa: Add install_link

2024-05-14 Thread Helge Deller
* Richard Henderson : > Add a common routine for writing the return address. > > Signed-off-by: Richard Henderson Reviewed-by: Helge Deller > --- > target/hppa/translate.c | 54 +++-- > 1 file changed, 31 insertions(+), 23 deletions(-) > > diff --git

  1   2   3   >