Re: [PATCH 5/5] hw/i2c: Document the I2C qdev helpers

2020-07-14 Thread Markus Armbruster
Peter Maydell writes: > On Tue, 30 Jun 2020 at 11:15, Markus Armbruster wrote: >> >> Philippe Mathieu-Daudé writes: >> >> > In commit d88c42ff2c we added new prototype but neglected to >> > add their documentation. Fix that. >> > >> > Reported-by: Peter Maydell >> > Signed-off-by: Philippe Mat

Re: [PATCH] linux-user: Add several IFTUN ioctls

2020-07-14 Thread Laurent Vivier
Le 13/07/2020 à 21:28, Laurent Vivier a écrit : > Le 10/07/2020 à 21:53, Josh Kunz a écrit : >> This change includes most widely-available if_tun ioctls that are >> integer typed. >> >> Tested by compiling all linux-user emulators. This patch has also been >> used successfully to run several binari

[PULL 2/7] linux-user: refactor ipc syscall and support of semtimedop syscall

2020-07-14 Thread Laurent Vivier
From: Matus Kysel Refactoring ipc syscall for s390x and SPARC, so it matches glibc implementation We should add support of semtimedop syscall as new version of glibc 2.31 uses semop based on semtimedop (commit: https://gitlab.com/freedesktop-sdk/mirrors/sourceware/glibc/-/commit/765cdd0bffd7796

[PULL 5/7] linux-user: add netlink RTM_SETLINK command

2020-07-14 Thread Laurent Vivier
This command is needed to be able to boot systemd in a container. $ sudo systemd-nspawn -D /chroot/armhf/sid/ -b Spawning container sid on /chroot/armhf/sid. Press ^] three times within 1s to kill container. systemd 245.6-2 running in system mode. Detected virtualization systemd-nspawn.

[PULL 1/7] linux-user: Use EPROTONOSUPPORT for unimplemented netlink protocols

2020-07-14 Thread Laurent Vivier
From: Josh Kunz Linux uses the EPROTONOSUPPORT error code[1] if the users requests a netlink socket with an unsupported netlink protocol. This change switches linux-user to use the same code as Linux, instead of EPFNOSUPPORT (which AFAIK is just an anachronistic version of EAFNOSUPPORT). Tested

[PULL 0/7] Linux user for 5.1 patches

2020-07-14 Thread Laurent Vivier
x-user-for-5.1-pull-request for you to fetch changes up to 42b16184d016d48d167229a1ddb89b3671c77440: linux-user: fix print_syscall_err() when syscall returned value is negative (2020-07-14 09:29:14 +0200) linux-user branch 202

[PULL 7/7] linux-user: fix print_syscall_err() when syscall returned value is negative

2020-07-14 Thread Laurent Vivier
print_syscall_err() relies on the sign of the returned value to know if it is an errno value or not. But in some cases the returned value can have the most signicant bit set without being an errno. This patch restores previous behaviour that was also checking if we can decode the errno to validat

[PULL 4/7] linux-user: add new netlink types

2020-07-14 Thread Laurent Vivier
Only implement IFLA_PERM_ADDRESS to fix the following error: Unknown host QEMU_IFLA type: 54 The couple of other ones, IFLA_PROP_LIST and IFLA_ALT_IFNAME, have been introduced to be used with RTM_NEWLINKPROP, RTM_DELLINKPROP and RTM_GETLINKPROP that are not implemented by QEMU. Signed-off-by:

[PULL 3/7] linux-user: Fix Coverity CID 1430271 / CID 1430272

2020-07-14 Thread Laurent Vivier
In new functions print_ioctl() and print_syscall_ret_ioctl(), we don't check if lock_user() returns NULL and this would cause a segfault in thunk_print(). If lock_user() returns NULL don't call thunk_print() but prints only the value of the (invalid) pointer. Tested with: # cat ioctl.c #

[PULL 6/7] linux-user: fix the errno value in print_syscall_err()

2020-07-14 Thread Laurent Vivier
errno of the target is returned as a negative value by the syscall, not in the host errno variable. The emulation of the target syscall can return an error while the host doesn't set an errno value. Target errnos and host errnos can also differ in some cases. Fixes: c84be71f6854 ("linux-user: Ext

Re: [PATCH] Allow acpi-tmr size=2

2020-07-14 Thread Michael S. Tsirkin
On Mon, Jul 13, 2020 at 05:16:56PM +0300, Michael Tokarev wrote: > 13.07.2020 15:17, Michael S. Tsirkin пишет: > > On Mon, Jul 13, 2020 at 12:46:00PM +0100, Simon John wrote: > >> I don't profess to understand most of this, I am just a user who found > >> something didn't work and tracked down the

[Bug 1884719] Re: Function not implemented when using libaio

2020-07-14 Thread Martin Grigorov
Laurent, I am not familiar with the internals of QEMU but if you point me to the source code of similar functionality I could try! Thanks! -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1884719 Titl

Re: [PATCH] tests: improve performance of device-introspect-test

2020-07-14 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Fri, Jul 10, 2020 at 10:03:56PM +0200, Markus Armbruster wrote: >> Daniel P. Berrangé writes: >> >> > Total execution time with "-m slow" and x86_64 QEMU, drops from 3 >> > minutes 15 seconds, down to 54 seconds. >> > >> > Individual tests drop from 17-20 seconds

Re: [PULL 0/7] Linux user for 5.1 patches

2020-07-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200714073259.1464675-1-laur...@vivier.eu/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200714073259.1464675-1-laur...@vivier.eu Subject: [PULL 0/7] Linux user for 5.1 patches

Re: [PATCH for-5.1] qemu-img resize: Require --shrink for shrinking all image formats

2020-07-14 Thread Kevin Wolf
Am 10.07.2020 um 14:41 hat Kevin Wolf geschrieben: > Am 10.07.2020 um 14:33 hat Peter Maydell geschrieben: > > On Fri, 10 Jul 2020 at 13:17, Kevin Wolf wrote: > > > > > > QEMU 2.11 introduced the --shrink option for qemu-img resize to avoid > > > accidentally shrinking images (commit 4ffca8904a3).

[PATCH 1/1] MAINTAINERS: introduce cve or security quotient field

2020-07-14 Thread P J P
From: Prasad J Pandit QEMU supports numerous virtualisation and emulation use cases. It also offers many features to support guest's function(s). All of these use cases and features are not always security relevant. Because some maybe used in trusted environments only. Some may still be in exper

[PATCH 0/1] MAINTAINERS: add security quotient field

2020-07-14 Thread P J P
From: Prasad J Pandit Hello, QEMU supports numerous virtualisation and emulation use cases. It offers many features to support guest's function(s). All of these use cases and features are not always security relevant. Because some maybe used in trusted environments only. Some may still be in ex

[PATCH v6 0/3] modify CPU model info

2020-07-14 Thread Chenyi Qiang
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 fixed. To apply this patchset, a bug related to env->user_features need to

[PATCH v6 1/3] target/i386: add fast short REP MOV support

2020-07-14 Thread 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 --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [RFC PATCH 4/5] hw/i386/acpi-build: Turn off support of PCIe native hot-plug and SHPC in _OSC

2020-07-14 Thread Michael S. Tsirkin
On Mon, Jul 13, 2020 at 04:56:54PM +0200, Igor Mammedov wrote: > On Thu, 9 Jul 2020 00:46:14 +0200 > Julia Suvorova wrote: > > > Other methods may be used if the system is capable of this and the _OSC bit > > is set. Disable them explicitly to force ACPI PCI hot-plug use. The older > > versions

[PATCH v6 2/3] target/i386: fix model number and add missing features for Icelake-Server CPU model

2020-07-14 Thread 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 --- target/i386/cpu.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tar

[PATCH v6 3/3] target/i386: add the missing vmx features for Skylake-Server and Cascadelake-Server CPU models

2020-07-14 Thread 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 --- target/i386/cpu.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 6afc59d8ff..1d

Re: [RFC PATCH 5/5] hw/acpi/ich9: Enable ACPI PCI hot-plug

2020-07-14 Thread Michael S. Tsirkin
On Mon, Jul 13, 2020 at 05:17:18PM +0200, Igor Mammedov wrote: > On Thu, 9 Jul 2020 00:46:15 +0200 > Julia Suvorova wrote: > > > Add acpi_pcihp to ich9_pm and use ACPI PCI hot-plug by default. > > > > Signed-off-by: Julia Suvorova > > --- > > include/hw/acpi/ich9.h | 3 +++ > > hw/acpi/ich9.

Re: [Bug 1886362] [NEW] Heap use-after-free in lduw_he_p through e1000e_write_to_rx_buffers

2020-07-14 Thread Jason Wang
On 2020/7/10 下午6:37, Li Qiang wrote: Paolo Bonzini 于2020年7月10日周五 上午1:36写道: On 09/07/20 17:51, Li Qiang wrote: Maybe we should check whether the address is a RAM address in 'dma_memory_rw'? But it is a hot path. I'm not sure it is right. Hope more discussion. Half of the purpose of dma-helpe

Re: [PATCH] docs/qdev-device-use: Clean up the sentences related to -usbdevice

2020-07-14 Thread Markus Armbruster
Thomas Huth writes: > Most of the -usbdevice paramaters have been removed already. Update > the doc accordingly. > > Signed-off-by: Thomas Huth > --- > docs/qdev-device-use.txt | 28 +++- > 1 file changed, 3 insertions(+), 25 deletions(-) > > diff --git a/docs/qdev-devic

Re: [PATCH 3/4] hw/arm/virt-acpi-build: Only expose flash on older machine types

2020-07-14 Thread Michael S. Tsirkin
On Tue, Jul 14, 2020 at 07:51:09AM +0200, Andrew Jones wrote: > On Mon, Jul 13, 2020 at 10:49:07AM +0200, Igor Mammedov wrote: > > On Mon, 29 Jun 2020 16:09:37 +0200 > > Andrew Jones wrote: > > > > > The flash device is exclusively for the host-controlled firmware, so > > > we should not expose i

Re: [PATCH v2] ftgmac100: fix dblac write test

2020-07-14 Thread Jason Wang
On 2020/7/13 下午8:06, Cédric Le Goater wrote: On 7/7/20 9:42 AM, Erik Smit wrote: Hi Andrew, On Mon, 6 Jul 2020 at 03:59, Andrew Jeffery wrote: On Sun, 28 Jun 2020, at 23:56, erik-smit wrote: The test of the write of the dblac register was testing the old value instead of the new value. Thi

Re: [PATCH v2 09/11] hw/virtio/pci: include vdev name in registered PCI sections

2020-07-14 Thread Michael S. Tsirkin
On Mon, Jul 13, 2020 at 09:04:13PM +0100, Alex Bennée wrote: > When viewing/debugging memory regions it is sometimes hard to figure > out which PCI device something belongs to. Make the names unique by > including the vdev name in the name string. > > Signed-off-by: Alex Bennée > Reviewed-by: P

Re: [PATCH] hw/net/xgmac: Fix buffer overflow in xgmac_enet_send()

2020-07-14 Thread Jason Wang
On 2020/7/10 下午7:07, Peter Maydell wrote: On Fri, 10 Jul 2020 at 10:20, Mauro Matteo Cascella wrote: A buffer overflow issue was reported by Mr. Ziming Zhang, CC'd here. It occurs while sending an Ethernet frame due to missing break statements and improper checking of the buffer size. Report

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

2020-07-14 Thread 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 --- target/i386/hvf/vmx.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target

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

2020-07-14 Thread Markus Armbruster
Havard Skinnemoen writes: > On Mon, Jul 13, 2020 at 7:57 AM Cédric Le Goater wrote: >> >> On 7/9/20 2:36 AM, Havard Skinnemoen wrote: >> > 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/

Re: [RFC PATCH 3/5] hw/i386/acpi-build: Add ACPI PCI hot-plug methods to q35

2020-07-14 Thread Michael S. Tsirkin
On Mon, Jul 13, 2020 at 04:39:54PM +0200, Igor Mammedov wrote: > On Thu, 9 Jul 2020 00:46:13 +0200 > Julia Suvorova wrote: > > > Implement notifications and gpe to support q35 ACPI PCI hot-plug. > > The addresses specified in [1] remain the same to make fewer changes. > > > > [1] docs/spec/acpi

Re: [PATCH 3/4] hw/arm/virt-acpi-build: Only expose flash on older machine types

2020-07-14 Thread Andrew Jones
On Tue, Jul 14, 2020 at 04:57:50AM -0400, Michael S. Tsirkin wrote: > On Tue, Jul 14, 2020 at 07:51:09AM +0200, Andrew Jones wrote: > > On Mon, Jul 13, 2020 at 10:49:07AM +0200, Igor Mammedov wrote: > > > On Mon, 29 Jun 2020 16:09:37 +0200 > > > Andrew Jones wrote: > > > > > > > The flash device

Re: [RFC 63/65] fpu: implement full set compare for fp16

2020-07-14 Thread Chih-Min Chao
On Fri, Jul 10, 2020 at 8:26 PM Alex Bennée wrote: > > Alex Bennée writes: > > > frank.ch...@sifive.com writes: > > > >> From: Kito Cheng > >> > >> Signed-off-by: Kito Cheng > >> Signed-off-by: Chih-Min Chao > >> Signed-off-by: Frank Chang > > > > NACK I'm afraid. What's wrong with the exiti

Re: [PATCH] Allow acpi-tmr size=2

2020-07-14 Thread Michael S. Tsirkin
On Mon, Jul 13, 2020 at 10:20:12AM +0300, Michael Tokarev wrote: > 12.07.2020 15:00, Simon John wrote: > > macos guests no longer boot after commit > > 5d971f9e672507210e77d020d89e0e89165c8fc9 > > > > acpi-tmr needs 2 byte memory accesses, so breaks as that commit only allows > > 4 bytes. > > >

Re: [PATCH 3/4] hw/arm/virt-acpi-build: Only expose flash on older machine types

2020-07-14 Thread Michael S. Tsirkin
On Tue, Jul 14, 2020 at 11:23:25AM +0200, Andrew Jones wrote: > On Tue, Jul 14, 2020 at 04:57:50AM -0400, Michael S. Tsirkin wrote: > > On Tue, Jul 14, 2020 at 07:51:09AM +0200, Andrew Jones wrote: > > > On Mon, Jul 13, 2020 at 10:49:07AM +0200, Igor Mammedov wrote: > > > > On Mon, 29 Jun 2020 16:0

Re: [PATCH 5/5] hw/i2c: Document the I2C qdev helpers

2020-07-14 Thread Peter Maydell
On Tue, 14 Jul 2020 at 08:06, Markus Armbruster wrote: > Since you felt a need for a more elaborate ssi_realize_and_unref() doc > comment, you should probably propose a patch for > qdev_realize_and_unref()'s doc comment :) Yes, that's part of https://patchew.org/QEMU/20200711142425.16283-1-peter.

Re: [PATCH v2 7/9] hw/sd/sdcard: Do not allow invalid SD card sizes

2020-07-14 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 13 Jul 2020 at 19:32, Philippe Mathieu-Daudé wrote: >> >> QEMU allows to create SD card with unrealistic sizes. This could >> work, but some guests (at least Linux) consider sizes that are not >> a power of 2 as a firmware bug and fix the card size to the next >>

Re: [PATCH 1/1] MAINTAINERS: introduce cve or security quotient field

2020-07-14 Thread Peter Maydell
On Tue, 14 Jul 2020 at 09:40, P J P wrote: > > From: Prasad J Pandit > > QEMU supports numerous virtualisation and emulation use cases. > It also offers many features to support guest's function(s). > > All of these use cases and features are not always security relevant. > Because some maybe use

Re: [PATCH 0/1] MAINTAINERS: add security quotient field

2020-07-14 Thread Michael S. Tsirkin
On Tue, Jul 14, 2020 at 02:06:30PM +0530, P J P wrote: > From: Prasad J Pandit > > Hello, > > QEMU supports numerous virtualisation and emulation use cases. > It offers many features to support guest's function(s). > > All of these use cases and features are not always security relevant. > Beca

Re: [PATCH v2 09/11] hw/virtio/pci: include vdev name in registered PCI sections

2020-07-14 Thread Philippe Mathieu-Daudé
On 7/14/20 11:07 AM, Michael S. Tsirkin wrote: > On Mon, Jul 13, 2020 at 09:04:13PM +0100, Alex Bennée wrote: >> When viewing/debugging memory regions it is sometimes hard to figure >> out which PCI device something belongs to. Make the names unique by >> including the vdev name in the name stri

Re: [PATCH v2 20/25] x86: Fix x86_cpu_new() error API violations

2020-07-14 Thread Markus Armbruster
Igor Mammedov writes: > On Fri, 26 Jun 2020 14:54:38 +0200 > Markus Armbruster wrote: > >> Igor Mammedov writes: >> >> > On Wed, 24 Jun 2020 10:37:32 +0200 >> > Markus Armbruster wrote: >> > >> >> The Error ** argument must be NULL, &error_abort, &error_fatal, or a >> >> pointer to a variab

[Bug 1886793] Re: "go install" command fails while running inside s390x docker container on x86_64 host using qemu

2020-07-14 Thread Nirman Narang
I will try the same and will report here soon. What about the issue with getting a go s390x environment inside and s390x container running on x86 host using qemu-user-static? (This problem is also mentioned in the main issue above. This is the ultimate target which needs to be achieved, I want to

Re: [PATCH 1/1] MAINTAINERS: introduce cve or security quotient field

2020-07-14 Thread Daniel P . Berrangé
On Tue, Jul 14, 2020 at 10:42:55AM +0100, Peter Maydell wrote: > On Tue, 14 Jul 2020 at 09:40, P J P wrote: > > > > From: Prasad J Pandit > > > > QEMU supports numerous virtualisation and emulation use cases. > > It also offers many features to support guest's function(s). > > > > All of these us

[PULL 1/9] docs/devel: fix grammar in multi-thread-tcg

2020-07-14 Thread Alex Bennée
Review comment came just too late ;-) Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Message-Id: <20200713200415.26214-9-alex.ben...@linaro.org> diff --git a/docs/devel/multi-thread-tcg.rst b/docs/devel/multi-thread-tcg.rst index 42158b77c7..21483870db 10064

[PULL 5/9] gitlab-ci/containers: Add missing wildcard where we should look for changes

2020-07-14 Thread Alex Bennée
From: Thomas Huth The tests/docker/* wildcard seems to only match the files that are directly in the tests/docker folder - but changes to the files in the directory tests/docker/dockerfiles are currently ignored. Seems like we need a separate entry to match the files in that folder. With this wil

[PULL 0/9] final misc fixes for 5.1-rc0

2020-07-14 Thread Alex Bennée
The following changes since commit 20c1df5476e1e9b5d3f5b94f9f3ce01d21f14c46: Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20200713-pull-request' into staging (2020-07-13 16:58:44 +0100) are available in the Git repository at: https://github.com/stsquad/qemu.git tags/pull-misc-fo

[PULL 2/9] configure: remove all dependencies on a (re)configure

2020-07-14 Thread Alex Bennée
The previous code was brittle and missed cases such as the mipn32 variants which for some reason has the 64 bit syscalls. This leads to a number of binary targets having deps lines like: all.clang-sanitizer/mipsn32el-linux-user/linux-user/signal.d 140: /home/alex/lsrc/qemu.git/linux-user/mips

[PULL 3/9] tests/docker: Remove the libssh workaround from the ubuntu 20.04 image

2020-07-14 Thread Alex Bennée
From: Thomas Huth The libssh problem only exists in Ubuntu 18.04 - we can enable it in 20.04 again. Signed-off-by: Thomas Huth Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200713185237.9419-1-th...@redhat.com> Message-Id: <20200713200415.26214-3-alex.ben...@li

[PULL 4/9] docker.py: fix fetching of FROM layers

2020-07-14 Thread Alex Bennée
This worked on a system that was already bootstrapped because the stage 2 images already existed even if they wouldn't be used. What we should have pulled down was the FROM line containers first because building on gitlab doesn't have the advantage of using our build system to build the pre-requisi

[PULL 8/9] cputlb: ensure we save the IOTLB data in case of reset

2020-07-14 Thread Alex Bennée
Any write to a device might cause a re-arrangement of memory triggering a TLB flush and potential re-size of the TLB invalidating previous entries. This would cause users of qemu_plugin_get_hwaddr() to see the warning: invalid use of qemu_plugin_get_hwaddr because of the failed tlb_lookup which

[PATCH for-5.1] acpi-pm-tmr: allow 2-byte reads

2020-07-14 Thread Michael Tokarev
As found in LP#964247, MacOS Catalina performs 2-byte reads on the acpi timer address space while the spec says it should be 4-byte. Allow 2-byte reads. Reported-By: Simon John Signed-Off-By: Michael Tokarev --- hw/acpi/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) I'm applyi

[PULL 6/9] fpu/softfloat: fix up float16 nan recognition

2020-07-14 Thread Alex Bennée
From: LIU Zhiwei Signed-off-by: LIU Zhiwei Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20200712234521.3972-2-zhiwei_...@c-sky.com> Message-Id: <20200713200415.26214-5-alex.ben...@linaro.org> diff --git a/fpu/softfloat-specialize.inc.c b/fpu/softfloat-specialize.inc.

[PULL 7/9] tests/plugins: don't unconditionally add -Wpsabi

2020-07-14 Thread Alex Bennée
Not all compilers support the -Wpsabi (clang-9 in my case). To handle this gracefully we pare back the shared build machinery so the Makefile is relatively "standalone". We still take advantage of config-host.mak as configure has done a bunch of probing for us but that is it. Fixes: bac8d222a Sign

Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure

2020-07-14 Thread Max Reitz
On 13.07.20 16:29, Kevin Wolf wrote: > Am 13.07.2020 um 13:19 hat Max Reitz geschrieben: >> On 10.07.20 16:21, Kevin Wolf wrote: >>> Unaligned requests will automatically be aligned to bl.request_alignment >>> and we don't want to extend requests to access space beyond the end of >>> the image, so

[PULL 9/9] plugins: expand the bb plugin to be thread safe and track per-cpu

2020-07-14 Thread Alex Bennée
While there isn't any easy way to make the inline counts thread safe we can ensure the callback based ones are. While we are at it we can reduce introduce a new option ("idle") to dump a report of the current bb and insn count each time a vCPU enters the idle state. Signed-off-by: Alex Bennée Rev

Re: [RFC 0/3] x86: fix cpu hotplug with secure boot

2020-07-14 Thread Laszlo Ersek
On 07/10/20 18:17, Igor Mammedov wrote: > CPU hotplug with Secure Boot was not really supported and firmware wasn't > aware > of hotplugged CPUs (which might lead to guest crashes). During 4.2 we > introduced > locked SMI handler RAM arrea to make sure that guest OS wasn't able to inject > its ow

Re: [PATCH for-5.1] acpi-pm-tmr: allow 2-byte reads

2020-07-14 Thread Michael S. Tsirkin
On Tue, Jul 14, 2020 at 12:55:18PM +0300, Michael Tokarev wrote: > As found in LP#964247, MacOS Catalina performs 2-byte reads > on the acpi timer address space while the spec says it should > be 4-byte. Allow 2-byte reads. > > Reported-By: Simon John > Signed-Off-By: Michael Tokarev After some

Re: [RFC 0/3] x86: fix cpu hotplug with secure boot

2020-07-14 Thread Laszlo Ersek
On 07/14/20 11:58, Laszlo Ersek wrote: > On 07/10/20 18:17, Igor Mammedov wrote: >> CPU hotplug with Secure Boot was not really supported and firmware wasn't >> aware >> of hotplugged CPUs (which might lead to guest crashes). During 4.2 we >> introduced >> locked SMI handler RAM arrea to make sur

Re: [PATCH 1/1] MAINTAINERS: introduce cve or security quotient field

2020-07-14 Thread Michael S. Tsirkin
On Tue, Jul 14, 2020 at 10:52:33AM +0100, Daniel P. Berrangé wrote: > On Tue, Jul 14, 2020 at 10:42:55AM +0100, Peter Maydell wrote: > > On Tue, 14 Jul 2020 at 09:40, P J P wrote: > > > > > > From: Prasad J Pandit > > > > > > QEMU supports numerous virtualisation and emulation use cases. > > > I

Re: [RFC 1/3] x86: lpc9: let firmware negotiate CPU hotplug SMI feature

2020-07-14 Thread Laszlo Ersek
On 07/10/20 18:17, Igor Mammedov wrote: > It will allow firmware to notify QEMU that firmware requires SMI > being triggered on CPU hotplug, so that it would be able to account > for hotplugged CPU and relocate it to new SMM base. > > Using the negotiated feature, follow up patches will insert SMI

Re: [PATCH 1/1] MAINTAINERS: introduce cve or security quotient field

2020-07-14 Thread Philippe Mathieu-Daudé
Hi Prasad, On 7/14/20 10:36 AM, P J P wrote: > From: Prasad J Pandit > > QEMU supports numerous virtualisation and emulation use cases. > It also offers many features to support guest's function(s). > > All of these use cases and features are not always security relevant. > Because some maybe u

Re: [PATCH v2 08/11] docs/devel: fix grammar in multi-thread-tcg

2020-07-14 Thread Philippe Mathieu-Daudé
On 7/13/20 10:04 PM, Alex Bennée wrote: > Review comment came just too late ;-) > > Signed-off-by: Alex Bennée > --- > docs/devel/multi-thread-tcg.rst | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/docs/devel/multi-thread-tcg.rst b/docs/devel/multi-thread-tcg.rst > ind

Re: [PATCH 1/1] MAINTAINERS: introduce cve or security quotient field

2020-07-14 Thread Peter Maydell
On Tue, 14 Jul 2020 at 11:12, Michael S. Tsirkin wrote: > And for people who want to build QEMU with lots of functionality (like > Fedora does), I think a -security flag would be a useful addition. > We can then tell security researchers "only a high security issue > if it reproduces with -securit

Re: device compatibility interface for live migration with assigned devices

2020-07-14 Thread Daniel P . Berrangé
On Tue, Jul 14, 2020 at 07:29:57AM +0800, Yan Zhao wrote: > hi folks, > we are defining a device migration compatibility interface that helps upper > layer stack like openstack/ovirt/libvirt to check if two devices are > live migration compatible. > The "devices" here could be MDEVs, physical devic

Re: [PATCH RFCv2 3/6] s390x/diag: implement diag260

2020-07-14 Thread Claudio Imbrenda
On Fri, 10 Jul 2020 17:12:36 +0200 David Hildenbrand wrote: > Let's implement diag260 - "Access Certain Virtual Machine > Information", used under z/VM to expose the storage configuration > (especially, layout of storage extends and thereby holes). For now, > the returned information is completel

Re: [PATCH for-5.1] acpi-pm-tmr: allow 2-byte reads

2020-07-14 Thread Philippe Mathieu-Daudé
On 7/14/20 11:55 AM, Michael Tokarev wrote: > As found in LP#964247, MacOS Catalina performs 2-byte reads > on the acpi timer address space while the spec says it should > be 4-byte. Allow 2-byte reads. https://bugs.launchpad.net/qemu/+bug/964247 is about Unity-2D shell... What is the target hard

Re: [PATCH for-5.1] acpi-pm-tmr: allow 2-byte reads

2020-07-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200714095518.16241-1-...@msgid.tls.msk.ru/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200714095518.16241-1-...@msgid.tls.msk.ru Subject: [PATCH for-5.1] acpi-pm-tmr: allow

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

2020-07-14 Thread Roman Bolshakov
On Tue, Jul 14, 2020 at 12:07:27PM +0300, Roman Bolshakov wrote: > 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 > If one

Re: [Bug 1886362] [NEW] Heap use-after-free in lduw_he_p through e1000e_write_to_rx_buffers

2020-07-14 Thread Li Qiang
Jason Wang 于2020年7月14日周二 下午4:56写道: > > > On 2020/7/10 下午6:37, Li Qiang wrote: > > Paolo Bonzini 于2020年7月10日周五 上午1:36写道: > >> On 09/07/20 17:51, Li Qiang wrote: > >>> Maybe we should check whether the address is a RAM address in > >>> 'dma_memory_rw'? > >>> But it is a hot path. I'm not sure it i

[PATCH v2 for-5.1] acpi-pm-tmr: allow any small-size reads

2020-07-14 Thread Michael Tokarev
As found in LP#1886318, MacOS Catalina performs 2-byte reads on the acpi timer address space while the spec says it should be 4-byte. Allow any small reads. Reported-By: Simon John Signed-off-by: Michael Tokarev --- hw/acpi/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) v2: fi

Re: [PATCH] Allow acpi-tmr size=2

2020-07-14 Thread Philippe Mathieu-Daudé
+Peter/Paolo On 7/13/20 1:14 PM, Michael S. Tsirkin wrote: > On Mon, Jul 13, 2020 at 10:20:12AM +0300, Michael Tokarev wrote: >> 12.07.2020 15:00, Simon John wrote: >>> macos guests no longer boot after commit >>> 5d971f9e672507210e77d020d89e0e89165c8fc9 >>> >>> acpi-tmr needs 2 byte memory acces

Re: [PATCH for-5.1] acpi-pm-tmr: allow 2-byte reads

2020-07-14 Thread Michael Tokarev
14.07.2020 13:26, Philippe Mathieu-Daudé пишет: > On 7/14/20 11:55 AM, Michael Tokarev wrote: >> As found in LP#964247, MacOS Catalina performs 2-byte reads >> on the acpi timer address space while the spec says it should >> be 4-byte. Allow 2-byte reads. > > https://bugs.launchpad.net/qemu/+bug/9

Re: [RFC 2/3] x86: cphp: prevent guest crash on CPU hotplug when broadcast SMI is in use

2020-07-14 Thread Laszlo Ersek
On 07/10/20 18:17, Igor Mammedov wrote: > There were reports of guest crash on CPU hotplug, when using q35 machine > type and QVMF with Secure Boot, due to hotplugged CPU trying to process SMI (1) typo: s/QVMF/OVMF/ please (2) Please replace "Secure Boot" with "SMM". In everyday practice it's OK

Re: [PATCH for-5.1] acpi-pm-tmr: allow 2-byte reads

2020-07-14 Thread Philippe Mathieu-Daudé
On 7/14/20 12:55 PM, Michael Tokarev wrote: > 14.07.2020 13:26, Philippe Mathieu-Daudé пишет: >> On 7/14/20 11:55 AM, Michael Tokarev wrote: >>> As found in LP#964247, MacOS Catalina performs 2-byte reads >>> on the acpi timer address space while the spec says it should >>> be 4-byte. Allow 2-byte

Re: [PATCH 1/1] MAINTAINERS: introduce cve or security quotient field

2020-07-14 Thread Michael S. Tsirkin
On Tue, Jul 14, 2020 at 11:22:28AM +0100, Peter Maydell wrote: > On Tue, 14 Jul 2020 at 11:12, Michael S. Tsirkin wrote: > > And for people who want to build QEMU with lots of functionality (like > > Fedora does), I think a -security flag would be a useful addition. > > We can then tell security r

Re: [PATCH v2 for-5.1] acpi-pm-tmr: allow any small-size reads

2020-07-14 Thread Michael S. Tsirkin
On Tue, Jul 14, 2020 at 01:51:13PM +0300, Michael Tokarev wrote: > As found in LP#1886318, MacOS Catalina performs 2-byte reads > on the acpi timer address space while the spec says it should > be 4-byte. Allow any small reads. > > Reported-By: Simon John > Signed-off-by: Michael Tokarev Do we

Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure

2020-07-14 Thread Kevin Wolf
Am 14.07.2020 um 11:56 hat Max Reitz geschrieben: > On 13.07.20 16:29, Kevin Wolf wrote: > > Am 13.07.2020 um 13:19 hat Max Reitz geschrieben: > >> On 10.07.20 16:21, Kevin Wolf wrote: > >>> Unaligned requests will automatically be aligned to bl.request_alignment > >>> and we don't want to extend r

Re: [PATCH v2 for-5.1] acpi-pm-tmr: allow any small-size reads

2020-07-14 Thread Philippe Mathieu-Daudé
On 7/14/20 12:51 PM, Michael Tokarev wrote: > As found in LP#1886318, MacOS Catalina performs 2-byte reads > on the acpi timer address space while the spec says it should > be 4-byte. Allow any small reads. > BugLink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247 > Reported-By: Simon

Re: [PATCH v2 for-5.1] acpi-pm-tmr: allow any small-size reads

2020-07-14 Thread Michael S. Tsirkin
On Tue, Jul 14, 2020 at 01:51:13PM +0300, Michael Tokarev wrote: > As found in LP#1886318, MacOS Catalina performs 2-byte reads > on the acpi timer address space while the spec says it should > be 4-byte. Allow any small reads. > > Reported-By: Simon John > Signed-off-by: Michael Tokarev Simon'

Re: [PATCH] Allow acpi-tmr size=2

2020-07-14 Thread Michael S. Tsirkin
On Tue, Jul 14, 2020 at 12:55:44PM +0200, Philippe Mathieu-Daudé wrote: > +Peter/Paolo > > On 7/13/20 1:14 PM, Michael S. Tsirkin wrote: > > On Mon, Jul 13, 2020 at 10:20:12AM +0300, Michael Tokarev wrote: > >> 12.07.2020 15:00, Simon John wrote: > >>> macos guests no longer boot after commit > >

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

2020-07-14 Thread Philippe Mathieu-Daudé
+ qemu-block experts. On 7/14/20 11:16 AM, Markus Armbruster wrote: > Havard Skinnemoen writes: > >> On Mon, Jul 13, 2020 at 7:57 AM Cédric Le Goater wrote: >>> >>> On 7/9/20 2:36 AM, Havard Skinnemoen wrote: This allows these NPCM7xx-based boards to boot from a flash image, e.g. one

Re: [PATCH v5 04/11] hw/arm: Add NPCM730 and NPCM750 SoC models

2020-07-14 Thread Philippe Mathieu-Daudé
+Markus On 7/14/20 2:44 AM, Havard Skinnemoen wrote: > On Mon, Jul 13, 2020 at 8:02 AM Cédric Le Goater wrote: >> >> On 7/9/20 2:36 AM, Havard Skinnemoen wrote: >>> The Nuvoton NPCM7xx SoC family are used to implement Baseboard >>> Management Controllers in servers. While the family includes four

Re: [PATCH 1/1] MAINTAINERS: introduce cve or security quotient field

2020-07-14 Thread Cornelia Huck
On Tue, 14 Jul 2020 14:06:31 +0530 P J P wrote: > From: Prasad J Pandit > > QEMU supports numerous virtualisation and emulation use cases. > It also offers many features to support guest's function(s). > > All of these use cases and features are not always security relevant. > Because some may

Re: [PATCH v2 4/9] tests/acceptance/boot_linux: Expand SD card image to power of 2

2020-07-14 Thread Philippe Mathieu-Daudé
On 7/14/20 5:22 AM, Cleber Rosa wrote: > On Mon, Jul 13, 2020 at 08:32:04PM +0200, Philippe Mathieu-Daudé wrote: >> In few commits we won't allow SD card images with invalid size >> (not aligned to a power of 2). Prepare the tests: add the >> pow2ceil() and image_pow2ceil_expand() methods and resiz

[PATCH v1 0/6] CTU CAN FD core support

2020-07-14 Thread pisa
From: Pavel Pisa CTU CAN FD is an open source soft core written in VHDL. It originated in 2015 as Ondrej Ille's project at the Department of Measurement of FEE at CTU. Integration for Xilinx Zynq and Intel based SoCs is available as well as support for PCIe integration of the core. The core sou

[Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests

2020-07-14 Thread Mark Cave-Ayland
Hi Simon, Just in case you're not getting emails to the git@ email address on the patch, there has been more follow up and discussion on the qemu-devel@ list: https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg04006.html https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg04621.html ht

Re: [PATCH v11 31/34] qcow2: Add the 'extended_l2' option and the QCOW2_INCOMPAT_EXTL2 bit

2020-07-14 Thread Max Reitz
On 10.07.20 18:13, Alberto Garcia wrote: > Now that the implementation of subclusters is complete we can finally > add the necessary options to create and read images with this feature, > which we call "extended L2 entries". > > Signed-off-by: Alberto Garcia > Reviewed-by: Eric Blake > Reviewed-

[PATCH v1 1/6] net/can: Initial host SocketCan support for CAN FD.

2020-07-14 Thread pisa
From: Jan Charvat Signed-off-by: Jan Charvat Signed-off-by: Pavel Pisa --- hw/net/can/can_sja1000.c | 2 ++ include/net/can_emu.h| 8 ++- net/can/can_socketcan.c | 47 +--- 3 files changed, 53 insertions(+), 4 deletions(-) diff --git a/hw/net/can

[PATCH v1 2/6] hw/net/can: sja1000 ignore CAN FD frames

2020-07-14 Thread pisa
From: Jan Charvat Signed-off-by: Jan Charvat Signed-off-by: Pavel Pisa --- hw/net/can/can_sja1000.c | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/hw/net/can/can_sja1000.c b/hw/net/can/can_sja1000.c index d83c550edc..382911560c 100644 --- a/h

Re: [RFC 3/3] x68: acpi: trigger SMI before scanning for hotplugged CPUs

2020-07-14 Thread Laszlo Ersek
(CC'ing Peter Krempa due to virsh setvcpu (singular) / setvcpus (plural) references) On 07/10/20 18:17, Igor Mammedov wrote: > In case firmware has negotiated CPU hotplug SMI feature, generate > AML to describe SMI IO port region and send SMI to firmware > on each CPU hotplug SCI. > > It might be

[PATCH v1 3/6] net/can: Add can_dlc2len and can_len2dlc for CAN FD.

2020-07-14 Thread pisa
From: Jan Charvat Signed-off-by: Jan Charvat Signed-off-by: Pavel Pisa --- include/net/can_emu.h | 4 net/can/can_core.c| 36 2 files changed, 40 insertions(+) diff --git a/include/net/can_emu.h b/include/net/can_emu.h index c6164dcfb4..7d395fbb9

[PATCH v1 4/6] hw/net/can/ctucafd: Add CTU CAN FD core register definitions.

2020-07-14 Thread pisa
From: Jan Charvat Definitions of registers and CAN FD frame message box of CTU CAN FD IP core are generated the specification in CACTUS/IP-XACT format. CTU CAN FD IP core repository https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core The location of the CTU CAN IP core specification within IP

[PATCH v1 5/6] hw/net/can: CTU CAN FD IP open hardware core emulation.

2020-07-14 Thread pisa
From: Jan Charvat The implementation of the model of complete open-source/design/hardware CAN FD controller. The IP core project has been started and is maintained by Ondrej Ille at Czech Technical University in Prague. CTU CAN FD project pages: https://gitlab.fel.cvut.cz/canbus/ctucanfd

[PATCH v1 6/6] hw/net/can: Documentation for CTU CAN FD IP open hardware core emulation.

2020-07-14 Thread pisa
From: Pavel Pisa Signed-off-by: Pavel Pisa --- MAINTAINERS | 8 docs/can.txt | 113 ++- 2 files changed, 110 insertions(+), 11 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index fe8139f367..d554a1cb41 100644 --- a/MAINTAINERS +++ b

Re: [RFC 3/3] x68: acpi: trigger SMI before scanning for hotplugged CPUs

2020-07-14 Thread Laszlo Ersek
On 07/14/20 14:28, Laszlo Ersek wrote: > (CC'ing Peter Krempa due to virsh setvcpu (singular) / setvcpus (plural) > references) > > On 07/10/20 18:17, Igor Mammedov wrote: >> In case firmware has negotiated CPU hotplug SMI feature, generate >> AML to describe SMI IO port region and send SMI to fir

[Bug 1886318] Re: Qemu after v5.0.0 breaks macos guests

2020-07-14 Thread Simon John
Hi Mark, Yes I am getting the emails from qemu-devel thanks (seems pretty slow though - the website is faster) I replied to a couple but its over my head mostly now! I didn't notice Michael had done a v2 patch for 5.1, that's fine with me. I wonder if we can get the debian 5.0 package updated wi

Re: [PATCH v1 0/6] CTU CAN FD core support

2020-07-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/cover.1594725647.git.p...@cmp.felk.cvut.cz/ 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. === TEST SCRIPT BEGIN ===

Re: [PATCH for-5.1 2/4] docs/system: Briefly document collie board

2020-07-14 Thread Philippe Mathieu-Daudé
On 7/13/20 7:57 PM, Peter Maydell wrote: > Add skeletal documentation of the collie board. > > Signed-off-by: Peter Maydell > --- > docs/system/arm/collie.rst | 16 > docs/system/target-arm.rst | 1 + > MAINTAINERS| 1 + > 3 files changed, 18 insertions(+) > c

Re: [PATCH v2 for-5.1] acpi-pm-tmr: allow any small-size reads

2020-07-14 Thread Simon John
On Tue, 14 Jul 2020 07:10:14 -0400, Michael S. Tsirkin wrote: On Tue, Jul 14, 2020 at 01:51:13PM +0300, Michael Tokarev wrote: As found in LP#1886318, MacOS Catalina performs 2-byte reads on the acpi timer address space while the spec says it should be 4-byte. Allow any small reads. Reported-By

  1   2   3   >