Re: [PATCH v3 for-5.2 1/3] ppc/xive: Rework setup of XiveSource::esb_mmio

2020-08-13 Thread David Gibson
On Fri, Aug 07, 2020 at 02:36:01PM +0200, Cédric Le Goater wrote: > On 8/7/20 1:32 PM, Greg Kurz wrote: > > Depending on whether XIVE is emultated or backed with a KVM XIVE device, > > the ESB MMIOs of a XIVE source point to an I/O memory region or a mapped > > memory region. > > > > This is

Re: [PATCH v3 for-5.2 3/3] spapr/xive: Convert KVM device fd checks to assert()

2020-08-13 Thread David Gibson
On Fri, Aug 07, 2020 at 01:32:21PM +0200, Greg Kurz wrote: > All callers guard these functions with an xive_in_kernel() helper. Make > it clear that they are only to be called when the KVM XIVE device exists. > > Note that the check on xive is dropped in kvmppc_xive_disconnect(). It > really

Re: [PATCH v3 for-5.2 2/3] ppc/xive: Introduce dedicated kvm_irqchip_in_kernel() wrappers

2020-08-13 Thread David Gibson
On Fri, Aug 07, 2020 at 01:32:14PM +0200, Greg Kurz wrote: > Calls to the KVM XIVE device are guarded by kvm_irqchip_in_kernel(). This > ensures that QEMU won't try to use the device if KVM is disabled or if > an in-kernel irqchip isn't required. > > When using ic-mode=dual with the pseries

Re: [PATCH 13/14] ppc/xive: Simplify error handling in xive_tctx_realize()

2020-08-13 Thread David Gibson
On Mon, Aug 10, 2020 at 06:55:22PM +0200, Greg Kurz wrote: > Now that kvmppc_xive_cpu_connect() returns a negative errno on failure, > use that and get rid of the local_err boilerplate. > > Signed-off-by: Greg Kurz Applied to ppc-for-5.2 > --- > hw/intc/xive.c |5 + > 1 file changed,

Re: [RFC 6/9] target/arm: introduce KVM_CAP_ARM_CPU_FEATURE

2020-08-13 Thread Cornelia Huck
On Thu, 13 Aug 2020 18:26:54 +0800 Peng Liang wrote: > Introduce KVM_CAP_ARM_CPU_FEATURE to check whether KVM supports to set > CPU features in ARM. > > Signed-off-by: zhanghailiang > Signed-off-by: Peng Liang > --- > linux-headers/linux/kvm.h | 1 + > target/arm/cpu.c | 5 + >

Re: [PATCH-for-5.2] target/mips: Report unimplemented cache() operations

2020-08-13 Thread Jiaxun Yang
在 2020/8/11 上午1:21, Philippe Mathieu-Daudé 写道: On 8/6/20 11:37 PM, Philippe Mathieu-Daudé wrote: On 8/6/20 10:51 PM, Peter Maydell wrote: On Thu, 6 Aug 2020 at 21:31, Philippe Mathieu-Daudé wrote: On 8/6/20 8:01 PM, Jiaxun Yang wrote: 在 2020/8/6 下午8:26, Philippe Mathieu-Daudé 写道: We

Re: [PATCH 10/14] spapr/xive: Fix error handling in kvmppc_xive_post_load()

2020-08-13 Thread David Gibson
On Mon, Aug 10, 2020 at 06:55:01PM +0200, Greg Kurz wrote: > Now that all these functions return a negative errno on failure, check > that because it is preferred to local_err. And most of all, propagate it > because vmstate expects negative errnos. > > Signed-off-by: Greg Kurz Applied to

Call for Outreachy Mentors (December 2020 - March 2021)

2020-08-13 Thread Stefan Hajnoczi
Dear QEMU & KVM community, QEMU will apply to participate in the Outreachy December 2020 - March 2021 internship program this year. Outreachy (https://www.outreachy.org/) offers full-time, paid, 12-week, remote work internships for contributing to QEMU for anyone who faces under-representation,

Re: [PATCH 00/17] crypto/cipher: Class hierarchy cleanups

2020-08-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200813032537.2888593-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200813032537.2888593-1-richard.hender...@linaro.org Subject: [PATCH 00/17]

Re: [PULL 0/9] Tracing patches

2020-08-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200813052257.226142-1-stefa...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN

Re: [PATCH 09/14] spapr/kvm: Fix error handling in kvmppc_xive_pre_save()

2020-08-13 Thread David Gibson
On Mon, Aug 10, 2020 at 06:54:54PM +0200, Greg Kurz wrote: > Now that kvmppc_xive_get_queues() returns a negative errno on failure, check > with that because it is preferred to local_err. And most of all, propagate > it because vmstate expects negative errnos. > > Signed-off-by: Greg Kurz Fixed

Re: [PATCH 08/14] spapr/xive: Rework error handling of kvmppc_xive_set_source_config()

2020-08-13 Thread David Gibson
On Mon, Aug 10, 2020 at 06:54:47PM +0200, Greg Kurz wrote: > Since kvm_device_access() returns a negative errno on failure, convert > kvmppc_xive_set_source_config() to use it for error checking. This allows > to get rid of the local_err boilerplate. > > Propagate the return value so that callers

Re: [PATCH 06/14] spapr/xive: Rework error handling of kvmppc_xive_[gs]et_queue_config()

2020-08-13 Thread David Gibson
On Mon, Aug 10, 2020 at 06:54:33PM +0200, Greg Kurz wrote: > Since kvm_device_access() returns a negative errno on failure, convert > kvmppc_xive_get_queue_config() and kvmppc_xive_set_queue_config() to > use it for error checking. This allows to get rid of the local_err > boilerplate. > >

Re: [PATCH 05/14] spapr/xive: Rework error handling of kvmppc_xive_cpu_[gs]et_state()

2020-08-13 Thread David Gibson
On Mon, Aug 10, 2020 at 06:54:26PM +0200, Greg Kurz wrote: > kvm_set_one_reg() returns a negative errno on failure, use that instead > of errno. Also propagate it to callers so they can use it to check > for failures and hopefully get rid of their local_err boilerplate. > > Signed-off-by: Greg

Re: [PATCH 03/14] spapr/xive: Rework error handling of kvmppc_xive_source_reset()

2020-08-13 Thread David Gibson
On Mon, Aug 10, 2020 at 06:54:12PM +0200, Greg Kurz wrote: > Since kvmppc_xive_source_reset_one() has a return value, convert > kvmppc_xive_source_reset() to use it for error checking. This > allows to get rid of the local_err boiler plate. > > Propagate the return value so that callers may use

Re: [PATCH 04/14] spapr/xive: Rework error handling of kvmppc_xive_mmap()

2020-08-13 Thread David Gibson
On Mon, Aug 10, 2020 at 06:54:19PM +0200, Greg Kurz wrote: > Callers currently check failures of kvmppc_xive_mmap() through the > @errp argument, which isn't a recommanded practice. It is preferred > to use a return value when possible. > > Since NULL isn't an invalid address in theory, it seems

Re: [PATCH 07/14] spapr/xive: Rework error handling in kvmppc_xive_get_queues()

2020-08-13 Thread David Gibson
On Mon, Aug 10, 2020 at 06:54:40PM +0200, Greg Kurz wrote: > Since kvmppc_xive_get_queue_config() has a return value, convert > kvmppc_xive_get_queues() to use it for error checking. This allows > to get rid of the local_err boiler plate. > > Propagate the return value so that callers may use it

Re: [RFC 1/9] target/arm: convert isar regs to array

2020-08-13 Thread Philippe Mathieu-Daudé
On 8/13/20 12:26 PM, Peng Liang wrote: > The isar in ARMCPU is a struct, each field of which represents an ID > register. It's not convenient for us to support CPU feature in AArch64. > So let's change it to an array first and add an enum as the index of the > array for convenience. Since we

Re: [PATCH 2/2] target/mips: Add definition of Loongson-3A3000 CPU

2020-08-13 Thread Jiaxun Yang
在 2020/8/13 下午5:41, Kaige Li 写道: Add definition of the Loongson-3A3000 processor in QEMU. Hi Kaige, We're not defining Loongson-3A3000 in QEMU because we have some features like Loongson-EXT2, VTLB not available currently, I'd prefer define it after we add these features to TCG.

Re: virtio-vsock requires 'disable-legacy=on' in QEMU 5.1

2020-08-13 Thread Cornelia Huck
On Thu, 13 Aug 2020 12:24:30 +0200 Stefano Garzarella wrote: > On Thu, Aug 13, 2020 at 11:28:20AM +0200, Cornelia Huck wrote: > > On Thu, 13 Aug 2020 11:16:56 +0200 > > Stefano Garzarella wrote: > > > > > Hi, > > > > > > Qinghua discovered that virtio-vsock-pci requires 'disable-legacy=on'

[RFC 9/9] target/arm: Add more CPU features

2020-08-13 Thread Peng Liang
Add i8mm, bf16, and dgh CPU features for AArch64. Signed-off-by: zhanghailiang Signed-off-by: Peng Liang --- target/arm/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 0f620e8afe..9e2ddbc3ed 100644 --- a/target/arm/cpu.c +++

[RFC 8/9] target/arm: Update ID fields

2020-08-13 Thread Peng Liang
Update definitions for ID fields, up to ARMv8.6. Signed-off-by: zhanghailiang Signed-off-by: Peng Liang --- target/arm/cpu.h | 17 + 1 file changed, 17 insertions(+) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index da68b7f8f4..7a46d223bc 100644 --- a/target/arm/cpu.h +++

Re: [PATCH v2 2/2] spapr/nvram: Error out if NVRAM cannot contain all -prom-env data

2020-08-13 Thread Greg Kurz
On Thu, 13 Aug 2020 16:43:36 +1000 David Gibson wrote: > On Wed, Aug 12, 2020 at 09:06:54PM +0200, Greg Kurz wrote: > > On Wed, 12 Aug 2020 19:29:26 +0200 > > Laurent Vivier wrote: > > > > > Le 12/08/2020 à 19:08, Greg Kurz a écrit : > > > > Since commit 61f20b9dc5b7 ("spapr_nvram:

[RFC 3/9] target/arm: register CPU features for property

2020-08-13 Thread Peng Liang
The Arm architecture specifies a number of ID registers that are characterized as comprising a set of 4-bit ID fields. Each ID field identifies the presence, and possibly the level of support for, a particular feature in an implementation of the architecture. [1] For most of the ID fields, there

[RFC 6/9] target/arm: introduce KVM_CAP_ARM_CPU_FEATURE

2020-08-13 Thread Peng Liang
Introduce KVM_CAP_ARM_CPU_FEATURE to check whether KVM supports to set CPU features in ARM. Signed-off-by: zhanghailiang Signed-off-by: Peng Liang --- linux-headers/linux/kvm.h | 1 + target/arm/cpu.c | 5 + target/arm/kvm64.c| 14 ++ target/arm/kvm_arm.h

[RFC 1/9] target/arm: convert isar regs to array

2020-08-13 Thread Peng Liang
The isar in ARMCPU is a struct, each field of which represents an ID register. It's not convenient for us to support CPU feature in AArch64. So let's change it to an array first and add an enum as the index of the array for convenience. Since we will never access high 32-bits of ID registers in

[RFC 7/9] target/arm: Add CPU features to query-cpu-model-expansion

2020-08-13 Thread Peng Liang
Add CPU features to the result of query-cpu-model-expansion so that other applications (such as libvirt) can know the supported CPU features. Signed-off-by: zhanghailiang Signed-off-by: Peng Liang --- target/arm/cpu.c | 41 + target/arm/cpu.h |

[RFC 2/9] target/arm: parse cpu feature related options

2020-08-13 Thread Peng Liang
The implementation of CPUClass::parse_features only supports CPU features in "feature=value" format. However, libvirt maybe send us a CPU feature string in "+feature/-feature" format. Hence, we need to override CPUClass::parse_features to support CPU feature string in both "feature=value" and

[RFC 4/9] target/arm: Allow ID registers to synchronize to KVM

2020-08-13 Thread Peng Liang
There are 2 steps to synchronize the values of system registers from CPU state to KVM: 1. write to the values of system registers from CPU state to (index,value) list by write_cpustate_to_list; 2. write the values in (index,value) list to KVM by write_list_to_kvmstate; In step 1, the values

[RFC 5/9] target/arm: introduce CPU feature dependency mechanism

2020-08-13 Thread Peng Liang
Some CPU features are dependent on other CPU features. For example, ID_AA64PFR0_EL1.FP field and ID_AA64PFR0_EL1.AdvSIMD must have the same value, which means FP and ADVSIMD are dependent on each other, FPHP and ADVSIMDHP are dependent on each other. This commit introduces a mechanism for CPU

[RFC 0/9] Support disable/enable CPU features for AArch64

2020-08-13 Thread Peng Liang
QEMU does not support disable/enable CPU features in AArch64 for now. This patch series add support for CPU features in AArch64. Firstly, we change the isar struct in ARMCPU to an array for convenience. Secondly, we add support to configure CPU feautres in AArch64 and make sure that the ID

Re: [PULL 0/9] Tracing patches

2020-08-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200813052257.226142-1-stefa...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200813052257.226142-1-stefa...@redhat.com Subject: [PULL 0/9] Tracing patches ===

Re: [PATCH v1 0/1] COLO: migrate dirty ram pages before colo checkpoint

2020-08-13 Thread Derek Su
On Fri, Jul 31, 2020 at 3:52 PM Lukas Straub wrote: > > On Sun, 21 Jun 2020 10:10:03 +0800 > Derek Su wrote: > > > This series is to reduce the guest's downtime during colo checkpoint > > by migrating dirty ram pages as many as possible before colo checkpoint. > > > > If the iteration count

Re: virtio-vsock requires 'disable-legacy=on' in QEMU 5.1

2020-08-13 Thread Stefano Garzarella
On Thu, Aug 13, 2020 at 11:28:20AM +0200, Cornelia Huck wrote: > On Thu, 13 Aug 2020 11:16:56 +0200 > Stefano Garzarella wrote: > > > Hi, > > > > Qinghua discovered that virtio-vsock-pci requires 'disable-legacy=on' in > > QEMU 5.1: > > $ ./qemu-system-x86_64 ... -device

[PATCH] docs: clarify absence of set_features in vhost-user

2020-08-13 Thread Alyssa Ross
The previous wording was (at least to me) ambiguous about whether a backend should enable features immediately after they were set using VHOST_USER_SET_PROTOCOL_FEATURES, or wait for support for protocol features to be acknowledged if it hasn't been yet before enabling those features. This patch

Re: [PATCH 1/2] target/arm: Add cpu property to control pauth

2020-08-13 Thread Andrew Jones
On Thu, Aug 13, 2020 at 10:05:04AM +0100, Mark Rutland wrote: > On Thu, Aug 13, 2020 at 08:03:21AM +0200, Andrew Jones wrote: > > Thinking about this some more, maybe we don't need pauth-arch. > > If we don't, then it simplifies nicely to > > > > # Default (enabled with architected algorithm) >

[PATCH 2/2] target/mips: Add definition of Loongson-3A3000 CPU

2020-08-13 Thread Kaige Li
Add definition of the Loongson-3A3000 processor in QEMU. Signed-off-by: Kaige Li --- target/mips/translate_init.inc.c | 24 1 file changed, 24 insertions(+) diff --git a/target/mips/translate_init.inc.c b/target/mips/translate_init.inc.c index 0740819..2e98aff 100644

[PATCH 1/2] target/mips: Coding style update to fix checkpatch errors

2020-08-13 Thread Kaige Li
This will help ensure that style guidelines are being maintained during subsequent changes. Signed-off-by: Kaige Li --- target/mips/translate_init.inc.c | 61 1 file changed, 31 insertions(+), 30 deletions(-) diff --git

Re: [PATCH 02/14] spapr/xive: Rework error handling of kvmppc_xive_cpu_connect()

2020-08-13 Thread David Gibson
On Mon, Aug 10, 2020 at 06:54:05PM +0200, Greg Kurz wrote: > Use error_setg_errno() instead of error_setg(strerror()). While here, > use -ret instead of errno since kvm_vcpu_enable_cap() returns a negative > errno on failure. > > Use ERRP_GUARD() to ensure that errp can be passed to

Re: [PATCH 01/14] spapr: Simplify error handling in spapr_phb_realize()

2020-08-13 Thread David Gibson
On Mon, Aug 10, 2020 at 06:53:58PM +0200, Greg Kurz wrote: > The spapr_phb_realize() function has a local_err variable which > is used to: > > 1) check failures of spapr_irq_findone() and spapr_irq_claim() > > 2) prepend extra information to the error message > > Recent work from Markus

Re: virtio-vsock requires 'disable-legacy=on' in QEMU 5.1

2020-08-13 Thread Cornelia Huck
On Thu, 13 Aug 2020 11:16:56 +0200 Stefano Garzarella wrote: > Hi, > > Qinghua discovered that virtio-vsock-pci requires 'disable-legacy=on' in > QEMU 5.1: > $ ./qemu-system-x86_64 ... -device vhost-vsock-pci,guest-cid=5 > qemu-system-x86_64: -device vhost-vsock-pci,guest-cid=5: >

Re: [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt()

2020-08-13 Thread Auger Eric
Hi, On 8/13/20 9:37 AM, Chen Qun wrote: > Clang static code analyzer show warning: > hw/vfio/platform.c:239:9: warning: Value stored to 'ret' is never read > ret = event_notifier_test_and_clear(intp->interrupt); > ^ ~~ > >

Re: [PATCH 00/11] trivial patchs for static code analyzer fixes

2020-08-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200813073712.4001404-1-kuhn.chen...@huawei.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT

virtio-vsock requires 'disable-legacy=on' in QEMU 5.1

2020-08-13 Thread Stefano Garzarella
Hi, Qinghua discovered that virtio-vsock-pci requires 'disable-legacy=on' in QEMU 5.1: $ ./qemu-system-x86_64 ... -device vhost-vsock-pci,guest-cid=5 qemu-system-x86_64: -device vhost-vsock-pci,guest-cid=5: device is modern-only, use disable-legacy=on Bisecting I found that this

Re: [PATCH 1/2] target/arm: Add cpu property to control pauth

2020-08-13 Thread Mark Rutland
On Thu, Aug 13, 2020 at 08:03:21AM +0200, Andrew Jones wrote: > Thinking about this some more, maybe we don't need pauth-arch. > If we don't, then it simplifies nicely to > > # Default (enabled with architected algorithm) > -cpu max[,pauth=on][,pauth-fast=off] > > # Select pauth-fast > -cpu

RE: [PATCH 09/11] usb/bus: Remove dead assignment in usb_get_fw_dev_path()

2020-08-13 Thread Chenqun (kuhn)
> hw/usb/bus.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/usb/bus.c b/hw/usb/bus.c index b17bda3b29..77d3f7ddb8 > 100644 > --- a/hw/usb/bus.c > +++ b/hw/usb/bus.c > @@ -612,8 +612,8 @@ static char *usb_get_fw_dev_path(DeviceState *qdev) > in++; >

Re: [PATCH 00/17] crypto/cipher: Class hierarchy cleanups

2020-08-13 Thread Philippe Mathieu-Daudé
On 8/13/20 5:25 AM, Richard Henderson wrote: > Mostly this is intended to cleanup the class hierarchy > used for the ciphers. We currently have multiple levels > of dispatch, and multiple separate allocations. The final > patches rearrange this to one level of indirect call, and > all memory

Re: [PATCH 00/11] trivial patchs for static code analyzer fixes

2020-08-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200813073712.4001404-1-kuhn.chen...@huawei.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200813073712.4001404-1-kuhn.chen...@huawei.com Subject: [PATCH 00/11] trivial

Re: [for-5.2 v4 09/10] host trust limitation: Alter virtio default properties for protected guests

2020-08-13 Thread Greg Kurz
On Thu, 13 Aug 2020 09:43:56 +0200 Greg Kurz wrote: > On Mon, 27 Jul 2020 16:05:14 +0100 > "Dr. David Alan Gilbert" wrote: > > > * David Gibson (da...@gibson.dropbear.id.au) wrote: > > > The default behaviour for virtio devices is not to use the platforms > > > normal > > > DMA paths, but

Re: [PATCH 06/11] hw/net/virtio-net:Remove redundant statement in virtio_net_rsc_tcp_ctrl_check()

2020-08-13 Thread Philippe Mathieu-Daudé
On 8/13/20 9:37 AM, Chen Qun wrote: > Clang static code analyzer show warning: > hw/net/virtio-net.c:2077:5: warning: Value stored to 'tcp_flag' is never read > tcp_flag &= VIRTIO_NET_TCP_FLAG; > ^ ~~~ > > The 'VIRTIO_NET_TCP_FLAG' is '0x3F'. The last ‘tcp_flag’

Re: [PATCH 13/17] crypto/builtin: Move AES_cbc_encrypt into cipher-builtin.inc.c

2020-08-13 Thread Philippe Mathieu-Daudé
On 8/13/20 5:25 AM, Richard Henderson wrote: > By making the function private, we will be able to make further > simplifications. Re-indent the migrated code and fix the missing > braces for CODING_STYLE. Patch easier to review using 'git-diff --color-moved=dimmed-zebra

Re: [PATCH 12/17] crypto/builtin: Merge qcrypto_cipher_aes_{ecb, xts}_{en, de}crypt

2020-08-13 Thread Philippe Mathieu-Daudé
On 8/13/20 5:25 AM, Richard Henderson wrote: > There's no real reason we need two separate helper functions here. > Standardize on the function signature required for xts_encrypt. > Rename to do_aes_{en,de}crypt_ecb, since the helper does not > itself do anything with respect to xts. > >

Re: [PATCH 05/17] crypto: Remove redundant includes

2020-08-13 Thread Philippe Mathieu-Daudé
On 8/13/20 5:25 AM, Richard Henderson wrote: > Both qemu/osdep.h and cipherpriv.h have already been > included by the parent cipher.c. > > Signed-off-by: Richard Henderson > --- > crypto/cipher-builtin.inc.c | 2 -- > crypto/cipher-gcrypt.inc.c | 2 -- > crypto/cipher-nettle.inc.c | 2 -- > 3

Re: [PATCH 10/17] crypto: Constify cipher data tables

2020-08-13 Thread Philippe Mathieu-Daudé
On 8/13/20 5:25 AM, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > crypto/cipher.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 07/17] crypto: Use the correct const type for driver

2020-08-13 Thread Philippe Mathieu-Daudé
On 8/13/20 5:25 AM, Richard Henderson wrote: > This allows the in memory structures to be read-only. > > Signed-off-by: Richard Henderson > --- > crypto/cipherpriv.h | 2 +- > include/crypto/cipher.h | 2 +- > crypto/cipher-afalg.c | 2 +- > crypto/cipher-builtin.inc.c | 2

Re: [PATCH 04/17] crypto: Rename cipher include files to .inc.c

2020-08-13 Thread Philippe Mathieu-Daudé
On 8/13/20 5:25 AM, Richard Henderson wrote: > QEMU standard procedure for included c files is to use *.inc.c. > E.g. there are a different set of checks that are applied. > > Signed-off-by: Richard Henderson > --- > crypto/{cipher-builtin.c => cipher-builtin.inc.c} | 0 >

Re: [PATCH 02/17] crypto: Move QCryptoCipherDriver typedef to qemu/typedefs.h

2020-08-13 Thread Philippe Mathieu-Daudé
On 8/13/20 5:25 AM, Richard Henderson wrote: > This will allow the pointer to be used in crypto/cipher.h, > and not just in code using cipherpriv.h. > > Signed-off-by: Richard Henderson > --- > crypto/cipherpriv.h | 2 -- > include/qemu/typedefs.h | 1 + > 2 files changed, 1 insertion(+), 2

Re: [PATCH 01/17] crypto: Move QCryptoCipher typedef to qemu/typedefs.h

2020-08-13 Thread Philippe Mathieu-Daudé
On 8/13/20 5:25 AM, Richard Henderson wrote: > This allows header files to declare pointers without pulling > in the entire crypto subsystem. > > Signed-off-by: Richard Henderson > --- > include/crypto/cipher.h | 2 -- > include/qemu/typedefs.h | 1 + > 2 files changed, 1 insertion(+), 2

[Bug 1890545] Re: (ARM64) qemu-x86_64+schroot(Debian bullseye) can't run chrome and can't load HTML

2020-08-13 Thread Tony.LI
Hi,I have already added ioctl(), but there is one individual issue. Like this: ioctl(54, _IOC(_IOC_READ, 0xf5, 0x0c, 0x04) But,despite the appearance: 15461 open("/home/tony/.config/google-chrome/Default/Web Data",O_RDWR|O_CREAT|O_NOFOLLOW|O_CLOEXEC,0600) = 43 15461

[PULL 6/9] scripts/cleanup-trace-events: Fix for vcpu property

2020-08-13 Thread Stefan Hajnoczi
From: Markus Armbruster Commit a44cf524f8 "scripts/cleanup-trace-events: Update for current practice" limited search to the input file's directory. That's wrong for events with the vcpu property, because these can only be defined in root directory. Signed-off-by: Markus Armbruster Message-id:

Re: [PULL 00/20] riscv-to-apply queue

2020-08-13 Thread Philippe Mathieu-Daudé
On 8/13/20 12:30 AM, Alistair Francis wrote: > The following changes since commit d0ed6a69d399ae193959225cdeaa9382746c91cc: > > Update version for v5.1.0 release (2020-08-11 17:07:03 +0100) > > are available in the Git repository at: > > g...@github.com:alistair23/qemu.git

[PULL 3/9] build: Don't make object files for dtrace on macOS

2020-08-13 Thread Stefan Hajnoczi
From: Roman Bolshakov dtrace on macOS uses unresolved symbols with a special prefix to define probes [1], only headers should be generated for USDT (dtrace(1)). But it doesn't support backwards compatible no-op -G flag [2] and implicit build rules fail. 1.

[PULL 2/9] scripts/tracetool: Use void pointer for vcpu

2020-08-13 Thread Stefan Hajnoczi
From: Roman Bolshakov dtrace on macOS complains that CPUState * is used for a few probes: dtrace: failed to compile script trace-dtrace-root.dtrace: line 130: syntax error near "CPUState" A comment in scripts/tracetool/__init__.py mentions that: We only want to allow standard C types or

[PULL 9/9] trace-events: Fix attribution of trace points to source

2020-08-13 Thread Stefan Hajnoczi
From: Markus Armbruster Some trace points are attributed to the wrong source file. Happens when we neglect to update trace-events for code motion, or add events in the wrong place, or misspell the file name. Clean up with help of scripts/cleanup-trace-events.pl. Funnies requiring manual

[PULL 1/9] scripts/tracetool: Fix dtrace generation for macOS

2020-08-13 Thread Stefan Hajnoczi
From: Roman Bolshakov dtrace USDT is fully supported since OS X 10.6. There are a few peculiarities compared to other dtrace flavors. 1. It doesn't accept empty files. 2. It doesn't recognize bool type but accepts C99 _Bool. 3. It converts int8_t * in probe points to char * in header files

[PULL 7/9] scripts/cleanup-trace-events: Emit files in alphabetical order

2020-08-13 Thread Stefan Hajnoczi
From: Markus Armbruster Signed-off-by: Markus Armbruster Message-id: 20200806141334.3646302-3-arm...@redhat.com Signed-off-by: Stefan Hajnoczi --- scripts/cleanup-trace-events.pl | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/cleanup-trace-events.pl

[PULL 8/9] trace-events: Delete unused trace points

2020-08-13 Thread Stefan Hajnoczi
From: Markus Armbruster Tracked down with the help of scripts/cleanup-trace-events.pl. Signed-off-by: Markus Armbruster Message-id: 20200806141334.3646302-4-arm...@redhat.com Signed-off-by: Stefan Hajnoczi --- audio/trace-events | 3 --- block/trace-events | 3 ---

[PATCH 11/11] hw/display/vga:Remove redundant statement in vga_draw_graphic()

2020-08-13 Thread Chen Qun
Clang static code analyzer show warning: hw/display/vga.c:1677:9: warning: Value stored to 'update' is never read update = full_update; ^~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Gerd Hoffmann --- hw/display/vga.c | 1 - 1 file changed, 1

[PULL 5/9] softmmu: Add missing trace-events file

2020-08-13 Thread Stefan Hajnoczi
From: Philippe Mathieu-Daudé Commit c7f419f584 moved softmmu-only files out of the root directory, but forgot to move the trace events, which should no longer be generated to "trace-root.h". Fix that by adding softmmu/trace-events. Signed-off-by: Philippe Mathieu-Daudé Tested-by: Claudio

[PULL 4/9] net/colo: Match is-enabled probe to tracepoint

2020-08-13 Thread Stefan Hajnoczi
From: Roman Bolshakov Build of QEMU with dtrace fails on macOS: LINKx86_64-softmmu/qemu-system-x86_64 error: probe colo_compare_miscompare doesn't exist error: Could not register probes ld: error creating dtrace DOF section for architecture x86_64 The reason of the error is explained by

[PATCH 09/11] usb/bus: Remove dead assignment in usb_get_fw_dev_path()

2020-08-13 Thread Chen Qun
Clang static code analyzer show warning: qemu/hw/usb/bus.c:615:13: warning: Value stored to 'pos' is never read pos += snprintf(fw_path + pos, fw_len - pos, "%s@%lx", Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Gerd Hoffmann Cc: Markus Armbruster --- hw/usb/bus.c | 4

[PULL 0/9] Tracing patches

2020-08-13 Thread Stefan Hajnoczi
The following changes since commit d0ed6a69d399ae193959225cdeaa9382746c91cc: Update version for v5.1.0 release (2020-08-11 17:07:03 +0100) are available in the Git repository at: https://github.com/stefanha/qemu.git tags/tracing-pull-request for you to fetch changes up to

Re: [for-5.2 v4 09/10] host trust limitation: Alter virtio default properties for protected guests

2020-08-13 Thread Greg Kurz
On Mon, 27 Jul 2020 16:05:14 +0100 "Dr. David Alan Gilbert" wrote: > * David Gibson (da...@gibson.dropbear.id.au) wrote: > > The default behaviour for virtio devices is not to use the platforms normal > > DMA paths, but instead to use the fact that it's running in a hypervisor > > to directly

[PATCH 01/11] hw/arm/virt-acpi-build:Remove dead assignment in build_madt()

2020-08-13 Thread Chen Qun
Clang static code analyzer show warning: hw/arm/virt-acpi-build.c:641:5: warning: Value stored to 'madt' is never read madt = acpi_data_push(table_data, sizeof *madt); ^ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Shannon Zhao

[PATCH 03/11] target/arm/translate-a64:Remove dead assignment in handle_scalar_simd_shli()

2020-08-13 Thread Chen Qun
Clang static code analyzer show warning: target/arm/translate-a64.c:8635:14: warning: Value stored to 'tcg_rn' during its initialization is never read TCGv_i64 tcg_rn = new_tmp_a64(s); ^~ ~~ target/arm/translate-a64.c:8636:14: warning: Value stored to 'tcg_rd'

[PATCH 10/11] hw/intc: Remove redundant statement in exynos4210_combiner_read()

2020-08-13 Thread Chen Qun
Clang static code analyzer show warning: hw/intc/exynos4210_combiner.c:231:9: warning: Value stored to 'val' is never read val = s->reg_set[offset >> 2]; The default value of 'val' is '0', so we can break the 'default' branch and return 'val'. Reported-by: Euler Robot Signed-off-by:

[PATCH 06/11] hw/net/virtio-net:Remove redundant statement in virtio_net_rsc_tcp_ctrl_check()

2020-08-13 Thread Chen Qun
Clang static code analyzer show warning: hw/net/virtio-net.c:2077:5: warning: Value stored to 'tcp_flag' is never read tcp_flag &= VIRTIO_NET_TCP_FLAG; ^ ~~~ The 'VIRTIO_NET_TCP_FLAG' is '0x3F'. The last ‘tcp_flag’ assignment statement is the same as that of the

[PATCH 00/11] trivial patchs for static code analyzer fixes

2020-08-13 Thread Chen Qun
Hi All, This series fix trivial warnings reported by the Clang static code analyzer. Chen Qun (11): hw/arm/virt-acpi-build:Remove dead assignment in build_madt() hw/arm/omap1:Remove redundant statement in omap_clkdsp_read() target/arm/translate-a64:Remove dead assignment in

[PATCH 08/11] tcg/optimize: Remove redundant statement in tcg_optimize()

2020-08-13 Thread Chen Qun
Clang static code analyzer show warning: tcg/optimize.c:1267:17: warning: Value stored to 'nb_iargs' is never read nb_iargs = 2; ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Richard Henderson Cc: Richard Henderson --- tcg/optimize.c |

[PATCH 04/11] target/arm/translate-a64:Remove redundant statement in disas_simd_two_reg_misc_fp16()

2020-08-13 Thread Chen Qun
Clang static code analyzer show warning: target/arm/translate-a64.c:13007:5: warning: Value stored to 'rd' is never read rd = extract32(insn, 0, 5); ^~ target/arm/translate-a64.c:13008:5: warning: Value stored to 'rn' is never read rn = extract32(insn, 5, 5);

[PATCH 05/11] hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions()

2020-08-13 Thread Chen Qun
Clang static code analyzer show warning: hw/virtio/vhost-user.c:606:9: warning: Value stored to 'mr' is never read mr = vhost_user_get_mr_data(reg->userspace_addr, , ); ^~ Reported-by: Euler Robot Signed-off-by: Chen Qun

[PATCH 02/11] hw/arm/omap1:Remove redundant statement in omap_clkdsp_read()

2020-08-13 Thread Chen Qun
Clang static code analyzer show warning: hw/arm/omap1.c:1760:15: warning: Value stored to 'cpu' during its initialization is never read CPUState *cpu = CPU(s->cpu); ^~~ ~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Peter Maydell Cc:

[PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt()

2020-08-13 Thread Chen Qun
Clang static code analyzer show warning: hw/vfio/platform.c:239:9: warning: Value stored to 'ret' is never read ret = event_notifier_test_and_clear(intp->interrupt); ^ ~~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc:

[PATCH 1/3] fpu/softfloat: Define operations for bfloat16

2020-08-13 Thread LIU Zhiwei
This patch implements operations for bfloat16 except conversion and some misc operations. We also add FloatFmt and pack/unpack interfaces for bfloat16. As they are both static fields, we can't make a sperate patch for them. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson ---

[PATCH 2/3] fpu/softfloat: Define convert operations for bfloat16

2020-08-13 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson --- fpu/softfloat.c | 223 include/fpu/softfloat.h | 48 + 2 files changed, 271 insertions(+) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index d4205f92d5..afb121135d 100644

[PATCH 3/3] fpu/softfloat: Define misc operations for bfloat16

2020-08-13 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson --- fpu/softfloat-specialize.inc.c | 38 +++ include/fpu/softfloat.h| 41 ++ 2 files changed, 79 insertions(+) diff --git a/fpu/softfloat-specialize.inc.c

[PATCH 0/3] Implement blfoat16 in softfloat

2020-08-13 Thread LIU Zhiwei
As bfloat16 is more and more popular in many archs, implement bfloat16 interfaces in softfloat, so that archs can add their bfloat16 insns based on the blfoat16 interfaces here. These interfaces have been tested by RISU on RISC-V bfloat16 with XuanTie C906. LIU Zhiwei (3): fpu/softfloat:

Re: [PATCH v4 0/9] memory: assert and define MemoryRegionOps callbacks

2020-08-13 Thread David Gibson
On Tue, Aug 11, 2020 at 05:11:24PM +0530, P J P wrote: > From: Prasad J Pandit > > Hello, > > * This series asserts that MemoryRegionOps objects define read/write > callback methods. Thus avoids potential NULL pointer dereference. > ex. -> >

Re: [PATCH v2 2/2] spapr/nvram: Error out if NVRAM cannot contain all -prom-env data

2020-08-13 Thread David Gibson
On Wed, Aug 12, 2020 at 09:06:54PM +0200, Greg Kurz wrote: > On Wed, 12 Aug 2020 19:29:26 +0200 > Laurent Vivier wrote: > > > Le 12/08/2020 à 19:08, Greg Kurz a écrit : > > > Since commit 61f20b9dc5b7 ("spapr_nvram: Pre-initialize the NVRAM to > > > support the -prom-env parameter"), pseries

[PULL 12/14] linux-user: Add support for btrfs ioctls used to manage quota

2020-08-13 Thread Laurent Vivier
From: Filip Bozuta This patch implements functionality for following ioctls: BTRFS_IOC_QUOTA_CTL - Enabling/Disabling quota support Enable or disable quota support for a btrfs filesystem. Quota support is enabled or disabled using the ioctls third argument which represents a

[PULL 14/14] linux-user: Fix 'utimensat()' implementation

2020-08-13 Thread Laurent Vivier
From: Filip Bozuta Implementation of syscall 'utimensat()' in 'syscall.c' uses functions target_to_host/host_to_target_timespec() to convert values of 'struct timespec' between host and target. However, the implementation doesn't check whether the conversion succeeds and thus can cause an

[PULL 10/14] linux-user: Add support for a group of btrfs inode ioctls

2020-08-13 Thread Laurent Vivier
From: Filip Bozuta This patch implements functionality of following ioctls: BTRFS_IOC_INO_LOOKUP - Reading tree root id and path Read tree root id and path for a given file or directory. The name and tree root id are returned in an ioctl's third argument that represents a pointer

[PATCH 2/2] hw/virtio-pci Added AER capability.

2020-08-13 Thread andrew
From: Andrew Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1857668 Added AER capability for virtio-pci devices. Also added property for devices, by default AER is enabled. Signed-off-by: Andrew Melnychenko --- hw/virtio/virtio-pci.c | 16 hw/virtio/virtio-pci.h | 4

[PULL 11/14] linux-user: Add support for two btrfs ioctls used for subvolume

2020-08-13 Thread Laurent Vivier
From: Filip Bozuta This patch implements functionality for following ioctl: BTRFS_IOC_DEFAULT_SUBVOL - Setting a default subvolume Set a default subvolume for a btrfs filesystem. The third ioctl's argument is a '__u64' (unsigned long long) which represents the id of a subvolume

[PATCH 1/2] hw/virtio-pci Added counter for pcie capabilities offsets.

2020-08-13 Thread andrew
From: Andrew Removed hardcoded offset for ats. Added cap offset counter for future capabilities like AER. Signed-off-by: Andrew Melnychenko --- hw/virtio/virtio-pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index

[PULL 05/14] linux-user: Add support for a group of 2038 safe syscalls

2020-08-13 Thread Laurent Vivier
From: Filip Bozuta This patch implements functionality for following time64 syscalls: *clock_getres_time64 This a year 2038 safe variant of syscall: int clock_getres(clockid_t clockid, struct timespec *res) --finding the resoultion of a specified clock-- man page:

[PULL 08/14] linux-user: Add support for btrfs ioctls used to manipulate with devices

2020-08-13 Thread Laurent Vivier
From: Filip Bozuta This patch implements functionality for following ioctls: BTRFS_IOC_SCAN_DEV - Scanning device for a btrfs filesystem Scan a device for a btrfs filesystem. The device that is to be scanned is passed in the ioctl's third argument which represents a pointer to a

[PULL 13/14] linux-user: Add support for btrfs ioctls used to scrub a filesystem

2020-08-13 Thread Laurent Vivier
From: Filip Bozuta This patch implements functionality for following ioctls: BTRFS_IOC_SCRUB - Starting a btrfs filesystem scrub Start a btrfs filesystem scrub. The third ioctls argument is a pointer to a following type: struct btrfs_ioctl_scrub_args { __u64 devid;

[PULL 04/14] linux-user: Modify 'target_to_host/host_to_target_itimerspec()'

2020-08-13 Thread Laurent Vivier
From: Filip Bozuta Functions 'target_to_host_itimerspec()' and 'host_to_target_itimerspec()' are used to convert values of type 'struct itimerspec' between target and host. This type has 'struct timespec' as its fields. That is the reason why this patch introduces a little modification to the

[PULL 06/14] linux-user: Add support for a group of btrfs ioctls used for subvolumes

2020-08-13 Thread Laurent Vivier
From: Filip Bozuta This patch implements functionality of following ioctls: BTRFS_IOC_SUBVOL_CREATE - Creating a btrfs subvolume Create a btrfs subvolume. The subvolume is created using the ioctl's third argument which represents a pointer to a following structure type: struct

<    1   2   3   4   >