Re: [PATCH v7 10/10] virtio-net: add peer_deleted check in virtio_net_handle_rx

2021-06-02 Thread Jason Wang
在 2021/6/2 上午11:47, Cindy Lu 写道: During the test, We found this function will continue running while the peer is deleted, this will cause the crash. so add check for this. this only exist in machines type microvm Any idea why it only happens on microvm? reproduce step : load the VM with

Re: [PATCH v7 09/10] virtio-pci: add support for configure interrupt

2021-06-02 Thread Jason Wang
在 2021/6/2 上午11:47, Cindy Lu 写道: Add support for configure interrupt, use kvm_irqfd_assign and set the gsi to kernel. When the configure notifier was eventfd_signal by host kernel, this will finally inject an msix interrupt to guest Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 63 ++

Re: [PATCH v7 08/10] virtio-pci: decouple virtqueue from kvm_virtio_pci_vector_use

2021-06-02 Thread Jason Wang
在 2021/6/2 上午11:47, Cindy Lu 写道: inorder s/inorder/In order/ to support configure interrupt, we need to decouple virtqueue from vector use and vector release function this patch introduce vector_release_one and vector_use_one to support one vector. Signed-off-by: Cindy Lu I think we

Re: [PATCH v7 07/10] virtio-mmio: add support for configure interrupt

2021-06-02 Thread Jason Wang
在 2021/6/2 上午11:47, Cindy Lu 写道: Add configure interrupt support for virtio-mmio bus. This interrupt will working while backend is vhost-vdpa Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/hw/virtio/virtio

Re: [PATCH v7 06/10] vhost:add support for configure interrupt

2021-06-02 Thread Jason Wang
在 2021/6/2 上午11:47, Cindy Lu 写道: Add configure notifier support in vhost and virtio driver When backend support VIRTIO_NET_F_STATUS, So config interrupt is the basic facility of the virtio device. We need to make the code not specific to this feature. But we can leave the specific device

Re: [PATCH v7 05/10] vhost-vdpa: add support for config interrupt call back

2021-06-02 Thread Jason Wang
在 2021/6/2 上午11:47, Cindy Lu 写道: Add new call back function in vhost-vdpa, this call back function only supported in vhost-vdpa backend Signed-off-by: Cindy Lu --- hw/virtio/trace-events | 2 ++ hw/virtio/vhost-vdpa.c | 7 +++ 2 files changed, 9 insertions(+) diff --git a/hw/virtio/t

Re: [PATCH v7 04/10] vhost: add new call back function for config interrupt

2021-06-02 Thread Jason Wang
在 2021/6/2 上午11:47, Cindy Lu 写道: To support configure interrupt, we need to add a new call back function for config interrupt. Signed-off-by: Cindy Lu Acked-by: Jason Wang --- include/hw/virtio/vhost-backend.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/virtio/

Re: [PATCH v7 03/10] virtio: decouple virtqueue from set notifier fd handler

2021-06-02 Thread Jason Wang
在 2021/6/2 上午11:47, Cindy Lu 写道: To support config interrupt.we need to decouple virtqueue number s/we/ We/ from virtio_queue_set_guest_notifier_fd_handler, Signed-off-by: Cindy Lu --- hw/s390x/virtio-ccw.c | 6 +++--- hw/virtio/virtio-mmio.c| 4 ++-- hw/virtio/virtio-pci

Re: [PATCH v7 02/10] virtio-pci:decouple virtqueue from interrupt setting process

2021-06-02 Thread Jason Wang
在 2021/6/2 上午11:47, Cindy Lu 写道: Decouple virtqueue from interrupt setting process to support config interrupt Now the code for interrupt/vector are coupling with the vq number, this patch will decouple the vritqueue numbers from these functions. Signed-off-by: Cindy Lu --- hw/virtio/virtio

Re: [PATCH v3 2/2] GitLab: Add "Feature Request" issue template.

2021-06-02 Thread Thomas Huth
On 03/06/2021 02.11, John Snow wrote: Based on Peter Krempa's libvirt template, feature.md. CC: Peter Krempa Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi --- .gitlab/issue_templates/feature_request.md | 32 ++ 1 file changed, 32 insertions(+) create mode 1006

Re: [PATCH v3 1/2] GitLab: Add "Bug" issue reporting template

2021-06-02 Thread Thomas Huth
On 03/06/2021 02.11, John Snow wrote: Based loosely on libvirt's template, written by Peter Krempa. CC: Peter Krempa Signed-off-by: John Snow --- .gitlab/issue_templates/bug.md | 63 ++ 1 file changed, 63 insertions(+) create mode 100644 .gitlab/issue_templ

[PATCH 5/8] Fix incorrect initialization of PCI BARs.

2021-06-02 Thread Jason Thorpe
Only program a BAR as a 64-bit MEM BAR if it really is a 64-bit MEM BAR. Fixes an issue with the CMD646 IDE controller under NetBSD. Improve some debug/info messages. Signed-off-by: Jason Thorpe --- pci.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pci.c b/pci.c i

[PATCH 4/8] Make some PCI macros available to other files. NFC.

2021-06-02 Thread Jason Thorpe
Move PCI_DEVFN(), PCI_BUS(), PCI_SLOT(), and PCI_FUNC() to pci.h. Signed-off-by: Jason Thorpe --- pci.c | 4 pci.h | 5 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pci.c b/pci.c index 87a101c..ba05adb 100644 --- a/pci.c +++ b/pci.c @@ -31,10 +31,6 @@ #include "pci_

[PATCH 3/8] Fix initialization of the hwrpb.hwrpb.cpuid field.

2021-06-02 Thread Jason Thorpe
Initialize the hwrpb.hwrpb.cpuid field with the primary CPU ID, not the processor type, as per the architecture specification. Some operating systems check and assert this. Improve a couple of comments. Signed-off-by: Jason Thorpe --- init.c | 29 ++--- 1 file changed,

[PATCH 7/8] Provide a Console Terminal Block in the HWRPB.

2021-06-02 Thread Jason Thorpe
Provide a Console Terminal Block in the HWRPB so that operating systems that depend on it can correctly initialize the console device. In addition to defining and filling out the structures, there are a couple of other key changes: - Redefine the a2 register passed by Qemu at start-up to also inc

[PATCH 6/8] Provide interrupt mapping information in PCI config registers.

2021-06-02 Thread Jason Thorpe
Use system-specific information to program the interrupt line register with the interrupt mappings, which is what the SRM console does on real hardware; some operating systems (e.g. NetBSD) use this information rather than having interrupt mappings tables for every possible system variation. Signe

[PATCH 0/8] PALcode fixes required to run NetBSD/alpha.

2021-06-02 Thread Jason Thorpe
Included here are a set of patches that fix issues in qemu-palcode needed to run NetBSD/alpha under Qemu. Some fix garden-variety bugs, some fix deviations from the architecture specification or behavior of the SRM console on real Alpha hardware. Two of the changes (patch 6 and patch 7) also requ

[PATCH 8/8] Fixes for seconday CPU start-up.

2021-06-02 Thread Jason Thorpe
Changes to make secondary CPU start-up work on NetBSD, which depends on some specific behavior in the architecture specification: - Change the internal swppal() function to take the new VPTPTR and Procedure Value as explicit arguments. Adapt do_start() to the new the new swppal() signature.

[PATCH 2/8] Fix delivery of unaligned access exceptions.

2021-06-02 Thread Jason Thorpe
In the unaligned access exception vector, actually pass the return PC in the exception frame. This is required in order for unaligned access fixup handlers in the operating system to work. Signed-off-by: Jason Thorpe --- pal.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH 1/8] Make qemu-palcode build environment standalone. NFC.

2021-06-02 Thread Jason Thorpe
Don't include system headers. Instead, provide standalone definitions and declarations of types needed and functions used by the PALcode that are compatible with the standard Alpha / GCC ABI. Signed-off-by: Jason Thorpe --- init.c | 2 -- memcpy.c | 2 +- memset.c | 2 +- printf.c | 4 +--

Re: [RFC v3 25/29] vhost: Add custom IOTLB translations to SVQ

2021-06-02 Thread Jason Wang
在 2021/6/3 上午1:51, Eugenio Perez Martin 写道: On Wed, Jun 2, 2021 at 11:52 AM Jason Wang wrote: 在 2021/5/20 上午12:28, Eugenio Pérez 写道: Use translations added in IOVAReverseMaps in SVQ if the vhost device does not support the mapping of the full qemu's virtual address space. In other cases, Sh

Re: [RFC v3 17/29] vhost: Shadow virtqueue buffers forwarding

2021-06-02 Thread Jason Wang
在 2021/6/3 上午1:18, Eugenio Perez Martin 写道: On Wed, Jun 2, 2021 at 11:51 AM Jason Wang wrote: 在 2021/5/20 上午12:28, Eugenio Pérez 写道: Initial version of shadow virtqueue that actually forward buffers. The exposed addresses are the qemu's virtual address, so devices with IOMMU that does not a

Re: [RFC v3 13/29] vhost: Add vhost_get_iova_range operation

2021-06-02 Thread Jason Wang
在 2021/6/1 下午3:17, Eugenio Perez Martin 写道: On Thu, May 27, 2021 at 6:51 AM Jason Wang wrote: 在 2021/5/27 上午1:49, Eugenio Perez Martin 写道: On Wed, May 26, 2021 at 3:14 AM Jason Wang wrote: 在 2021/5/20 上午12:28, Eugenio Pérez 写道: For simplicity, If a device does not support this operation

Re: [PATCH v2] target/ppc: fix single-step exception regression

2021-06-02 Thread David Gibson
On Wed, Jun 02, 2021 at 09:51:03AM -0300, Luis Pires wrote: > Commit 6086c75 (target/ppc: Replace POWERPC_EXCP_BRANCH with > DISAS_NORETURN) broke the generation of exceptions when > CPU_SINGLE_STEP or CPU_BRANCH_STEP were set, due to nip always being > reset to the address of the current instructi

Re: [RFC v3 06/29] virtio-net: Honor VIRTIO_CONFIG_S_DEVICE_STOPPED

2021-06-02 Thread Jason Wang
在 2021/6/1 下午3:13, Eugenio Perez Martin 写道: On Wed, May 26, 2021 at 3:10 AM Jason Wang wrote: 在 2021/5/26 上午9:06, Jason Wang 写道: 在 2021/5/20 上午12:28, Eugenio Pérez 写道: So the guest can stop and start net device. It implements the RFC https://lists.oasis-open.org/archives/virtio-comment/202

Re: [PATCH] hw/arm/boot: Use NUMA node ID in memory node name

2021-06-02 Thread Gavin Shan
Hi Drew, On 6/2/21 9:36 PM, Andrew Jones wrote: On Wed, Jun 02, 2021 at 11:09:32AM +1000, Gavin Shan wrote: On 6/1/21 5:50 PM, Andrew Jones wrote: On Tue, Jun 01, 2021 at 03:30:04PM +0800, Gavin Shan wrote: We possibly populate empty nodes where memory isn't included and might be hot added at

Re: [RFC PATCH 2/2] migration/rdma: Enable use of g_autoptr with struct rdma_cm_event

2021-06-02 Thread lizhij...@fujitsu.com
On 03/06/2021 01.51, Philippe Mathieu-Daudé wrote: > Since 00f2cfbbec6 ("glib: bump min required glib library version to > 2.48") we can use g_auto/g_autoptr to have the compiler automatically > free an allocated variable when it goes out of scope, Glad to know this feature. However per its code

[PATCH v3 18/19] scripts/qom-fuse: add redirection shim to python/qemu/qmp/qom-fuse.py

2021-06-02 Thread John Snow
By leaving the script absent for a commit, git-blame travels to the new file instead of staying on the shim. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé --- scripts/qmp/qom-fuse | 11 +++ 1 file changed, 11 insertions(+) create mode 100755 scripts/qmp/qom-fuse diff --

[PATCH v3 14/19] scripts/qom-fuse: ensure QOMFuse.read always returns bytes

2021-06-02 Thread John Snow
- Use FuseOSError to signal ENOENT instead of returning it - Wrap qom-get in str(), as we don't always know its type - The empty return should be b'', not ''. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé --- scripts/qmp/qom-fuse | 6 +++--- 1 file changed, 3 insertions(+), 3 del

[PATCH v3 19/19] python/qmp: add fuse command to 'qom' tools

2021-06-02 Thread John Snow
The 'fuse' command will be unavailable if 'fusepy' is not installed. It will simply not load and subsequently be unavailable as a subcommand. Signed-off-by: John Snow --- python/qemu/qmp/qom.py | 14 -- python/setup.cfg | 1 + 2 files changed, 13 insertions(+), 2 deletions(-)

[PATCH v3 13/19] scripts/qom-fuse: use QOMCommand.qom_list()

2021-06-02 Thread John Snow
the qom_list method provides a type-safe object that's easier to type check, so switch to using it. Signed-off-by: John Snow --- scripts/qmp/qom-fuse | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/scripts/qmp/qom-fuse b/scripts/qmp/qom-fuse index 1676fb78

[PATCH v3 17/19] scripts/qom-fuse: move to python/qemu/qmp/qom_fuse.py

2021-06-02 Thread John Snow
Move qom-fuse over to the python package now that it passes the linter. Update the import paradigms so that it continues to pass in the context of the Python package. Signed-off-by: John Snow --- scripts/qmp/qom-fuse => python/qemu/qmp/qom_fuse.py | 12 ++-- 1 file changed, 2 insertions(

[PATCH v3 11/19] scripts/qom-fuse: Add docstrings

2021-06-02 Thread John Snow
The methods inherited from fuse don't need docstrings; that's up to fusepy to handle. Signed-off-by: John Snow --- scripts/qmp/qom-fuse | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/scripts/qmp/qom-fuse b/scripts/qmp/qom-fuse index 805e99c8ecd..1fb300

[PATCH v3 08/19] scripts/qom-fuse: apply flake8 rules

2021-06-02 Thread John Snow
flake8 still has one warning because of the sys.path hack, but that will be going away by the end of this patch series. Signed-off-by: John Snow --- scripts/qmp/qom-fuse | 81 +++- 1 file changed, 43 insertions(+), 38 deletions(-) diff --git a/scripts/qmp

[PATCH v3 16/19] python: add optional FUSE dependencies

2021-06-02 Thread John Snow
In preparation for moving qom-fuse over to the python package, we need some new dependencies to support it. Add an optional 'fusepy' dependency that users of the package can opt into with e.g. "pip install qemu[fuse]" which installs the requirements necessary to obtain the additional functionality

[PATCH v3 09/19] python: Add 'fh' to known-good variable names

2021-06-02 Thread John Snow
fd and fh are fine: we often use these for "file descriptor" or "file handle" accordingly. It is rarely the case that you need to enforce a more semantically meaningful name beyond "This is the file we are using right now." While we're here: add comments for all of the non-standard pylint names. (

[PATCH v3 07/19] scripts/qom-fuse: apply isort rules

2021-06-02 Thread John Snow
Hint: you can use symlinks to create qom_fuse.py in python/qemu/qmp/ and point to scripts/qom-fuse to apply the standard linting rules to this script. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé --- scripts/qmp/qom-fuse | 12 +--- 1 file changed, 9 insertions(+), 3 dele

[PATCH v3 15/19] scripts/qom-fuse: add static type hints

2021-06-02 Thread John Snow
Because fusepy does not have type hints, add some targeted warning suppressions. Namely, we need to allow subclassing something of an unknown type (in qom_fuse.py), and we need to allow missing imports (recorded against fuse itself) because mypy will be unable to import fusepy (even when installed

[PATCH v3 04/19] python/qmp: Add qom script rewrites

2021-06-02 Thread John Snow
Inspired by qom-set, qom-get, qom-tree and qom-list; combine all four of those scripts into a single script. A later addition of qom-fuse as an 'extension' necessitates that some common features are split out and shared between them. Signed-off-by: John Snow --- python/qemu/qmp/qom.py|

[PATCH v3 06/19] scripts/qmp: redirect qom-xxx scripts to python/qemu/qmp/

2021-06-02 Thread John Snow
Redirect to the new qom scripts. These forwarders can be deleted eventually when there has been more time for the dust on the Python packaging to settle and people understand how to find these commands. Note: You can run these by setting $PYTHONPATH in your shell and then running "python3 -m qemu.

[PATCH v3 00/19] Python: move /scripts/qmp/qom* to /python/qemu/qmp/qom*

2021-06-02 Thread John Snow
Closes: https://gitlab.com/qemu-project/qemu/-/issues/202 GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-package-qom CI: https://gitlab.com/jsnow/qemu/-/pipelines/313932818 Hello! -- This series applies the usual linting cleanups to modernize the qom tools and then integrates them int

[PATCH v3 12/19] scripts/qom-fuse: Convert to QOMCommand

2021-06-02 Thread John Snow
Move qom-fuse onto the QOMCommand base established in python/qemu/qmp/qom_common.py. The interface doesn't change incompatibly, "qom-fuse mountpoint" still works as an invocation, and QMP_SOCKET is still used as the environment variable. Signed-off-by: John Snow --- scripts/qmp/qom-fuse | 59 +++

[PATCH v3 05/19] python/qmp: add qom script entry points

2021-06-02 Thread John Snow
Add the 'qom', 'qom-set', 'qom-get', 'qom-list', and 'qom-tree' scripts to the qemu.qmp package. When you install this package, these scripts will become available on your command line. (e.g. when inside of a venv, `cd python && pip install .` will add 'qom', 'qom-set', etc to your $PATH.) Signed

[PATCH v3 03/19] python/qmp: add parse_address classmethod

2021-06-02 Thread John Snow
This takes the place of qmp-shell's __get_address function. It also allows other utilities to share the same parser and syntax for specifying QMP locations. Signed-off-by: John Snow --- python/qemu/qmp/__init__.py | 26 ++ scripts/qmp/qmp-shell | 21 ++--

[PATCH v3 10/19] scripts/qom-fuse: Apply pylint rules

2021-06-02 Thread John Snow
- Catch specific exceptions from QMP - Reraise errors with explicit context - method parameters should match parent's names Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé --- scripts/qmp/qom-fuse | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/

[PATCH v3 02/19] python/qmp: Fix type of SocketAddrT

2021-06-02 Thread John Snow
In porting the qom tools, qmp-shell, etc; it becomes evident that this type is wrong. This is an integer, not a string. We didn't catch this before because none of QEMUMonitorProtocol's *users* happen to be checked, and the internal logic of this class is otherwise self-consistent. Additionally, m

[PATCH v3 01/19] python/pipenv: Update Pipfile.lock

2021-06-02 Thread John Snow
In a previous commit, I added tox to the development requirements of the Python library. I never bothered to add them to the Pipfile, because they aren't needed there. Here, I sync it anyway in its own commit so that when we add new packages later that the diffstats will not confusingly appear to p

[PATCH v3 0/2] Gitlab: Add issue templates

2021-06-02 Thread John Snow
Add "Bug" and "Feature Request" templates to the Gitlab interface to help improve the quality of newly reported issues. To see what this looks like, I've temporarily allowed my Gitlab fork to diverge with these files merged. See my fork's "new issue" page to see it in action: https://gitlab.com/j

[PATCH v3 2/2] GitLab: Add "Feature Request" issue template.

2021-06-02 Thread John Snow
Based on Peter Krempa's libvirt template, feature.md. CC: Peter Krempa Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi --- .gitlab/issue_templates/feature_request.md | 32 ++ 1 file changed, 32 insertions(+) create mode 100644 .gitlab/issue_templates/feature_request.

[PATCH v3 1/2] GitLab: Add "Bug" issue reporting template

2021-06-02 Thread John Snow
Based loosely on libvirt's template, written by Peter Krempa. CC: Peter Krempa Signed-off-by: John Snow --- .gitlab/issue_templates/bug.md | 63 ++ 1 file changed, 63 insertions(+) create mode 100644 .gitlab/issue_templates/bug.md diff --git a/.gitlab/issue_tem

Re: [PATCH v4 26/35] python/qemu/machine: QEMUMachine: improve qmp() method

2021-06-02 Thread John Snow
On 6/2/21 9:10 AM, Vladimir Sementsov-Ogievskiy wrote: We often call qmp() with unpacking dict, like qmp('foo', **{...}). mypy don't really like it, it thinks that passed unpacked dict is a positional argument and complains that it type should be bool (because second argument of qmp() is conv_key

Re: [PATCH v4 25/35] python/qemu/machine.py: refactor _qemu_args()

2021-06-02 Thread John Snow
On 6/2/21 9:10 AM, Vladimir Sementsov-Ogievskiy wrote: - use shorter construction - don't create new dict if not needed - drop extra unpacking key-val arguments - drop extra default values Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Sorry, I shuffled around the

Re: [PATCH qemu] Add basic power management to raspi.

2021-06-02 Thread Nolan
On 6/2/21 4:22 PM, Philippe Mathieu-Daudé wrote: On 6/2/21 11:33 PM, Nolan wrote: On 5/31/21 4:23 AM, Philippe Mathieu-Daudé wrote: Hi Nolan, Thanks for your patch! There is something odd with your email address, which apparently became source...@sigbus.net instead of no...@sigbus.net. Ugh,

Re: [PATCH v8 02/12] accel: Introduce 'query-accels' QMP command

2021-06-02 Thread John Snow
On 5/26/21 1:04 PM, Philippe Mathieu-Daudé wrote: Introduce the 'query-accels' QMP command which returns a list of built-in accelerator names. > - Accelerator is a QAPI enum of all existing accelerators, - AcceleratorInfo is a QAPI structure providing accelerator specific information. Curren

Re: [PATCH v8] qapi: introduce 'query-kvm-cpuid' action

2021-06-02 Thread Philippe Mathieu-Daudé
On 6/2/21 10:46 PM, Eduardo Habkost wrote: > On Wed, Jun 02, 2021 at 08:17:28PM +0200, Philippe Mathieu-Daudé wrote: >> Hi Valeriy, >> >> (Sorry for not looking earlier than v8) >> >> On 5/31/21 2:38 PM, Valeriy Vdovin wrote: >>> Introducing new qapi method 'query-kvm-cpuid'. This method can be use

Re: [PATCH v4 01/15] python: qemu: add timer parameter for qmp.accept socket

2021-06-02 Thread John Snow
On 5/20/21 3:52 AM, Emanuele Giuseppe Esposito wrote: Alsp add a new _qmp_timer field to the QEMUMachine class. Let's change the default socket timeout to None, so that if a subclass needs to add a timer, it can be done by modifying this private field. At the same time, restore the timer to be

Re: [PATCH qemu] Add basic power management to raspi.

2021-06-02 Thread Philippe Mathieu-Daudé
On 6/2/21 11:33 PM, Nolan wrote: > On 5/31/21 4:23 AM, Philippe Mathieu-Daudé wrote: >> Hi Nolan, >> >> Thanks for your patch! >> >> There is something odd with your email address, which apparently >> became source...@sigbus.net instead of no...@sigbus.net. > > Ugh, oops. I was trying out sourcehu

[PATCH qemu v2] Add basic power management to raspi.

2021-06-02 Thread ~nolanl
From: Nolan Leake This is just enough to make reboot and poweroff work. Works for linux, u-boot, and the arm trusted firmware. Not tested, but should work for plan9, and bare-metal/hobby OSes, since they seem to generally do what linux does for reset. The watchdog timer functionality is not yet

Re: [PATCH v2 04/28] softfloat: Move minmax_flags to softfloat-parts.c.inc

2021-06-02 Thread Richard Henderson
On 5/25/21 8:06 AM, Richard Henderson wrote: +which = parts_minmax(&pa, &pb, s, flags, &float32_params); +if (unlikely(which < 0)) { +/* Some sort of nan, need to repack default and silenced nans. */ +return float32_round_pack_canonical(&pa, s); +} +return which ?

Re: [PATCH v2 04/28] softfloat: Move minmax_flags to softfloat-parts.c.inc

2021-06-02 Thread Richard Henderson
On 6/2/21 1:36 PM, Alex Bennée wrote: Richard Henderson writes: Rename to parts$N_minmax. Combine 3 bool arguments to a bitmask, return a tri-state value to indicate nan vs unchanged operand. Introduce ftype_minmax functions as a common optimization point. Fold bfloat16 expansions into the s

Re: [RFC PATCH] target/ppc: fix address translation bug for hash table mmus

2021-06-02 Thread Richard Henderson
On 6/2/21 12:58 PM, Bruno Piazera Larsen wrote: For the use from ppc_cpu_get_phys_page_debug, you'd pass in cpu_mmu_index(env, false). ppc_cpu_get_phys_page_debug has 2 calls to ppc_xlate, one using the data MMU, the other using the instruction MMU. I'm guessing I should pass both, right? Ye

Re: [PATCH qemu] Add basic power management to raspi.

2021-06-02 Thread Nolan
On 5/31/21 4:23 AM, Philippe Mathieu-Daudé wrote: Hi Nolan, Thanks for your patch! There is something odd with your email address, which apparently became source...@sigbus.net instead of no...@sigbus.net. Ugh, oops. I was trying out sourcehut for this, and reflexively gave them a marker emai

Re: [PATCH v2 10/10] nbd: move connection code from block/nbd to nbd/client-connection

2021-06-02 Thread Eric Blake
On Thu, Apr 08, 2021 at 05:08:27PM +0300, Vladimir Sementsov-Ogievskiy wrote: > We now have bs-independent connection API, which consists of four > functions: > > nbd_client_connection_new() > nbd_client_connection_unref() > nbd_co_establish_connection() > nbd_co_establish_connection_cance

Re: [PATCH v3 13/33] block/nbd: introduce nbd_client_connection_release()

2021-06-02 Thread Eric Blake
On Fri, Apr 16, 2021 at 11:08:51AM +0300, Vladimir Sementsov-Ogievskiy wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/nbd.c | 43 ++- > 1 file changed, 26 insertions(+), 17 deletions(-) Commit message said what, but not why. Presumably

Re: [PATCH v3 12/33] block/nbd: introduce nbd_client_connection_new()

2021-06-02 Thread Eric Blake
On Fri, Apr 16, 2021 at 11:08:50AM +0300, Vladimir Sementsov-Ogievskiy wrote: > This is the last step of creating bs-independent nbd connection > interface. With next commit we can finally move it to separate file. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Roman Kagan > ---

Re: [PATCH v3 11/33] block/nbd: rename NBDConnectThread to NBDClientConnection

2021-06-02 Thread Eric Blake
On Fri, Apr 16, 2021 at 11:08:49AM +0300, Vladimir Sementsov-Ogievskiy wrote: > We are going to move connection code to own file and want clear names > and APIs. We are going to move the connection code to its own file, and want clear names and APIs first. > > The structure is shared between use

Re: [PATCH v3 10/33] block/nbd: make nbd_co_establish_connection_cancel() bs-independent

2021-06-02 Thread Eric Blake
On Fri, Apr 16, 2021 at 11:08:48AM +0300, Vladimir Sementsov-Ogievskiy wrote: > nbd_co_establish_connection_cancel() actually needs only pointer to > NBDConnectThread. So, make it clean. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Roman Kagan > --- > block/nbd.c | 16 +++-

Re: [PATCH v8] qapi: introduce 'query-kvm-cpuid' action

2021-06-02 Thread Eduardo Habkost
On Wed, Jun 02, 2021 at 03:51:02PM -0500, Eric Blake wrote: > On Mon, May 31, 2021 at 03:38:06PM +0300, Valeriy Vdovin wrote: [...] > > +## > > +# @CpuidEntry: > > +# > > +# A single entry of a CPUID response. > > +# > > +# One entry holds full set of information (leaf) returned to the guest in >

Re: [RFC PATCH 1/4] target/ppc: Don't compile ppc_tlb_invalid_all without TCG

2021-06-02 Thread Fabiano Rosas
"Lucas Mateus Castro (alqotel)" writes: > The function ppc_tlb_invalid_all is not compiled anymore in a TCG-less > environment, and the call to that function has been disabled in this > situation. > > Signed-off-by: Lucas Mateus Castro (alqotel) > --- > Is there a better way than to deal with th

Re: [PATCH v8] qapi: introduce 'query-kvm-cpuid' action

2021-06-02 Thread Eric Blake
On Mon, May 31, 2021 at 03:38:06PM +0300, Valeriy Vdovin wrote: > Introducing new qapi method 'query-kvm-cpuid'. This method can be used to > get virtualized cpu model info generated by QEMU during VM initialization in > the form of cpuid representation. > > > Use example: > qmp_request: { > "e

Re: [PATCH] target/i386/sev: Ensure sev_fw_errlist is sync with update-linux-headers

2021-06-02 Thread Eduardo Habkost
On Wed, Jun 02, 2021 at 12:48:18PM +0200, Philippe Mathieu-Daudé wrote: > This patch was supposed to go via Eduardo's tree but he > missed it, can it go via qemu-trivial instead? My apologies, again. I'm still behind on my qemu-devel backlog, and this was still buried in my inbox. > > On 2/19/2

Re: [PATCH v8] qapi: introduce 'query-kvm-cpuid' action

2021-06-02 Thread Eduardo Habkost
On Wed, Jun 02, 2021 at 08:17:28PM +0200, Philippe Mathieu-Daudé wrote: > Hi Valeriy, > > (Sorry for not looking earlier than v8) > > On 5/31/21 2:38 PM, Valeriy Vdovin wrote: > > Introducing new qapi method 'query-kvm-cpuid'. This method can be used to > > get virtualized cpu model info generate

Re: [PATCH v2 04/28] softfloat: Move minmax_flags to softfloat-parts.c.inc

2021-06-02 Thread Alex Bennée
Richard Henderson writes: > Rename to parts$N_minmax. Combine 3 bool arguments to a bitmask, > return a tri-state value to indicate nan vs unchanged operand. > Introduce ftype_minmax functions as a common optimization point. > Fold bfloat16 expansions into the same macro as the other types. >

Re: [PATCH v2 1/3] doc: Fix some mistakes in the SEV documentation

2021-06-02 Thread Connor Kuehl
On 4/23/21 3:08 PM, Tom Lendacky wrote: > From: Tom Lendacky > > Fix some spelling and grammar mistakes in the amd-memory-encryption.txt > file. No new information added. > > Signed-off-by: Tom Lendacky For the series: Reviewed-by: Connor Kuehl

Re: [RFC PATCH] target/ppc: fix address translation bug for hash table mmus

2021-06-02 Thread Bruno Piazera Larsen
On 02/06/2021 16:26, Richard Henderson wrote: On 6/2/21 12:18 PM, Bruno Larsen (billionai) wrote: Based-on: <20210518201146.794854-1-richard.hender...@linaro.org> This commit attempts to implement a first draft of a solution to the first bug mentioned by Richard Henderson in this e-mail https:

Re: [PATCH v2 1/3] doc: Fix some mistakes in the SEV documentation

2021-06-02 Thread Tom Lendacky
Just a quick ping on this series... Thanks, Tom On 4/23/21 3:08 PM, Tom Lendacky wrote: > From: Tom Lendacky > > Fix some spelling and grammar mistakes in the amd-memory-encryption.txt > file. No new information added. > > Signed-off-by: Tom Lendacky > --- > docs/amd-memory-encryption.txt |

[RFC PATCH 4/4] target/ppc: Moved helpers to mmu_helper.c

2021-06-02 Thread Lucas Mateus Castro (alqotel)
Moved helpers from target/ppc/mmu-hash64.c to target/ppc/mmu_helpers.c and removed #ifdef CONFIG_TCG and #include exec/helper-proto.h from mmu-hash64.c Signed-off-by: Lucas Mateus Castro (alqotel) --- I had to turn slb_lookup in a non static function as it had calls from the code that was moved t

[RFC PATCH 2/4] target/ppc: divided mmu_helper.c in 2 files

2021-06-02 Thread Lucas Mateus Castro (alqotel)
Moved functions in mmu_helper.c that should be compiled in build to mmu_common.c, moved declaration of functions that both files use to cpu.h and moved struct declarations and inline functions needed by both to target/ppc/internal.h. Updated meson.build to compile the new file. Signed-off-by: Luca

[RFC PATCH 3/4] target/ppc: moved ppc_store_sdr1 to mmu_common.c

2021-06-02 Thread Lucas Mateus Castro (alqotel)
Moved ppc_store_sdr1 to mmu_common.c as it was originally in mmu_helper.c. Signed-off-by: Lucas Mateus Castro (alqotel) --- Talking to billionai he commented that ppc_store_sdr1 was at first in mmu_helper.c and was moved as part of the patches to enable the disable-tcg option, now it's being move

[RFC PATCH 1/4] target/ppc: Don't compile ppc_tlb_invalid_all without TCG

2021-06-02 Thread Lucas Mateus Castro (alqotel)
The function ppc_tlb_invalid_all is not compiled anymore in a TCG-less environment, and the call to that function has been disabled in this situation. Signed-off-by: Lucas Mateus Castro (alqotel) --- Is there a better way than to deal with the ppc_tlb_invalidate_all call than ifdef? I couldn't th

[RFC PATCH 0/4] target/ppc: mmu cleanup

2021-06-02 Thread Lucas Mateus Castro (alqotel)
This patch series aims to clean up some of the code in mmu-hash64.c and mmu_helper.c, including removing the includes inside ifdef of those files. Helpers are in mmu_helper.c now and code that is needed in a !TCG build are in mmu-hash64.c and mmu_common.c. Comments are welcome, thanks, Lucas Mate

Re: [RFC PATCH] target/ppc: fix address translation bug for hash table mmus

2021-06-02 Thread Richard Henderson
On 6/2/21 12:18 PM, Bruno Larsen (billionai) wrote: Based-on: <20210518201146.794854-1-richard.hender...@linaro.org> This commit attempts to implement a first draft of a solution to the first bug mentioned by Richard Henderson in this e-mail https://lists.nongnu.org/archive/html/qemu-devel/2021-

[RFC PATCH] target/ppc: fix address translation bug for hash table mmus

2021-06-02 Thread Bruno Larsen (billionai)
Based-on: <20210518201146.794854-1-richard.hender...@linaro.org> This commit attempts to implement a first draft of a solution to the first bug mentioned by Richard Henderson in this e-mail https://lists.nongnu.org/archive/html/qemu-devel/2021-05/msg06247.html The second bug was not touched, which

Re: [PATCH v3] target/riscv: fix VS interrupts forwarding to HS

2021-06-02 Thread Jose Martins
Hello Zhiwei and Alistair, I went for a middle-ground solution. I divided the patch into two: one fixes the vs interrupt forwarding to the hypervisor, the other removes the unnecessary force exception stuff. I just submitted the patch series. I hope it's ok with you. José On Fri, 28 May 2021 at

Re: [PATCH v3 09/33] block/nbd: bs-independent interface for nbd_co_establish_connection()

2021-06-02 Thread Eric Blake
On Fri, Apr 16, 2021 at 11:08:47AM +0300, Vladimir Sementsov-Ogievskiy wrote: > We are going to split connection code to separate file. Now we are to a separate > ready to give nbd_co_establish_connection() clean and bs-independent > interface. > > Signed-off-by: Vladimir Sementsov-Ogievskiy >

[PATCH 1/2] target/riscv: fix VS interrupts forwarding to HS

2021-06-02 Thread Jose Martins
VS interrupts (2, 6, 10) were not correctly forwarded to hs-mode when not delegated in hideleg (which was not being taken into account). This was mainly because hs level sie was not always considered enabled when it should. The spec states that "Interrupts for higher-privilege modes, y>x, are alway

[PATCH 2/2] target/riscv: remove force HS exception

2021-06-02 Thread Jose Martins
There is no need to "force an hs exception" as the current privilege level, the state of the global ie and of the delegation registers should be enough to route the interrupt to the appropriate privilege level in riscv_cpu_do_interrupt. The is true for both asynchronous and synchronous exceptions,

[PATCH 0/2] target/riscv: fix hypervisor exceptions

2021-06-02 Thread Jose Martins
This patch series fixes the forwarding of VS-level execptions to HS-mode and removes unecessary code previously used for the routing of exceptions to HS-mode. Jose Martins (2): target/riscv: fix VS interrupts forwarding to HS target/riscv: remove force HS exception target/riscv/cpu.h

Re: [RFC] Adding the A64FX's HPC funtions.

2021-06-02 Thread Peter Maydell
On Wed, 2 Jun 2021 at 20:02, Richard Henderson wrote: > On 6/1/21 8:21 AM, Peter Maydell wrote: > >>> 2) Is it OK to specify the option to set the HPC extension of A64FX as > >>> follows, > >>> for example? > >>> > >>> -M virt -cpu max,a64fx-hpc-sec=on (*sector cache function) -M virt -cpu > >>>

Re: [PATCH v3 07/33] block/nbd: simplify waking of nbd_co_establish_connection()

2021-06-02 Thread Eric Blake
On Fri, Apr 16, 2021 at 11:08:45AM +0300, Vladimir Sementsov-Ogievskiy wrote: Grammar suggestions: > Instead of connect_bh, bh_ctx and wait_connect fields we can live with > only one link to waiting coroutine, protected by mutex. Instead of managing connect_bh, bh_ctx, and wait_connect fields, w

Re: [RFC] Adding the A64FX's HPC funtions.

2021-06-02 Thread Richard Henderson
On 6/1/21 8:21 AM, Peter Maydell wrote: I'm thinking of implementing A64FX HPC extension in qemu. A64FX [1] is a CPU developed by Fujitsu that implements armv8+SVE. [1] https://github.com/fujitsu/A64FX/blob/master/doc/A64FX_Microarchitecture _Manual_en_1.4.pdf A64FX is a CPU developed for HPC (

Re: [PATCH 1/3] virtiofsd: Find original inode ID of mount points

2021-06-02 Thread Miklos Szeredi
On Wed, 2 Jun 2021 at 20:20, Vivek Goyal wrote: > > On Wed, May 12, 2021 at 02:55:42PM +0200, Max Reitz wrote: > > Mount point directories represent two inodes: On one hand, they are a > > normal directory on their parent filesystem. On the other, they are the > > root node of the filesystem moun

Re: [PULL 00/17] doc updates and CentOS 7 removal

2021-06-02 Thread Peter Maydell
On Wed, 2 Jun 2021 at 08:36, Thomas Huth wrote: > > Hi Peter! > > The following changes since commit 52848929b70dcf92a68aedcfd90207be81ba3274: > > Merge remote-tracking branch > 'remotes/kraxel/tags/usb-20210528-pull-request' into staging (2021-05-30 > 20:10:30 +0100) > > are available in the

Re: [PATCH 1/3] virtiofsd: Find original inode ID of mount points

2021-06-02 Thread Vivek Goyal
On Wed, May 12, 2021 at 02:55:42PM +0200, Max Reitz wrote: > Mount point directories represent two inodes: On one hand, they are a > normal directory on their parent filesystem. On the other, they are the > root node of the filesystem mounted there. Thus, they have two inode > IDs. > > Right now

Re: [PATCH v8] qapi: introduce 'query-kvm-cpuid' action

2021-06-02 Thread Philippe Mathieu-Daudé
Hi Valeriy, (Sorry for not looking earlier than v8) On 5/31/21 2:38 PM, Valeriy Vdovin wrote: > Introducing new qapi method 'query-kvm-cpuid'. This method can be used to > get virtualized cpu model info generated by QEMU during VM initialization in > the form of cpuid representation. > > Diving

[PATCH v4 8/8] hw/arm/virt: add ITS support in virt GIC

2021-06-02 Thread Shashi Mallela
Included creation of ITS as part of virt platform GIC initialization.This Emulated ITS model now co-exists with kvm ITS and is enabled in absence of kvm irq kernel support in a platform. Signed-off-by: Shashi Mallela --- hw/arm/virt.c | 27 +-- include/hw/arm/virt

Re: [PATCH v7 23/27] tcg/tci: Split out tci_qemu_ld, tci_qemu_st

2021-06-02 Thread Philippe Mathieu-Daudé
On 6/1/21 5:01 PM, Richard Henderson wrote: > We can share this code between 32-bit and 64-bit loads and stores. > > Signed-off-by: Richard Henderson > --- > tcg/tci.c | 183 +- > 1 file changed, 71 insertions(+), 112 deletions(-) Reviewed-by:

[PATCH v4 7/8] hw/arm/sbsa-ref: add ITS support in SBSA GIC

2021-06-02 Thread Shashi Mallela
Included creation of ITS as part of SBSA platform GIC initialization. Signed-off-by: Shashi Mallela --- hw/arm/sbsa-ref.c | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index 43c19b4923..3d9c073636 100644 ---

[PATCH v4 6/8] hw/intc: GICv3 redistributor ITS processing

2021-06-02 Thread Shashi Mallela
Implemented lpi processing at redistributor to get lpi config info from lpi configuration table,determine priority,set pending state in lpi pending table and forward the lpi to cpuif.Added logic to invoke redistributor lpi processing with translated LPI which set/clear LPI from ITS device as part o

[PATCH v4 5/8] hw/intc: GICv3 ITS Feature enablement

2021-06-02 Thread Shashi Mallela
Added properties to enable ITS feature and define qemu system address space memory in gicv3 common,setup distributor and redistributor registers to indicate LPI support. Signed-off-by: Shashi Mallela --- hw/intc/arm_gicv3_common.c | 12 hw/intc/arm_gicv3_dist.c |

  1   2   3   4   >