Re: [RFC PATCH 18/25] hw/cxl/device: Add a memory device (8.2.8.5)

2020-11-12 Thread Markus Armbruster
Eric Blake writes: > On 11/10/20 11:47 PM, Ben Widawsky wrote: >> A CXL memory device (AKA Type 3) is a CXL component that contains some >> combination of volatile and persistent memory. It also implements the >> previously defined mailbox interface as well as the memory device >> firmware

Re: [PATCH v3 4/4] max111x: put it into the 'misc' category

2020-11-12 Thread Thomas Huth
On 12/11/2020 13.58, Gan Qixin wrote: > The category of the max111x device is not set, put it into the 'misc' > category. > > Signed-off-by: Gan Qixin > --- > hw/misc/max111x.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/misc/max111x.c b/hw/misc/max111x.c > index

Re: [PATCH 29/30] sparc tcg cpus: Fix Lesser GPL version number

2020-11-12 Thread Thomas Huth
On 23/10/2020 14.42, Chetan Pant wrote: > There is no "version 2" of the "Lesser" General Public License. > It is either "GPL version 2.0" or "Lesser GPL version 2.1". > This patch replaces all occurrences of "Lesser GPL version 2" with > "Lesser GPL version 2.1" in comment section. > >

Re: [PATCH 22/30] overall/alpha tcg cpus|hppa: Fix Lesser GPL version number

2020-11-12 Thread Thomas Huth
On 23/10/2020 14.33, Chetan Pant wrote: > There is no "version 2" of the "Lesser" General Public License. > It is either "GPL version 2.0" or "Lesser GPL version 2.1". > This patch replaces all occurrences of "Lesser GPL version 2" with > "Lesser GPL version 2.1" in comment section. > >

Re: [PATCH 28/30] e1000e: Fix Lesser GPL version number

2020-11-12 Thread Thomas Huth
On 23/10/2020 14.41, Chetan Pant wrote: > There is no "version 2" of the "Lesser" General Public License. > It is either "GPL version 2.0" or "Lesser GPL version 2.1". > This patch replaces all occurrences of "Lesser GPL version 2" with > "Lesser GPL version 2.1" in comment section. > >

[PATCH 5/6] migration: Fix cache_init()'s "Failed to allocate" error messages

2020-11-12 Thread Markus Armbruster
cache_init() attempts to handle allocation failure.. The two error messages are garbage, as untested error messages commonly are: Parameter 'cache size' expects Failed to allocate cache Parameter 'cache size' expects Failed to allocate page cache Fix them to just Failed to allocate

[PATCH 6/6] migration: Fix a few absurdly defective error messages

2020-11-12 Thread Markus Armbruster
migrate_params_check() has a number of error messages of the form Parameter 'NAME' expects is invalid, it should be ... Fix them to something like Parameter 'NAME' expects a ... Signed-off-by: Markus Armbruster --- migration/migration.c | 23 +++ 1 file changed,

[PATCH 1/6] migration: Fix and clean up around @tls-authz

2020-11-12 Thread Markus Armbruster
Commit d2f1d29b95 "migration: add support for a "tls-authz" migration parameter" added MigrationParameters member @tls-authz. Whereas the other members aren't really optional (see commit 1bda8b3c695), this one is genuinely optional: migration_instance_init() leaves it absent, and

Re: [PATCH 27/30] x86 hvf cpus: Fix Lesser GPL version number

2020-11-12 Thread Thomas Huth
On 23/10/2020 14.40, Chetan Pant wrote: > There is no "version 2" of the "Lesser" General Public License. > It is either "GPL version 2.0" or "Lesser GPL version 2.1". > This patch replaces all occurrences of "Lesser GPL version 2" with > "Lesser GPL version 2.1" in comment section. > >

[PATCH 0/6] migration: Fixes and cleanups aroung migrate-set-parameters

2020-11-12 Thread Markus Armbruster
Not sure about 5.2. The bugs aren't recent regressions. Markus Armbruster (6): migration: Fix and clean up around @tls-authz migration: Fix migrate-set-parameters argument validation migration: Clean up signed vs. unsigned XBZRLE cache-size migration: Check xbzrle-cache-size more

[PATCH 2/6] migration: Fix migrate-set-parameters argument validation

2020-11-12 Thread Markus Armbruster
Commit 741d4086c8 "migration: Use proper types in json" (v2.12.0) switched MigrationParameters to narrower integer types, and removed the simplified qmp_migrate_set_parameters()'s argument checking accordingly. Good idea, except qmp_migrate_set_parameters() takes MigrateSetParameters, not

[PATCH 4/6] migration: Check xbzrle-cache-size more carefully

2020-11-12 Thread Markus Armbruster
migrate-set-parameters passes the size to xbzrle_cache_resize(). xbzrle_cache_resize() checks it fits into size_t before it passes it on to cache_init(). cache_init() checks it is a power of two no smaller than @page_size. cache_init() is also called from xbzrle_init(), bypassing

[PATCH 3/6] migration: Clean up signed vs. unsigned XBZRLE cache-size

2020-11-12 Thread Markus Armbruster
73af8dd8d7 "migration: Make xbzrle_cache_size a migration parameter" (v2.11.0) made the new parameter unsigned (QAPI type 'size', uint64_t in C). It neglected to update existing code, which continues to use int64_t. migrate_xbzrle_cache_size() returns the new parameter. Adjust its return type.

[PATCH 0/2] authz-list-file: Error handling fixes

2020-11-12 Thread Markus Armbruster
Possibly 5.2 material, because a silly mistake in use of object-add can crash QEMU. Markus Armbruster (2): authz-list-file: Fix file read error handling authz-list-file: Improve an error message authz/listfile.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.26.2

[PATCH 1/2] authz-list-file: Fix file read error handling

2020-11-12 Thread Markus Armbruster
The Error ** argument must be NULL, _abort, _fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. qauthz_list_file_complete() is

[PATCH 2/2] authz-list-file: Improve an error message

2020-11-12 Thread Markus Armbruster
When qauthz_list_file_load() rejects JSON values other than JSON object with a rather confusing error message: $ echo 1 | qemu-system-x86_64 -nodefaults -S -display none -object authz-list-file,id=authz0,filename=/dev/stdin qemu-system-x86_64: -object

[PATCH] Clean up includes

2020-11-12 Thread Markus Armbruster
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes, with the changes to the following files manually reverted: contrib/libvhost-user/libvhost-user-glib.h

RE: [PATCH v2 4/5] plugins/loader: fix uninitialized variable warning in plugin_reset_uninstall()

2020-11-12 Thread Chenqun (kuhn)
> -Original Message- > From: Alex Bennée [mailto:alex.ben...@linaro.org] > Sent: Thursday, November 12, 2020 1:23 AM > To: Chenqun (kuhn) > Cc: qemu-devel@nongnu.org; qemu-triv...@nongnu.org; > peter.mayd...@linaro.org; Zhanghailiang ; > ganqixin ; Euler Robot > Subject: Re: [PATCH v2

[PULL for-5.2 1/1] MAINTAINERS: Replace my twiddle.net address

2020-11-12 Thread Richard Henderson
Consolidate all of my MAINTAINERS entries on my work address. Signed-off-by: Richard Henderson --- MAINTAINERS | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 6c2df0bef3..2e018a0c1d 100644 --- a/MAINTAINERS +++

[PULL for-5.2 0/1] MAINTAINERS: Replace my twiddle.net address

2020-11-12 Thread Richard Henderson
The following changes since commit cb5d19e8294486551c422759260883ed290226d9: Merge remote-tracking branch 'remotes/mcayland/tags/qemu-macppc-20201112' into staging (2020-11-12 11:33:26 +) are available in the Git repository at: https://github.com/rth7680/qemu.git tags/pull-tcg-20201112

[PATCH v3 1/4] ssd0323: put it into the 'display' category

2020-11-12 Thread Gan Qixin
The category of the ssd0323 device is not set, put it into the 'display' category. Signed-off-by: Gan Qixin Reviewed-by: Thomas Huth --- hw/display/ssd0323.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/ssd0323.c b/hw/display/ssd0323.c index 17d4b32ae3..cbfd21dfd5 100644 ---

[PATCH v3 4/4] max111x: put it into the 'misc' category

2020-11-12 Thread Gan Qixin
The category of the max111x device is not set, put it into the 'misc' category. Signed-off-by: Gan Qixin --- hw/misc/max111x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/max111x.c b/hw/misc/max111x.c index 7e6723f343..eae0f9b598 100644 --- a/hw/misc/max111x.c +++

[PATCH v3 3/4] nand: put it into the 'storage' category

2020-11-12 Thread Gan Qixin
The category of the nand device is not set, put it into the 'storage' category. Signed-off-by: Gan Qixin Reviewed-by: Thomas Huth --- hw/block/nand.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/block/nand.c b/hw/block/nand.c index bcceb64ebb..1d7a48a2ec 100644 --- a/hw/block/nand.c

[PATCH v3 2/4] ads7846: put it into the 'input' category

2020-11-12 Thread Gan Qixin
The category of the ads7846 device is not set, put it into the 'input' category. Signed-off-by: Gan Qixin --- Cc: Peter Maydell --- hw/display/ads7846.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/display/ads7846.c b/hw/display/ads7846.c index 023165b2a3..cb3a431cfd 100644 ---

[PATCH v3 0/4] Categorize some uncategorized devices

2020-11-12 Thread Gan Qixin
v1->v2: Correct some spelling errors and limit commit message line length to around 70. v2->v3: Changes suggested by Peter Maydell: ads7846 is a touch-screen controller, so put it into the 'input' category instead of 'display' category. Gan Qixin (4): ssd0323: put it into the

[PATCH] hmp: Update current monitor acts on the entire handle_hmp_command()

2020-11-12 Thread lichun
monitor_parse_arguments() also need to known the current monitoar: (gdb) bt #0 0x55ac6a6d in mon_get_cpu_sync (mon=0x0, synchronize=synchronize@entry=true) at ../monitor/misc.c:270 #1 0x55ac6b4a in mon_get_cpu () at ../monitor/misc.c:294 #2 0x55ac80fd in

[PATCH v4 0/4] hw/block/m25p80: Numonyx: Fix dummy cycles and check for SPI mode on cmds

2020-11-12 Thread Joe Komlodi
Changelog: v3 -> v4 - 1/4: Patch changed to change names of register fields to be more accurate. - 1/4: Revert polarity change from v3. - 2/4: Added, fixes polarity of VCFG XIP mode when copied from NVCFG. - 3/4: Removed check_cmd_mode function, each command check is done in decode_new_cmd

[PATCH v4 2/4] hw/block/m25p80: Fix when VCFG XIP bit is set for Numonyx

2020-11-12 Thread Joe Komlodi
VCFG XIP is set (disabled) when the NVCFG XIP bits are all set (disabled). Signed-off-by: Joe Komlodi --- hw/block/m25p80.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 452d252..eb6539f 100644 --- a/hw/block/m25p80.c +++

[PATCH v4 3/4] hw/block/m25p80: Check SPI mode before running some Numonyx commands

2020-11-12 Thread Joe Komlodi
Some Numonyx flash commands cannot be executed in DIO and QIO mode, such as trying to do DPP or DOR when in QIO mode. Signed-off-by: Joe Komlodi --- hw/block/m25p80.c | 134 +- 1 file changed, 112 insertions(+), 22 deletions(-) diff --git

[PATCH v4 4/4] hw/block/m25p80: Fix Numonyx fast read dummy cycle count

2020-11-12 Thread Joe Komlodi
Numonyx chips determine the number of cycles to wait based on bits 7:4 in the volatile configuration register. However, if these bits are 0x0 or 0xF, the number of dummy cycles to wait is 10 on a QIOR or QIOR4 command, or 8 on any other currently supported fast read command. [1] [1]

[PATCH v4 1/4] hw/block/m25p80: Make Numonyx config field names more accurate

2020-11-12 Thread Joe Komlodi
The previous naming of the configuration registers made it sound like that if the bits were set the settings would be enabled, while the opposite is true. Signed-off-by: Joe Komlodi --- hw/block/m25p80.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

RE: [PATCH v2 09/12] colo: Use class properties

2020-11-12 Thread Zhang, Chen
Looks good for me, but Qemu still have lots of parts use object_property_add, do you have plan to change it? Reviewed-by: Zhang Chen Thanks Chen > -Original Message- > From: Eduardo Habkost > Sent: Thursday, November 12, 2020 2:38 AM > To: qemu-devel@nongnu.org > Cc: Daniel P.

[Bug 1902470] Re: migration with TLS-MultiFD is stuck when the dst-libvirtd service restarts

2020-11-12 Thread Chuan Zheng
this bug is fixed by commit(a1af605bd5ade1a6dd571f553a6746b97f3d6869), close the issue as fixed ** Changed in: qemu Status: In Progress => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[PATCH 09/10] vhost: add VHOST_SET_VRING_ENABLE support

2020-11-12 Thread Mike Christie
This adds a new ioctl VHOST_SET_VRING_ENABLE that the vhost drivers can implement a callout for and execute an operation when the vq is enabled/disabled. Signed-off-by: Mike Christie --- drivers/vhost/vhost.c | 25 + drivers/vhost/vhost.h | 1 +

[PATCH 03/10] vhost poll: fix coding style

2020-11-12 Thread Mike Christie
We use like 3 coding styles in this struct. Switch to just tabs. Signed-off-by: Mike Christie Reviewed-by: Chaitanya Kulkarni --- drivers/vhost/vhost.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index

[PATCH 06/10] vhost scsi: make SCSI cmd completion per vq

2020-11-12 Thread Mike Christie
In the last patches we are going to have a worker thread per IO vq. This patch separates the scsi cmd completion code paths so we can complete cmds based on their vq instead of having all cmds complete on the same worker thread. Signed-off-by: Mike Christie --- drivers/vhost/scsi.c | 48

[PATCH 00/10] vhost/qemu: thread per IO SCSI vq

2020-11-12 Thread Mike Christie
The following kernel patches were made over Michael's vhost branch: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git/log/?h=vhost and the vhost-scsi bug fix patchset: https://lore.kernel.org/linux-scsi/20201112170008.GB1555653@stefanha-x1.localdomain/T/#t And the qemu patch was

[PATCH 10/10] vhost-scsi: create a woker per IO vq

2020-11-12 Thread Mike Christie
This patch has vhost-scsi create a worker thread per IO vq. It also adds a modparam to enable the feature, because I was thinking existing setups might not be expecting the extra threading use, so the default is to use the old single thread multiple vq behavior. Signed-off-by: Mike Christie ---

[PATCH 04/10] vhost: support multiple worker threads

2020-11-12 Thread Mike Christie
This is a prep patch to support multiple vhost worker threads per vhost dev. This patch converts the code that had assumed a single worker thread by: 1. Moving worker related fields to a new struct vhost_worker. 2. Converting vhost.c code to use the new struct and assume we will have an array of

[PATCH 05/10] vhost: poll support support multiple workers

2020-11-12 Thread Mike Christie
The final patches are going to have vhost scsi create a vhost worker per IO vq. This patch converts the poll code to poll and queue work on the worker that is tied to the vq (in this patch we maintain the old behavior where all vqs use a single worker). For drivers that do not convert over to the

[PATCH 07/10] vhost, vhost-scsi: flush IO vqs then send TMF rsp

2020-11-12 Thread Mike Christie
With one worker we will always send the scsi cmd responses then send the TMF rsp, because LIO will always complete the scsi cmds first which calls vhost_scsi_release_cmd to add them to the work queue. When the next patch adds multiple worker support, the worker threads could still be sending

[PATCH 1/1] qemu vhost scsi: add VHOST_SET_VRING_ENABLE support

2020-11-12 Thread Mike Christie
This patch made over the master branch allows the vhost-scsi driver to call into the kernel and tell it to enable/disable a virtqueue. The kernel patches included with this set, will create a worker per IO vq when multiple IO queues have been setup. Signed-off-by: Mike Christie ---

[PATCH 02/10] vhost scsi: remove extra flushes

2020-11-12 Thread Mike Christie
The vhost work flush function was flushing the entire work queue, so there is no need for the double vhost_work_dev_flush calls in vhost_scsi_flush. And we do not need to call vhost_poll_flush for each poller because that call also ends up flushing the same work queue thread the

[PATCH 08/10] vhost: move msg_handler to new ops struct

2020-11-12 Thread Mike Christie
The next patch adds a callout so drivers can perform some action when we get a VHOST_SET_VRING_ENABLE, so this patch moves the msg_handler callout to a new vhost_dev_ops struct just to keep all the callouts better organized. Signed-off-by: Mike Christie --- drivers/vhost/vdpa.c | 7 +--

[PATCH 01/10] vhost: remove work arg from vhost_work_flush

2020-11-12 Thread Mike Christie
vhost_work_flush doesn't do anything with the work arg. This patch drops it and then renames vhost_work_flush to vhost_work_dev_flush to reflect that the function flushes all the works in the dev and not just a specific queue or work item. Signed-off-by: Mike Christie Acked-by: Jason Wang

[PATCH v2 7/7] qapi: More complex uses of QAPI_LIST_APPEND

2020-11-12 Thread Eric Blake
These cases require a bit more thought to review; in each case, the code was appending to a list, but not with a FOOList **tail variable. Signed-off-by: Eric Blake --- block/gluster.c| 13 +--- block/qapi.c | 14 + dump/dump.c| 22 ++-

[PATCH v2 4/7] qapi: Use QAPI_LIST_PREPEND() where possible

2020-11-12 Thread Eric Blake
Anywhere we create a list of just one item or by prepending items (typically because order doesn't matter), we can use the now-public macro. But places where we must keep the list in order by appending remain open-coded until later patches. Note that as a side effect, this also performs a

[PATCH v2 6/7] qapi: Use QAPI_LIST_APPEND in trivial cases

2020-11-12 Thread Eric Blake
The easiest spots to use QAPI_LIST_APPEND are where we already have an obvious pointer to the tail of a list. Signed-off-by: Eric Blake --- backends/hostmem.c | 8 +--- block/dirty-bitmap.c| 6 +-- block/export/export.c | 5 +-- block/qapi.c

[PATCH v2 5/7] qapi: Introduce QAPI_LIST_APPEND

2020-11-12 Thread Eric Blake
Similar to the existing QAPI_LIST_PREPEND, but designed for use where we want to preserve insertion order. Callers will be added in upcoming patches. Note the difference in signature: PREPEND takes List*, APPEND takes List**. Signed-off-by: Eric Blake --- include/qapi/util.h | 13

[PATCH v2 3/7] migration: Refactor migrate_cap_add

2020-11-12 Thread Eric Blake
Instead of taking a list parameter and returning a new head at a distance, just return the new item for the caller to insert into a list via QAPI_LIST_PREPEND. Signed-off-by: Eric Blake --- migration/migration.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff

[PATCH v2 2/7] rocker: Revamp fp_port_get_info

2020-11-12 Thread Eric Blake
Instead of modifying the value member of a list element passed as a parameter, and open-coding the manipulation of that list, it's nicer to just return a freshly allocated value to be prepended to a list using QAPI_LIST_PREPEND. Signed-off-by: Eric Blake --- hw/net/rocker/rocker_fp.h | 2 +-

[PATCH v2 0/7] Common macros for QAPI list growth

2020-11-12 Thread Eric Blake
v1, as such, was here: https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg08003.html (v6 11/11 qapi: Use QAPI_LIST_ADD() where possible) since then, I've rebased that patch (upstream went with PREPEND instead of ADD), split things out for easier review, added QAPI_LIST_APPEND, caught a lot

[PATCH v2 1/7 for-5.2?] net: Fix memory leak on error

2020-11-12 Thread Eric Blake
If qmp_query_rx_filter() encounters an error on a second iteration, it leaks the memory from the first. Fixes: 9083da1d4c Signed-off-by: Eric Blake --- net/net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/net.c b/net/net.c index 794c652282cb..eb65e110871a 100644 --- a/net/net.c

[Bug 1794086] Re: readlink(2) returns incorrect size for /proc/self/exe

2020-11-12 Thread Oleg Andriyanov
** Changed in: qemu Status: Incomplete => New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1794086 Title: readlink(2) returns incorrect size for /proc/self/exe Status in QEMU: New Bug

Re: [RFC PATCH 16/25] hw/pxb/cxl: Add "windows" for host bridges

2020-11-12 Thread Ben Widawsky
On 20-11-10 21:47:15, Ben Widawsky wrote: > In a bare metal CXL capable system, system firmware will program > physical address ranges on the host. This is done by programming > internal registers that aren't typically known to OS. These address > ranges might be contiguous or interleaved across

Re: [PATCH v2] hw/riscv: microchip_pfsoc: add QSPI NOR flash

2020-11-12 Thread Alistair Francis
On Wed, Nov 11, 2020 at 11:51 PM Vitaly Wool wrote: > > Add QSPI NOR flash definition for Microchip PolarFire SoC. > > Signed-off-by: Vitaly Wool Thanks! Applied to riscv-to-apply.next Alistair > --- > hw/riscv/microchip_pfsoc.c | 21 + >

Re: [PATCH v2 1/1] register: Remove unnecessary NULL check

2020-11-12 Thread Alistair Francis
On Thu, Nov 12, 2020 at 7:51 AM Peter Maydell wrote: > > On Fri, 2 Oct 2020 at 17:04, Alistair Francis > wrote: > > > > This patch fixes CID 1432800 by removing an unnecessary check. > > > > Signed-off-by: Alistair Francis > > --- > > hw/core/register.c | 4 > > 1 file changed, 4

RE: [PATCH v3 1/3] hw/block/m25p80: Fix Numonyx NVCFG DIO and QIO bit polarity

2020-11-12 Thread Joe Komlodi
Hi Francisco, -Original Message- From: Francisco Iglesias Sent: Wednesday, November 11, 2020 6:33 AM To: Joe Komlodi Cc: qemu-devel@nongnu.org; philippe.mathieu.da...@gmail.com; Francisco Eduardo Iglesias ; alist...@alistair23.me; qemu-bl...@nongnu.org; mre...@redhat.com Subject: Re:

[PULL 1/1] Fix use after free in vfio_migration_probe

2020-11-12 Thread Alex Williamson
From: Kirti Wankhede Fixes Coverity issue: CID 1436126: Memory - illegal accesses (USE_AFTER_FREE) Fixes: a9e271ec9b36 ("vfio: Add migration region initialization and finalize function") Signed-off-by: Kirti Wankhede Reviewed-by: David Edmondson Reviewed-by: Alex Bennée Reviewed-by:

[PULL 0/1] vfio fix for QEMU 5.2-rc2

2020-11-12 Thread Alex Williamson
The following changes since commit cb5d19e8294486551c422759260883ed290226d9: Merge remote-tracking branch 'remotes/mcayland/tags/qemu-macppc-20201112' into staging (2020-11-12 11:33:26 +) are available in the Git repository at: git://github.com/awilliam/qemu-vfio.git tags/vfio-update

[PATCH v3 3/4] ppc/translate: Delay NaN checking after comparison

2020-11-12 Thread LemonBoy
Since we always perform a comparison between the two operands avoid checking for NaN unless the result states they're unordered. Suggested-by: Richard Henderson Signed-off-by: Giuseppe Musacchio Reviewed-by: Richard Henderson --- target/ppc/fpu_helper.c | 80

[PATCH v3 2/4] ppc/translate: Turn the helper macros into functions

2020-11-12 Thread LemonBoy
Suggested-by: Richard Henderson Signed-off-by: Giuseppe Musacchio Reviewed-by: Richard Henderson --- target/ppc/fpu_helper.c | 222 ++-- 1 file changed, 120 insertions(+), 102 deletions(-) diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c index

[PATCH v3 0/4] ppc/translate: Fix unordered f64/f128 comparisons

2020-11-12 Thread LemonBoy
Fix a couple of problems found in the emulation of f64/f128 comparisons plus some minimal self-contained commits to clean-up some code. Giuseppe Musacchio (4): ppc/translate: Fix unordered f64/f128 comparisons ppc/translate: Turn the helper macros into functions ppc/translate: Delay NaN

[PATCH v3 1/4] ppc/translate: Fix unordered f64/f128 comparisons

2020-11-12 Thread LemonBoy
According to the PowerISA v3.1 reference, Table 68 "Actions for xscmpudp - Part 1: Compare Unordered", whenever one of the two operands is a NaN the SO bit is set while the other three bits are cleared. Apply the same change to xscmpuqp. The respective ordered counterparts are unaffected.

[PATCH v3 4/4] ppc/translate: Raise exceptions after setting the cc

2020-11-12 Thread LemonBoy
The PowerISA reference states that the comparison operators update the FPCC, CR and FPSCR and, if VE=1, jump to the exception handler. Moving the exception-triggering code after the CC update sequence solves the problem. Signed-off-by: Giuseppe Musacchio Reviewed-by: Richard Henderson ---

[PATCH v3 53/53] sev: Use class properties

2020-11-12 Thread Eduardo Habkost
Instance properties make introspection hard and are not shown by "-object ...,help". Convert them to class properties. Signed-off-by: Eduardo Habkost --- This is a new patch added in v3 of this series. There was another version of this patch inside series: Subject: [PATCH 00/12] qom: Make

[PATCH v3 51/53] qom: PROP_* macros

2020-11-12 Thread Eduardo Habkost
The new helper macros are similar to the old DEFINE_PROP_* macros, but don't take a name argument. They can be used directly as argument to object_class_property_add_field(). The DEFINE_PROP_* macros were redefined to just be wrappers to PROP_*. Signed-off-by: Eduardo Habkost --- Changes v2 ->

[PATCH v3 50/53] qom: Delete DEFINE_PROP_*SIGNED_NODEFAULT macro

2020-11-12 Thread Eduardo Habkost
Those macros are exactly the same as DEFINE_PROP, we can use DEFINE_PROP directly. Signed-off-by: Eduardo Habkost --- This is a new patch added in v3 of this series. --- Cc: Alex Williamson Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: Peter Maydell Cc:

[PATCH v3 46/53] qdev: Move base property types to qom/property-types.c

2020-11-12 Thread Eduardo Habkost
Move all property types from qdev-properties.c to qom/property-types.c. Declarations are moved from hw/qdev-properties.h to qom/property-types.h. Signed-off-by: Eduardo Habkost --- Changes v2 -> v3: * Redone after changes in previous patches in this series * Reordered patch, tried to put it a

Re: [PATCH 0/2] RFC: Issue with discards on raw block device without O_DIRECT

2020-11-12 Thread Darrick J. Wong
On Thu, Nov 12, 2020 at 01:00:56PM +0100, Jan Kara wrote: > On Thu 12-11-20 12:19:51, Jan Kara wrote: > > [added some relevant people and lists to CC] > > > > On Wed 11-11-20 17:44:05, Maxim Levitsky wrote: > > > On Wed, 2020-11-11 at 17:39 +0200, Maxim Levitsky wrote: > > > > clone of

[PATCH v3 52/53] tests: Use field property at check-qom-proplist test case

2020-11-12 Thread Eduardo Habkost
Use the field property system for the "sv" property used at check-qom-proplist. Signed-off-by: Eduardo Habkost --- Changes v2 -> v3: * Don't register a instance field property, as object_property_add_field() is an internal API Changes v1 -> v2: * Use PROP_* and

[PATCH v3 44/53] qom: Add new qom.h header

2020-11-12 Thread Eduardo Habkost
Multiple QOM features will be provided by different headers. Add a qom/qom.h header to make it easier to include all of them at once. Signed-off-by: Eduardo Habkost --- This is a new patch added in v3 of the series. --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc:

[PATCH v3 42/53] qdev: Reuse object_property_add_field() when adding array elements

2020-11-12 Thread Eduardo Habkost
Now that we call object_property_add() with exactly the same arguments as object_property_add_field() does, we can just reuse the function. We can now use a stack variable for the new Property struct, because object_property_add_field() will copy the struct. Signed-off-by: Eduardo Habkost ---

[PATCH v3 43/53] qdev: Move static_prop_release_dynamic_prop() closer to its usage

2020-11-12 Thread Eduardo Habkost
Move the function closer to where it's used, to make refactor and review simpler. While doing it, reformat the comment at the top to follow coding style. Signed-off-by: Eduardo Habkost --- This is a new patch added in v3 of the series. --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc:

[PATCH v3 49/53] qom: FIELD_PROP macro

2020-11-12 Thread Eduardo Habkost
The FIELD_PROP macro can be used to define a Property struct when initializing static variables, or as a function parameter (e.g. as a paramter to object_class_property_add_field()). The qdev-specific DEFINE_PROP macro can be defined using the new macro. The only difference is that DEFINE_PROP

[PATCH v3 40/53] qdev: Rename array_element_release() to static_prop_release_dynamic_prop()

2020-11-12 Thread Eduardo Habkost
The function is now generic and can be used by any property that had the Property struct allocated dynamically. Signed-off-by: Eduardo Habkost --- This is a new patch added in v3 of the series. --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org ---

[PATCH v3 47/53] qom: Include static property API reference in documentation

2020-11-12 Thread Eduardo Habkost
Include the static-properties.h API reference in docs/devel/qom.rst. Signed-off-by: Eduardo Habkost --- Changes v2 -> v3: * Redone patch after changes in previous patches in the series * Split into separate patches. This one only adds the file to qom.rst and Property/PropertyInfo doc

[PATCH v3 39/53] qdev: Get rid of ArrayElementProperty struct

2020-11-12 Thread Eduardo Habkost
Now that we don't store any additional data about the property in AraryElementStruct, we don't need it anymore. We can just allocate a Property struct directly. Signed-off-by: Eduardo Habkost --- Change v1 -> v2: * Get rid of the struct, but not of the release function (we still need it, or

[PATCH v3 41/53] qdev: Make object_property_add_field() copy the Property struct

2020-11-12 Thread Eduardo Habkost
This will make the function more convenient to use, and allow us to reuse it for array element properties. I'm not adding a version of this function that doesn't copy the struct, because this function isn't supposed to be used widely. Signed-off-by: Eduardo Habkost --- This is a new patch added

[PATCH v3 25/53] qdev: Make qdev_class_add_property() more flexible

2020-11-12 Thread Eduardo Habkost
Support Property.set_default and PropertyInfo.description even if PropertyInfo.create is set. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Patch redone after changes in the previous patches in the series --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc:

[PATCH v3 24/53] qdev: Make PropertyInfo.create return ObjectProperty*

2020-11-12 Thread Eduardo Habkost
Returning ObjectProperty* will be useful for new property registration code that will add additional callbacks to ObjectProperty after registering it. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Redone patch on top of additional changes in series v2 * Commit message reword --- Cc:

[PATCH v3 38/53] qdev: Remove ArrayElementProperty.release field

2020-11-12 Thread Eduardo Habkost
We don't need the extra field because we can find the release function for the property directly at ArrayElementProperty.info.release. Signed-off-by: Eduardo Habkost --- This is a new patch added in v3 of this series. --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc:

[PATCH v3 36/53] qdev: Don't set .name_template for array elements

2020-11-12 Thread Eduardo Habkost
All property code should be able to handle .name_template==NULL without problems, so we don't need to set it for array elements. This simple change will allow us to simplify the array property registration code a lot in the next commits. Signed-off-by: Eduardo Habkost --- This is a patch added

[PATCH v3 37/53] qdev: Remove ArrayElementProperty.propname field

2020-11-12 Thread Eduardo Habkost
Now that we don't save the property name in Property.name anymore, we don't need the to keep the property name string alive after the property was registered. We can remove the ArrayElementProperty.propname field, and free the string immediately after registering the property. Signed-off-by:

[Bug 1903833] Re: User mode qemu-aarch: SIGGSEGV signal handler works wrong

2020-11-12 Thread Richard Henderson
The patch is most definitely wrong. The page protection is required to implement self-modifying code, of which a signal trampoline is a subset. Moreover, your test case works for me using both x86_64-linux and aarch64-linux as hosts. There may be a bug, but I suspect it to be within WSL. I have

[PATCH v3 33/53] qom: Add allow_set callback to ObjectProperty

2020-11-12 Thread Eduardo Habkost
Add a ObjectProperty.allow_set callback, that can be set by QOM property registration functions. Note that this doesn't replace the check callback at object*_property_add_link() (yet), because currently the link property check callback needs to get the property value as argument (despite this not

[PATCH v3 34/53] qdev: Make qdev_prop_allow_set() a ObjectProperty.allow_set callback

2020-11-12 Thread Eduardo Habkost
Add a new allow_set parameter to object*_property_add_field(), and pass qdev_prop_allow_set as argument in the qdev registration code. This removes the last remaining line of code inside the core field property code that's specific to TYPE_DEVICE, and will allow us to make field properties a core

[PATCH v3 19/53] qdev: Avoid using prop->name unnecessarily

2020-11-12 Thread Eduardo Habkost
We already get the property name as argument to the property getter and setters, we don't need to use prop->name. This will make it easier to remove the Property.name field in the future. Reviewed-by: Stefan Berger Signed-off-by: Eduardo Habkost --- This is a new patch added in series v2 ---

[PATCH v3 32/53] tests: Add unit test for qdev array properties

2020-11-12 Thread Eduardo Habkost
Add a test case to ensure array properties are behaving as expected. Signed-off-by: Eduardo Habkost --- This is a new patch added in v3 of this series. --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- tests/test-qdev-global-props.c | 61

[PATCH v3 29/53] qdev: Rename qdev_prop_* to prop_info_*

2020-11-12 Thread Eduardo Habkost
The basic property types in qdev-properties.c are not going to be qdev-specific anymore. Rename the variables to prop_info_*. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Redone patch after moving UUID property to qdev-properties-system.c --- Cc: Paolo Bonzini Cc: "Daniel P.

[PATCH v3 48/53] qom: object_class_property_add_field() function

2020-11-12 Thread Eduardo Habkost
It is similar to object_class_property_add_field_static(), but gets a copy of a Property struct so we don't need static variables. Signed-off-by: Eduardo Habkost --- This is a new patch added in v3 of this series, but v2 had a object_class_property_add_field() function too. This version of

[PATCH v3 31/53] qdev: Avoid unnecessary DeviceState* variable at set_prop_arraylen()

2020-11-12 Thread Eduardo Habkost
We're just doing pointer math with the device pointer, we can simply use obj instead. Reviewed-by: Marc-André Lureau Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- hw/core/qdev-properties.c | 5 ++--- 1 file

[PATCH v3 15/53] qdev: Move softmmu properties to qdev-properties-system.h

2020-11-12 Thread Eduardo Habkost
Move the property types and property macros implemented in qdev-properties-system.c to a new qdev-properties-system.h header. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Move UUID property type too, as it was moved to qdev-properties-system.c in the previous patch --- audio/audio.h

[PATCH v3 45/53] qdev: Move core field property code to QOM

2020-11-12 Thread Eduardo Habkost
Move the core of the static property code to qom/field-property.c. The actual property type implementations are still in qdev-properties.c, they will be moved later. Signed-off-by: Eduardo Habkost --- Changes v2 -> v3: * Redone patch after changes in previous patches of this series * Reordered

[PATCH v3 13/53] qdev: Make qdev_propinfo_get_uint16() static

2020-11-12 Thread Eduardo Habkost
There are no users of the function outside qdev-properties.c. Make function static and rename it to get_uint16(). Reviewed-by: Marc-André Lureau Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org ---

[PATCH v3 26/53] qdev: Separate generic and device-specific property registration

2020-11-12 Thread Eduardo Habkost
qdev_class_add_property() and qdev_property_add_static() will have code that's specific for device types. object_class_property_add_field_static() and object_property_add_field() will be generic and part of the QOM field property API. Note that the new functions have a `name` parameter because

[PATCH v3 23/53] qdev: Move dev->realized check to qdev_property_set()

2020-11-12 Thread Eduardo Habkost
Every single qdev property setter function manually checks dev->realized. We can just check dev->realized inside qdev_property_set() instead. The check is being added as a separate function (qdev_prop_allow_set()) because it will become a callback later. Reviewed-by: Stefan Berger

[PATCH v3 27/53] qdev: Rename qdev_propinfo_* to field_prop_*

2020-11-12 Thread Eduardo Habkost
These functions will be moved to be part of QOM, so rename them. Signed-off-by: Eduardo Habkost --- Changes v2: * Rename to field_prop_* instead of object_propinfo_* --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- hw/core/qdev-prop-internal.h

[PATCH v3 12/53] qdev: Make error_set_from_qdev_prop_error() get Object* argument

2020-11-12 Thread Eduardo Habkost
Make the code more generic and not specific to TYPE_DEVICE. Reviewed-by: Marc-André Lureau Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: Cornelia Huck Cc: Thomas Huth Cc: Richard Henderson Cc: David Hildenbrand Cc: Halil Pasic Cc:

[PATCH v3 35/53] qdev: Rename Property.name to Property.name_template

2020-11-12 Thread Eduardo Habkost
The Property.name field won't always be set, but it is very easy to miss this detail when we see code using prop->name. Rename the field to "name_template", to indicate it is just a template used when creating new properties in some cases, but is not always set. Signed-off-by: Eduardo Habkost

  1   2   3   >