Re: [PATCH v3 1/2] hw/net: Added plen fix for IPv6

2020-07-16 Thread Jason Wang
On 2020/7/16 上午11:53, and...@daynix.com wrote: From: Andrew Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1708065 With network backend with 'virtual header' - there was an issue in 'plen' field. Overall, during TSO, 'plen' would be changed, but with 'vheader' this field should be set t

[PATCH v6 13/13] tests/acceptance: console boot tests for quanta-gsj

2020-07-16 Thread Havard Skinnemoen
This adds two acceptance tests for the quanta-gsj machine. One test downloads a lightly patched openbmc flash image from github and verifies that it boots all the way to the login prompt. The other test downloads a kernel, initrd and dtb built from the same openbmc source and verifies that the ke

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

2020-07-16 Thread David Gibson
On Thu, Jul 16, 2020 at 07:11:11PM +0200, Greg Kurz wrote: > 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 &error_fatal, all functions must > also call th

[PATCH v6 07/13] hw/arm: Load -bios image as a boot ROM for npcm7xx

2020-07-16 Thread Havard Skinnemoen
If a -bios option is specified on the command line, load the image into the internal ROM memory region, which contains the first instructions run by the CPU after reset. If -bios is not specified, the vbootrom included with qemu is loaded by default. Reviewed-by: Tyrone Ting Signed-off-by: Havar

Re: [PATCH v3 2/2] hw/net: Added basic IPv6 software fragmentation

2020-07-16 Thread Jason Wang
On 2020/7/16 上午11:53, and...@daynix.com wrote: From: Andrew The basic IPv6 fragmentation - adding 'frag' extension to the packet, overall shares some logic with IPv4. It works, but there are still issues with a combination of extensions - in the future, it would require refactoring work to im

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

2020-07-16 Thread David Gibson
On Fri, Jul 17, 2020 at 01:27:05PM +1000, Alexey Kardashevskiy wrote: > 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/qem

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

2020-07-16 Thread Havard Skinnemoen
This allows these NPCM7xx-based boards to boot from a flash image, e.g. one built with OpenBMC. For example like this: IMAGE=${OPENBMC}/build/tmp/deploy/images/gsj/image-bmc qemu-system-arm -machine quanta-gsj -nographic \ -drive file=${IMAGE},if=mtd,bus=0,unit=0,format=raw,snapshot=on Re

[PATCH v6 06/13] roms: Add virtual Boot ROM for NPCM7xx SoCs

2020-07-16 Thread Havard Skinnemoen
This is a minimalistic boot ROM written specifically for use with QEMU. It supports loading the second-stage loader from SPI flash into RAM, SMP boot, and not much else. Signed-off-by: Havard Skinnemoen --- Makefile| 1 + .gitmodules | 3 +++ pc-bios/npcm7

[PATCH v6 12/13] docs/system: Add Nuvoton machine documentation

2020-07-16 Thread Havard Skinnemoen
Reviewed-by: Cédric Le Goater Signed-off-by: Havard Skinnemoen --- docs/system/arm/nuvoton.rst | 90 + docs/system/target-arm.rst | 1 + 2 files changed, 91 insertions(+) create mode 100644 docs/system/arm/nuvoton.rst diff --git a/docs/system/arm/nuvoton.r

[PATCH v6 05/13] hw/arm: Add two NPCM7xx-based machines

2020-07-16 Thread Havard Skinnemoen
This adds two new machines, both supported by OpenBMC: - npcm750-evb: Nuvoton NPCM750 Evaluation Board. - quanta-gsj: A board with a NPCM730 chip. They rely on the NPCM7xx SoC device to do the heavy lifting. They are almost completely identical at the moment, apart from the SoC type, which cu

[PATCH v6 04/13] hw/arm: Add NPCM730 and NPCM750 SoC models

2020-07-16 Thread Havard Skinnemoen
The Nuvoton NPCM7xx SoC family are used to implement Baseboard Management Controllers in servers. While the family includes four SoCs, this patch implements limited support for two of them: NPCM730 (targeted for Data Center applications) and NPCM750 (targeted for Enterprise applications). This pat

[PATCH v6 10/13] hw/ssi: NPCM7xx Flash Interface Unit device model

2020-07-16 Thread Havard Skinnemoen
This implements a device model for the NPCM7xx SPI flash controller. Direct reads and writes, and user-mode transactions have been tested in various modes. Protection features are not implemented yet. All the FIU instances are available in the SoC's address space, regardless of whether or not the

[PATCH v6 03/13] hw/timer: Add NPCM7xx Timer device model

2020-07-16 Thread Havard Skinnemoen
The NPCM730 and NPCM750 SoCs have three timer modules each holding five timers and some shared registers (e.g. interrupt status). Each timer runs at 25 MHz divided by a prescaler, and counts down from a configurable initial value to zero. When zero is reached, the interrupt flag for the timer is s

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

2020-07-16 Thread David Gibson
On Thu, Jul 16, 2020 at 07:11:21PM +0200, Greg Kurz wrote: > 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 painfu

[PATCH v6 08/13] hw/nvram: NPCM7xx OTP device model

2020-07-16 Thread Havard Skinnemoen
This supports reading and writing OTP fuses and keys. Only fuse reading has been tested. Protection is not implemented. Reviewed-by: Avi Fishman Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Havard Skinnemoen --- include/hw/arm/npcm7xx.h | 3 + include/hw/nvram/npcm7xx_otp.h | 88

[PATCH v6 02/13] hw/misc: Add NPCM7xx Clock Controller device model

2020-07-16 Thread Havard Skinnemoen
Enough functionality to boot the Linux kernel has been implemented. This includes: - Correct power-on reset values so the various clock rates can be accurately calculated. - Clock enables stick around when written. In addition, a best effort attempt to implement SECCNT and CNTR25M was mad

[PATCH v6 09/13] hw/mem: Stubbed out NPCM7xx Memory Controller model

2020-07-16 Thread Havard Skinnemoen
This just implements the bare minimum to cause the boot block to skip memory initialization. Reviewed-by: Tyrone Ting Reviewed-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Havard Skinnemoen --- include/hw/arm/npcm7xx.h| 2 + include/hw/mem/npcm7xx_mc.h | 36 +++

[PATCH v6 01/13] hw/misc: Add NPCM7xx System Global Control Registers device model

2020-07-16 Thread Havard Skinnemoen
Implement a device model for the System Global Control Registers in the NPCM730 and NPCM750 BMC SoCs. This is primarily used to enable SMP boot (the boot ROM spins reading the SCRPAD register) and DDR memory initialization; other registers are best effort for now. The reset values of the MDLR and

[PATCH v6 00/13] Add Nuvoton NPCM730/NPCM750 SoCs and two BMC machines

2020-07-16 Thread Havard Skinnemoen
I also pushed this and the previous two patchsets to my qemu fork on github. The branches are named npcm7xx-v[1-6]. https://github.com/hskinnemoen/qemu This patch series models enough of the Nuvoton NPCM730 and NPCM750 SoCs to boot an OpenBMC image built for quanta-gsj. This includes device mod

Re: Slow down with: 'Make "info qom-tree" show children sorted'

2020-07-16 Thread David Gibson
On Thu, 16 Jul 2020 07:37:17 +0200 Markus Armbruster wrote: > David Gibson writes: > > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > > > > ... as you say, 256 shouldn't really be a problem. I was concerned > > about LMB DRCs rather than PCI

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 an

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 ar

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 a

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 "chi

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 addres

[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

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 7f5258dd8327d574de455a

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 out-of-bo

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 will

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 > > issues

[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 eve

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 'payload

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 informati

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 betw

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 trigge

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 s

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 will

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 '--extr

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 for

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 bui

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 cou

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 issue

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. (https://bugs.launchpad.net/qemu/+b

[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 follow

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: Ta

[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 debug

[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 of

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 lug

[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> Signed-off-by

[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 f

[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> Si

[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 mec

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 12:0

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 < /de

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 > GN

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 --test-nam

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 rele

[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 cha

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 i

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 Qia

[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 &error_fatal, all functions must also call the ERRP_GUARD() macro for error_append_hint() to be functional. While h

[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 the

[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 the

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 h

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 impleme

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 reg

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. === TES

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 ./scripts/oss-fuzz/build

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 ne

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 6.

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 see

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(+) > > Updat

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 repr

[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-entra

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 w

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),

  1   2   3   >