Re: Editing QEMU POWER Platform wiki page

2021-02-22 Thread Greg Kurz
On Tue, 23 Feb 2021 15:51:19 +1100 David Gibson wrote: > On Mon, Feb 22, 2021 at 06:18:08PM -0300, Leonardo Augusto Guimarães Garcia > wrote: > > On 2/22/21 8:01 AM, Greg Kurz wrote: > > > On Thu, 18 Feb 2021 10:16:25 -0300 > > > Leonardo Augusto Guimarães Garcia wrote: > > > > > > > Hi there,

Re: [PATCH qemu v13] spapr: Implement Open Firmware client interface

2021-02-22 Thread Alexey Kardashevskiy
On 23/02/2021 16:28, David Gibson wrote: On Tue, Feb 23, 2021 at 04:01:00PM +1100, Alexey Kardashevskiy wrote: On 23/02/2021 14:07, David Gibson wrote: On Tue, Feb 09, 2021 at 10:02:52PM +1100, Alexey Kardashevskiy wrote: The PAPR platform which describes an OS environment that's presente

[PATCH] target/riscv: fix vs() to return proper error code

2021-02-22 Thread frank . chang
From: Frank Chang vs() should return -RISCV_EXCP_ILLEGAL_INST instead of -1 if rvv feature is not enabled. If -1 is returned, exception will be raised and cs->exception_index will be set to the negative return value. The exception will then be treated as an instruction access fault instead of il

Re: who's using the ozlabs patchwork install for QEMU patches ?

2021-02-22 Thread Bin Meng
On Mon, Feb 22, 2021 at 10:43 PM Greg Kurz wrote: > > On Mon, 22 Feb 2021 13:59:34 + > Peter Maydell wrote: > > > On Mon, 22 Feb 2021 at 07:21, Greg Kurz wrote: > > > > > > On Fri, 19 Feb 2021 17:51:02 +0100 > > > Thomas Huth wrote: > > > > > > > On 19/02/2021 17.26, Peter Maydell wrote: >

[PATCH v4] configure: Improve OpenGL dependency detections

2021-02-22 Thread Akihiko Odaki
This has the following visible changes: - GBM is required only for OpenGL dma-buf. - X11 is explicitly required by gtk-egl. - EGL is now mandatory for the OpenGL displays. The last one needs some detailed description. Before this change, EGL was tested only for OpenGL dma-buf with the check of EG

Re: [PATCH] docs/system: Extend PPC section

2021-02-22 Thread Cédric Le Goater
On 2/23/21 1:28 AM, David Gibson wrote: > On Mon, Feb 22, 2021 at 03:04:41PM +0100, Greg Kurz wrote: >> On Mon, 22 Feb 2021 14:39:56 +0100 >> Cédric Le Goater wrote: >> >>> This moves the current documentation in files specific to each >>> platform family. PowerNV machine is updated, the other mac

[PATCH v3] configure: Improve OpenGL dependency detections

2021-02-22 Thread Akihiko Odaki
This has the following visible changes: - GBM is required only for OpenGL dma-buf. - X11 is explicitly required by gtk-egl. - EGL is now mandatory for the OpenGL displays. The last one needs some detailed description. Before this change, EGL was tested only for OpenGL dma-buf with the check of EG

[PATCH v2] virtio-blk: Respect discard granularity

2021-02-22 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/block/virtio-blk.c | 8 +++- hw/core/machine.c | 9 - include/hw/virtio/virtio-blk.h | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index bac2d6fa2b2..f4378e

Re: [PATCH qemu v13] spapr: Implement Open Firmware client interface

2021-02-22 Thread David Gibson
On Tue, Feb 23, 2021 at 04:01:00PM +1100, Alexey Kardashevskiy wrote: > > > On 23/02/2021 14:07, David Gibson wrote: > > On Tue, Feb 09, 2021 at 10:02:52PM +1100, Alexey Kardashevskiy wrote: > > > The PAPR platform which describes an OS environment that's presented by > > > a combination of a hyp

Re: [PATCH qemu v13] spapr: Implement Open Firmware client interface

2021-02-22 Thread David Gibson
On Mon, Feb 22, 2021 at 04:01:06PM +0100, Greg Kurz wrote: > On Mon, 22 Feb 2021 22:48:51 +1100 > Alexey Kardashevskiy wrote: > > > Ping? > > > > I need community support here :) I am hearing that having this mode > > helps heaps with development in fully emulated environments as this > > skip

[PATCH] net/slirp: Fix incorrect permissions on samba >= 2.0.5

2021-02-22 Thread Niklas Hambüchen
As the added commend and `man smb.conf` explain, starting with that samba version, `force user` must be configured in `[global]` in order to access the configured `smb_dir`. This broke `-net user,smb=/path/to/folder`: The `chdir` into e.g. `/run/user/0/qemu-smb.DCZ8Y0` failed. In verbose logs, th

Re: [PATCH qemu v13] spapr: Implement Open Firmware client interface

2021-02-22 Thread Alexey Kardashevskiy
On 23/02/2021 14:07, David Gibson wrote: On Tue, Feb 09, 2021 at 10:02:52PM +1100, Alexey Kardashevskiy wrote: The PAPR platform which describes an OS environment that's presented by a combination of a hypervisor and firmware. The features it specifies require collaboration between the firmwa

Re: Editing QEMU POWER Platform wiki page

2021-02-22 Thread David Gibson
On Mon, Feb 22, 2021 at 06:18:08PM -0300, Leonardo Augusto Guimarães Garcia wrote: > On 2/22/21 8:01 AM, Greg Kurz wrote: > > On Thu, 18 Feb 2021 10:16:25 -0300 > > Leonardo Augusto Guimarães Garcia wrote: > > > > > Hi there, > > > > > > I would like to edit the wiki page at [0] as it contains

Re: [PATCH] virtio-gpu: Respect graphics update interval for EDID

2021-02-22 Thread Akihiko Odaki
2021年2月22日(月) 19:57 Gerd Hoffmann : > > On Sun, Feb 21, 2021 at 10:34:14PM +0900, Akihiko Odaki wrote: > > This change introduces an additional member, refresh_rate to > > qemu_edid_info in include/hw/display/edid.h. > > > > This change also isolates the graphics update interval from the > > displa

Re: [PATCH v2] ui/console: Pass placeholder surface to displays

2021-02-22 Thread Akihiko Odaki
2021年2月22日(月) 19:51 Gerd Hoffmann : > > Hi, > > > #define QEMU_ALLOCATED_FLAG 0x01 > > +#define QEMU_PLACEHOLDER_FLAG 0x02 > > > +static inline int is_placeholder(DisplaySurface *surface) > > +{ > > +return surface->flags & QEMU_PLACEHOLDER_FLAG; > > +} > > Interesting idea. That appr

Re: [PATCH v3 6/6] hw/ppc: Add emulation of Genesi/bPlan Pegasos II

2021-02-22 Thread David Gibson
On Mon, Feb 22, 2021 at 04:22:06PM +0100, BALATON Zoltan wrote: > Add new machine called pegasos2 emulating the Genesi/bPlan Pegasos II, > a PowerPC board based on the Marvell MV64361 system controller and the > VIA VT8231 integrated south bridge/superio chips. It can run Linux, > AmigaOS and a wid

Re: [PATCH v3 0/6] Pegasos2 emulation

2021-02-22 Thread David Gibson
On Mon, Feb 22, 2021 at 04:22:06PM +0100, BALATON Zoltan wrote: > Hello, > > This is adding a new PPC board called pegasos2. More info on it can be > found at: > > https://osdn.net/projects/qmiga/wiki/SubprojectPegasos2 > > Currently it needs a firmware ROM image that I cannot include due to > o

Re: [PATCH v3 1/6] vt82c686: Implement control of serial port io ranges via config regs

2021-02-22 Thread David Gibson
On Mon, Feb 22, 2021 at 04:22:06PM +0100, BALATON Zoltan wrote: > In VIA super south bridge the io ranges of superio components > (parallel and serial ports and FDC) can be controlled by superio > config registers to set their base address and enable/disable them. > This is not easy to implement in

Re: [PATCH v3 5/6] hw/pci-host: Add emulation of Marvell MV64361 PPC system controller

2021-02-22 Thread David Gibson
On Mon, Feb 22, 2021 at 04:22:06PM +0100, BALATON Zoltan wrote: > The Marvell Discovery II aka. MV64361 is a PowerPC system controller > chip that is used on the pegasos2 PPC board. This adds emulation of it > that models the device enough to boot guests on this board. The > mv643xx.h header with r

Re: [PATCH v4 0/5] CPU unplug timeout/LMB unplug cleanup in DRC reconfiguration

2021-02-22 Thread David Gibson
On Mon, Feb 22, 2021 at 04:45:26PM -0300, Daniel Henrique Barboza wrote: > Hi, > > This new version contains fixes proposed during the review of v3. > Patches were rebased on top of David's ppc-for-6.0. Applied to ppc-for-6.0. > > > changes from v3: > - former patch 1: already pushed to ppc-fo

[PATCH v2] configure: Improve OpenGL dependency detections

2021-02-22 Thread Akihiko Odaki
This has the following visible changes: - GBM is required only for OpenGL dma-buf. - X11 is explicitly required by gtk-egl. - EGL is now mandatory for the OpenGL displays. The last one needs some detailed description. Before this change, EGL was tested only for OpenGL dma-buf with the check of EG

Re: [RFC PATCH 02/23] kvm: Switch KVM_CAP_READONLY_MEM to a per-VM ioctl()

2021-02-22 Thread Isaku Yamahata
On Tue, Feb 16, 2021 at 08:56:45AM +0100, Philippe Mathieu-Daudé wrote: > Hi Isaku, > > On 2/16/21 3:12 AM, Isaku Yamahata wrote: > > Switch to making a VM ioctl() call for KVM_CAP_READONLY_MEM, which may > > be conditional on VM type in recent versions of KVM, e.g. when TDX is > > supported. >

Re: [PATCH v2 01/11] accel/kvm: Check MachineClass kvm_type() return value

2021-02-22 Thread David Gibson
On Mon, Feb 22, 2021 at 06:50:44PM +0100, Cornelia Huck wrote: > On Mon, 22 Feb 2021 18:41:07 +0100 > Philippe Mathieu-Daudé wrote: > > > On 2/22/21 6:24 PM, Cornelia Huck wrote: > > > On Fri, 19 Feb 2021 18:38:37 +0100 > > > Philippe Mathieu-Daudé wrote: > > > > > >> MachineClass::kvm_type()

Re: [PATCH qemu v13] spapr: Implement Open Firmware client interface

2021-02-22 Thread David Gibson
On Tue, Feb 09, 2021 at 10:02:52PM +1100, Alexey Kardashevskiy wrote: > The PAPR platform which describes an OS environment that's presented by > a combination of a hypervisor and firmware. The features it specifies > require collaboration between the firmware and the hypervisor. > > Since the beg

Re: [PATCH v4 2/5] spapr: rename spapr_drc_detach() to spapr_drc_unplug_request()

2021-02-22 Thread David Gibson
On Mon, Feb 22, 2021 at 04:45:28PM -0300, Daniel Henrique Barboza wrote: > spapr_drc_detach() is not the best name for what the function does. The > function does not detach the DRC, it makes an uncommited attempt to do > it. It'll mark the DRC as pending unplug, via the 'unplug_request' > flag, a

Re: [PATCH] target/ppc: Fix bcdsub. emulation when result overflows

2021-02-22 Thread David Gibson
On Mon, Feb 22, 2021 at 04:40:35PM -0300, Fabiano Rosas wrote: 65;6203;1c> The commit d03b174a83 (target/ppc: simplify bcdadd/sub functions) > meant to simplify some of the code but it inadvertently altered the > way the CR6 field is set after the operation has overflowed. > > The CR6 bits are set

Re: [PATCH v2 01/11] accel/kvm: Check MachineClass kvm_type() return value

2021-02-22 Thread David Gibson
On Tue, Feb 23, 2021 at 10:33:55AM +1100, David Gibson wrote: > On Mon, Feb 22, 2021 at 06:50:44PM +0100, Cornelia Huck wrote: > > On Mon, 22 Feb 2021 18:41:07 +0100 > > Philippe Mathieu-Daudé wrote: > > > > > On 2/22/21 6:24 PM, Cornelia Huck wrote: > > > > On Fri, 19 Feb 2021 18:38:37 +0100 > >

Re: [PATCH qemu v13] spapr: Implement Open Firmware client interface

2021-02-22 Thread David Gibson
On Mon, Feb 22, 2021 at 10:48:51PM +1100, Alexey Kardashevskiy wrote: > Ping? > > I need community support here :) I am hearing that having this mode helps > heaps with development in fully emulated environments as this skips SLOF > entirely, for example. Another rumour I am hearing is that there

Re: [PATCH v4 1/5] spapr_drc.c: use spapr_drc_release() in isolate_physical/set_unusable

2021-02-22 Thread David Gibson
On Mon, Feb 22, 2021 at 04:45:27PM -0300, Daniel Henrique Barboza wrote: > When moving a physical DRC to "Available", drc_isolate_physical() will > move the DRC state to STATE_PHYSICAL_POWERON and, if the DRC is marked > for unplug, call spapr_drc_detach(). For physical DRCs, > drck->empty_state is

Re: [PATCH] docs/system: Extend PPC section

2021-02-22 Thread David Gibson
On Mon, Feb 22, 2021 at 03:04:41PM +0100, Greg Kurz wrote: > On Mon, 22 Feb 2021 14:39:56 +0100 > Cédric Le Goater wrote: > > > This moves the current documentation in files specific to each > > platform family. PowerNV machine is updated, the other machines need > > to be done. > > > > Signed-o

[PATCH v3 1/3] vfio: Move the saving of the config space to the right place in VFIO migration

2021-02-22 Thread Shenming Lu
On ARM64 the VFIO SET_IRQS ioctl is dependent on the VM interrupt setup, if the restoring of the VFIO PCI device config space is before the VGIC, an error might occur in the kernel. So we move the saving of the config space to the non-iterable process, thus it will be called after the VGIC accordi

[PATCH v3 2/3] vfio: Set the priority of the VFIO VM state change handler explicitly

2021-02-22 Thread Shenming Lu
In the VFIO VM state change handler when stopping the VM, the _RUNNING bit in device_state is cleared which makes the VFIO device stop, including no longer generating interrupts. Then we can save the pending states of all interrupts in the GIC VM state change handler (on ARM). So we have to set th

[PATCH v3 0/3] vfio: Some fixes and optimizations for VFIO migration

2021-02-22 Thread Shenming Lu
This patch set includes two fixes and one optimization for VFIO migration as blew: Patch 1-2: - Fix two ordering problems in migration. Patch 3: - Optimize the enabling process of the MSI-X vectors in migration. History: v2 -> v3: - Nit fixes. - Set error in migration stream for migration to fa

[PATCH v3 3/3] vfio: Avoid disabling and enabling vectors repeatedly in VFIO migration

2021-02-22 Thread Shenming Lu
In VFIO migration resume phase and some guest startups, there are already unmasked vectors in the vector table when calling vfio_msix_enable(). So in order to avoid inefficiently disabling and enabling vectors repeatedly, let's allocate all needed vectors first and then enable these unmasked vector

[PATCH 1/3] migration/ram: Modify the code comment of ram_save_host_page()

2021-02-22 Thread Kunkun Jiang
The ram_save_host_page() has been modified several times since its birth. But the comment hasn't been modified as it should be. It'd better to modify the comment to explain ram_save_host_page() more clearly. Signed-off-by: Keqian Zhu Signed-off-by: Kunkun Jiang --- migration/ram.c | 17

[PATCH 2/3] migration/ram: Modify ram_save_host_page() to match the comment

2021-02-22 Thread Kunkun Jiang
According to the comment, when the host page is a huge page, the migration_rate_limit() should be executed. If not, this function can be omitted to save time. Signed-off-by: Keqian Zhu Signed-off-by: Kunkun Jiang --- migration/ram.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH 3/3] migration/ram: Optimize ram_save_host_page()

2021-02-22 Thread Kunkun Jiang
Starting from pss->page, ram_save_host_page() will check every page and send the dirty pages up to the end of the current host page or the boundary of used_length of the block. If the host page size is a huge page, the step "check" will take a lot of time. This will improve performance to use migr

[PATCH 0/3] migration/ram: Some modifications about ram_save_host_page()

2021-02-22 Thread Kunkun Jiang
Hi, This series include patches as below: Patch 1-2: - modified the comment and code of ram_save_host_page() to make them match each other Patch 3: - optimized ram_save_host_page() by using migration_bitmap_find_dirty() to find dirty pages Best Regards Kunkun Jiang Kunkun Jiang (3): migrat

[PATCH v3 08/16] qapi/expr.py: add type hint annotations

2021-02-22 Thread John Snow
Annotations do not change runtime behavior. This commit *only* adds annotations. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/expr.py | 71 --- scripts/qapi/mypy.ini | 5 --- 2 files changed, 46 insert

[PATCH v3 16/16] qapi/expr.py: Use an expression checker dispatch table

2021-02-22 Thread John Snow
This enforces a type signature against all of the top-level expression check routines without necessarily needing to create some overcomplicated class hierarchy for them. Signed-off-by: John Snow --- scripts/qapi/expr.py | 64 +++- 1 file changed, 34 inser

[PATCH v3 15/16] qapi/expr.py: move related checks inside check_xxx functions

2021-02-22 Thread John Snow
There's not a big obvious difference between the types of checks that happen in the main function versus the kind that happen in the functions. Now they're in one place for each of the main types. As part of the move, spell out the required and optional keywords so they're obvious at a glance. Use

[PATCH v3 10/16] qapi/expr.py: Remove single-letter variable

2021-02-22 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/expr.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py index 3235a3b809e..473ee4f7f7e 100644 --- a/scripts/qapi/expr.py

[PATCH v3 13/16] qapi/expr.py: Modify check_keys to accept any Collection

2021-02-22 Thread John Snow
This is a minor adjustment that allows the 'required' and 'optional' keys fields to take a default value of an empty, immutable sequence (the empty tuple). This reveals a quirk of this function, which is that "a + b" is list-specific behavior. We can accept a wider variety of types if we avoid tha

[PATCH v3 11/16] qapi/expr.py: enable pylint checks

2021-02-22 Thread John Snow
Signed-off-by: John Snow Tested-by: Eduardo Habkost Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- scripts/qapi/pylintrc | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc index b9e077a1642..fb0386d529a 100644 ---

[PATCH v3 14/16] qapi/expr.py: Use tuples instead of lists for static data

2021-02-22 Thread John Snow
It is -- maybe -- possibly -- three nanoseconds faster. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- This can be dropped if desired; it has no real functional impact I could defend in code review court. I just happened to write it this way. Signed-off-by

[PATCH v3 12/16] qapi/expr.py: Add docstrings

2021-02-22 Thread John Snow
In this patch, I begin to adopt the idea that some functions can be marked as "Const" and others "RW" to distinguish between functions that perform a check-only, and those that perform normilization work and modify the structure under consideration. It is not any kind of doc standard, it was for m

[PATCH v3 09/16] qapi/expr.py: Consolidate check_if_str calls in check_if

2021-02-22 Thread John Snow
This is a small rewrite to address some minor style nits. Don't compare against the empty list to check for the empty condition, and move the normalization forward to unify the check on the now-normalized structure. With the check unified, the local nested function isn't needed anymore and can be

[PATCH v3 07/16] qapi/expr.py: Add casts in a few select cases

2021-02-22 Thread John Snow
Casts are instructions to the type checker only, they aren't "safe" and should probably be avoided in general. In this case, when we perform type checking on a nested structure, the type of each field does not "stick". We don't need to assert that something is a str if we've already checked that i

[PATCH v3 00/16] qapi: static typing conversion, pt3

2021-02-22 Thread John Snow
Hi, this series adds static types to the QAPI module. This is part three, and it focuses on expr.py. This series is applied and hosted here: https://gitlab.com/jsnow/qemu/-/tree/python-qapi-cleanup-pt3 Environment: - Python >= 3.6, <= 3.8 * - mypy >= 0.770 - pylint >= 2.6.0 - flake8 - isort Ever

[PATCH v3 04/16] qapi/expr.py: Add assertion for union type 'check_dict'

2021-02-22 Thread John Snow
mypy isn't fond of allowing you to check for bool membership in a collection of str elements. Guard this lookup for precisely when we were given a name. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/expr.py | 4 +++- 1 file changed, 3 insertion

[PATCH v3 06/16] qapi/expr.py: Check type of 'data' member

2021-02-22 Thread John Snow
Iterating over the members of data isn't going to work if it's not some form of dict anyway, but for the sake of mypy, formalize it. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost --- scripts/qapi/expr.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/scripts/qapi/expr.py b/s

[PATCH v3 05/16] qapi/expr.py: move string check upwards in check_type

2021-02-22 Thread John Snow
For readability purposes only, shimmy the early return upwards to the top of the function, so cases proceed in order from least to most complex. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/expr.py | 8 1 file changed, 4 insertions(+)

[PATCH v3 03/16] qapi/expr.py: constrain incoming expression types

2021-02-22 Thread John Snow
mypy does not know the types of values stored in Dicts that masquerade as objects. Help the type checker out by constraining the type. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/expr.py | 25 ++--- 1 file changed, 22 inse

[PATCH v3 01/16] qapi/expr.py: Remove 'info' argument from nested check_if_str

2021-02-22 Thread John Snow
The function can just use the argument from the scope above. Otherwise, we get shadowed argument errors because the parameter name clashes with the name of a variable already in-scope. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/expr.py | 6 +

[PATCH v3 02/16] qapi/expr.py: Check for dict instead of OrderedDict

2021-02-22 Thread John Snow
OrderedDict is a subtype of dict, so we can check for a more general form. These functions do not themselves depend on it being any particular type. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/expr.py | 5 ++--- 1 file changed, 2 insertions(+

[PATCH 0/2] gitlab-ci.yml: Add jobs to test CFI

2021-02-22 Thread Daniele Buono
For a few months now QEMU has had options to enable compiler-based control-flow integrity if built with clang. While this feature has a low maintenance, It's probably still better to add tests to the CI environment to check that an update doesn't break it. As an added benefit, this also inherentl

[PATCH 2/2] gitlab-ci.yml: Add jobs to test CFI flags

2021-02-22 Thread Daniele Buono
QEMU has had options to enable control-flow integrity features for a few months now. Add two sets of build/check/acceptance jobs to ensure the binary produced is working fine. The two sets allow testing of x86_64 binaries for every target that is not deprecated. Signed-off-by: Daniele Buono ---

[PATCH 1/2] gitlab-ci.yml: Allow custom make parallelism

2021-02-22 Thread Daniele Buono
Currently, make parallelism at build time is defined as #cpus+1. Some build jobs may need (or benefit from) a different number. An example is builds with LTO where, because of the huge demand of memory at link time, gitlab runners fails if two linkers are run concurrently This patch retains the d

[PATCH v3 10/10] target/mips: Extract MXU code to new mxu_translate.c file

2021-02-22 Thread Philippe Mathieu-Daudé
Extract 1600+ lines from the big translate.c into a new file. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/mxu_translate.c | 1625 +++ target/mips/translate.c | 1613 -- target/mips/meson.build |1 + 3 files cha

[PATCH v3 08/10] target/mips: Make mxu_translate_init() / decode_ase_mxu() proto public

2021-02-22 Thread Philippe Mathieu-Daudé
To be able to move these functions out of the big translate.c, make their prototype public. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.h | 6 ++ target/mips/translate.c | 9 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/target/mips/translate.h

[PATCH v3 06/10] target/mips: Use OPC_MUL instead of OPC__MXU_MUL

2021-02-22 Thread Philippe Mathieu-Daudé
We already have a macro and definition to extract / check the Special2 MUL opcode. Use it instead of the unnecessary OPC__MXU_MUL macro. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/mips/translate.c

[PATCH v3 05/10] target/mips: Extract decode_ase_mxu() from decode_opc_mxu()

2021-02-22 Thread Philippe Mathieu-Daudé
To easily convert MXU code to decodetree, extract decode_ase_mxu() from decode_opc_mxu(), making it return a boolean. We will keep decode_opc_mxu() in the translate.c unit because it calls gen_arith(). Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.c | 45 +++

Re: [RFC PATCH 4/5] Add migration support for KVM guest with MTE

2021-02-22 Thread Richard Henderson
On 2/22/21 1:46 AM, Haibo Xu wrote: > As I mentioned in the cover later, the reason to let the tag go with the > memory data together is to make it easier to sync with each other. I think > if we migratie them separately, it would be hard to keep the tags to sync > with the data. Well, maybe, maybe

[PATCH v3 03/10] target/mips: Remove unused CPUMIPSState* from MXU functions

2021-02-22 Thread Philippe Mathieu-Daudé
None of these MXU functions use their CPUMIPSState* env argument, remove it. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index a53ce6

[PATCH v3 02/10] target/mips: Remove XBurst Media eXtension Unit dead code

2021-02-22 Thread Philippe Mathieu-Daudé
All these unimplemented MXU opcodes end up calling gen_reserved_instruction() which is the default switch case in decode_opc_mxu(). The translate.c file is already big enough and hard to maintain, remove 1300 lines of unnecessary code and /* TODO */ comments. Reviewed-by: Richard Henderson Signe

[PATCH v3 01/10] target/mips: Rewrite complex ifdef'ry

2021-02-22 Thread Philippe Mathieu-Daudé
No need for this obfuscated ifdef'ry, KISS. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index 70891c37cdd..1f1c5f33c87 100644 --- a/target/mips/

[PATCH v3 04/10] target/mips: Pass instruction opcode to decode_opc_mxu()

2021-02-22 Thread Philippe Mathieu-Daudé
In the next commit we'll make decode_opc_mxu() match decodetree prototype by returning a boolean. First pass ctx->opcode as an argument. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/target/mip

[PATCH v3 07/10] target/mips: Introduce mxu_translate_init() helper

2021-02-22 Thread Philippe Mathieu-Daudé
Extract the MXU register initialization code from mips_tcg_init() as a new mxu_translate_init() helper Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/target/mips/translate.c b/targ

[PATCH v3 09/10] target/mips: Simplify 64-bit ifdef'ry of MXU code

2021-02-22 Thread Philippe Mathieu-Daudé
Check for 'TARGET_LONG_BITS == 32' and simplify 64-bit ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.h | 2 -- target/mips/translate.c | 18 ++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/target/mips/translate.h b/target/mips/tran

[PATCH v3 00/10] target/mips: Extract MXU code to new mxu_translate.c file

2021-02-22 Thread Philippe Mathieu-Daudé
Hi, This is a respin of "Extract XBurst Media eXtension Unit translation routines" v2: https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg05889.html But instead of an included C file (.c.inc) we now have an independent C unit. We gain faster recompilation time when hacking translate.c or mx

[Bug 1916394] Re: [git] Cannot build qemu: FAILED: target/hexagon/semantics_generated.pyinc

2021-02-22 Thread briancain
I can't seem to reproduce this locally, I will try to see if I can get my configuration to match yours more closely. Does the attached patch mitigate the build issue? 0001-target-hexagon- fix-meson-build-failure.patch ** Patch added: "0001-target-hexagon-fix-meson-build-failure.patch" https:

Re: [PATCH V2 1/7] block/rbd: bump librbd requirement to luminous release

2021-02-22 Thread Jason Dillaman
On Mon, Feb 15, 2021 at 8:29 AM Peter Lieven wrote: > > Am 15.02.21 um 13:13 schrieb Kevin Wolf: > > Am 15.02.2021 um 12:45 hat Peter Lieven geschrieben: > >> Am 15.02.21 um 12:41 schrieb Daniel P. Berrangé: > >>> On Mon, Feb 15, 2021 at 12:32:24PM +0100, Peter Lieven wrote: > Am 15.02.21 um

Re: What prevents discarding a cluster during rewrite?

2021-02-22 Thread Vladimir Sementsov-Ogievskiy
23.02.2021 00:30, Vladimir Sementsov-Ogievskiy wrote: Hi all! Thinking of how to prevent dereferencing to zero (and discard) of host cluster during flush of compressed cache (which I'm working on now), I have a question.. What prevents it for normal writes? I have no idea about why didn't i

What prevents discarding a cluster during rewrite?

2021-02-22 Thread Vladimir Sementsov-Ogievskiy
Hi all! Thinking of how to prevent dereferencing to zero (and discard) of host cluster during flush of compressed cache (which I'm working on now), I have a question.. What prevents it for normal writes? A simple interactive qemu-io session on master branch: ./qemu-img create -f qcow2 x 1M [

Re: Editing QEMU POWER Platform wiki page

2021-02-22 Thread Leonardo Augusto Guimarães Garcia
On 2/22/21 8:01 AM, Greg Kurz wrote: On Thu, 18 Feb 2021 10:16:25 -0300 Leonardo Augusto Guimarães Garcia wrote: Hi there, I would like to edit the wiki page at [0] as it contains some outdated information. Could anyone that has access to the wiki please help me create a user so that I can ed

Re: [PATCH v2 5/5] hw/block/nvme: report non-mdts command size limit for dsm

2021-02-22 Thread Klaus Jensen
On Feb 23 05:55, Keith Busch wrote: > On Mon, Feb 22, 2021 at 07:47:59PM +0100, Klaus Jensen wrote: > > +typedef struct NvmeIdCtrlNvm { > > +uint8_t vsl; > > +uint8_t wzsl; > > +uint8_t wusl; > > +uint8_t dmrl; > > +uint32_tdmrsl; > > +uint64_tdmsl; >

Re: [PATCH 0/3] hw/block/nvme: mdts/zasl cleanup

2021-02-22 Thread Keith Busch
These look good. Reviewed-by: Keith Busch

Re: [PATCH v2 5/5] hw/block/nvme: report non-mdts command size limit for dsm

2021-02-22 Thread Keith Busch
On Mon, Feb 22, 2021 at 07:47:59PM +0100, Klaus Jensen wrote: > +typedef struct NvmeIdCtrlNvm { > +uint8_t vsl; > +uint8_t wzsl; > +uint8_t wusl; > +uint8_t dmrl; > +uint32_tdmrsl; > +uint64_tdmsl; > +uint8_t rsvd16[4080]; > +} NvmeIdCtrlNvm;

Re: [PATCH V2 0/6] hw/block/nvme: support namespace attachment

2021-02-22 Thread Klaus Jensen
On Feb 11 01:09, Minwoo Im wrote: > Hello, > > This series supports namespace attachment: attach and detach. This is > the second version series with a fix a bug on choosing a controller to > attach for a namespace in the attach command handler. > > Since V1: > - Fix to take 'ctrl' which is gi

Re: Plugin Address Translations Inconsistent/Incorrect?

2021-02-22 Thread Aaron Lindsay via
On Feb 22 19:30, Alex Bennée wrote: > Aaron Lindsay writes: > > If I call (inside a memory callback): > > > > `uint64_t pa = qemu_plugin_hwaddr_device_offset(hwaddr);` > > > > I see that `pa` takes the value 0xe0e58760. If, however, I plumb > > `cpu_get_phys_page_debug` through to the plugin inter

Re: [PATCH v5 3/4] Jobs based on custom runners: docs and gitlab-runner setup playbook

2021-02-22 Thread Wainer dos Santos Moschetta
Hi, On 2/19/21 6:58 PM, Cleber Rosa wrote: To have the jobs dispatched to custom runners, gitlab-runner must be installed, active as a service and properly configured. The variables file and playbook introduced here should help with those steps. The playbook introduced here covers a number of

Re: [PATCH V2 6/7] hw/block/nvme: support namespace attachment command

2021-02-22 Thread Klaus Jensen
On Feb 11 01:09, Minwoo Im wrote: > This patch supports Namespace Attachment command for the pre-defined > nvme-ns device nodes. Of course, attach/detach namespace should only be > supported in case 'subsys' is given. This is because if we detach a > namespace from a controller, somebody needs to

[PATCH 2/3] hw/block/nvme: deduplicate bad mdts trace event

2021-02-22 Thread Klaus Jensen
From: Klaus Jensen If mdts is exceeded, trace it from a single place. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 6 +- hw/block/trace-events | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 6a27b28f2c2d..25a7726ca05

[PATCH 0/3] hw/block/nvme: mdts/zasl cleanup

2021-02-22 Thread Klaus Jensen
From: Klaus Jensen The gist of this series is about aligning the zoned.zasl parameter with the mdts parameter. I complained about this back when I was reviewing the zoned series but was shot down. I relented on the size/capacity debate (and still fully support that), but I never really liked that

[PATCH 1/3] hw/block/nvme: document 'mdts' nvme device parameter

2021-02-22 Thread Klaus Jensen
From: Klaus Jensen Document the 'mdts' nvme device parameter. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 1cd82fa3c9fe..6a27b28f2c2d 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -63,6

[PATCH 3/3] hw/block/nvme: align zoned.zasl with mdts

2021-02-22 Thread Klaus Jensen
From: Klaus Jensen ZASL (Zone Append Size Limit) is defined exactly like MDTS (Maximum Data Transfer Size), that is, it is a value in units of the minimum memory page size (CAP.MPSMIN) and is reported as a power of two. The 'mdts' nvme device parameter is specified as in the spec, but the 'zoned

[PATCH] target/ppc: Fix bcdsub. emulation when result overflows

2021-02-22 Thread Fabiano Rosas
The commit d03b174a83 (target/ppc: simplify bcdadd/sub functions) meant to simplify some of the code but it inadvertently altered the way the CR6 field is set after the operation has overflowed. The CR6 bits are set based on the *unbounded* result of the operation, so we need to look at the result

Re: [PATCH v2 0/4] improve do_strtosz precision

2021-02-22 Thread Eric Blake
On 2/11/21 2:44 PM, Eric Blake wrote: > Parsing sizes with only 53 bits of precision is surprising; it's time > to fix it to use a full 64 bits of precision. > > v1 was here: > https://lists.gnu.org/archive/html/qemu-devel/2021-02/msg01800.html > > Since then: > - split testsuite improvements fro

Re: Plugin Address Translations Inconsistent/Incorrect?

2021-02-22 Thread Peter Maydell
On Mon, 22 Feb 2021 at 19:53, Alex Bennée wrote: > It certainly is by design. The comment for the helper states: > > /* >* The following additional queries can be run on the hwaddr structure >* to return information about it. For non-IO accesses the device >* offset will be into the

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread Michael Tokarev
22.02.2021 20:09, Laurent Vivier wrote: Here it is: https://lists.gnu.org/archive/html/qemu-devel/2021-02/msg04639.html In this case, we don't want to modify QEMU to manage special case based on the binary name but instead use a wrapper: A wrapper immediately defeats the purpose of the fix-

Re: [PATCH v2 04/11] hw/arm: Restrit KVM to the virt & versal machines

2021-02-22 Thread BALATON Zoltan
On Fri, 19 Feb 2021, Philippe Mathieu-Daudé wrote: Restrit KVM to the following ARM machines: Typo: "Restrict" (also in patch title). Regards, BALATON Zoltan - virt - xlnx-versal-virt Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/virt.c | 5 + hw/arm/xlnx-versal-virt.c |

Re: Plugin Address Translations Inconsistent/Incorrect?

2021-02-22 Thread Alex Bennée
Aaron Lindsay writes: > Hello, > > I've been doing some more work with plugins and found something I didn't > expect with regards to address translation. > > If I call (inside a memory callback): > > `uint64_t pa = qemu_plugin_hwaddr_device_offset(hwaddr);` > > I see that `pa` takes the value 0

[PATCH v4 5/5] spapr_drc.c: use DRC reconfiguration to cleanup DIMM unplug state

2021-02-22 Thread Daniel Henrique Barboza
Handling errors in memory hotunplug in the pSeries machine is more complex than any other device type, because there are all the complications that other devices has, and more. For instance, determining a timeout for a DIMM hotunplug must consider if it's a Hash-MMU or a Radix-MMU guest, because H

[PATCH v4 3/5] spapr_drc.c: introduce unplug_timeout_timer

2021-02-22 Thread Daniel Henrique Barboza
The LoPAR spec provides no way for the guest kernel to report failure of hotplug/hotunplug events. This wouldn't be bad if those operations were granted to always succeed, but that's far for the reality. What ends up happening is that, in the case of a failed hotunplug, regardless of whether it wa

[PATCH v4 4/5] spapr_drc.c: add hotunplug timeout for CPUs

2021-02-22 Thread Daniel Henrique Barboza
There is a reliable way to make a CPU hotunplug fail in the pseries machine. Hotplug a CPU A, then offline all other CPUs inside the guest but A. When trying to hotunplug A the guest kernel will refuse to do it, because A is now the last online CPU of the guest. PAPR has no 'error callback' in this

[PATCH v4 2/5] spapr: rename spapr_drc_detach() to spapr_drc_unplug_request()

2021-02-22 Thread Daniel Henrique Barboza
spapr_drc_detach() is not the best name for what the function does. The function does not detach the DRC, it makes an uncommited attempt to do it. It'll mark the DRC as pending unplug, via the 'unplug_request' flag, and only if the DRC state is drck->empty_state it will detach the DRC, via spapr_d

[PATCH v4 0/5] CPU unplug timeout/LMB unplug cleanup in DRC reconfiguration

2021-02-22 Thread Daniel Henrique Barboza
Hi, This new version contains fixes proposed during the review of v3. Patches were rebased on top of David's ppc-for-6.0. changes from v3: - former patch 1: already pushed to ppc-for-6.0 - former patch 2: dropped - all patches: commit message trimmed to < 76 chars per line - all patches: added R

[PATCH v4 1/5] spapr_drc.c: use spapr_drc_release() in isolate_physical/set_unusable

2021-02-22 Thread Daniel Henrique Barboza
When moving a physical DRC to "Available", drc_isolate_physical() will move the DRC state to STATE_PHYSICAL_POWERON and, if the DRC is marked for unplug, call spapr_drc_detach(). For physical DRCs, drck->empty_state is STATE_PHYSICAL_POWERON, meaning that we're sure that spapr_drc_detach() will end

Re: [PATCH v6 01/12] memory: Introduce RamDiscardMgr for RAM memory regions

2021-02-22 Thread David Hildenbrand
The main motivation is to let listener decide how it wants to handle the memory region. For example, for vhost, vdpa, kvm, ... I only want a single region, not separate ones for each and every populated range, punching out discarded ranges. Note that there are cases (i.e., anonymous memory), where

[PATCH 0/3] gitlab-pipeline-status script: provide more information on errors

2021-02-22 Thread Cleber Rosa
When things go wrong with the GitLab API requests, it's useful to give users more information about the possible causes. Cleber Rosa (3): scripts/ci/gitlab-pipeline-status: split utlity function for HTTP GET scripts/ci/gitlab-pipeline-status: give more information on failures scripts/ci/gitl

  1   2   3   4   5   >