Re: [RESEND PATCH 1/3] hw/intc: openpic: Correct the reset value of IPIDR for FSL chipset

2021-09-22 Thread Bin Meng
On Tue, Sep 21, 2021 at 4:13 PM Philippe Mathieu-Daudé wrote: > > On 9/21/21 05:25, David Gibson wrote: > > On Sat, Sep 18, 2021 at 11:26:51AM +0800, Bin Meng wrote: > >> The reset value of IPIDR should be zero for Freescale chipset, per > >> the following 2 manuals I checked: > >> > >> - P2020RM

Re: [PATCH] hw/char/mchp_pfsoc_mmuart: QOM'ify PolarFire MMUART

2021-09-22 Thread Bin Meng
Hi Philippe, On Sun, Sep 19, 2021 at 2:07 AM Philippe Mathieu-Daudé wrote: > > - Embed SerialMM in MchpPfSoCMMUartState and QOM-initialize it > - Alias SERIAL_MM 'chardev' property on MCHP_PFSOC_UART > - Forward SerialMM sysbus IRQ in mchp_pfsoc_mmuart_realize() > - Keep

Re: [PATCH v6 00/21] Add LoongArch linux-user emulation support

2021-09-22 Thread WANG Xuerui
Hi Song, On 9/23/21 11:09, gaosong wrote: > > - How would you provide the necessary firmware bits? Ideally that would > be some open-source reference implementation so people would be able to > collaborate on that front, and to maybe customize for specialized needs > (e.g. ultra-dense cloud

Re: [PATCH v6 00/21] Add LoongArch linux-user emulation support

2021-09-22 Thread gaosong
Hi, Xuerui. -Original Messages- From: "WANG Xuerui" Sent Time: 2021-09-22 17:49:56 (Wednesday) To: "Song Gao" , "Richard Henderson" , qemu-devel@nongnu.org Cc: peter.mayd...@linaro.org, th...@redhat.com, phi...@redhat.com, yangxiaoj...@loongson.cn, laur...@vivier.eu,

Re: [PATCH v2 0/1] fixes in spapr_numa_FORM2_write_rtas_tables()

2021-09-22 Thread David Gibson
On Wed, Sep 22, 2021 at 09:28:51AM -0300, Daniel Henrique Barboza wrote: > Hi, > > This new version contains suggestions from Greg, Phillipe and Zoltan > that were made in the v1. Applied to ppc-for-6.2, thanks. > > Changes from v1: > - keep the heap allocation of both arrays; > - use

[PATCH v3 4/7] docs/devel: create TCG subsection

2021-09-22 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell --- docs/devel/index.rst | 6 +- docs/devel/section-tcg.rst | 12 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 docs/devel/section-tcg.rst diff --git

[PATCH v3 0/7] docs/devel: Organize devel manual into further subsections

2021-09-22 Thread John Snow
It's a bit cluttered. On my way to converting the QAPI/QMP documents to ReST I thought it could do with another organizational level to help make sense of things a bit more quickly. V3: - Rebase/resend. V2: - Move decodetree into TCG subsection - Rebase, add QOM/QAPI/QMP docs into API

[PATCH v3 7/7] docs/devel: create "Miscellaneous Topics" subsection

2021-09-22 Thread John Snow
The hallmark of any truly great taxonomical reorganization: the bin of leftover bits and pieces that didn't neatly fit elsewhere. Signed-off-by: John Snow Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell --- docs/devel/index.rst| 7 +-- docs/devel/section-misc.rst | 13

[PATCH v3 1/7] docs/devel: create "Community & Governance" subsection

2021-09-22 Thread John Snow
Plonk the Code of Conduct and Conflict Resolution Policy guides into a new "Community & Governance" subsection. Signed-off-by: John Snow Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell --- docs/devel/index.rst| 3 +-- docs/devel/section-community-governance.rst | 9

[PATCH v2 14/17] iotests: Conditionally silence certain AQMP errors

2021-09-22 Thread John Snow
AQMP likes to be very chatty about errors it encounters. In general, this is good because it allows us to get good diagnostic information for otherwise complex async failures. For example, during a failed QMP connection attempt, we might see: +ERROR:qemu.aqmp.qmp_client.qemub-2536319:Negotiation

[PATCH v3 6/7] docs/devel: create "QEMU API" section

2021-09-22 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Peter Maydell --- docs/devel/index.rst | 4 +--- docs/devel/section-api.rst | 10 ++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 docs/devel/section-api.rst diff --git a/docs/devel/index.rst b/docs/devel/index.rst

[PATCH v3 3/7] docs/devel: create "Testing & Debugging" subsection

2021-09-22 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell --- docs/devel/index.rst | 6 +- docs/devel/section-testing-debugging.rst | 12 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644

[PATCH v2 10/17] python, iotests: remove socket_scm_helper

2021-09-22 Thread John Snow
It's not used anymore, now. Signed-off-by: John Snow Reviewed-by: Hanna Reitz --- tests/qemu-iotests/socket_scm_helper.c | 136 - python/qemu/machine/machine.py | 3 - python/qemu/machine/qtest.py | 2 - tests/Makefile.include | 1

[PATCH v3 5/7] docs/devel: create "Subsystem APIs" subsection

2021-09-22 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell --- docs/devel/index.rst | 10 +- docs/devel/section-subsystems.rst | 16 2 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 docs/devel/section-subsystems.rst

[PATCH v3 2/7] docs/devel: create "Developing QEMU" subsection

2021-09-22 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell --- docs/devel/index.rst | 6 +- docs/devel/section-development.rst | 12 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 docs/devel/section-development.rst diff

[PATCH v2 15/17] python/aqmp: Create sync QMP wrapper for iotests

2021-09-22 Thread John Snow
This is a wrapper around the async QMPClient that mimics the old, synchronous QEMUMonitorProtocol class. It is designed to be interchangeable with the old implementation. It does not, however, attempt to mimic Exception compatibility. Signed-off-by: John Snow Acked-by: Hanna Reitz ---

[PATCH v2 08/17] python/qmp: clear events on get_events() call

2021-09-22 Thread John Snow
All callers in the tree *already* clear the events after a call to get_events(). Do it automatically instead and update callsites to remove the manual clear call. These semantics are quite a bit easier to emulate with async QMP, and nobody appears to be abusing some emergent properties of what

[PATCH v2 17/17] python, iotests: replace qmp with aqmp

2021-09-22 Thread John Snow
Swap out the synchronous QEMUMonitorProtocol from qemu.qmp with the sync wrapper from qemu.aqmp instead. Add an escape hatch in the form of the environment variable QEMU_PYTHON_LEGACY_QMP which allows you to cajole QEMUMachine into using the old implementatin, proving that both implementations

[PATCH v2 16/17] python/aqmp: Remove scary message

2021-09-22 Thread John Snow
The scary message interferes with the iotests output. Coincidentally, if iotests works by removing this, then it's good evidence that we don't really need to scare people away from using it. Signed-off-by: John Snow --- python/qemu/aqmp/__init__.py | 12 1 file changed, 12

[PATCH v2 12/17] python/machine: Handle QMP errors on close more meticulously

2021-09-22 Thread John Snow
To use the AQMP backend, Machine just needs to be a little more diligent about what happens when closing a QMP connection. The operation is no longer a freebie in the async world; it may return errors encountered in the async bottom half on incoming message receipt, etc. (AQMP's disconnect,

[PATCH v2 07/17] python/aqmp: Disable logging messages by default

2021-09-22 Thread John Snow
AQMP is a library, and ideally it should not print error diagnostics unless a user opts into seeing them. By default, Python will print all WARNING, ERROR or CRITICAL messages to screen if no logging configuration has been created by a client application. In AQMP's case, ERROR logging statements

[PATCH v2 13/17] iotests: Accommodate async QMP Exception classes

2021-09-22 Thread John Snow
(But continue to support the old ones for now, too.) There are very few cases of any user of QEMUMachine or a subclass thereof relying on a QMP Exception type. If you'd like to check for yourself, you want to grep for all of the derivatives of QMPError, excluding 'AQMPError' and its derivatives.

[PATCH v2 11/17] python/machine: remove has_quit argument

2021-09-22 Thread John Snow
If we spy on the QMP commands instead, we don't need callers to remember to pass it. Seems like a fair trade-off. The one slightly weird bit is overloading this instance variable for wait(), where we use it to mean "don't issue the qmp 'quit' command". This means that wait() will "fail" if the

[PATCH v2 09/17] python/qmp: add send_fd_scm directly to QEMUMonitorProtocol

2021-09-22 Thread John Snow
It turns out you can do this directly from Python ... and because of this, you don't need to worry about setting the inheritability of the fds or spawning another process. Doing this is helpful because it allows QEMUMonitorProtocol to keep its file descriptor and socket object as private

[PATCH v2 05/17] python/aqmp: Add dict conversion method to Greeting object

2021-09-22 Thread John Snow
The iotests interface expects to return the greeting as a dict; AQMP offers it as a rich object. Signed-off-by: John Snow --- python/qemu/aqmp/models.py | 13 + 1 file changed, 13 insertions(+) diff --git a/python/qemu/aqmp/models.py b/python/qemu/aqmp/models.py index

[PATCH v2 04/17] python/aqmp: add send_fd_scm

2021-09-22 Thread John Snow
The single space is indeed required to successfully transmit the file descriptor to QEMU. Python 3.11 removes support for calling sendmsg directly from a transport's socket. There is no other interface for doing this, our use case is, I suspect, "quite unique". As far as I can tell, this is safe

[PATCH v2 02/17] python/aqmp: add .empty() method to EventListener

2021-09-22 Thread John Snow
Synchronous clients may want to know if they're about to block waiting for an event or not. A method such as this is necessary to implement a compatible interface for the old QEMUMonitorProtocol using the new async internals. Signed-off-by: John Snow Reviewed-by: Hanna Reitz ---

[PATCH v2 06/17] python/aqmp: Reduce severity of EOFError-caused loop terminations

2021-09-22 Thread John Snow
When we encounter an EOFError, we don't know if it's an "error" in the perspective of the user of the library yet. Therefore, we should not log it as an error. Reduce the severity of this logging message to "INFO" to indicate that it's something that we expect to occur during the normal operation

[PATCH v2 00/17] Switch iotests to using Async QMP

2021-09-22 Thread John Snow
Based-on: <20210915162955.333025-1-js...@redhat.com> [PATCH v4 00/27] python: introduce Asynchronous QMP package GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-aqmp-iotest-wrapper CI: https://gitlab.com/jsnow/qemu/-/pipelines/375637927 Hiya, This series continues where the

[PATCH v2 03/17] python/aqmp: Return cleared events from EventListener.clear()

2021-09-22 Thread John Snow
This serves two purposes: (1) It is now possible to discern whether or not clear() removed any event(s) from the queue with absolute certainty, and (2) It is now very easy to get a List of all pending events in one chunk, which is useful for the sync bridge. Signed-off-by: John Snow

[PATCH v2 01/17] python/aqmp: add greeting property to QMPClient

2021-09-22 Thread John Snow
Expose the greeting as a read-only property of QMPClient so it can be retrieved at-will. Signed-off-by: John Snow Reviewed-by: Hanna Reitz --- python/qemu/aqmp/qmp_client.py | 5 + 1 file changed, 5 insertions(+) diff --git a/python/qemu/aqmp/qmp_client.py b/python/qemu/aqmp/qmp_client.py

[PATCH 6/6] iotests: Update for pylint 2.11.1

2021-09-22 Thread John Snow
1. Ignore the new f-strings warning, we're not interested in doing a full conversion at this time. 2. Just mute the unbalanced-tuple-unpacking warning, it's not a real error in this case and muting the dozens of callsites is just not worth it. 3. Add encodings to read_text().

[PATCH 5/6] iotests/migrate-bitmaps-test: delint

2021-09-22 Thread John Snow
Mostly uninteresting stuff. Move the test injections under a function named main() so that the variables used during that process aren't in the global scope. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Hanna Reitz --- tests/qemu-iotests/tests/migrate-bitmaps-test

[PATCH 3/6] iotests/linters: check mypy files all at once

2021-09-22 Thread John Snow
We can circumvent the '__main__' redefinition problem by passing --scripts-are-modules. Take mypy out of the loop per-filename and check everything in one go: it's quite a bit faster. Signed-off-by: John Snow Reviewed-by: Hanna Reitz --- tests/qemu-iotests/297 | 44

[PATCH 1/6] iotests: add 'qemu' package location to PYTHONPATH in testenv

2021-09-22 Thread John Snow
We can drop the sys.path hacking in various places by doing this. Additionally, by doing it in one place right up top, we can print interesting warnings in case the environment does not look correct. If we ever decide to change how the environment is crafted, all of the "help me find my python

[PATCH 4/6] iotests/mirror-top-perms: Adjust imports

2021-09-22 Thread John Snow
We need to import things from the qemu namespace; importing the namespace alone doesn't bring the submodules with it -- unless someone else (like iotests.py) imports them too. Adjust the imports. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Hanna Reitz ---

[PATCH 2/6] iotests: add warning for rogue 'qemu' packages

2021-09-22 Thread John Snow
Add a warning for when 'iotests' runs against a qemu namespace that isn't the one in the source tree. This might occur if you have (accidentally) installed the Python namespace package to your local packages. (I'm not going to say that this is because I bit myself with this, but. You can fill in

[PATCH 0/6] iotests: update environment and linting configuration

2021-09-22 Thread John Snow
GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-package-iotest-pt1 CI: https://gitlab.com/jsnow/qemu/-/pipelines/375630185 This series partially supersedes: [PATCH v3 00/16] python/iotests: Run iotest linters during Python CI' Howdy, this is good stuff we want even if we aren't yet in

[PATCH v2] Hexagon (target/hexagon) probe the stores in a packet at start of commit

2021-09-22 Thread Taylor Simpson
When a packet has 2 stores, either both commit or neither commit. At the beginning of gen_commit_packet, we check for multiple stores. If there are multiple stores, call a helper that will probe each of them before proceeding with the commit. Note that we don't call the probe helper for packets

Re: [PATCH v2 0/3] QIOChannel async_write & async_flush + MSG_ZEROCOPY + multifd

2021-09-22 Thread Leonardo Bras Soares Passos
I sent an v3 to this series, due to some errors on testing MSG_ZEROCOPY on a user with a low memory locking resource. - If there is not enough memory locking resource, fall back to sync (non-zerocopy) approach. Best regards, Leo

[PATCH v3 3/3] multifd: Send using asynchronous write on nocomp to send RAM pages.

2021-09-22 Thread Leonardo Bras
Change multifd nocomp version to use asynchronous write for RAM pages, and benefit of MSG_ZEROCOPY when it's available. The asynchronous flush happens on cleanup only, before destroying the QIOChannel. This will work fine on RAM migration because the RAM pages are not usually freed, and there

[PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush

2021-09-22 Thread Leonardo Bras
Implement the new optional callbacks io_async_write and io_async_flush on QIOChannelSocket, but enables it only when MSG_ZEROCOPY feature is available in the host kernel, and TCP sockets are used. qio_channel_socket_writev() contents were moved to a helper function __qio_channel_socket_writev()

[PATCH v3 1/3] QIOChannel: Add io_async_writev & io_async_flush callbacks

2021-09-22 Thread Leonardo Bras
Adds io_async_writev and io_async_flush as optional callback to QIOChannelClass, allowing the implementation of asynchronous writes by subclasses. How to use them: - Write data using qio_channel_async_writev(), - Wait write completion with qio_channel_async_flush(). Notes: Some asynchronous

[PATCH v3 0/3] QIOChannel async_write & async_flush + MSG_ZEROCOPY + multifd

2021-09-22 Thread Leonardo Bras
This patch series intends to enable MSG_ZEROCOPY in QIOChannel, and make use of it for multifd migration performance improvement. Patch #1 creates new callbacks for QIOChannel, allowing the implementation of asynchronous writing. Patch #2 implements async_write and async_flush on

Re: [PATCH v3 01/15] target/ppc: add user read functions for MMCR0 and MMCR2

2021-09-22 Thread Daniel Henrique Barboza
On 9/22/21 08:23, Matheus K. Ferst wrote: On 03/09/2021 17:31, Daniel Henrique Barboza wrote: [E-MAIL EXTERNO] Não clique em links ou abra anexos, a menos que você possa confirmar o remetente e saber que o conteúdo é seguro. Em caso de e-mail suspeito entre imediatamente em contato com o

Re: [PATCH v3 16/16] iotests/linters: check mypy files all at once

2021-09-22 Thread John Snow
On Fri, Sep 17, 2021 at 7:23 AM Hanna Reitz wrote: > On 16.09.21 06:09, John Snow wrote: > > We can circumvent the '__main__' redefinition problem by passing > > --scripts-are-modules. Take mypy out of the loop per-filename and check > > everything in one go: it's quite a bit faster. > > Is it

Re: [PATCH v3 14/16] iotests/linters: Add workaround for mypy bug #9852

2021-09-22 Thread John Snow
On Wed, Sep 22, 2021 at 4:37 PM John Snow wrote: > > On Fri, Sep 17, 2021 at 7:16 AM Hanna Reitz wrote: > >> >> Question is, when “can we use” mypy >= 0.920? Should we check the >> version string and append this switch as required? >> >> > The answer to that question depends on how the block

Re: [PATCH v3 14/16] iotests/linters: Add workaround for mypy bug #9852

2021-09-22 Thread John Snow
On Fri, Sep 17, 2021 at 7:16 AM Hanna Reitz wrote: > On 16.09.21 06:09, John Snow wrote: > > This one is insidious: if you use the invocation > > "from {namespace} import {subpackage}" as mirror-top-perms does, > > mypy will fail on every-other invocation *if* the package being > > imported is a

Re: plugins: Missing Store Exclusive Memory Accesses

2021-09-22 Thread Aaron Lindsay via
On Sep 21 16:28, Aaron Lindsay wrote: > On Sep 17 12:05, Alex Bennée wrote: > > Aaron Lindsay writes: > > > I recently noticed that the plugin interface does not appear to be > > > emitting callbacks to functions registered via > > > `qemu_plugin_register_vcpu_mem_cb` for AArch64 store

Re: [PATCH v3 11/16] iotests/297: return error code from run_linters()

2021-09-22 Thread John Snow
On Fri, Sep 17, 2021 at 7:00 AM Hanna Reitz wrote: > On 16.09.21 06:09, John Snow wrote: > > This turns run_linters() into a bit of a hybrid test; returning non-zero > > on failed execution while also printing diffable information. This is > > done for the benefit of the avocado simple test

[PATCH v2 1/2] docs/devel/testing: add instruction to run a single acceptance test

2021-09-22 Thread Willian Rampazzo
Add instructions to the Acceptance tests section about running a single test file or a test within the test file. Signed-off-by: Willian Rampazzo --- docs/devel/testing.rst | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index

[PATCH v2 2/2] tests/Makefile: add AVOCADO_TEST_FILES option to make check-acceptance

2021-09-22 Thread Willian Rampazzo
Add the possibility of running all the tests from a single file, or multiple files, running a single test within a file or multiple tests within multiple files using `make check-acceptance` and the AVOCADO_TEST_FILES environment variable. Suggested-by: Daniel P. Berrangé Signed-off-by: Willian

[PATCH v2 0/2] docs/devel/testing: improvements on make check-acceptance

2021-09-22 Thread Willian Rampazzo
Improve the documentation about how to run a single test within a file or all the tests from a file using the standalone avocado command. Add a way to run specific tests using the `make check-acceptance` command. GitLab pipeline: https://gitlab.com/willianrampazzo/qemu/-/pipelines/375517782

Re: [PATCH v3 07/16] iotests/297: Don't rely on distro-specific linter binaries

2021-09-22 Thread John Snow
(This email just explains python packaging stuff. No action items in here. Skim away.) On Fri, Sep 17, 2021 at 5:43 AM Hanna Reitz wrote: > On 16.09.21 06:09, John Snow wrote: > > 'pylint-3' is another Fedora-ism. Use "python3 -m pylint" or "python3 -m > > mypy" to access these scripts instead.

Re: Change TCG cache size?

2021-09-22 Thread Kenneth Adam Miller
Also, that command flag was *really really buried, and I couldn't find it at all in the help. On Wed, Sep 22, 2021 at 1:50 PM Kenneth Adam Miller < kennethadammil...@gmail.com> wrote: > It's just the overhead of running a cross architecture emulation. For Arm > to x86_64, the overhead is very

Re: [PULL 18/28] file-posix: try BLKSECTGET on block devices too, do not round to power of 2

2021-09-22 Thread Halil Pasic
On Mon, 6 Sep 2021 16:24:20 +0200 Halil Pasic wrote: > On Fri, 25 Jun 2021 16:18:12 +0200 > Paolo Bonzini wrote: > > > bs->sg is only true for character devices, but block devices can also > > be used with scsi-block and scsi-generic. Unfortunately BLKSECTGET > > returns bytes in an int for

Re: [PATCH 2/2] tests/Makefile: add TESTFILES option to make check-acceptance

2021-09-22 Thread Willian Rampazzo
On Wed, Sep 22, 2021 at 4:08 PM Philippe Mathieu-Daudé wrote: > > On 9/22/21 21:03, Willian Rampazzo wrote: > > Add the possibility of running all the tests from a single file, or > > multiple files, running a single test within a file or multiple tests > > within multiple files using `make

Re: [PULL 00/12] jobs: mirror: Handle errors after READY cancel

2021-09-22 Thread Vladimir Sementsov-Ogievskiy
22.09.2021 19:05, Richard Henderson wrote: On 9/21/21 3:20 AM, Vladimir Sementsov-Ogievskiy wrote: The following changes since commit 326ff8dd09556fc2e257196c49f35009700794ac:    Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2021-09-20 16:17:05 +0100)

Re: [PATCH] allwinner-h3: Switch to SMC as PSCI conduit

2021-09-22 Thread Niek Linnenbank
Hi Alexander, I've tested your patch on the acceptance tests and they all pass: ARMBIAN_ARTIFACTS_CACHED=yes AVOCADO_ALLOW_LARGE_STORAGE=yes avocado --show=app,console run -t machine:orangepi-pc tests/acceptance/boot_linux_console.py ... RESULTS: PASS 5 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 |

Re: [PATCH v3 08/15] PPC64/TCG: Implement 'rfebb' instruction

2021-09-22 Thread Daniel Henrique Barboza
On 9/9/21 08:47, Matheus K. Ferst wrote: On 03/09/2021 17:31, Daniel Henrique Barboza wrote: An Event-Based Branch (EBB) allows applications to change the NIA when a event-based exception occurs. Event-based exceptions are enabled by setting the Branch Event Status and Control Register

Re: [PATCH v3 06/16] iotests/297: Add get_files() function

2021-09-22 Thread John Snow
On Fri, Sep 17, 2021 at 5:24 AM Hanna Reitz wrote: > On 16.09.21 06:09, John Snow wrote: > > Split out file discovery into its own method to begin separating out the > > "environment setup" and "test execution" phases. > > > > Signed-off-by: John Snow > > --- > > tests/qemu-iotests/297 | 12

Re: [PATCH v3 09/30] tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi

2021-09-22 Thread WANG Xuerui
Hi Richard, On 9/23/21 02:39, Richard Henderson wrote: On 9/22/21 11:09 AM, WANG Xuerui wrote: +    if (pc_offset == (int32_t)pc_offset) { +    tcg_target_long lo = sextreg(pc_offset, 0, 12); +    tcg_target_long hi = pc_offset - lo; +    tcg_out_opc_pcaddu12i(s, rd, hi >> 12); +   

Re: [PATCH v3 04/30] tcg/loongarch64: Add generated instruction opcodes and encoding helpers

2021-09-22 Thread Philippe Mathieu-Daudé
On Wed, Sep 22, 2021 at 8:51 PM WANG Xuerui wrote: > > Hi Philippe, > > On 9/23/21 02:37, Philippe Mathieu-Daudé wrote: > > On 9/22/21 20:09, WANG Xuerui wrote: > >> > > > > The generated code ... > > > >> > > > > ... ends here, right? ... > > > >> > > > > ... or are these helpers also

[PATCH 2/2] tests/Makefile: add TESTFILES option to make check-acceptance

2021-09-22 Thread Willian Rampazzo
Add the possibility of running all the tests from a single file, or multiple files, running a single test within a file or multiple tests within multiple files using `make check-acceptance` and the TESTFILES environment variable. Signed-off-by: Willian Rampazzo --- docs/devel/testing.rst | 27

Re: [PATCH v3 07/30] tcg/loongarch64: Implement necessary relocation operations

2021-09-22 Thread WANG Xuerui
Hi Philippe, On 9/23/21 02:41, Philippe Mathieu-Daudé wrote: On 9/22/21 20:09, WANG Xuerui wrote: Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson ---   tcg/loongarch64/tcg-target.c.inc | 66   1 file changed, 66 insertions(+) +/* Field Sk16,

[PATCH] virtiofsd: xattr mapping add a new type "unsupported"

2021-09-22 Thread Vivek Goyal
Right now for xattr remapping, we support types of "prefix", "ok" or "bad". Type "bad" returns -EPERM on setxattr and hides xattr in listxattr. For getxattr, mapping code returns -EPERM but getxattr code converts it to -ENODATA. I need a new semantics where if an xattr is unsupported, then

Re: [PATCH v3 04/30] tcg/loongarch64: Add generated instruction opcodes and encoding helpers

2021-09-22 Thread WANG Xuerui
Hi Philippe, On 9/23/21 02:37, Philippe Mathieu-Daudé wrote: On 9/22/21 20:09, WANG Xuerui wrote: The generated code ... ... ends here, right? ... ... or are these helpers also generated? I actively hate writing these by hand, so of course the whole file is auto-generated with

Re: [PATCH v3 03/30] tcg/loongarch64: Add the tcg-target.h file

2021-09-22 Thread Richard Henderson
On 9/22/21 11:34 AM, Philippe Mathieu-Daudé wrote: Here could go:    TCG_TARGET_NB_REGS, Not a fan of putting NFOO in the enumeration. It interferes with -Wenum stuff. r~

Re: [PATCH v3 03/30] tcg/loongarch64: Add the tcg-target.h file

2021-09-22 Thread WANG Xuerui
Hi Philippe, On 9/23/21 02:34, Philippe Mathieu-Daudé wrote: On 9/22/21 20:09, WANG Xuerui wrote: Support for all optional TCG ops are initially marked disabled; the bits are to be set in individual commits later. Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson ---  

Re: [PATCH v3 03/16] iotests/migrate-bitmaps-postcopy-test: declare instance variables

2021-09-22 Thread John Snow
On Fri, Sep 17, 2021 at 4:37 AM Hanna Reitz wrote: > On 16.09.21 06:09, John Snow wrote: > > Signed-off-by: John Snow > > --- > > tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git

[PATCH] Hexagon (target/hexagon) probe the stores in a packet at start of commit

2021-09-22 Thread Taylor Simpson
When a packet has 2 stores, either both commit or neither commit. At the beginning of gen_commit_packet, we check for multiple stores. If there are multiple stores, call a helper that will probe each of them before proceeding with the commit. Note that we don't call the probe helper for packets

Re: [PATCH v3 09/30] tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi

2021-09-22 Thread Richard Henderson
On 9/22/21 11:09 AM, WANG Xuerui wrote: +if (sextreg(val, 0, 52) == val) { +/* + * Fits in 52-bits, upper bits are already properly sign-extended by + * cu32i.d. + */ +return; +} +tcg_out_opc_cu52i_d(s, rd, rd, top); +} Oh, future

Re: [PATCH v3 03/30] tcg/loongarch64: Add the tcg-target.h file

2021-09-22 Thread Philippe Mathieu-Daudé
On 9/22/21 20:09, WANG Xuerui wrote: Support for all optional TCG ops are initially marked disabled; the bits are to be set in individual commits later. Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.h | 180 +++ 1

Re: [PATCH 2/2] tests/Makefile: add TESTFILES option to make check-acceptance

2021-09-22 Thread Philippe Mathieu-Daudé
On 9/22/21 21:03, Willian Rampazzo wrote: Add the possibility of running all the tests from a single file, or multiple files, running a single test within a file or multiple tests within multiple files using `make check-acceptance` and the TESTFILES environment variable. Signed-off-by: Willian

Re: [PATCH v3 04/30] tcg/loongarch64: Add generated instruction opcodes and encoding helpers

2021-09-22 Thread Philippe Mathieu-Daudé
On 9/22/21 20:09, WANG Xuerui wrote: Signed-off-by: WANG Xuerui Acked-by: Richard Henderson --- tcg/loongarch64/tcg-insn-defs.c.inc | 881 1 file changed, 881 insertions(+) create mode 100644 tcg/loongarch64/tcg-insn-defs.c.inc diff --git

[PATCH 0/2] docs/devel/testing: improvements on make check-acceptance

2021-09-22 Thread Willian Rampazzo
Improve the documentation about how to run a single test within a file or all the tests from a file using the standalone avocado command. Add a way to run specific tests using the `make check-acceptance` command. GitLab pipeline: https://gitlab.com/willianrampazzo/qemu/-/pipelines/375486996

Re: [PATCH v3] tests/acceptance: allow control over tags during check-acceptance

2021-09-22 Thread Willian Rampazzo
Ping? Any good soul to send a pull request? On Tue, Jul 13, 2021 at 6:03 PM Willian Rampazzo wrote: > > Although it is possible to run a specific test using the avocado > command-line, a user may want to use a specific tag while running the > ``make check-acceptance`` during the development or

[PATCH v3 26/30] tcg/loongarch64: Implement tcg_target_init

2021-09-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 27 +++ 1 file changed, 27 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 405da21234..b1de1529fa 100644 ---

Re: [PATCH v3 20/30] tcg/loongarch64: Implement setcond ops

2021-09-22 Thread Richard Henderson
On 9/22/21 11:09 AM, WANG Xuerui wrote: +case INDEX_op_setcond_i32: +case INDEX_op_setcond_i64: return C_O1_I2(r, rZ, rZ); It shouldn't ever happen, but just for safety, remove the Z from arg1. With that, Reviewed-by: Richard Henderson r~

[PATCH 1/2] docs/devel/testing: add instruction to run a single acceptance test

2021-09-22 Thread Willian Rampazzo
Add instructions to the Acceptance tests section about running a single test file or a test within the test file. Signed-off-by: Willian Rampazzo --- docs/devel/testing.rst | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index

[PATCH v3 30/30] configure, meson.build: Mark support for loongarch64 hosts

2021-09-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- configure | 7 ++- meson.build | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 1043ccce4f..3a9035385d 100755 --- a/configure +++ b/configure @@ -659,6 +659,8 @@ elif

Re: [PATCH v3 07/30] tcg/loongarch64: Implement necessary relocation operations

2021-09-22 Thread Philippe Mathieu-Daudé
On 9/22/21 20:09, WANG Xuerui wrote: Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 66 1 file changed, 66 insertions(+) +/* Field Sk16, shifted right by 2; suitable for conditional jumps */ +#define

[PATCH v3 25/30] tcg/loongarch64: Implement exit_tb/goto_tb

2021-09-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 590f2b7c2f..405da21234 100644 ---

Re: [PATCH v3 01/30] elf: Add machine type value for LoongArch

2021-09-22 Thread Philippe Mathieu-Daudé
On Wed, Sep 22, 2021 at 8:09 PM WANG Xuerui wrote: > > This is already officially allocated as recorded in GNU binutils > repo [1], and the description is updated in [2]. Add to enable further > work. > > [1]: >

[PATCH v3 24/30] tcg/loongarch64: Implement tcg_target_qemu_prologue

2021-09-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 68 1 file changed, 68 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 4c3feb2258..590f2b7c2f 100644 ---

Re: [PATCH v3 09/30] tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi

2021-09-22 Thread Richard Henderson
On 9/22/21 11:09 AM, WANG Xuerui wrote: +if (pc_offset == (int32_t)pc_offset) { +tcg_target_long lo = sextreg(pc_offset, 0, 12); +tcg_target_long hi = pc_offset - lo; +tcg_out_opc_pcaddu12i(s, rd, hi >> 12); +tcg_out_opc_addi_d(s, rd, rd, lo); pc_offset =

Re: [PATCH v3 14/30] tcg/loongarch64: Implement bswap{16,32,64} ops

2021-09-22 Thread Richard Henderson
On 9/22/21 11:09 AM, WANG Xuerui wrote: Signed-off-by: WANG Xuerui --- tcg/loongarch64/tcg-target.c.inc | 32 tcg/loongarch64/tcg-target.h | 10 +- 2 files changed, 37 insertions(+), 5 deletions(-) Reviewed-by: Richard Henderson r~

[PATCH v3 22/30] tcg/loongarch64: Implement simple load/store ops

2021-09-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 131 +++ 2 files changed, 132 insertions(+) diff --git a/tcg/loongarch64/tcg-target-con-set.h

Re: [PATCH v3 01/30] elf: Add machine type value for LoongArch

2021-09-22 Thread Richard Henderson
On 9/22/21 11:08 AM, WANG Xuerui wrote: This is already officially allocated as recorded in GNU binutils repo [1], and the description is updated in [2]. Add to enable further work. [1]:https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=4cf2ad720078a9f490dd5b5bc8893a926479196e

Re: [PULL 0/3] Update meson version

2021-09-22 Thread Peter Maydell
On Tue, 21 Sept 2021 at 13:40, Peter Maydell wrote: > > On Sat, 18 Sept 2021 at 10:34, Paolo Bonzini wrote: > > > > The following changes since commit 831aaf24967a49d7750090b9dcfd6bf356f16529: > > > > Merge remote-tracking branch 'remotes/marcandre/tags/misc-pull-request' > > into staging

[PATCH v3 27/30] tcg/loongarch64: Register the JIT

2021-09-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 44 1 file changed, 44 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index b1de1529fa..025ed525e6 100644 ---

[PATCH v3 28/30] linux-user: Add safe syscall handling for loongarch64 hosts

2021-09-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- linux-user/host/loongarch64/hostdep.h | 34 .../host/loongarch64/safe-syscall.inc.S | 80 +++ 2 files changed, 114 insertions(+) create mode 100644 linux-user/host/loongarch64/hostdep.h create

Re: Change TCG cache size?

2021-09-22 Thread Kenneth Adam Miller
It's just the overhead of running a cross architecture emulation. For Arm to x86_64, the overhead is very high. I was wondering if there is some command line argument that I was missing in order to reduce this. I read somewhere that the tcg cache is defaulted to some value, and wanted to check in

Re: [PATCH 2/2] tests/qapi-schema: Make test-qapi.py -u work when files are absent

2021-09-22 Thread John Snow
On Wed, Sep 22, 2021 at 8:56 AM Markus Armbruster wrote: > test-qapi.py -u updates the expected files. Since it fails when they > are absent, users have to create them manually before they can use > test-qapi.py to fill in the contents, say for a new test. Silly. > Improve -u to create them. >

[PATCH v3 29/30] accel/tcg/user-exec: Implement CPU-specific signal handler for loongarch64 hosts

2021-09-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- accel/tcg/user-exec.c | 73 +++ 1 file changed, 73 insertions(+) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 8fed542622..38d4ad8a7d 100644 --- a/accel/tcg/user-exec.c +++

[PATCH v3 18/30] tcg/loongarch64: Implement mul/mulsh/muluh/div/divu/rem/remu ops

2021-09-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 65 tcg/loongarch64/tcg-target.h | 16 +++ 3 files changed, 74 insertions(+), 8 deletions(-) diff --git

[PATCH v3 21/30] tcg/loongarch64: Implement tcg_out_call

2021-09-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 34 1 file changed, 34 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index e30277b43a..66b19bb973 100644 ---

Re: [RFC PATCH v2 00/16] Initial support for machine creation via QMP

2021-09-22 Thread Philippe Mathieu-Daudé
Hi Damien, On 9/22/21 18:13, Damien Hedde wrote: The goal of this work is to bring dynamic machine creation to QEMU: we want to setup a machine without compiling a specific machine C code. It would ease supporting highly configurable platforms (for example resulting from an automated design

[PATCH v3 23/30] tcg/loongarch64: Add softmmu load/store helpers, implement qemu_ld/qemu_st ops

2021-09-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui --- tcg/loongarch64/tcg-target-con-set.h | 2 + tcg/loongarch64/tcg-target.c.inc | 342 +++ 2 files changed, 344 insertions(+) diff --git a/tcg/loongarch64/tcg-target-con-set.h b/tcg/loongarch64/tcg-target-con-set.h index

[PATCH v3 15/30] tcg/loongarch64: Implement clz/ctz ops

2021-09-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 42 tcg/loongarch64/tcg-target.h | 8 +++--- 3 files changed, 47 insertions(+), 4 deletions(-) diff --git

  1   2   3   4   >