Re: [PATCH] net: check payload length limit for all frames

2020-07-16 Thread Jason Wang
On 2020/7/17 下午1:06, P J P wrote: Hello Jason, all +-- On Fri, 17 Jul 2020, Jason Wang wrote --+ | On 2020/7/17 上午9:21, Alexander Bulekov wrote: | > On 200717 0853, Li Qiang wrote: | >> Which issue are you trying to solve, any reference linking? | >> I also send a patch related this part

Re: [PATCH] gitlab-ci.yml: Add oss-fuzz build tests

2020-07-16 Thread Thomas Huth
On 16/07/2020 18.33, Alexander Bulekov wrote: > This tries to build and run the fuzzers with the same build-script used > by oss-fuzz. This doesn't guarantee that the builds on oss-fuzz will > also succeed, since oss-fuzz provides its own compiler and fuzzer vars, > but it can catch changes that

Re: [PATCH] e1000e: using bottom half to send packets

2020-07-16 Thread Jason Wang
On 2020/7/17 下午12:46, Li Qiang wrote: Jason Wang 于2020年7月17日周五 上午11:10写道: On 2020/7/17 上午12:14, Li Qiang wrote: Alexander Bulekov reported a UAF bug related e1000e packets send. -->https://bugs.launchpad.net/qemu/+bug/1886362 This is because the guest trigger a e1000e packet send and set

Re: [PATCH] gitlab-ci.yml: Add fuzzer tests

2020-07-16 Thread Thomas Huth
On 16/07/2020 18.46, Alexander Bulekov wrote: > On 200716 1209, Thomas Huth wrote: >> So far we neither compile-tested nor run any of the new fuzzers in our CI, >> which led to some build failures of the fuzzer code in the past weeks. >> To avoid this problem, add a job to compile the fuzzer code

Re: [RFC PATCH-for-5.2 v2 2/2] block/block-backend: Let blk_attach_dev() provide helpful error

2020-07-16 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Thu, Jul 16, 2020 at 02:37:04PM +0200, Philippe Mathieu-Daudé wrote: >> Let blk_attach_dev() take an Error* object to return helpful >> information. Adapt the callers. >> >> $ qemu-system-arm -M n800 >> qemu-system-arm: sd_init failed: cannot attach blk 'sd0'

Re: sysbus_create_simple Vs qdev_create

2020-07-16 Thread Markus Armbruster
Eduardo Habkost writes: > I'd also note that the use of "parent" in the code is also > ambiguous. It can mean: > > * QOM parent type, i.e. TypeInfo.parent. Related fields: > * parent_class members of class structs > * parent_obj members of object structs I hate the use of "parent" and

Re: [PATCH] net: check payload length limit for all frames

2020-07-16 Thread P J P
Hello Jason, all +-- On Fri, 17 Jul 2020, Jason Wang wrote --+ | On 2020/7/17 上午9:21, Alexander Bulekov wrote: | > On 200717 0853, Li Qiang wrote: | >> Which issue are you trying to solve, any reference linking? | >> I also send a patch related this part and also a UAF. | > | > I reported a UAF

Re: [PATCH] e1000e: using bottom half to send packets

2020-07-16 Thread Li Qiang
Jason Wang 于2020年7月17日周五 上午11:10写道: > > > On 2020/7/17 上午12:14, Li Qiang wrote: > > Alexander Bulekov reported a UAF bug related e1000e packets send. > > > > -->https://bugs.launchpad.net/qemu/+bug/1886362 > > > > This is because the guest trigger a e1000e packet send and set the > > data's

[PATCH] Fix vhost-user buffer over-read on ram hot-unplug

2020-07-16 Thread Raphael Norwitz
The VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS vhost-user protocol feature introduced a shadow-table, used by the backend to dynamically determine how a vdev's memory regions have changed since the last vhost_user_set_mem_table() call. On hot-remove, a memmove() operation is used to overwrite the

Re: [virtio-dev] [RFC for Linux v4 0/2] virtio_balloon: Add VIRTIO_BALLOON_F_CONT_PAGES to report continuous pages

2020-07-16 Thread teawater
> 2020年7月16日 18:45,Michael S. Tsirkin 写道: > > On Thu, Jul 16, 2020 at 03:01:18PM +0800, teawater wrote: >> >> >>> 2020年7月16日 14:38,Michael S. Tsirkin 写道: >>> >>> On Thu, Jul 16, 2020 at 10:41:50AM +0800, Hui Zhu wrote: The first, second and third version are in [1], [2] and [3].

[PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2020-07-16 Thread Alexey Kardashevskiy
The following changes since commit 1038a309ec829f05a3a3e52a9951cfdb24dfd02c: spapr: Add a new level of NUMA for GPUs (2020-07-17 10:36:28 +1000) are available in the Git repository at: g...@github.com:aik/qemu.git tags/qemu-slof-20200717 for you to fetch changes up to

Re: [PATCH] net: check payload length limit for all frames

2020-07-16 Thread Jason Wang
On 2020/7/17 上午9:21, Alexander Bulekov wrote: On 200717 0853, Li Qiang wrote: P J P 于2020年7月17日周五 上午3:26写道: From: Prasad J Pandit While sending packets, the check that packet 'payload_len' is within 64kB limit, seems to happen only for GSO frames. It may lead to use-after-free or

Re: [PATCH] e1000e: using bottom half to send packets

2020-07-16 Thread Jason Wang
On 2020/7/17 上午12:14, Li Qiang wrote: Alexander Bulekov reported a UAF bug related e1000e packets send. -->https://bugs.launchpad.net/qemu/+bug/1886362 This is because the guest trigger a e1000e packet send and set the data's address to e1000e's MMIO address. So when the e1000e do DMA it

Re: [PATCH] net: check payload length limit for all frames

2020-07-16 Thread Alexander Bulekov
On 200717 0853, Li Qiang wrote: > P J P 于2020年7月17日周五 上午3:26写道: > > > > From: Prasad J Pandit > > > > While sending packets, the check that packet 'payload_len' > > is within 64kB limit, seems to happen only for GSO frames. > > It may lead to use-after-free or out-of-bounds access like > >

[PATCH] usb: only build hcd-dwc2 host controller for RASPI target

2020-07-16 Thread Paul Zimmerman
The hcd-dwc2 host controller is currently built for all targets. Since for now hcd-dwc2 is only implemented on RASPI, restrict its build to that target only. Signed-off-by: Paul Zimmerman --- Hi Gerd, Do we want to apply this before the 5.1.0 release? It seems a waste to build this code for

Re: [PATCH] net: check payload length limit for all frames

2020-07-16 Thread Li Qiang
P J P 于2020年7月17日周五 上午3:26写道: > > From: Prasad J Pandit > > While sending packets, the check that packet 'payload_len' > is within 64kB limit, seems to happen only for GSO frames. > It may lead to use-after-free or out-of-bounds access like > issues when sending non-GSO frames. Check the

Re: [PATCH] spapr_pci: Robustify support of PCI bridges

2020-07-16 Thread David Gibson
On Thu, Jul 16, 2020 at 04:57:54PM +0200, Greg Kurz wrote: > On Thu, 16 Jul 2020 16:23:52 +0200 > Markus Armbruster wrote: > > > David Gibson writes: > > > > > On Thu, Jul 16, 2020 at 12:32:44PM +0200, Greg Kurz wrote: > > >> On Thu, 16 Jul 2020 14:45:40 +1000 > > >> David Gibson wrote: > >

Re: [PATCH] spapr_pci: Robustify support of PCI bridges

2020-07-16 Thread David Gibson
On Thu, Jul 16, 2020 at 04:42:00PM +0200, Greg Kurz wrote: > On Thu, 16 Jul 2020 16:01:18 +0200 > Markus Armbruster wrote: > > > David Gibson writes: > > > > > On Thu, Jul 09, 2020 at 07:12:47PM +0200, Greg Kurz wrote: > > >> Some recent error handling cleanups unveiled issues with our support

Re: [PATCH v4] spapr: Add a new level of NUMA for GPUs

2020-07-16 Thread David Gibson
On Thu, Jul 16, 2020 at 05:56:55PM -0500, Reza Arbab wrote: > NUMA nodes corresponding to GPU memory currently have the same > affinity/distance as normal memory nodes. Add a third NUMA associativity > reference point enabling us to give GPU nodes more distance. > > This is guest visible

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

2020-07-16 Thread David Gibson
On Thu, Jul 16, 2020 at 07:04:56PM +1000, Alexey Kardashevskiy wrote: > Ping? I kinda realize it is not going to replace SLOF any time soon but > still... Yeah, I know. I just haven't had time to consider it. Priority starvation. > On 07/07/2020 10:34, Alexey Kardashevskiy wrote: > > Ping? >

[PATCH v4] spapr: Add a new level of NUMA for GPUs

2020-07-16 Thread Reza Arbab
NUMA nodes corresponding to GPU memory currently have the same affinity/distance as normal memory nodes. Add a third NUMA associativity reference point enabling us to give GPU nodes more distance. This is guest visible information, which shouldn't change under a running guest across migration

Re: TB Cache size grows out of control with qemu 5.0

2020-07-16 Thread BALATON Zoltan
On Thu, 16 Jul 2020, Alex Bennée wrote: Christian Ehrhardt writes: On Wed, Jul 15, 2020 at 5:58 PM BALATON Zoltan wrote: See commit 47a2def4533a2807e48954abd50b32ecb1aaf29a and the next two following it. Thank you Zoltan for pointing out this commit, I agree that this seems to be the

Re: [GIT PULL] I2C updates

2020-07-16 Thread Corey Minyard
On Thu, Jul 16, 2020 at 09:45:41PM +0100, Peter Maydell wrote: > On Thu, 16 Jul 2020 at 18:49, Corey Minyard wrote: > > > > The following changes since commit 45db94cc90c286a9965a285ba19450f448760a09: > > > > Merge remote-tracking branch > > 'remotes/mcayland/tags/qemu-openbios-20200707' into

Re: sysbus_create_simple Vs qdev_create

2020-07-16 Thread Eduardo Habkost
On Wed, Jul 15, 2020 at 04:37:18PM +0200, Markus Armbruster wrote: > Pratik Parvati writes: > > > Hi Markus and Philippe, > > > > Thanks for your reply. Now I am pretty clear about Qdev and sysbus helper > > function. > > > > Can you please explain to me in brief on buses and device hierarchies

Re: [PATCH 2/2] configure: add support for Control-Flow Integrity

2020-07-16 Thread Daniele Buono
On 7/2/2020 5:52 AM, Daniel P. Berrangé wrote: The need to maintain this list of functions makes me feel very uneasy. How can we have any confidence that this list of functions is accurate ? How will maintainers ensure that they correctly update it as they are writing/changing code, and how

hw-display-qxl.so: undefined symbol: qemu_qxl_io_log_semaphore

2020-07-16 Thread Cole Robinson
Hi Gerd, I'm trying to build qemu 5.1.0-rc0 in Fedora. I'm hitting some issues. Using this configure line: ./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/libexec --interp-prefix=/usr/qemu-%M --with-pkgversion=qemu-5.1.0-0.1.rc0.fc33

Re: [RFC PATCH] tcg/cpu-exec: precise single-stepping after an exception

2020-07-16 Thread Richard Henderson
On 7/16/20 1:12 PM, Peter Maydell wrote: > On Thu, 16 Jul 2020 at 11:08, Luc Michel wrote: >> >> When single-stepping with a debugger attached to QEMU, and when an >> exception is raised, the debugger misses the first instruction after the >> exception: > > This is a long-standing bug; thanks

Re: qemu test-qga failure on mergebuild after VERSION file change: dependency issues??

2020-07-16 Thread Philippe Mathieu-Daudé
On 7/16/20 10:15 PM, Peter Maydell wrote: > On Thu, 16 Jul 2020 at 20:52, Michael Roth wrote: >> But is it intermittent, environment-dependent? I'm trying to understand how >> to >> replicate Peter's result since it seems like it would be straightforward >> reproducer. > > I blew away all my

Re: [PATCH v5 10/11] hw/arm: Wire up BMC boot flash for npcm750-evb and quanta-gsj

2020-07-16 Thread Havard Skinnemoen
On Wed, Jul 15, 2020 at 1:54 PM Havard Skinnemoen wrote: > > On Wed, Jul 15, 2020 at 3:57 AM Philippe Mathieu-Daudé > wrote: > > > > On 7/15/20 11:00 AM, Markus Armbruster wrote: > > > Now my point. Why first make up user configuration, then use that to > > > create a BlockBackend, when you

Re: [GIT PULL] I2C updates

2020-07-16 Thread Peter Maydell
On Thu, 16 Jul 2020 at 18:49, Corey Minyard wrote: > > The following changes since commit 45db94cc90c286a9965a285ba19450f448760a09: > > Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20200707' > into staging (2020-07-10 16:43:40 +0100) > > are available in the Git repository

[Bug 1887854] Re: Spurious Data Abort on qemu-system-aarch64

2020-07-16 Thread Peter Maydell
Writing to SCTLR can cause QEMU to flush its TLB (as an internal implementation detail), so if adding SCTLR writes is sufficient to cause the problem to go away, I would be suspicious that your guest code is missing necessary TLB maintenance instructions. QEMU 3.1 and 4.1 are quite old -- can you

Re: qemu test-qga failure on mergebuild after VERSION file change: dependency issues??

2020-07-16 Thread Peter Maydell
On Thu, 16 Jul 2020 at 20:52, Michael Roth wrote: > But is it intermittent, environment-dependent? I'm trying to understand how to > replicate Peter's result since it seems like it would be straightforward > reproducer. I blew away all my build trees and recreated them from scratch, and the

Re: [PULL 0/2] Fixes 20200716 patches

2020-07-16 Thread Peter Maydell
axel.org/qemu tags/fixes-20200716-pull-request > > for you to fetch changes up to 4084e35068772cf4f81bbae5174019f277c61084: > > usb: fix storage regression (2020-07-16 10:20:27 +0200) > > > fixes: usb storage regressio

Re: [RFC PATCH] tcg/cpu-exec: precise single-stepping after an exception

2020-07-16 Thread Peter Maydell
On Thu, 16 Jul 2020 at 11:08, Luc Michel wrote: > > When single-stepping with a debugger attached to QEMU, and when an > exception is raised, the debugger misses the first instruction after the > exception: This is a long-standing bug; thanks for looking at it.

[Bug 1887854] Re: Spurious Data Abort on qemu-system-aarch64

2020-07-16 Thread K
** Description changed: When running RTEMS test psxndbm01.exe built for AArch64-ilp32 (this code is not yet publically available), the test generates a spurious data abort (the MMU and alignment checks should be disabled according to bits 1, 0 of SCTLR_EL1). The abort information is as

Re: qemu test-qga failure on mergebuild after VERSION file change: dependency issues??

2020-07-16 Thread Philippe Mathieu-Daudé
On 7/16/20 9:52 PM, Michael Roth wrote: > Quoting Philippe Mathieu-Daudé (2020-07-16 12:59:28) >> On 7/16/20 7:55 PM, Michael Roth wrote: >>> Quoting Peter Maydell (2020-07-16 05:53:17) The first merge I tried to process after bumping VERSION for rc0 failed on test-qga like this:

Re: qemu test-qga failure on mergebuild after VERSION file change: dependency issues??

2020-07-16 Thread Michael Roth
Quoting Philippe Mathieu-Daudé (2020-07-16 12:59:28) > On 7/16/20 7:55 PM, Michael Roth wrote: > > Quoting Peter Maydell (2020-07-16 05:53:17) > >> The first merge I tried to process after bumping VERSION for rc0 > >> failed on test-qga like this: > >> > >> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$((

[Bug 1887854] [NEW] Spurious Data Abort on qemu-system-aarch64

2020-07-16 Thread K
Public bug reported: When running RTEMS test psxndbm01.exe built for AArch64-ilp32 (this code is not yet publically available), the test generates a spurious data abort (the MMU and alignment checks should be disabled according to bits 1, 0 of SCTLR_EL1). The abort information is as follows:

[PATCH v2] tcg/cpu-exec: precise single-stepping after an exception

2020-07-16 Thread Luc Michel
When single-stepping with a debugger attached to QEMU, and when an exception is raised, the debugger misses the first instruction after the exception: $ qemu-system-aarch64 -M virt -display none -cpu cortex-a53 -s -S $ aarch64-linux-gnu-gdb GNU gdb (GDB) 9.2 [...] (gdb) tar rem :1234 Remote

[PATCH] net: check payload length limit for all frames

2020-07-16 Thread P J P
From: Prasad J Pandit While sending packets, the check that packet 'payload_len' is within 64kB limit, seems to happen only for GSO frames. It may lead to use-after-free or out-of-bounds access like issues when sending non-GSO frames. Check the 'payload_len' limit for all packets, irrespective

Re: [PATCH for-5.1] i386: hvf: Explicitly set CR4 guest/host mask

2020-07-16 Thread Roman Bolshakov
On Thu, Jul 16, 2020 at 02:14:57PM -0400, Eduardo Habkost wrote: > On Tue, Jul 14, 2020 at 08:20:04PM +0200, Paolo Bonzini wrote: > > Hi Roman, please ask Peter to apply it directly because I won't be able to > > send a pull request in the next couple of weeks. > > > > Paolo > > > > Il mar 14

[PULL 4/6] target/i386: fix model number and add missing features for Icelake-Server CPU model

2020-07-16 Thread Eduardo Habkost
From: Chenyi Qiang Add the missing features(sha_ni, avx512ifma, rdpid, fsrm, vmx-rdseed-exit, vmx-pml, vmx-eptp-switching) and change the model number to 106 in the Icelake-Server-v4 CPU model. Signed-off-by: Chenyi Qiang Message-Id: <20200714084148.26690-3-chenyi.qi...@intel.com>

[PULL 1/6] i368/cpu: Clear env->user_features after loading versioned CPU model

2020-07-16 Thread Eduardo Habkost
From: Xiaoyao Li Features defined in versioned CPU model are recorded in env->user_features since they are updated as property. It's unwated because they are not user specified. Simply clear env->user_features as a fix. It won't clear user specified features because user specified features are

[PULL 6/6] i386: hvf: Explicitly set CR4 guest/host mask

2020-07-16 Thread Eduardo Habkost
From: Roman Bolshakov Removal of register reset omitted initialization of CR4 guest/host mask. x86_64 guests aren't booting without it. Fixes: 5009ef22c6bb2 ("i386: hvf: Don't duplicate register reset") Signed-off-by: Roman Bolshakov Message-Id: <20200714090726.41082-1-r.bolsha...@yadro.com>

[PULL 0/6] x86 fixes for -rc1

2020-07-16 Thread Eduardo Habkost
The following changes since commit ee5128bb00f90dd301991d80d1db5224ce924c84: Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2020-07-16 13:12:05 +0100) are available in the Git repository at: git://github.com/ehabkost/qemu.git tags/x86-next-pull-request

[PULL 5/6] target/i386: add the missing vmx features for Skylake-Server and Cascadelake-Server CPU models

2020-07-16 Thread Eduardo Habkost
From: Chenyi Qiang Add the missing vmx features in Skylake-Server and Cascadelake-Server CPU models based on the output of Paolo's script. Signed-off-by: Chenyi Qiang Message-Id: <20200714084148.26690-4-chenyi.qi...@intel.com> Signed-off-by: Eduardo Habkost --- target/i386/cpu.c | 14

[PULL 3/6] target/i386: add fast short REP MOV support

2020-07-16 Thread Eduardo Habkost
From: Chenyi Qiang For CPUs support fast short REP MOV[CPUID.(EAX=7,ECX=0):EDX(bit4)], e.g Icelake and Tigerlake, expose it to the guest VM. Reviewed-by: Eduardo Habkost Signed-off-by: Chenyi Qiang Message-Id: <20200714084148.26690-2-chenyi.qi...@intel.com> Signed-off-by: Eduardo Habkost ---

[PULL 2/6] i386/cpu: Don't add unavailable_features to env->user_features

2020-07-16 Thread Eduardo Habkost
From: Xiaoyao Li Features unavailable due to absent of their dependent features should not be added to env->user_features. env->user_features only contains the feature explicity specified with -feature/+feature by user. Fixes: 99e24dbdaa68 ("target/i386: introduce generic feature dependency

Re: [PATCH for-5.1] i386: hvf: Explicitly set CR4 guest/host mask

2020-07-16 Thread Eduardo Habkost
On Tue, Jul 14, 2020 at 08:20:04PM +0200, Paolo Bonzini wrote: > Hi Roman, please ask Peter to apply it directly because I won't be able to > send a pull request in the next couple of weeks. > > Paolo > > Il mar 14 lug 2020, 12:39 Roman Bolshakov ha > scritto: > > > On Tue, Jul 14, 2020 at

Re: qemu test-qga failure on mergebuild after VERSION file change: dependency issues??

2020-07-16 Thread Philippe Mathieu-Daudé
On 7/16/20 7:55 PM, Michael Roth wrote: > Quoting Peter Maydell (2020-07-16 05:53:17) >> The first merge I tried to process after bumping VERSION for rc0 >> failed on test-qga like this: >> >> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))} >> tests/test-qga -m=quick -k --tap <

Re: [RFC PATCH] tcg/cpu-exec: precise single-stepping after an exception

2020-07-16 Thread Richard Henderson
On 7/16/20 3:04 AM, Luc Michel wrote: > When single-stepping with a debugger attached to QEMU, and when an > exception is raised, the debugger misses the first instruction after the > exception: > > $ qemu-system-aarch64 -M virt -display none -cpu cortex-a53 -s -S > > $ aarch64-linux-gnu-gdb >

Re: qemu test-qga failure on mergebuild after VERSION file change: dependency issues??

2020-07-16 Thread Michael Roth
Quoting Peter Maydell (2020-07-16 05:53:17) > The first merge I tried to process after bumping VERSION for rc0 > failed on test-qga like this: > > MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))} > tests/test-qga -m=quick -k --tap < /dev/null | ./scripts/tap-driv > er.pl

Re: [PULL v1 0/2] Merge tpm 2020/07/15 v1

2020-07-16 Thread Peter Maydell
On Wed, 15 Jul 2020 at 20:23, Stefan Berger wrote: > > Hello! > > This series fixes a couple of minor issues with the PPC64 TPM SPAPR interface > and a test case. > >Stefan > > The following changes since commit 8746309137ba470d1b2e8f5ce86ac228625db940: > > Update version for v5.1.0-rc0

[GIT PULL] I2C updates

2020-07-16 Thread Corey Minyard
The following changes since commit 45db94cc90c286a9965a285ba19450f448760a09: Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20200707' into staging (2020-07-10 16:43:40 +0100) are available in the Git repository at: https://github.com/cminyard/qemu.git tags/for-qemu-i2c-5

Re: [PATCH v3 3/9] vfio: add quirk device write method

2020-07-16 Thread Peter Maydell
On Tue, 30 Jun 2020 at 13:30, P J P wrote: > > From: Prasad J Pandit > > Add vfio quirk device mmio write method to avoid NULL pointer > dereference issue. > > Reported-by: Lei Sun > Reviewed-by: Li Qiang > Signed-off-by: Prasad J Pandit > --- > hw/vfio/pci-quirks.c | 8 > 1 file

Re: [PATCH v3 1/9] hw/pci-host: add pci-intack write method

2020-07-16 Thread Peter Maydell
On Tue, 30 Jun 2020 at 13:29, P J P wrote: > > From: Prasad J Pandit > > Add pci-intack mmio write method to avoid NULL pointer dereference > issue. > > Reported-by: Lei Sun > Reviewed-by: Li Qiang > Signed-off-by: Prasad J Pandit > --- > hw/pci-host/prep.c | 8 > 1 file changed, 8

Re: [PATCH v3 9/9] memory: assert MemoryRegionOps callbacks are defined

2020-07-16 Thread Peter Maydell
On Tue, 30 Jun 2020 at 13:31, P J P wrote: > > From: Prasad J Pandit > > When registering a MemoryRegionOps object, assert that its > read/write callback methods are defined. This avoids potential > guest crash via a NULL pointer dereference. > > Suggested-by: Peter Maydell > Reviewed-by: Li

[PATCH v4 for-5.2 1/2] spapr: Use error_append_hint() in spapr_caps.c

2020-07-16 Thread Greg Kurz
We have a dedicated error API for hints. Use it instead of embedding the hint in the error message, as recommanded in the "qapi/error.h" header file. Since spapr_caps_apply() passes _fatal, all functions must also call the ERRP_GUARD() macro for error_append_hint() to be functional. While here,

[PATCH v4 for-5.2 2/2] spapr: Forbid nested KVM-HV in pre-power9 compat mode

2020-07-16 Thread Greg Kurz
Nested KVM HV only works if the kernel is using the radix MMU mode, ie. the CPU is POWER9 and it is not running in some pre-power9 compat mode. Otherwise, the KVM HV module fails to load in the guest with -ENODEV. It might be painful for a user to discover this late that nested cannot work with

[PATCH v4 for-5.2 0/2] spapr: Improve error reporting in spapr_caps.c

2020-07-16 Thread Greg Kurz
Nested KVM HV only works if the kernel is using the radix MMU mode, ie. the CPU is POWER9 and it is not running in some pre-power9 compat mode. Otherwise, the KVM HV module fails to load in the guest with -ENODEV. It might be painful for a user to discover this late that nested cannot work with

Re: [PATCH 2/2] python/qemu: Change ConsoleSocket to optionally drain socket.

2020-07-16 Thread Robert Foley
On Thu, 16 Jul 2020 at 09:42, Alex Bennée wrote: > > > +self._drain_thread = None > > +socket.socket.__init__(self, socket.AF_UNIX, socket.SOCK_STREAM) > > +self.connect(address) > > +self._drain = drain > > We end up with two variables that represent the fact we

Re: [PATCH v3 8/9] imx7-ccm: add digprog mmio write method

2020-07-16 Thread Peter Maydell
On Thu, 16 Jul 2020 at 17:55, P J P wrote: > > +-- On Thu, 16 Jul 2020, Peter Maydell wrote --+ > | > +static void imx7_digprog_write(void *opaque, hwaddr addr, > | > +uint64_t data, unsigned size) > | > +{ > | > +qemu_log_mask(LOG_UNIMP, "%s not

Re: [PATCH v3 8/9] imx7-ccm: add digprog mmio write method

2020-07-16 Thread P J P
+-- On Thu, 16 Jul 2020, Peter Maydell wrote --+ | > +static void imx7_digprog_write(void *opaque, hwaddr addr, | > +uint64_t data, unsigned size) | > +{ | > +qemu_log_mask(LOG_UNIMP, "%s not implemented\n", __func__); | > +} | | This covers a single

Re: [PATCH] introduce VFIO-over-socket protocol specificaion

2020-07-16 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1594913503-52271-1-git-send-email-thanos.maka...@nutanix.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1594913503-52271-1-git-send-email-thanos.maka...@nutanix.com Subject:

Re: [PATCH] introduce VFIO-over-socket protocol specificaion

2020-07-16 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1594913503-52271-1-git-send-email-thanos.maka...@nutanix.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. ===

Re: [PATCH v3 2/9] pci-host: add pcie-msi read method

2020-07-16 Thread Peter Maydell
On Tue, 30 Jun 2020 at 13:30, P J P wrote: > > From: Prasad J Pandit > > Add pcie-msi mmio read method to avoid NULL pointer dereference > issue. This change is specific to the designware pci host controller; it would be nice to have "designware" in the commit subject. > Reported-by: Lei Sun

[PATCH] gitlab-ci.yml: Add oss-fuzz build tests

2020-07-16 Thread Alexander Bulekov
This tries to build and run the fuzzers with the same build-script used by oss-fuzz. This doesn't guarantee that the builds on oss-fuzz will also succeed, since oss-fuzz provides its own compiler and fuzzer vars, but it can catch changes that are not compatible with the the

Re: [PATCH] gitlab-ci.yml: Add fuzzer tests

2020-07-16 Thread Alexander Bulekov
On 200716 1209, Thomas Huth wrote: > So far we neither compile-tested nor run any of the new fuzzers in our CI, > which led to some build failures of the fuzzer code in the past weeks. > To avoid this problem, add a job to compile the fuzzer code and run some > loops (which likely don't find any

Re: [PATCH v3] spapr: Add a new level of NUMA for GPUs

2020-07-16 Thread Daniel Henrique Barboza
On 7/16/20 1:00 PM, Reza Arbab wrote: On Thu, Jul 16, 2020 at 06:42:11AM -0300, Daniel Henrique Barboza wrote: Which would translate here to:    uint32_t associativity[] = {    cpu_to_be32(0x4),    cpu_to_be32(nvslot->numa_id),    cpu_to_be32(nvslot->numa_id),    

Re: [PATCH v3 6/9] spapr_pci: add spapr msi read method

2020-07-16 Thread Peter Maydell
On Tue, 30 Jun 2020 at 13:31, P J P wrote: > > From: Prasad J Pandit > > Add spapr msi mmio read method to avoid NULL pointer dereference > issue. > > Reported-by: Lei Sun > Acked-by: David Gibson > Reviewed-by: Li Qiang > Signed-off-by: Prasad J Pandit > --- > hw/ppc/spapr_pci.c | 13

Re: [PATCH] target/i386: floatx80: avoid compound literals in static initializers

2020-07-16 Thread Alex Bennée
Laszlo Ersek writes: > Quoting ISO C99 6.7.8p4, "All the expressions in an initializer for an > object that has static storage duration shall be constant expressions or > string literals". > > The compound literal produced by the make_floatx80() macro is not such a > constant expression, per

Re: [PATCH v3 5/9] nvram: add nrf51_soc flash read method

2020-07-16 Thread Peter Maydell
On Tue, 30 Jun 2020 at 13:31, P J P wrote: > > From: Prasad J Pandit > > Add nrf51_soc mmio read method to avoid NULL pointer dereference > issue. > > Reported-by: Lei Sun > Signed-off-by: Prasad J Pandit > --- > hw/nvram/nrf51_nvm.c | 5 + > 1 file changed, 5 insertions(+) > > Update v3:

Re: [PATCH v2 5/9] nvram: add nrf51_soc flash read method

2020-07-16 Thread Peter Maydell
On Mon, 29 Jun 2020 at 12:18, Li Qiang wrote: > > P J P 于2020年6月25日周四 上午3:01写道: > > > > From: Prasad J Pandit > > > > Add nrf51_soc mmio read method to avoid NULL pointer dereference > > issue. > > > > Reported-by: Lei Sun > > Signed-off-by: Prasad J Pandit > > --- > > hw/nvram/nrf51_nvm.c |

Re: TB Cache size grows out of control with qemu 5.0

2020-07-16 Thread Alex Bennée
Christian Ehrhardt writes: > On Wed, Jul 15, 2020 at 5:58 PM BALATON Zoltan wrote: > >> See commit 47a2def4533a2807e48954abd50b32ecb1aaf29a and the next two >> following it. >> > > Thank you Zoltan for pointing out this commit, I agree that this seems to be > the trigger for the issues I'm

Re: [PATCH v3 8/9] imx7-ccm: add digprog mmio write method

2020-07-16 Thread Peter Maydell
On Tue, 30 Jun 2020 at 13:31, P J P wrote: > > From: Prasad J Pandit > > Add digprog mmio write method to avoid assert failure during > initialisation. > > Reviewed-by: Li Qiang > Signed-off-by: Prasad J Pandit > --- > hw/misc/imx7_ccm.c | 7 +++ > 1 file changed, 7 insertions(+) > >

Re: [PATCH for-5.1] qapi: Fix visit_type_STRUCT() not to fail for null object

2020-07-16 Thread Li Qiang
Markus Armbruster 于2020年7月16日周四 下午11:07写道: > > To make deallocating partially constructed objects work, the > visit_type_STRUCT() need to succeed without doing anything when passed > a null object. > > Commit cdd2b228b9 "qapi: Smooth visitor error checking in generated > code" broke that. To

[PATCH] e1000e: using bottom half to send packets

2020-07-16 Thread Li Qiang
Alexander Bulekov reported a UAF bug related e1000e packets send. -->https://bugs.launchpad.net/qemu/+bug/1886362 This is because the guest trigger a e1000e packet send and set the data's address to e1000e's MMIO address. So when the e1000e do DMA it will write the MMIO again and trigger

Re: [PATCH v3 7/9] tz-ppc: add dummy read/write methods

2020-07-16 Thread Peter Maydell
On Tue, 30 Jun 2020 at 13:31, P J P wrote: > > From: Prasad J Pandit > > Add tz-ppc-dummy mmio read/write methods to avoid assert failure > during initialisation. > > Signed-off-by: Prasad J Pandit > -- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v10 09/10] qcow2_format.py: collect fields to dump in JSON format

2020-07-16 Thread Vladimir Sementsov-Ogievskiy
16.07.2020 18:52, Andrey Shinkevich wrote: On 16.07.2020 18:40, Vladimir Sementsov-Ogievskiy wrote: 16.07.2020 18:34, Andrey Shinkevich wrote: On 16.07.2020 13:24, Vladimir Sementsov-Ogievskiy wrote: 14.07.2020 00:36, Andrey Shinkevich wrote: As __dict__ is being extended with class members

Re: [PATCH v3] spapr: Add a new level of NUMA for GPUs

2020-07-16 Thread Reza Arbab
On Thu, Jul 16, 2020 at 06:42:11AM -0300, Daniel Henrique Barboza wrote: Which would translate here to: uint32_t associativity[] = { cpu_to_be32(0x4), cpu_to_be32(nvslot->numa_id), cpu_to_be32(nvslot->numa_id), cpu_to_be32(nvslot->numa_id),

Re: [PATCH for-5.1] qapi: Fix visit_type_STRUCT() not to fail for null object

2020-07-16 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200716150617.4027356-1-arm...@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

[Bug 1880822] Re: CVE-2020-13253 QEMU: sd: OOB access could crash the guest resulting in DoS

2020-07-16 Thread Philippe Mathieu-Daudé
Fixed in commit 790762e54871143415bffcec4cb3c022c3cd. ** Changed in: qemu Status: In Progress => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1880822 Title:

Re: [PATCH v10 09/10] qcow2_format.py: collect fields to dump in JSON format

2020-07-16 Thread Andrey Shinkevich
On 16.07.2020 18:40, Vladimir Sementsov-Ogievskiy wrote: 16.07.2020 18:34, Andrey Shinkevich wrote: On 16.07.2020 13:24, Vladimir Sementsov-Ogievskiy wrote: 14.07.2020 00:36, Andrey Shinkevich wrote: As __dict__ is being extended with class members we do not want to print, make a light copy

[PATCH] introduce VFIO-over-socket protocol specificaion

2020-07-16 Thread Thanos Makatos
This patch introduces the VFIO-over-socket protocol specification, which is designed to allow devices to be emulated outside QEMU, in a separate process. VFIO-over-socket reuses the existing VFIO defines, structs and concepts. It has been earlier discussed as an RFC in: "RFC: use VFIO over a UNIX

[PATCH] osdep.h: Add doc comment for qemu_get_thread_id()

2020-07-16 Thread Peter Maydell
Add a documentation comment for qemu_get_thread_id(): since this is rather host-OS-specific it's useful if people writing the implementation and people thinking of using the function know what the purpose and limitations are. Signed-off-by: Peter Maydell --- Based on conversation with Dan on

Re: [PATCH v10 09/10] qcow2_format.py: collect fields to dump in JSON format

2020-07-16 Thread Vladimir Sementsov-Ogievskiy
16.07.2020 18:34, Andrey Shinkevich wrote: On 16.07.2020 13:24, Vladimir Sementsov-Ogievskiy wrote: 14.07.2020 00:36, Andrey Shinkevich wrote: As __dict__ is being extended with class members we do not want to print, make a light copy of the initial __dict__ and extend the copy by adding lists

Re: [PATCH v10 09/10] qcow2_format.py: collect fields to dump in JSON format

2020-07-16 Thread Andrey Shinkevich
On 16.07.2020 13:24, Vladimir Sementsov-Ogievskiy wrote: 14.07.2020 00:36, Andrey Shinkevich wrote: As __dict__ is being extended with class members we do not want to print, make a light copy of the initial __dict__ and extend the copy by adding lists we have to print in the JSON output.

Re: [PATCH 2/2] i386/cpu: Mask off unsupported XSAVE components

2020-07-16 Thread Xiaoyao Li
On 7/16/2020 11:14 PM, Eduardo Habkost wrote: On Thu, Jul 16, 2020 at 04:20:19PM +0800, Xiaoyao Li wrote: When setting up XSAVE components, it needs to mask off those unsupported by KVM. Signed-off-by: Xiaoyao Li We must never disable CPUID features silently based on host capabilities,

Re: [PATCH v7 02/47] block: Add chain helper functions

2020-07-16 Thread Vladimir Sementsov-Ogievskiy
16.07.2020 17:50, Max Reitz wrote: On 13.07.20 12:18, Vladimir Sementsov-Ogievskiy wrote: 25.06.2020 18:21, Max Reitz wrote: Add some helper functions for skipping filters in a chain of block nodes. Signed-off-by: Max Reitz ---   include/block/block_int.h |  3 +++   block.c 

Re: [PATCH 1/2] i386/cpu: Clear FEAT_XSAVE_COMP_{LO, HI} when XSAVE is not available

2020-07-16 Thread Xiaoyao Li
On 7/16/2020 11:15 PM, Eduardo Habkost wrote: On Thu, Jul 16, 2020 at 04:20:18PM +0800, Xiaoyao Li wrote: Per Intel SDM vol 1, 13.2, if CPUID.1:ECX.XSAVE[bit 26] is 0, the processor provides no further enumeration through CPUID function 0DH. Can you explain what's the bug you are trying to

Re: [PATCH v7 21/47] block: Use CAFs in bdrv_refresh_filename()

2020-07-16 Thread Max Reitz
On 15.07.20 14:52, Andrey Shinkevich wrote: > On 25.06.2020 18:21, Max Reitz wrote: >> bdrv_refresh_filename() and the kind of related bdrv_dirname() should >> look to the primary child when they wish to copy the underlying file's >> filename. >> >> Signed-off-by: Max Reitz >> --- >>   block.c |

[Bug 1887820] [NEW] TCG test targets missing from 'make check-help'

2020-07-16 Thread Philippe Mathieu-Daudé
Public bug reported: We can run the TCG tests using: $ make run-tcg-tests-$TARGET-softmmu This is not listed in 'make check-help'. ** Affects: qemu Importance: Undecided Status: New -- You received this bug notification because you are a member of qemu- devel-ml, which is

Re: [PATCH 1/2] i386/cpu: Clear FEAT_XSAVE_COMP_{LO,HI} when XSAVE is not available

2020-07-16 Thread Eduardo Habkost
On Thu, Jul 16, 2020 at 04:20:18PM +0800, Xiaoyao Li wrote: > Per Intel SDM vol 1, 13.2, if CPUID.1:ECX.XSAVE[bit 26] is 0, the > processor provides no further enumeration through CPUID function 0DH. Can you explain what's the bug you are trying to fix? env->features[FEAT_XSAVE_COMP_*] is already

Re: [PATCH v7 20/47] block: Iterate over children in refresh_limits

2020-07-16 Thread Max Reitz
On 14.07.20 20:37, Andrey Shinkevich wrote: > On 25.06.2020 18:21, Max Reitz wrote: >> Instead of looking at just bs->file and bs->backing, we should look at >> all children that could end up receiving forwarded requests. >> >> Signed-off-by: Max Reitz >> --- >>   block/io.c | 32

Re: [PATCH 2/2] i386/cpu: Mask off unsupported XSAVE components

2020-07-16 Thread Eduardo Habkost
On Thu, Jul 16, 2020 at 04:20:19PM +0800, Xiaoyao Li wrote: > When setting up XSAVE components, it needs to mask off those unsupported > by KVM. > > Signed-off-by: Xiaoyao Li We must never disable CPUID features silently based on host capabilities, otherwise we can't guarantee guest ABI

Re: [PATCH v7 19/47] vmdk: Drop vmdk_co_flush()

2020-07-16 Thread Max Reitz
On 14.07.20 16:52, Andrey Shinkevich wrote: > On 25.06.2020 18:21, Max Reitz wrote: >> Before HEAD^, we needed this because bdrv_co_flush() by itself would >> only flush bs->file.  With HEAD^, bdrv_co_flush() will flush all >> children on which a WRITE or WRITE_UNCHANGED permission has been taken.

Re: [PATCH] target/i386: floatx80: avoid compound literals in static initializers

2020-07-16 Thread Philippe Mathieu-Daudé
On 7/16/20 4:42 PM, Laszlo Ersek wrote: > Quoting ISO C99 6.7.8p4, "All the expressions in an initializer for an > object that has static storage duration shall be constant expressions or > string literals". > > The compound literal produced by the make_floatx80() macro is not such a > constant

Re: [PATCH v6 0/3] modify CPU model info

2020-07-16 Thread Eduardo Habkost
On Tue, Jul 14, 2020 at 04:41:45PM +0800, Chenyi Qiang wrote: > Add the missing VMX features in Skylake-Server, Cascadelake-Server and > Icelake-Server CPU models. In Icelake-Server CPU model, it lacks sha_ni, > avx512ifma, rdpid and fsrm. The model number of Icelake-Server also needs > to be

[PATCH for-5.1] qapi: Fix visit_type_STRUCT() not to fail for null object

2020-07-16 Thread Markus Armbruster
To make deallocating partially constructed objects work, the visit_type_STRUCT() need to succeed without doing anything when passed a null object. Commit cdd2b228b9 "qapi: Smooth visitor error checking in generated code" broke that. To reproduce, run tests/test-qobject-input-visitor with

Re: [PATCH] spapr_pci: Robustify support of PCI bridges

2020-07-16 Thread Greg Kurz
On Thu, 16 Jul 2020 16:23:52 +0200 Markus Armbruster wrote: > David Gibson writes: > > > On Thu, Jul 16, 2020 at 12:32:44PM +0200, Greg Kurz wrote: > >> On Thu, 16 Jul 2020 14:45:40 +1000 > >> David Gibson wrote: > >> > >> > On Thu, Jul 09, 2020 at 07:12:47PM +0200, Greg Kurz wrote: > >> > >

  1   2   3   >