[PATCH v2 6/7] vga: build virtio-gpu only once

2020-06-04 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/display/Makefile.objs | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs index 76b3571e4902..d619594ad4d3 100644 --- a/hw/display/Makefile.objs +++ b/hw/display/Makefile.objs @@

[PATCH v2 0/7] build some devices as modules.

2020-06-04 Thread Gerd Hoffmann
Specifically devices which depend on shared libraries, to reduce the runtime dependencies of core qemu. v2: - better commit messages. - add some more devices. - general tidy up. Gerd Hoffmann (7): qdev: add support for device module loading build: fix device module builds ccid: build

[PATCH v2 3/7] ccid: build smartcard as module

2020-06-04 Thread Gerd Hoffmann
Drops libcacard.so dependency from core qemu. Signed-off-by: Gerd Hoffmann --- Makefile.objs| 1 + hw/core/qdev.c | 2 ++ hw/Makefile.objs | 1 + hw/usb/Makefile.objs | 4 +++- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile.objs b/Makefile.objs index

[PATCH v2 2/7] build: fix device module builds

2020-06-04 Thread Gerd Hoffmann
See comment. Feels quite hackish. Better ideas anyone? Signed-off-by: Gerd Hoffmann --- Makefile.target | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Makefile.target b/Makefile.target index 8ed1eba95b9c..c70325df5796 100644 --- a/Makefile.target +++ b/Makefile.target @@ -179,6

[PATCH v2 5/7] vga: build qxl as module

2020-06-04 Thread Gerd Hoffmann
First step in making spice support modular. Signed-off-by: Gerd Hoffmann --- hw/core/qdev.c | 2 ++ hw/Makefile.objs | 1 + hw/display/Makefile.objs | 5 - 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index

Re: [PATCH v4 00/19] target/mips: FPU and other cleanups and improvements

2020-06-04 Thread Aleksandar Markovic
пон, 18. мај 2020. у 13:01 Aleksandar Rikalo је написао/ла: > > > This series contains mostly cosmetic FPU cleanups aimed to make > > source code recognition easier for tools like gdb, gcov, calgrind, > > and others. > > > > There is also a patch that refactors conversion from ieee to mips >

Re: kvm_target, QEMU_KVM_ARM_TARGET_GENERIC_V8 questions

2020-06-04 Thread Peter Maydell
[added kvm-arm to the cc list; the kernel folks tend to hang out there, not on qemu-devel, so KVM related questions are usually worth raising there as well.] On Thu, 4 Jun 2020 at 13:55, Leif Lindholm wrote: > However, while looking at this, I noticed aarch64_a72_initfn doesn't > initialise

Re: [RFC PATCH] hw/virtio/vhost: re-factor vhost-section and allow DIRTY_MEMORY_CODE

2020-06-04 Thread Dr. David Alan Gilbert
* Alex Bennée (alex.ben...@linaro.org) wrote: > > Michael S. Tsirkin writes: > > > On Thu, Jun 04, 2020 at 12:49:17PM +0100, Alex Bennée wrote: > >> > >> Michael S. Tsirkin writes: > >> > >> > On Thu, Jun 04, 2020 at 12:13:23PM +0100, Alex Bennée wrote: > >> >> The purpose of

[PATCH v2] hw/pci/pcie: Move hot plug capability check to pre_plug callback

2020-06-04 Thread Julia Suvorova
Check for hot plug capability earlier to avoid removing devices attached during the initialization process. Run qemu with an unattached drive: -drive file=$FILE,if=none,id=drive0 \ -device pcie-root-port,id=rp0,slot=3,bus=pcie.0,hotplug=off Hotplug a block device: device_add

Re: [RFC PATCH] hw/virtio/vhost: re-factor vhost-section and allow DIRTY_MEMORY_CODE

2020-06-04 Thread Philippe Mathieu-Daudé
On 6/4/20 1:49 PM, Alex Bennée wrote: > > Michael S. Tsirkin writes: > >> On Thu, Jun 04, 2020 at 12:13:23PM +0100, Alex Bennée wrote: >>> The purpose of vhost_section is to identify RAM regions that need to >>> be made available to a vhost client. However when running under TCG >>> all RAM

kvm_target, QEMU_KVM_ARM_TARGET_GENERIC_V8 questions

2020-06-04 Thread Leif Lindholm
Hi there, (all this done on current HEAD: 66234fee9c) I was looking through the definition of the aarch64 "max" cpu, and noticed it invokes aarch64_a57_initfn as a template, followed by overriding some feature and ID fields to enable additional functionality. I then noticed it does not override

Re: [RFC PATCH] hw/virtio/vhost: re-factor vhost-section and allow DIRTY_MEMORY_CODE

2020-06-04 Thread Alex Bennée
Michael S. Tsirkin writes: > On Thu, Jun 04, 2020 at 12:49:17PM +0100, Alex Bennée wrote: >> >> Michael S. Tsirkin writes: >> >> > On Thu, Jun 04, 2020 at 12:13:23PM +0100, Alex Bennée wrote: >> >> The purpose of vhost_section is to identify RAM regions that need to >> >> be made

[PATCH v5 3/3] hw/net/imx_fec: improve PHY implementation.

2020-06-04 Thread Jean-Christophe Dubois
improve the PHY implementation with more generic code. This patch remove a lot of harcoded values to replace them with generic symbols from header files. Signed-off-by: Jean-Christophe Dubois --- v2: Not present v3: Not present v4: Not present v5: improve PHY implementation.

[PATCH v5 2/3] hw/net/imx_fec: Allow phy not to be the first device on the mii bus.

2020-06-04 Thread Jean-Christophe Dubois
Up to now we were allowing only one PHY device and it had to be the first device on the bus. The i.MX6UL has 2 Ethernet devices and can therefore have several PHY devices on the bus (and not necessarilly as device 0). This patch allows for PHY devices on 2nd, 3rd or any position. Signed-off-by:

Re: [PATCH v2 1/1] python/machine.py: refactor shutdown

2020-06-04 Thread Kevin Wolf
Am 02.06.2020 um 21:48 hat John Snow geschrieben: > This is done primarily to avoid the 'bare except' pattern, which > suppresses ALL exceptions and not just ones that we are anticipating to > see. > > Replace this with a pattern that isolates the different kind of shutdown > paradigms and a new

[PATCH v5 0/3] hw/net/imx_fec: improve the imx fec emulator

2020-06-04 Thread Jean-Christophe Dubois
This series of path makes various improvement to the i.MX FEC ethernet emulator. * PATCH 1: Convert the Ethernet emulator debug output to trace event * PATCH 2: Allow Ethernet PHY to be at any position on the MDIO bus * PATCH 3: Improve the i.MX FEC related PHY emulator by using standard

[PATCH v5 1/3] hw/net/imx_fec: Convert debug fprintf() to trace events

2020-06-04 Thread Jean-Christophe Dubois
Signed-off-by: Jean-Christophe Dubois Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-Id: <20200530102707.195131-1-...@tribudubois.net> [PMD: Fixed 32-bit format string using PRIx32/PRIx64] Signed-off-by: Philippe Mathieu-Daudé --- Based-on:

Re: [PATCH v2 0/7] exec/cpu: Cleanups around "exec/hwaddr.h" (reserved to system-mode)

2020-06-04 Thread Cornelia Huck
On Tue, 26 May 2020 19:24:20 +0200 Philippe Mathieu-Daudé wrote: > The 'hwaddr' type declared in "exec/hwaddr.h" is meant for > system-mode emulation only. > This series is a preparatory cleanup to allow later poisoning > it in user-mode code. > > Missing review: patche 7 > - target/s390x:

Re: [PATCH] numa: forbid '-numa node, mem' for 5.1 and newer machine types

2020-06-04 Thread Eric Blake
On 6/2/20 3:41 AM, Igor Mammedov wrote: Deprecation period is run out and it's a time to flip the switch introduced by cd5ff8333a. Disable legacy option for new machine types (since 5.1) and amend documentation. '-numa node,memdev' shall be used instead of disabled option with new machine

Re: [PATCH] iotests: 194: wait migration completion on target too

2020-06-04 Thread Vladimir Sementsov-Ogievskiy
04.06.2020 15:04, Eric Blake wrote: On 6/4/20 3:33 AM, Vladimir Sementsov-Ogievskiy wrote: It is possible, that shutdown on target occurs earlier than migration finish. In this case we crash in bdrv_release_dirty_bitmap_locked() on assertion "assert(!bdrv_dirty_bitmap_busy(bitmap));" as we do

hw/char: a question about watch callback function in serial

2020-06-04 Thread LIU Zhiwei
Hi folks, I see many UART implementations have a G_IO_OUT | G_IO_HUP  callback function. In hw/serial.c, it is serial_watch_cb, setting by the following code,   s->watch_tag = qemu_chr_fe_add_watch(>chr, G_IO_OUT | G_IO_HUP,   serial_watch_cb, s); In hw/candence_uart.c,

Re: [PATCH v2 2/2] pci: ensure configuration access is within bounds

2020-06-04 Thread BALATON Zoltan
On Thu, 4 Jun 2020, Michael S. Tsirkin wrote: On Thu, Jun 04, 2020 at 01:49:53PM +0200, BALATON Zoltan wrote: On Thu, 4 Jun 2020, Michael S. Tsirkin wrote: On Thu, Jun 04, 2020 at 01:37:13PM +0200, BALATON Zoltan wrote: On Thu, 4 Jun 2020, Michael S. Tsirkin wrote: On Thu, Jun 04, 2020 at

Re: [PATCH] iotests: 194: wait migration completion on target too

2020-06-04 Thread Eric Blake
On 6/4/20 3:33 AM, Vladimir Sementsov-Ogievskiy wrote: It is possible, that shutdown on target occurs earlier than migration finish. In this case we crash in bdrv_release_dirty_bitmap_locked() on assertion "assert(!bdrv_dirty_bitmap_busy(bitmap));" as we do have busy bitmap, as bitmap migration

Re: [PATCH v3] ati-vga: check address before reading configuration bytes (CVE-2020-13791)

2020-06-04 Thread Michael S. Tsirkin
On Thu, Jun 04, 2020 at 01:56:45PM +0200, Philippe Mathieu-Daudé wrote: > On 6/4/20 1:49 PM, Michael S. Tsirkin wrote: > > On Thu, Jun 04, 2020 at 04:25:24PM +0530, P J P wrote: > >> From: Prasad J Pandit > >> > >> While reading PCI configuration bytes, a guest may send an > >> address towards

Re: [PATCH v3] ati-vga: check address before reading configuration bytes (CVE-2020-13791)

2020-06-04 Thread Paolo Bonzini
On 04/06/20 13:49, Michael S. Tsirkin wrote: > On Thu, Jun 04, 2020 at 04:25:24PM +0530, P J P wrote: >> From: Prasad J Pandit >> >> While reading PCI configuration bytes, a guest may send an >> address towards the end of the configuration space. It may lead >> to an OOB access issue. Add check

Re: [PATCH 1/2] Introduce (x86) CPU model deprecation API

2020-06-04 Thread Eric Blake
On 6/4/20 3:07 AM, Robert Hoo wrote: +++ b/qapi/machine-target.json @@ -309,7 +309,8 @@ 'static': 'bool', '*unavailable-features': [ 'str' ], 'typename': 'str', -'*alias-of' : 'str' }, +'*alias-of' : 'str', +

Re: [PATCH v2 2/2] pci: ensure configuration access is within bounds

2020-06-04 Thread Michael S. Tsirkin
On Thu, Jun 04, 2020 at 01:49:53PM +0200, BALATON Zoltan wrote: > On Thu, 4 Jun 2020, Michael S. Tsirkin wrote: > > On Thu, Jun 04, 2020 at 01:37:13PM +0200, BALATON Zoltan wrote: > > > On Thu, 4 Jun 2020, Michael S. Tsirkin wrote: > > > > On Thu, Jun 04, 2020 at 08:07:52AM +0200, Philippe

Re: target/mips: Enable Hardware page table walker and CMGCR features for P5600

2020-06-04 Thread Aleksandar Markovic
суб, 25. апр 2020. у 20:20 је написао/ла: > > Hi, > I have discovered that MIPS hardware page table walker is not enabled > for any CPU currently available. In this patch I have enable it (and > also CMGCR feature) for P5600 which supports both but they are not > enabled. > > This is my first

Re: [PATCH] configure: Disable -Wtautological-type-limit-compare

2020-06-04 Thread Eric Blake
On 6/3/20 10:45 PM, Richard Henderson wrote: Clang 10 enables this by default with -Wtype-limit. All of the instances flagged by this Werror so far have been cases in which we really do want the compiler to optimize away the test completely. Disabling the warning will avoid having to add

Re: [PATCH v3] ati-vga: check address before reading configuration bytes (CVE-2020-13791)

2020-06-04 Thread Philippe Mathieu-Daudé
On 6/4/20 1:49 PM, Michael S. Tsirkin wrote: > On Thu, Jun 04, 2020 at 04:25:24PM +0530, P J P wrote: >> From: Prasad J Pandit >> >> While reading PCI configuration bytes, a guest may send an >> address towards the end of the configuration space. It may lead >> to an OOB access issue. Add check

Re: [RFC PATCH] hw/virtio/vhost: re-factor vhost-section and allow DIRTY_MEMORY_CODE

2020-06-04 Thread Michael S. Tsirkin
On Thu, Jun 04, 2020 at 12:49:17PM +0100, Alex Bennée wrote: > > Michael S. Tsirkin writes: > > > On Thu, Jun 04, 2020 at 12:13:23PM +0100, Alex Bennée wrote: > >> The purpose of vhost_section is to identify RAM regions that need to > >> be made available to a vhost client. However when

Re: [PATCH v2 2/2] pci: ensure configuration access is within bounds

2020-06-04 Thread BALATON Zoltan
On Thu, 4 Jun 2020, Michael S. Tsirkin wrote: On Thu, Jun 04, 2020 at 01:37:13PM +0200, BALATON Zoltan wrote: On Thu, 4 Jun 2020, Michael S. Tsirkin wrote: On Thu, Jun 04, 2020 at 08:07:52AM +0200, Philippe Mathieu-Daudé wrote: On 6/4/20 12:13 AM, BALATON Zoltan wrote: On Thu, 4 Jun 2020,

Re: [PATCH v3] ati-vga: check address before reading configuration bytes (CVE-2020-13791)

2020-06-04 Thread Michael S. Tsirkin
On Thu, Jun 04, 2020 at 04:25:24PM +0530, P J P wrote: > From: Prasad J Pandit > > While reading PCI configuration bytes, a guest may send an > address towards the end of the configuration space. It may lead > to an OOB access issue. Add check to ensure 'address + size' is > within PCI

Re: [RFC PATCH] hw/virtio/vhost: re-factor vhost-section and allow DIRTY_MEMORY_CODE

2020-06-04 Thread Alex Bennée
Michael S. Tsirkin writes: > On Thu, Jun 04, 2020 at 12:13:23PM +0100, Alex Bennée wrote: >> The purpose of vhost_section is to identify RAM regions that need to >> be made available to a vhost client. However when running under TCG >> all RAM sections have DIRTY_MEMORY_CODE set which leads

Re: [PATCH] ftgmac100: Implement variable descriptor size

2020-06-04 Thread Cédric Le Goater
On 6/4/20 12:54 PM, Erik Smit wrote: > On Wed, 3 Jun 2020 at 10:16, Cédric Le Goater wrote: >> >> On 6/2/20 6:47 PM, Erik Smit wrote: >>> The hardware supports variable descriptor sizes, configured with the DBLAC >>> register. >> >> yes. >> >> The DBLAC default value is 0x00022F00 on AST2400 and

Re: [PATCH] pci: assert configuration access is within bounds

2020-06-04 Thread Michael S. Tsirkin
On Thu, Jun 04, 2020 at 05:05:25PM +0530, P J P wrote: > From: Prasad J Pandit > > While accessing PCI configuration bytes, assert that > 'address + len' is within PCI configuration space. > > Generally it is within bounds. This is more of a defensive > assert, in case a buggy device was to

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

2020-06-04 Thread Peter Maydell
On Wed, 3 Jun 2020 at 17:22, Alistair Francis wrote: > > The following changes since commit 5cc7a54c2e91d82cb6a52e4921325c511fd90712: > > Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20200602' into > staging (2020-06-02 18:16:38 +0100) > > are available in the Git repository at: > >

Re: [PATCH v2 2/2] pci: ensure configuration access is within bounds

2020-06-04 Thread Michael S. Tsirkin
On Thu, Jun 04, 2020 at 01:37:13PM +0200, BALATON Zoltan wrote: > On Thu, 4 Jun 2020, Michael S. Tsirkin wrote: > > On Thu, Jun 04, 2020 at 08:07:52AM +0200, Philippe Mathieu-Daudé wrote: > > > On 6/4/20 12:13 AM, BALATON Zoltan wrote: > > > > On Thu, 4 Jun 2020, P J P wrote: > > > > > From:

[PATCH] pci: assert configuration access is within bounds

2020-06-04 Thread P J P
From: Prasad J Pandit While accessing PCI configuration bytes, assert that 'address + len' is within PCI configuration space. Generally it is within bounds. This is more of a defensive assert, in case a buggy device was to send 'address' which may go out of bounds. Suggested-by: Philippe

Re: [PATCH v2 2/2] pci: ensure configuration access is within bounds

2020-06-04 Thread BALATON Zoltan
On Thu, 4 Jun 2020, Michael S. Tsirkin wrote: On Thu, Jun 04, 2020 at 08:07:52AM +0200, Philippe Mathieu-Daudé wrote: On 6/4/20 12:13 AM, BALATON Zoltan wrote: On Thu, 4 Jun 2020, P J P wrote: From: Prasad J Pandit While reading PCI configuration bytes, a guest may send an address towards

Re: [PATCH v1 6/9] hw/virtio/pci: include vdev name in registered PCI sections

2020-06-04 Thread Michael S. Tsirkin
On Tue, Jun 02, 2020 at 04:46:21PM +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:

Re: [RFC v3 7/8] vhost-vdpa: introduce vhost-vdpa backend

2020-06-04 Thread Michael S. Tsirkin
On Thu, Jun 04, 2020 at 12:39:34PM +0200, Eugenio Perez Martin wrote: > > +static int vhost_vdpa_set_config(struct vhost_dev *dev, const uint8_t > > *data, > > + uint32_t offset, uint32_t size, > > + uint32_t flags) > > +{ > > +

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-04 Thread Kevin Wolf
Am 04.06.2020 um 11:16 hat Peter Krempa geschrieben: > On Thu, Jun 04, 2020 at 11:12:31 +0200, Kevin Wolf wrote: > > Am 18.05.2020 um 22:49 hat Eric Blake geschrieben: > > > > + > > > > +/* NB: new bitmap is anonymous and enabled */ > > > > +cluster_size =

Re: [RFC PATCH] hw/virtio/vhost: re-factor vhost-section and allow DIRTY_MEMORY_CODE

2020-06-04 Thread Michael S. Tsirkin
On Thu, Jun 04, 2020 at 12:13:23PM +0100, Alex Bennée wrote: > The purpose of vhost_section is to identify RAM regions that need to > be made available to a vhost client. However when running under TCG > all RAM sections have DIRTY_MEMORY_CODE set which leads to problems > down the line. The

Re: [PATCH] hw/pci/pcie: Move hot plug capability check to pre_plug callback

2020-06-04 Thread Michael S. Tsirkin
On Thu, Jun 04, 2020 at 12:57:55PM +0200, Igor Mammedov wrote: > On Mon, 1 Jun 2020 18:29:34 +0200 > Julia Suvorova wrote: > > > Check for hot plug capability earlier to avoid removing devices attached > > during the initialization process. > > > > Run qemu with an unattached drive: > >

[RFC PATCH] hw/virtio/vhost: re-factor vhost-section and allow DIRTY_MEMORY_CODE

2020-06-04 Thread Alex Bennée
The purpose of vhost_section is to identify RAM regions that need to be made available to a vhost client. However when running under TCG all RAM sections have DIRTY_MEMORY_CODE set which leads to problems down the line. The original comment implies VGA regions are a problem but doesn't explain why

Re: [PATCH 0/2] build qxl as module

2020-06-04 Thread Gerd Hoffmann
> Other candidates: > * virtio-gpu (libvirglrenderer.so). > * ccid-card-emulated (libcacard.so). * usb-redir (libusbredir.so) * usb-host (libusb.so) usb-host also has a monitor command ("info usbhost"). This uses libusb too so leaving that in core qemu would be pointless. So for that one

RE: [Question] Regarding containers "unattached/peripheral/anonymous" - their relation with hot(un)plug of devices

2020-06-04 Thread Salil Mehta
> From: Igor Mammedov [mailto:imamm...@redhat.com] > Sent: Thursday, June 4, 2020 10:55 AM > To: Salil Mehta > Cc: Andrew Jones ; gs...@redhat.com; m...@redhat.com; > qemu-devel@nongnu.org; eric.au...@redhat.com; qemu-...@nongnu.org; pbonzini > > Subject: Re: [Question] Regarding containers

[PATCH v3] ati-vga: check address before reading configuration bytes (CVE-2020-13791)

2020-06-04 Thread P J P
From: Prasad J Pandit While reading PCI configuration bytes, a guest may send an address towards the end of the configuration space. It may lead to an OOB access issue. Add check to ensure 'address + size' is within PCI configuration space. Reported-by: Ren Ding Reported-by: Hanqing Zhao

Re: [PATCH] hw/pci/pcie: Move hot plug capability check to pre_plug callback

2020-06-04 Thread Igor Mammedov
On Mon, 1 Jun 2020 18:29:34 +0200 Julia Suvorova wrote: > Check for hot plug capability earlier to avoid removing devices attached > during the initialization process. > > Run qemu with an unattached drive: > -drive file=$FILE,if=none,id=drive0 \ > -device

Re: [PATCH 3/5] colo: Introduce high-level test suite

2020-06-04 Thread Lukas Straub
On Tue, 2 Jun 2020 14:19:08 +0200 Philippe Mathieu-Daudé wrote: > +Cleber/Wainer > > On 5/11/20 2:27 PM, Lukas Straub wrote: > > Add high-level test relying on the colo resource-agent to test > > all failover cases while checking guest network connectivity. > > > > Signed-off-by: Lukas Straub

Re: [PATCH] ftgmac100: Implement variable descriptor size

2020-06-04 Thread Erik Smit
On Wed, 3 Jun 2020 at 10:16, Cédric Le Goater wrote: > > On 6/2/20 6:47 PM, Erik Smit wrote: > > The hardware supports variable descriptor sizes, configured with the DBLAC > > register. > > yes. > > The DBLAC default value is 0x00022F00 on AST2400 and 0x00022500 on AST2500 > and AST2600. The

Re: [PATCH] acpi: tpm: Do not build TCPA table for TPM 2

2020-06-04 Thread Igor Mammedov
On Fri, 29 May 2020 15:28:40 -0400 Stefan Berger wrote: > From: Stefan Berger > > Do not build a TCPA table for TPM 2 anymore but create the log area when > building the TPM2 table. The TCPA table is only needed for TPM 1.2. > > Signed-off-by: Stefan Berger Reviewed-by: Igor Mammedov >

Re: [RFC v3 7/8] vhost-vdpa: introduce vhost-vdpa backend

2020-06-04 Thread Eugenio Perez Martin
On Fri, May 29, 2020 at 4:10 PM Cindy Lu wrote: > > From: Tiwei Bie > > Currently we have 2 types of vhost backends in QEMU: vhost kernel and > vhost-user. The above patch provides a generic device for vDPA purpose, > this vDPA device exposes to user space a non-vendor-specific configuration >

[Bug 1882065] Re: Could this cause OOB bug ?

2020-06-04 Thread r1ng0hacking
QEMU emulator version 5.0.50 (v5.0.0-533-gdebe78ce14-dirty) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1882065 Title: Could this cause OOB bug ? Status in QEMU: New Bug description: In

[Bug 1882065] [NEW] Could this cause OOB bug ?

2020-06-04 Thread r1ng0hacking
Public bug reported: In function megasas_handle_scsi(hw/scsi/megasas.c): ```c static int megasas_handle_scsi(MegasasState *s, MegasasCmd *cmd, int frame_cmd) { cdb =

Re: [PATCH v4 2/3] hw/acpi/nvdimm: add a helper to augment SRAT generation

2020-06-04 Thread Igor Mammedov
On Thu, 28 May 2020 16:34:36 -0600 Vishal Verma wrote: > NVDIMMs can belong to their own proximity domains, as described by the > NFIT. In such cases, the SRAT needs to have Memory Affinity structures > in the SRAT for these NVDIMMs, otherwise Linux doesn't populate node > data structures

Re: [PATCH v3] migration/xbzrle: add encoding rate

2020-06-04 Thread Wei Wang
On 06/04/2020 05:38 PM, Dr. David Alan Gilbert wrote: * Richard Henderson (richard.hender...@linaro.org) wrote: On 6/3/20 7:58 PM, Wei Wang wrote: It is possible that encoded_size==0, but unencoded_size !=0. For example, a page is written with the same data that it already has. That really

Re: [PATCH] qga: fix assert regression on guest-shutdown

2020-06-04 Thread Philippe Mathieu-Daudé
On 6/4/20 11:44 AM, Marc-André Lureau wrote: > Since commit 781f2b3d1e ("qga: process_event() simplification"), > send_response() is called unconditionally, but will assert when "rsp" is > NULL. This may happen with QCO_NO_SUCCESS_RESP commands, such as > "guest-shutdown". > > Fixes:

Re: [PATCH] iotests: 194: wait migration completion on target too

2020-06-04 Thread Thomas Huth
On 04/06/2020 10.33, Vladimir Sementsov-Ogievskiy wrote: > It is possible, that shutdown on target occurs earlier than migration > finish. In this case we crash in bdrv_release_dirty_bitmap_locked() > on assertion "assert(!bdrv_dirty_bitmap_busy(bitmap));" as we do have > busy bitmap, as bitmap

Re: [PATCH for-5.1 V4 1/4] hw/mips: Implement the kvm_type() hook in MachineClass

2020-06-04 Thread Aleksandar Markovic
чет, 4. јун 2020. у 02:57 Huacai Chen је написао/ла: > > Hi, Alexandar, > > On Wed, Jun 3, 2020 at 10:34 PM Aleksandar Markovic > wrote: > > > > > > > > уто, 2. јун 2020. у 04:38 Huacai Chen је написао/ла: > >> > >> MIPS has two types of KVM: TE & VZ, and TE is the default type. Now we > >>

Re: [PATCH] [PATCH v6] linux-user: syscall: ioctls: support DRM_IOCTL_VERSION

2020-06-04 Thread Chen Gang
That sounds good, I'll send patch v7, thanks. On 2020/6/4 下午5:10, Laurent Vivier wrote: > Le 04/06/2020 à 03:45, cheng...@emindsoft.com.cn a écrit : >> From: Chen Gang >> >> Another DRM_IOCTL_* commands will be done later. >> >> Signed-off-by: Chen Gang >> --- >> configure |

Re: [PATCH] iotests: 194: wait migration completion on target too

2020-06-04 Thread Dr. David Alan Gilbert
* Vladimir Sementsov-Ogievskiy (vsement...@virtuozzo.com) wrote: > It is possible, that shutdown on target occurs earlier than migration > finish. In this case we crash in bdrv_release_dirty_bitmap_locked() > on assertion "assert(!bdrv_dirty_bitmap_busy(bitmap));" as we do have > busy bitmap, as

Re: [Question] Regarding containers "unattached/peripheral/anonymous" - their relation with hot(un)plug of devices

2020-06-04 Thread Igor Mammedov
On Wed, 3 Jun 2020 15:13:26 + Salil Mehta wrote: > Hi Igor, > My sincere Apologies, I just realized that I missed to reply this mail. > I was distracted to something else in the month of the February and > had only resumed working on hotplug in march. But will still reply to > this mail.

Re: [PATCH 02/13] i386: hvf: Drop useless declarations in sysemu

2020-06-04 Thread Claudio Fontana
On 5/28/20 9:37 PM, Roman Bolshakov wrote: > They're either declared elsewhere or have no use. > > While at it, rename _hvf_cpu_synchronize_post_init() to > do_hvf_cpu_synchronize_post_init(). > > Signed-off-by: Roman Bolshakov > --- > include/sysemu/hvf.h | 22 -- >

Re: About the kvm-no-adjvtime CPU property

2020-06-04 Thread Ying Fang
On 6/3/2020 4:53 PM, Andrew Jones wrote: On Tue, Jun 02, 2020 at 03:47:22PM +0800, Ying Fang wrote: On 2020/6/1 20:29, Andrew Jones wrote: On Mon, Jun 01, 2020 at 08:07:31PM +0800, Ying Fang wrote: On 2020/6/1 16:07, Andrew Jones wrote: On Sat, May 30, 2020 at 04:56:26PM +0800, Ying

[PATCH] qga: fix assert regression on guest-shutdown

2020-06-04 Thread Marc-André Lureau
Since commit 781f2b3d1e ("qga: process_event() simplification"), send_response() is called unconditionally, but will assert when "rsp" is NULL. This may happen with QCO_NO_SUCCESS_RESP commands, such as "guest-shutdown". Fixes: 781f2b3d1e5ef389b44016a897fd55e7a780bf35 Cc: Michael Roth

Re: [PATCH v2 2/2] pci: ensure configuration access is within bounds

2020-06-04 Thread Michael S. Tsirkin
On Thu, Jun 04, 2020 at 07:14:00AM +0200, Gerd Hoffmann wrote: > Hi, > > > > +assert(address + len <= pci_config_size(d)); > > > > Does this allow guest now to crash QEMU? > > Looks like it does (didn't actually try though). > > > I think it was suggested that assert should only be used

Re: [PATCH v2 2/2] pci: ensure configuration access is within bounds

2020-06-04 Thread Michael S. Tsirkin
On Thu, Jun 04, 2020 at 08:07:52AM +0200, Philippe Mathieu-Daudé wrote: > On 6/4/20 12:13 AM, BALATON Zoltan wrote: > > On Thu, 4 Jun 2020, P J P wrote: > >> From: Prasad J Pandit > >> > >> While reading PCI configuration bytes, a guest may send an > >> address towards the end of the

Re: [PATCH v2 1/2] ait-vga: check address before reading configuration bytes

2020-06-04 Thread Michael S. Tsirkin
On Thu, Jun 04, 2020 at 02:48:59PM +0530, P J P wrote: > Hello Phil, > > +-- On Thu, 4 Jun 2020, Philippe Mathieu-Daudé wrote --+ > | >> @@ -1381,6 +1381,8 @@ uint32_t pci_default_read_config(PCIDevice *d, > | >> +    assert(address + len <= pci_config_size(d)); > | > | Yes, maybe I was

Re: [PATCH v4 4/6] iotests: 194: test also migration of dirty bitmap

2020-06-04 Thread Thomas Huth
On 04/06/2020 09.51, Vladimir Sementsov-Ogievskiy wrote: > 04.06.2020 10:21, Thomas Huth wrote: >> On 03/06/2020 10.06, Vladimir Sementsov-Ogievskiy wrote: >>> 03.06.2020 10:52, Thomas Huth wrote: On 22/05/2020 00.06, Vladimir Sementsov-Ogievskiy wrote: > Test that dirty bitmap migration

Re: [PATCH v3] migration/xbzrle: add encoding rate

2020-06-04 Thread Dr. David Alan Gilbert
* Richard Henderson (richard.hender...@linaro.org) wrote: > On 6/3/20 7:58 PM, Wei Wang wrote: > > It is possible that encoded_size==0, but unencoded_size !=0. For example, > > a page is written with the same data that it already has. > > That really contains 0 bytes? > Not even the ones that say

Re: [PATCH v2 2/2] pci: ensure configuration access is within bounds

2020-06-04 Thread Michael S. Tsirkin
On Thu, Jun 04, 2020 at 01:52:51AM +0530, P J P wrote: > From: Prasad J Pandit > > While reading PCI configuration bytes, a guest may send an > address towards the end of the configuration space. It may lead > to an OOB access issue. Assert that 'address + len' is within > PCI configuration

Re: [PATCH v2 00/15] tests/tcg: Add TriCore tests

2020-06-04 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200604085441.103087-1-kbast...@mail.uni-paderborn.de/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200604085441.103087-1-kbast...@mail.uni-paderborn.de Subject: [PATCH v2 00/15]

Re: [PATCH v2 2/2] pci: ensure configuration access is within bounds

2020-06-04 Thread Michael S. Tsirkin
On Thu, Jun 04, 2020 at 10:10:07AM +0100, Peter Maydell wrote: > On Wed, 3 Jun 2020 at 21:26, P J P wrote: > > > > From: Prasad J Pandit > > > > While reading PCI configuration bytes, a guest may send an > > address towards the end of the configuration space. It may lead > > to an OOB access

Re: qemu-guest agent asserts on shutdown

2020-06-04 Thread Marc-André Lureau
Hi On Thu, Jun 4, 2020 at 10:54 AM Christian Ehrhardt wrote: > > Hi, > while debugging a report I got in Ubuntu I found that since qemu 4.0 the > guest agent shutdown feature works (guest is shutting down) but crashes when > doing so each time. This can be a big red herring when debugging

Re: About improving devices and renaming migration stream...

2020-06-04 Thread Dr. David Alan Gilbert
* Philippe Mathieu-Daudé (phi...@redhat.com) wrote: > Hello Dave, > > ==[background]== > > I've been doing this pflash rework: > > * Add abstract TYPE_NOR_FLASH > > - qdev type > - blockdev backend > - manage bank/sector, > - manage timer for erase/write delays > - can be used by

Re: [PATCH RFC v2 5/5] iotests: add 287 for block-dirty-bitmap-populate

2020-06-04 Thread Kevin Wolf
Am 14.05.2020 um 05:49 hat John Snow geschrieben: > Give block-dirty-bitmap-populate a workout. > > Signed-off-by: John Snow I think it would be good to test on-error behaviour, too. Maybe that would be a different test file, though, considering that the output for this one is already huge?

Question about vhost-user-gpu on Arm64

2020-06-04 Thread Zhoujian (jay)
Hi, I want to test vhost-user-gpu on arm64 recently and follow the steps listed in section "vhost-user virtio gpu"[1]. So I compiled the qemu with CONFIG_VIRTIO_VGA=y and CONFIG_VHOST_USER_VGA=y forcely, the vhost-user-gpu gpu emulation process and qemu process started successfully, but the qemu

Re: [PATCH v2 1/2] ait-vga: check address before reading configuration bytes

2020-06-04 Thread P J P
Hello Phil, +-- On Thu, 4 Jun 2020, Philippe Mathieu-Daudé wrote --+ | >> @@ -1381,6 +1381,8 @@ uint32_t pci_default_read_config(PCIDevice *d, | >> +    assert(address + len <= pci_config_size(d)); | | Yes, maybe I was not clear while reviewing v1, we need to audit the | callers and fix them

Re: [PATCH 0/2] build qxl as module

2020-06-04 Thread Gerd Hoffmann
On Thu, Jun 04, 2020 at 09:48:20AM +0100, Daniel P. Berrangé wrote: > On Thu, Jun 04, 2020 at 09:59:41AM +0200, Gerd Hoffmann wrote: > > > > There's no info here, or in the commit message about the > intended goal of this modularization ? If we're modularizing > devices, why only qxl and not

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-04 Thread Peter Krempa
On Thu, Jun 04, 2020 at 11:12:31 +0200, Kevin Wolf wrote: > Am 18.05.2020 um 22:49 hat Eric Blake geschrieben: > > > + > > > +/* NB: new bitmap is anonymous and enabled */ > > > +cluster_size = bdrv_dirty_bitmap_granularity(target_bitmap); > > > +new_bitmap =

Re: [PATCH v2] ati-vga: check mm_index before recursive call

2020-06-04 Thread P J P
+-- On Wed, 3 Jun 2020, Philippe Mathieu-Daudé wrote --+ | > -} else { | > +} else if (s->regs.mm_index > MM_DATA + 3) { | > val = ati_mm_read(s, s->regs.mm_index + addr - MM_DATA, size); | | We usually log unexpected guest accesses with: | |} else { |

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-04 Thread Kevin Wolf
Am 18.05.2020 um 22:49 hat Eric Blake geschrieben: > > + > > +/* NB: new bitmap is anonymous and enabled */ > > +cluster_size = bdrv_dirty_bitmap_granularity(target_bitmap); > > +new_bitmap = bdrv_create_dirty_bitmap(bs, cluster_size, NULL, errp); > > +if (!new_bitmap) { > > +

Re: [PATCH] [PATCH v6] linux-user: syscall: ioctls: support DRM_IOCTL_VERSION

2020-06-04 Thread Laurent Vivier
Le 04/06/2020 à 03:45, cheng...@emindsoft.com.cn a écrit : > From: Chen Gang > > Another DRM_IOCTL_* commands will be done later. > > Signed-off-by: Chen Gang > --- > configure | 10 > linux-user/ioctls.h| 5 ++ > linux-user/syscall.c | 95

[PATCH v3] ati-vga: check mm_index before recursive call (CVE-2020-13800)

2020-06-04 Thread P J P
From: Prasad J Pandit While accessing VGA registers via ati_mm_read/write routines, a guest may set 's->regs.mm_index' such that it leads to infinite recursion. Check mm_index value to avoid such recursion. Log an error message for wrong values. Reported-by: Ren Ding Reported-by: Hanqing Zhao

Re: [PATCH v2 2/2] pci: ensure configuration access is within bounds

2020-06-04 Thread Peter Maydell
On Wed, 3 Jun 2020 at 21:26, P J P wrote: > > From: Prasad J Pandit > > While reading PCI configuration bytes, a guest may send an > address towards the end of the configuration space. It may lead > to an OOB access issue. Assert that 'address + len' is within > PCI configuration space. What

Re: [PATCH] numa: forbid '-numa node, mem' for 5.1 and newer machine types

2020-06-04 Thread Michal Privoznik
On 6/2/20 10:41 AM, Igor Mammedov wrote: Deprecation period is run out and it's a time to flip the switch introduced by cd5ff8333a. Disable legacy option for new machine types (since 5.1) and amend documentation. '-numa node,memdev' shall be used instead of disabled option with new machine

Re: [RFC v2 00/18] Refactor configuration of guest memory protection

2020-06-04 Thread Greg Kurz
On Thu, 4 Jun 2020 16:44:14 +1000 David Gibson wrote: > On Thu, Jun 04, 2020 at 01:39:22AM -0300, Thiago Jung Bauermann wrote: > > > > Hello David, > > > > David Gibson writes: > > > > > A number of hardware platforms are implementing mechanisms whereby the > > > hypervisor does not have

[PATCH V2 2/2] migration/colo: Update checkpoint time lately

2020-06-04 Thread Zhang Chen
From: Zhang Chen Previous operation(like vm_start and replication_start_all) will consume extra time for first forced synchronization, so reduce it in this patch. Signed-off-by: Zhang Chen Reviewed-by: zhanghailiang --- migration/colo.c | 5 ++--- 1 file changed, 2 insertions(+), 3

[PATCH V2 1/2] migration/colo: Optimize COLO boot code path

2020-06-04 Thread Zhang Chen
From: Zhang Chen No need to reuse MIGRATION_STATUS_ACTIVE boot COLO. Signed-off-by: Zhang Chen Reviewed-by: zhanghailiang --- migration/colo.c | 2 -- migration/migration.c | 17 ++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/migration/colo.c

Re: [PATCH 06/13] i386: hvf: Use IP from CPUX86State

2020-06-04 Thread Claudio Fontana
Hi Roman, On 5/28/20 9:37 PM, Roman Bolshakov wrote: > Drop and replace rip field from HVFX86EmulatorState in favor of eip from > common CPUX86State. > > Signed-off-by: Roman Bolshakov > --- > target/i386/hvf/hvf.c| 6 +-- > target/i386/hvf/x86.h| 3 -- >

[PATCH V2 0/2] migration/colo: Optimize COLO framework code

2020-06-04 Thread Zhang Chen
From: Zhang Chen This series optimize some code of COLO, please review. Zhang Chen (2): migration/colo: Optimize COLO boot code path migration/colo: Update checkpoint time lately migration/colo.c | 7 ++- migration/migration.c | 17 ++--- 2 files changed, 12

Re: How do I add my tcg tests to check-tcg?

2020-06-04 Thread Bastian Koppelmann
Hi Alex, On Wed, Jun 03, 2020 at 11:25:36AM +0100, Alex Bennée wrote: > > Bastian Koppelmann writes: > > > Hi Alex, > > > > I have some time again to integrate my tcg tests patch for TriCore [1]. > > However, > > I'm struggeling a bit to get through the details of the Makefiles. I'm > >

[PATCH v2 11/15] tests/tcg/tricore: Add fmul test

2020-06-04 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann --- tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/test_fmul.S | 8 2 files changed, 9 insertions(+) create mode 100644 tests/tcg/tricore/test_fmul.S diff --git a/tests/tcg/tricore/Makefile.softmmu-target

[PATCH v2 10/15] tests/tcg/tricore: Add fadd test

2020-06-04 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann --- tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/test_fadd.S | 16 2 files changed, 17 insertions(+) create mode 100644 tests/tcg/tricore/test_fadd.S diff --git a/tests/tcg/tricore/Makefile.softmmu-target

[PATCH v2 09/15] tests/tcg/tricore: Add dvstep test

2020-06-04 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann --- tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/macros.h| 29 ++- tests/tcg/tricore/test_dvstep.S | 15 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644

[PATCH v2 14/15] tests/tcg/tricore: Add msub test

2020-06-04 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann --- tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/test_msub.S | 9 + 2 files changed, 10 insertions(+) create mode 100644 tests/tcg/tricore/test_msub.S diff --git a/tests/tcg/tricore/Makefile.softmmu-target

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-04 Thread Kevin Wolf
Am 14.05.2020 um 05:49 hat John Snow geschrieben: > This job copies the allocation map into a bitmap. It's a job because > there's no guarantee that allocation interrogation will be quick (or > won't hang), so it cannot be retrofit into block-dirty-bitmap-merge. > > It was designed with different

[PATCH v2 08/15] tests/tcg/tricore: Add clz test

2020-06-04 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann --- tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/test_clz.S | 9 + 2 files changed, 10 insertions(+) create mode 100644 tests/tcg/tricore/test_clz.S diff --git a/tests/tcg/tricore/Makefile.softmmu-target

<    1   2   3   4   >