Re: [PATCH] monitor: trace qmp_send_response

2021-02-04 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Add a useful counterpart for trace_handle_qmp_command for debugging > libvirt guests. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > monitor/qmp.c| 6 ++ > monitor/trace-events | 1 + > 2 files changed, 7 insertions(+) > > diff --git

Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment

2021-02-04 Thread Philippe Mathieu-Daudé
On 2/4/21 10:04 AM, schspa wrote: > On Thu, 2021-02-04 at 09:19 +0100, Philippe Mathieu-Daudé wrote: >> Hi, >> >> Please Cc the maintainers when posting your patch: >> >> ./scripts/get_maintainer.pl -f hw/arm/xlnx-versal-virt.c >> Alistair Francis (maintainer:Xilinx ZynqMP >> and...) >> "Edgar E.

Re: [PATCH 03/33] migration: push Error **errp into qemu_loadvm_state_setup()

2021-02-04 Thread Markus Armbruster
Daniel P. Berrangé writes: > This is an incremental step in converting vmstate loading code to report > via Error objects instead of printing directly to the console/monitor. > > Signed-off-by: Daniel P. Berrangé > --- > migration/savevm.c | 7 +++ > 1 file changed, 3 insertions(+), 4

[PULL 05/24] vhost-user-gpu: check backend for EDID support

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau EDID has been enabled by default, but the backend may not implement it (such as the contrib backend). This results in extra warnings and potentially other issues in the guest. The option shouldn't probably have been added to VIRTIO_GPU_BASE, but it's a bit too late now,

Re: [PATCH v2] target/s390x/arch_dump: Fixes for the name field in the PT_NOTE section

2021-02-04 Thread Christian Borntraeger
On 05.02.21 08:08, Christian Borntraeger wrote: > > > On 05.02.21 07:12, Thomas Huth wrote: >> On 04/02/2021 18.00, Christian Borntraeger wrote: >>> On 04.02.21 17:41, Thomas Huth wrote: According to the "ELF-64 Object File Format" specification: "The first word in the entry,

[PULL 21/24] virtio-gpu: avoid re-entering cmdq processing

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau The next patch will notify the GL context got flush, which will resume the queue processing. However, if this happens within the caller context, it will end up with a stack overflow flush/update loop. Signed-off-by: Marc-André Lureau Message-Id:

Re: [PATCH v2] target/s390x/arch_dump: Fixes for the name field in the PT_NOTE section

2021-02-04 Thread Christian Borntraeger
On 05.02.21 07:12, Thomas Huth wrote: > On 04/02/2021 18.00, Christian Borntraeger wrote: >> On 04.02.21 17:41, Thomas Huth wrote: >>> According to the "ELF-64 Object File Format" specification: >>> >>> "The first word in the entry, namesz, identifies the length, in >>>   bytes, of a name

[PULL 23/24] chardev: check if the chardev is registered for yanking

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau Not all chardevs are created via qmp_chardev_open_socket(), and those should not call the yank function registration, as this will eventually assert() not being registered. Signed-off-by: Marc-André Lureau Message-Id:

Re: [PATCH 1/2] migration: dirty-bitmap: Convert alias map inner members to a struct

2021-02-04 Thread Vladimir Sementsov-Ogievskiy
03.02.2021 15:59, Peter Krempa wrote: Currently the alias mapping hash stores just strings of the target objects internally. In further patches we'll be adding another member which will need to be stored in the map so convert the members to a struct. Signed-off-by: Peter Krempa ---

[PULL 06/24] vhost-user-gpu: handle vhost-user-gpu features in a callback

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau Fixes a deadlock where the backend calls QEMU, while QEMU also calls the backend simultaneously, both ends waiting for each other. Signed-off-by: Marc-André Lureau Message-Id: <20210204105232.834642-3-marcandre.lur...@redhat.com> Signed-off-by: Gerd Hoffmann ---

[PULL 07/24] vhost-user-gpu: use an extandable state enum for commands

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau Introduce a pending state for commands which aren't finished yet, but are being handled. See following patch. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210204105232.834642-4-marcandre.lur...@redhat.com> Signed-off-by: Gerd

[PULL 16/24] ui: add a DCLOps callback to check dmabuf support

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <20210204105232.834642-13-marcandre.lur...@redhat.com> Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 2 ++ ui/console.c | 13 + 2 files changed, 15 insertions(+) diff --git

[PULL 19/24] ui: check gtk-egl dmabuf support

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <20210204105232.834642-16-marcandre.lur...@redhat.com> Signed-off-by: Gerd Hoffmann --- include/ui/gtk.h | 1 + ui/gtk.c | 9 + 2 files changed, 10 insertions(+) diff --git a/include/ui/gtk.h

[PULL 18/24] ui: add qemu_egl_has_dmabuf helper

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <20210204105232.834642-15-marcandre.lur...@redhat.com> Signed-off-by: Gerd Hoffmann --- include/ui/egl-helpers.h | 1 + ui/egl-helpers.c | 10 ++ 2 files changed, 11 insertions(+) diff --git

[PULL 22/24] display/ui: add a callback to indicate GL state is flushed

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau Displaying rendered resources requires blocking qemu GPU to avoid extra framebuffer copies. For an external display, via Spice currently, there is a callback to block/unblock the rendering in the same thread. But with the vhost-user-gpu backend, the qemu process doesn't

[PULL 11/24] ui: add gd_gl_area_scanout_disable

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau Require the callback, drop the fallback path. Signed-off-by: Marc-André Lureau Message-Id: <20210204105232.834642-8-marcandre.lur...@redhat.com> Signed-off-by: Gerd Hoffmann --- include/ui/gtk.h | 1 + ui/console.c | 7 +-- ui/gtk-gl-area.c | 7 +++

[PULL 17/24] ui: check hw requirements during DCL registration

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <20210204105232.834642-14-marcandre.lur...@redhat.com> Signed-off-by: Gerd Hoffmann --- ui/console.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/ui/console.c b/ui/console.c index

[PULL 24/24] tests: add some virtio-gpu & vhost-user-gpu acceptance test

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau This will check virtio/vhost-user-vga & virgl are correctly initialized by the Linux kernel on an egl-headless display. Signed-off-by: Marc-André Lureau Message-Id: <20210204105232.834642-21-marcandre.lur...@redhat.com> Signed-off-by: Gerd Hoffmann ---

[PULL 14/24] vhost-user-gpu: add a configuration flag for dmabuf usage

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau Let's inform VirtioGPUBase that vhost-user-gpu require DMABUF messages. Signed-off-by: Marc-André Lureau Message-Id: <20210204105232.834642-11-marcandre.lur...@redhat.com> Signed-off-by: Gerd Hoffmann --- include/hw/virtio/virtio-gpu.h | 3 +++

[PULL 15/24] ui: add an optional get_flags callback to GraphicHwOps

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau Those flags can be used to express different requirements for the display or other needs. Signed-off-by: Marc-André Lureau Message-Id: <20210204105232.834642-12-marcandre.lur...@redhat.com> Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 9 +

[PULL 01/24] hw/display/qxl: Fix bad printf format specifiers

2021-02-04 Thread Gerd Hoffmann
From: Alex Chen We should use printf format specifier "%u" instead of "%d" for argument of type "unsigned int". Reported-by: Euler Robot Signed-off-by: Alex Chen Message-id: 20201119025851.56487-1-alex.c...@huawei.com Signed-off-by: Gerd Hoffmann --- hw/display/qxl-logger.c | 4 ++--

[PULL 20/24] ui: add egl dmabuf import to gtkglarea

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau GtkGLArea is used on wayland, where EGL is usually available. Signed-off-by: Marc-André Lureau Message-Id: <20210204105232.834642-17-marcandre.lur...@redhat.com> Signed-off-by: Gerd Hoffmann --- include/ui/gtk.h | 2 ++ ui/gtk-gl-area.c | 18 ++

[PULL 03/24] qxl: also notify the rendering is done when skipping it

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau Asynchronous handlers may be waiting for the graphic_hw_update_done() to be called in this case too. Fixes: 4d6316218 ("console: add graphic_hw_update_done()") Signed-off-by: Marc-André Lureau Message-Id: <20210201201422.446552-3-marcandre.lur...@redhat.com>

[PULL 08/24] vhost-user-gpu: handle display-info in a callback

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau Fixes a deadlock where the backend calls QEMU, while QEMU also calls the backend simultaneously, both ends waiting for each other. Signed-off-by: Marc-André Lureau Message-Id: <20210204105232.834642-5-marcandre.lur...@redhat.com> Signed-off-by: Gerd Hoffmann ---

[PULL 10/24] ui: remove gl_ctx_get_current

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau There are no users left. Signed-off-by: Marc-André Lureau Message-Id: <20210204105232.834642-7-marcandre.lur...@redhat.com> Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 2 -- include/ui/egl-context.h | 1 - include/ui/sdl2.h| 1 - ui/console.c

[PULL 13/24] ui: remove console_has_gl_dmabuf()

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau This check is currently limited. It only is used by vhost-user-gpu (not by vfio-display), and will print an error repeatedly during run-time. We are going to dissociate the GL context from the DisplayChangeListener, and listeners may come and go. The following patches

[PULL 02/24] qxl: set qxl.ssd.dcl.con on secondary devices

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau On secondary QXL devices, the console is only set on qxl.vga.con. But graphic_hw_update_done() is called with qxl.ssd.dcl.con. Like for primary QXL devices, set qxl.sdd.dcl.con = qxl.vga.con. Signed-off-by: Marc-André Lureau Message-Id:

[PULL 12/24] ui: annotate DCLOps callback requirements

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <20210204105232.834642-9-marcandre.lur...@redhat.com> Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/ui/console.h b/include/ui/console.h

[PULL 04/24] spice: delay starting until display are initialized

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau QEMU used to run qemu_spice.display_init() before vm_start(), and QXL/display interfaces where started then. Now, vm_start() happens before QXL/display interfaces are added and Spice server doesn't automatically start them in this case (fixed in spice git) Fixes Spice

[PULL 09/24] ui: remove extra #ifdef CONFIG_OPENGL

2021-02-04 Thread Gerd Hoffmann
From: Marc-André Lureau Since commit 5cb69566daa8081abb82a13403dcc0fffed02007 ("gtk: remove CONFIG_GTK_GL"), some #ifdef are redundants. Signed-off-by: Marc-André Lureau Message-Id: <20210204105232.834642-6-marcandre.lur...@redhat.com> Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 9 +

[PULL 00/24] Vga ui 20210205 patches

2021-02-04 Thread Gerd Hoffmann
The following changes since commit db754f8ccaf2f073c9aed46a4389e9c0c2080399: Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210202' in= to staging (2021-02-03 19:35:57 +) are available in the Git repository at: git://git.kraxel.org/qemu

Re: [PATCH 2/4] hw/block/fdc: Remove the check_media_rate property

2021-02-04 Thread Thomas Huth
On 05/02/2021 01.40, John Snow wrote: On 2/3/21 12:18 PM, Thomas Huth wrote: This was only required for the pc-1.0 and earlier machine types. Now that these have been removed, we can also drop the corresponding code from the FDC device. Signed-off-by: Thomas Huth ---   hw/block/fdc.c  

Re: [PATCH v2] target/s390x/arch_dump: Fixes for the name field in the PT_NOTE section

2021-02-04 Thread Thomas Huth
On 04/02/2021 18.00, Christian Borntraeger wrote: On 04.02.21 17:41, Thomas Huth wrote: According to the "ELF-64 Object File Format" specification: "The first word in the entry, namesz, identifies the length, in bytes, of a name identifying the entry’s owner or originator. The name field

Re: [PATCH 1/2] build: add configure flag to indicate when the host is Darwin

2021-02-04 Thread Thomas Huth
On 04/02/2021 17.25, phillip.en...@gmail.com wrote: From: Phillip Tennen Although we already have CONFIG_BSD, I added this flag to be sure that we could rely on various macOS-specific subsystems, such as vmnet.framework. Signed-off-by: Phillip Tennen --- configure | 4 1 file

Re: [PATCH v2] hw/scsi/scsi-disk: Fix out of bounds access in mode_sense_page()

2021-02-04 Thread Li Qiang
Philippe Mathieu-Daudé 于2021年2月5日周五 上午6:50写道: > > Per the "SCSI Commands Reference Manual" (Rev. J) chapter 5.3 > "Mode parameters" and table 359 "Mode page codes and subpage > codes", the last page code is 0x3f. When using it as array index, > the array must have 0x40 elements. Replace the magic

Re: [RFC 05/10] vhost: Add vhost_dev_from_virtio

2021-02-04 Thread Jason Wang
On 2021/2/4 下午5:25, Eugenio Perez Martin wrote: On Thu, Feb 4, 2021 at 4:14 AM Jason Wang wrote: On 2021/2/2 下午6:17, Eugenio Perez Martin wrote: On Tue, Feb 2, 2021 at 4:31 AM Jason Wang wrote: On 2021/2/1 下午4:28, Eugenio Perez Martin wrote: On Mon, Feb 1, 2021 at 7:13 AM Jason Wang

[Bug 1914696] Re: aarch64: migration failed: Segmentation fault (core dumped)

2021-02-04 Thread lizhijian
i have no a good idea how to fix it prefectly yet. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to the bug report. https://bugs.launchpad.net/bugs/1914696 Title: aarch64: migration failed: Segmentation fault (core dumped) Status in

Re: [Bug 1914696] [NEW] aarch64: migration failed: Segmentation fault (core dumped)

2021-02-04 Thread no-reply
Patchew URL: https://patchew.org/QEMU/161249398803.13999.15324457641617983607.malone...@soybean.canonical.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id:

[Bug 1914696] [NEW] aarch64: migration failed: Segmentation fault (core dumped)

2021-02-04 Thread lizhijian
*** This bug is a security vulnerability *** Public security bug reported: reproduce: arch: aarch64 source qemu: v4.2.0 destination qemu: 1ed9228f63ea4bcc0ae240365305ee264e9189ce cmdline: source: $ ./aarch64-softmmu/qemu-system-aarch64 -name 'avocado-vt-vm1'-machine

[Bug 1914696] Re: aarch64: migration failed: Segmentation fault (core dumped)

2021-02-04 Thread lizhijian
paste the call trace (gdb) bt #0 0xc036a02c in armv7m_nvic_neg_prio_requested (opaque=0x0, secure=false) at ../hw/intc/armv7m_nvic.c:406 #1 0xc014dcf4 in arm_v7m_mmu_idx_for_secstate_and_priv (env=0xca23d950, secstate=false, priv=true) at ../target/arm/m_helper.c:2837 #2

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-04 Thread Jason Wang
On 2021/2/5 上午3:12, Peter Xu wrote: Previous work on dev-iotlb message broke vhost on either SMMU Have a quick git grep and it looks to me v3 support ATS and have command for device iotlb (ATC) invalidation. or virtio-iommu since dev-iotlb (or PCIe ATS) We may need to add this in

Re: [Bug 1914696] [NEW] aarch64: migration failed: Segmentation fault (core dumped)

2021-02-04 Thread no-reply
Patchew URL: https://patchew.org/QEMU/161249464270.1626.1619585641070694953.launch...@gac.canonical.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 161249464270.1626.1619585641070694953.launch...@gac.canonical.com

[Bug 1914696] [NEW] aarch64: migration failed: Segmentation fault (core dumped)

2021-02-04 Thread Launchpad Bug Tracker
*** This bug is a security vulnerability *** You have been subscribed to a public security bug by lizhijian (zhijianli88): reproduce: arch: aarch64 source qemu: v4.2.0 destination qemu: 1ed9228f63ea4bcc0ae240365305ee264e9189ce cmdline: source: $ ./aarch64-softmmu/qemu-system-aarch64 -name

Re: [PATCH v2 00/93] TCI fixes and cleanups

2021-02-04 Thread Richard Henderson
On 2/4/21 10:02 AM, Stefan Weil wrote: > It would also help if the patches which were already reviewed were already > merged in qemu master. I'll queue the ones that have been reviewed to tcg-next. That'll get this lot down into the 60's. :-) r~

[PATCH v2] arm: xlnx-versal: fix virtio-mmio base address assignment

2021-02-04 Thread schspa
At the moment the following QEMU command line triggers an assertion failure On xlnx-versal SOC:   qemu-system-aarch64 \   -machine xlnx-versal-virt -nographic -smp 2 -m 128 \   -fsdev local,id=shareid,path=${HOME}/work,security_model=none \   -device

[PATCH 2/3] acpi/gpex: Fix cca attribute check for pxb device

2021-02-04 Thread Wang Xingang
From: Xingang Wang When check DMA support for device attached to pxb, the cache coherency attribute need to be set. This add _CCA attribute for pxb DSDT. Fixes: 6f9765fbad ("acpi/gpex: Build tables for pxb") Signed-off-by: Jiahui Cen Signed-off-by: Xingang Wang --- hw/pci-host/gpex-acpi.c |

[PATCH 3/3] acpi: Update _CCA attribute in DSDT.pxb

2021-02-04 Thread Wang Xingang
From: Xingang Wang A new _CCA attribute is added. Update expected DSDT files accordingly, and re-enable their testing. Full diff of changed files disassembly: * * Disassembling to symbolic ASL+ operators * - * Disassembly of DSDT.pxb, Thu Feb 4 21:07:42 2021 + * Disassembly of

[PATCH 0/3] acpi: Add _CCA support for pxb devices

2021-02-04 Thread Wang Xingang
From: Xingang Wang This patch series add fix for pxb support dma 1. Add _CCA attribute for pxb DSDT, because cache coherency attribute is needed when check dma support for pxb device. 2. Update DSDT.pxb file Xingang Wang (3): acpi: Allow pxb DSDT acpi table changes acpi/gpex: Fix cca

[PATCH 1/3] acpi: Allow pxb DSDT acpi table changes

2021-02-04 Thread Wang Xingang
From: Xingang Wang Signed-off-by: Jiahui Cen Signed-off-by: Xingang Wang --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..90c53925fc

[PATCH] tcg/aarch64: Do not convert TCGArg to temps that are not temps

2021-02-04 Thread Richard Henderson
Fixes INDEX_op_rotli_vec for aarch64 host, where the 3rd argument is an integer, not a temporary, which now tickles an assert added in e89b28a6350. Previously, the value computed into v2 would be garbage for rotli_vec, but as the value was unused it caused no harm. Signed-off-by: Richard

[Bug 1914667] Re: High cpu usage when guest is idle on qemu-system-i386

2021-02-04 Thread John Arbuckle
For version 5.2 of qemu-system-i386 the instruction the guest is busy executing over and over again is this: addb %al, (%eax) For version 2.10.1 this is the instruction that is being executed when the guest is idle: add %al,(%eax) -- You received this bug notification because you are a member

Re: [PATCH] README: Add Documentation blurb

2021-02-04 Thread John Snow
On 2/4/21 9:07 AM, Thomas Huth wrote: On 04/11/2020 20.30, John Snow wrote: Add it in a prominent place: Right after figuring out what QEMU is, users may wish to know how to use it more than they want to know how to build their own version of it. Signed-off-by: John Snow ---   README.rst | 11

Re: [PATCH 2/4] hw/block/fdc: Remove the check_media_rate property

2021-02-04 Thread John Snow
On 2/3/21 12:18 PM, Thomas Huth wrote: This was only required for the pc-1.0 and earlier machine types. Now that these have been removed, we can also drop the corresponding code from the FDC device. Signed-off-by: Thomas Huth --- hw/block/fdc.c | 17 ++---

[Bug 1914667] Re: High cpu usage when guest is idle on qemu-system-i386

2021-02-04 Thread John Arbuckle
Just to compare notes I ran my same Windows XP image on an older version of QEMU. This is version 2.10.1. It was built for the x86_64 architecture. The host CPU architecture is aarm64. The host CPU usage was actually very low when the guest CPU usage was low. The guest was using about 8% and the

Re: [PATCH 10/22] Python: add utility function for retrieving port redirection

2021-02-04 Thread John Snow
On 2/3/21 12:23 PM, Cleber Rosa wrote: Slightly different versions for the same utility code are currently present on different locations. This unifies them all, giving preference to the version from virtiofs_submounts.py, because of the last tweaks added to it. While at it, this adds a

Re: [PATCH 2/2] net: implement vmnet-based netdev

2021-02-04 Thread Phillip Tennen
Thanks very much for taking a look! As per my understanding of the submission process, I will resubmit this patchset (sans my self-introduction =) ) in a new [PATCH v2] thread, incorporating the changes you pointed out here. > Adding Markus in cc; right now, I don't think QAPI supports a union

Re: [PATCH v2 2/2] hw/ppc: e500: Fill in correct for the serial nodes

2021-02-04 Thread David Gibson
On Thu, Feb 04, 2021 at 01:05:19PM +0800, Bin Meng wrote: > On Thu, Feb 4, 2021 at 12:58 PM David Gibson > wrote: > > > > On Wed, Feb 03, 2021 at 10:24:48PM +0800, Bin Meng wrote: > > > From: Bin Meng > > > > > > At present the property of the serial node is > > > populated with value zero.

Re: [PATCH v2 00/93] TCI fixes and cleanups

2021-02-04 Thread Richard Henderson
On 2/4/21 10:02 AM, Stefan Weil wrote: > Am 04.02.21 um 10:58 schrieb Peter Maydell: >> Not listed, but also a problem: >>   * it's a configure-time choice, not a runtime choice > > That's the feature which I also desire most. Well... that depends on how you see tci being most used. If, like

[Bug 1914667] [NEW] High cpu usage when guest is idle on qemu-system-i386

2021-02-04 Thread John Arbuckle
Public bug reported: When running Windows XP in qemu-system-i386, the cpu usage of QEMU is about 100% even when the guest CPU usage is close to 2%. The host cpu usage should be low when the guest cpu usage is low. Command: qemu-system-i386 -hda Using this command also shows around 100% host

[PATCH v2] hw/scsi/scsi-disk: Fix out of bounds access in mode_sense_page()

2021-02-04 Thread Philippe Mathieu-Daudé
Per the "SCSI Commands Reference Manual" (Rev. J) chapter 5.3 "Mode parameters" and table 359 "Mode page codes and subpage codes", the last page code is 0x3f. When using it as array index, the array must have 0x40 elements. Replace the magic 0x3f value by its definition and increase the size of

[PATCH] hw/scsi/scsi-disk: Fix out of bounds access in mode_sense_page()

2021-02-04 Thread Philippe Mathieu-Daudé
Per the "SCSI Commands Reference Manual" (Rev. J) chapter 5.3 "Mode parameters" and table 359 "Mode page codes and subpage codes", the last page code is 0x3f. When using it as array index, the array must have 0x40 elements. Replace the magic 0x3f value by its definition and increase the size of

Re: [PULL 16/21] hw/timer: Refactor NPCM7XX Timer to use CLK clock

2021-02-04 Thread Hao Wu
I don't see this error. It could be some error in the clock that the timer module does not get a correct clock input. How do you reproduce this? On Thu, Feb 4, 2021 at 1:39 AM Philippe Mathieu-Daudé wrote: > Hi, > > On Tue, Jan 12, 2021 at 6:20 PM Peter Maydell > wrote: > > > > From: Hao Wu >

Re: iotest 30 failing

2021-02-04 Thread Vladimir Sementsov-Ogievskiy
04.02.2021 20:51, Peter Maydell wrote: On Thu, 4 Feb 2021 at 17:48, Philippe Mathieu-Daudé wrote: Hi, Based on commit 1ed9228f63e (ericb/tags/pull-nbd-2021-02-02-v2) I got: TEST iotest-qcow2: 030 [fail] Yes; see also this thread:

[PATCH] monitor: trace qmp_send_response

2021-02-04 Thread Vladimir Sementsov-Ogievskiy
Add a useful counterpart for trace_handle_qmp_command for debugging libvirt guests. Signed-off-by: Vladimir Sementsov-Ogievskiy --- monitor/qmp.c| 6 ++ monitor/trace-events | 1 + 2 files changed, 7 insertions(+) diff --git a/monitor/qmp.c b/monitor/qmp.c index

[PATCH] sockets: Use SOMAXCONN for Unix socket listen()

2021-02-04 Thread Eric Blake
Our default of a backlog of 1 connection is rather puny, particularly for scenarios where we expect multiple listeners to connect (such as qemu-nbd -e X). For Unix sockets, there's no real harm in supporting a larger backlog, and a definite benefit to the clients: at least on Linux, a client

Re: [PATCH] tcg/s390: Fix compare instruction from extended-immediate facility

2021-02-04 Thread Richard W.M. Jones
On Thu, Feb 04, 2021 at 07:29:02PM +0100, Philippe Mathieu-Daudé wrote: > The code is currently comparing c2 to the type promotion of > uint32_t and int32_t. That is, the conversion rules are as: > > (common_type) c2 == (common_type) (uint32_t) > (is_unsigned >

Re: [PATCH 06/33] migration: push Error **errp into qemu_loadvm_section_start_full()

2021-02-04 Thread Philippe Mathieu-Daudé
On 2/4/21 6:18 PM, Daniel P. Berrangé wrote: > This is an incremental step in converting vmstate loading code to report > via Error objects instead of printing directly to the console/monitor. > > This is particularly useful for loading snapshots as this is a likely > error scenario to hit when

Re: [PATCH 04/33] migration: push Error **errp into qemu_load_device_state()

2021-02-04 Thread Philippe Mathieu-Daudé
On 2/4/21 6:18 PM, Daniel P. Berrangé wrote: > This is an incremental step in converting vmstate loading code to report > via Error objects instead of printing directly to the console/monitor. > > Signed-off-by: Daniel P. Berrangé > --- > migration/colo.c | 3 +-- > migration/savevm.c | 4

Re: [PATCH 03/33] migration: push Error **errp into qemu_loadvm_state_setup()

2021-02-04 Thread Philippe Mathieu-Daudé
On 2/4/21 6:18 PM, Daniel P. Berrangé wrote: > This is an incremental step in converting vmstate loading code to report > via Error objects instead of printing directly to the console/monitor. > > Signed-off-by: Daniel P. Berrangé > --- > migration/savevm.c | 7 +++ > 1 file changed, 3

Re: [PATCH 02/33] migration: push Error **errp into qemu_loadvm_state_header()

2021-02-04 Thread Philippe Mathieu-Daudé
On 2/4/21 6:18 PM, Daniel P. Berrangé wrote: > This is an incremental step in converting vmstate loading code to report > via Error objects instead of printing directly to the console/monitor. > > Signed-off-by: Daniel P. Berrangé > --- > migration/savevm.c | 31 +--

Re: [PATCH 01/33] migration: push Error **errp into qemu_loadvm_state()

2021-02-04 Thread Philippe Mathieu-Daudé
On 2/4/21 6:18 PM, Daniel P. Berrangé wrote: > This is an incremental step in converting vmstate loading code to report > via Error objects instead of printing directly to the console/monitor. > > Signed-off-by: Daniel P. Berrangé > --- > migration/migration.c | 4 ++-- > migration/savevm.c

Re: Detecting Faulting Instructions From Plugins

2021-02-04 Thread Aaron Lindsay
On Jan 29 22:23, Aaron Lindsay wrote: > I appear to be seeing that if I register a callback for an instruction > via `qemu_plugin_register_vcpu_insn_exec_cb` I receive a callback even > if the instruction faults. I was wrong about what I was seeing - I made some false assumptions based on

[Bug 1914638] Re: [OSS-Fuzz] Issue 30219: Global-buffer-overflow in mode_sense_page

2021-02-04 Thread Peter Maydell
** Tags added: fuzzer -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1914638 Title: [OSS-Fuzz] Issue 30219: Global-buffer-overflow in mode_sense_page Status in QEMU: New Bug description: ==

Re: [RFC] Move tools sources to the tools directory (was Re: [PATCH v2] MAINTAINERS: Fix the location of tools manuals)

2021-02-04 Thread John Snow
On 2/4/21 9:22 AM, Wainer dos Santos Moschetta wrote: On 2/4/21 10:59 AM, Philippe Mathieu-Daudé wrote: On 2/4/21 2:54 PM, Wainer dos Santos Moschetta wrote: The qemu-img.rst, qemu-nbd.rst, virtfs-proxy-helper.rst, qemu-trace-stap.rst, and virtiofsd.rst manuals were moved to docs/tools, so

Re: [PATCH] qemu-img: add seek and -n option to dd command

2021-02-04 Thread Eric Blake
On 2/4/21 2:09 PM, Peter Lieven wrote: > Am 02.02.21 um 16:51 schrieb Eric Blake: >> On 1/28/21 8:07 AM, Peter Lieven wrote: >>> Signed-off-by: Peter Lieven >> Your commit message says 'what', but not 'why'. Generally, the one-line >> 'what' works well as the subject line, but you want the

Re: [PATCH v2 00/93] TCI fixes and cleanups

2021-02-04 Thread Richard Henderson
On 2/4/21 10:02 AM, Stefan Weil wrote: > Is there a Git repository which makes pulling all changes easier? https://gitlab.com/rth7680/qemu/-/tree/tci-next > Regarding misaligned bytecode access, there exist two solutions. We could > either use code which handles that correctly (I had sent a

[PATCH 3/3] virtio-net: graceful fallback to vhost=off for tap netdev

2021-02-04 Thread Yuri Benditovich
Currently virtio-net silently clears features if they are not supported by respective vhost. This may create migration problems in future if vhost features on the source and destination are different. Implement graceful fallback to no-vhost mode when some acked features contradict with vhost. The

[PATCH 2/3] net: add ability to hide (disable) vhost_net

2021-02-04 Thread Yuri Benditovich
If 'vhost_net_disabled' in the NetClientState of the net device, get_vhost_net for TAP returns NULL. Network adapters can use this ability to hide the vhost_net temporary between resets in case some active features contradict with vhost. Signed-off-by: Yuri Benditovich --- hw/net/vhost_net.c |

[PATCH 0/3] virtio-net: graceful drop of vhost for TAP

2021-02-04 Thread Yuri Benditovich
This set of patches introduces graceful switch from tap-vhost to tap-no-vhost depending on guest features. Before that the features that vhost does not support were silently cleared in get_features. This creates potential problem of migration from the machine where some of virtio-net features are

[PATCH 1/3] vhost-net: add VIRTIO_NET_F_HASH_REPORT to the list of kernel features

2021-02-04 Thread Yuri Benditovich
In case of vhost TAP the kernel must support this feature, otherwise the device can't offer it. Signed-off-by: Yuri Benditovich --- hw/net/vhost_net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 24d555e764..8282e440bd 100644 ---

Re: About creating machines on the command line

2021-02-04 Thread John Snow
On 2/3/21 12:09 PM, graf--- via wrote: On 03.02.21 17:55, Philippe Mathieu-Daudé wrote: On 1/11/21 3:50 PM, Luc Michel wrote: Hi, We would like to work on improving QEMU to be able to create custom machines from the command line. The goal here is to get feedback from the community and

Re: [PATCH 1/3] utils: Improve qemu_strtosz() to have 64 bits of precision

2021-02-04 Thread Eric Blake
On 2/4/21 1:07 PM, Eric Blake wrote: > We have multiple clients of qemu_strtosz (qemu-io, the opts visitor, > the keyval visitor), and it gets annoying that edge-case testing is > impacted by implicit rounding to 53 bits of precision due to parsing > with strtod(). As an example posted by Rich

Re: [PATCH] qemu-img: add seek and -n option to dd command

2021-02-04 Thread Peter Lieven
Am 02.02.21 um 16:51 schrieb Eric Blake: > On 1/28/21 8:07 AM, Peter Lieven wrote: >> Signed-off-by: Peter Lieven > Your commit message says 'what', but not 'why'. Generally, the one-line > 'what' works well as the subject line, but you want the commit body to > give an argument why your patch

Re: [PATCH 3/3] utils: Deprecate inexact fractional suffix sizes

2021-02-04 Thread Eric Blake
On 2/4/21 1:07 PM, Eric Blake wrote: > The value '1.1k' is inexact; 1126.4 bytes is not possible, so we > happen to truncate it to 1126. Our use of fractional sizes is > intended for convenience, but when a user specifies a fraction that is > not a clean translation to binary, truncating/rounding

Re: [PATCH v2 00/93] TCI fixes and cleanups

2021-02-04 Thread Stefan Weil
Am 04.02.21 um 10:58 schrieb Peter Maydell: On Thu, 4 Feb 2021 at 01:49, Richard Henderson wrote: Almost 7 years ago I detailed 5 major problems in tci[1], of which three still remain: * Unaligned accesses to the bytecode stream, which means that we immediately SIGBUS on any host

Re: [PATCH v3 2/2] sev: update sev-inject-launch-secret to make gpa optional

2021-02-04 Thread Dr. David Alan Gilbert
* James Bottomley (j...@linux.ibm.com) wrote: > If the gpa isn't specified, it's value is extracted from the OVMF > properties table located below the reset vector (and if this doesn't > exist, an error is returned). OVMF has defined the GUID for the SEV > secret area as

Re: [PATCH v3 1/2] pc: add parser for OVMF reset block

2021-02-04 Thread Dr. David Alan Gilbert
* James Bottomley (j...@linux.ibm.com) wrote: > OVMF is developing a mechanism for depositing a GUIDed table just > below the known location of the reset vector. The table goes > backwards in memory so all entries are of the form > > |len| > > Where is arbtrary size and type, is a uint16_t

Re: [PULL 00/27] migration queue

2021-02-04 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Thu, 4 Feb 2021 at 17:16, Dr. David Alan Gilbert (git) > wrote: > > > > From: "Dr. David Alan Gilbert" > > > > The following changes since commit 1ba089f2255bfdb071be3ce6ac6c3069e8012179: > > > > Merge remote-tracking branch

Re: [PATCH v2] exec/cpu-defs: Remove TCG backends dependency

2021-02-04 Thread Richard Henderson
On 2/4/21 9:14 AM, Philippe Mathieu-Daudé wrote: > "exec/cpu-defs.h" contains generic CPU definitions for the > TCG frontends (mostly related to TLB). TCG backends definitions > aren't relevant here. > > See tcg/README description: > > 4) Backend > > tcg-target.h contains the target

Re: [PATCH 2/2] net: implement vmnet-based netdev

2021-02-04 Thread Eric Blake
On 2/4/21 10:25 AM, phillip.en...@gmail.com wrote: > From: Phillip Tennen > > This patch implements a new netdev device, reachable via -netdev > vmnet-macos, that’s backed by macOS’s vmnet framework. > > The vmnet framework provides native bridging support, and its usage in > this patch is

Re: [PULL 00/27] migration queue

2021-02-04 Thread Peter Maydell
On Thu, 4 Feb 2021 at 17:16, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > The following changes since commit 1ba089f2255bfdb071be3ce6ac6c3069e8012179: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-qmp-2021-02-04' into > staging (2021-02-04 14:15:35

Re: [PULL 0/5] virtiofs queue: Security fix

2021-02-04 Thread Dr. David Alan Gilbert
* no-re...@patchew.org (no-re...@patchew.org) wrote: > Patchew URL: > https://patchew.org/QEMU/20210204183439.546918-1-dgilb...@redhat.com/ > > > > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Type: series > Message-id:

[PATCH v3 2/2] sev: update sev-inject-launch-secret to make gpa optional

2021-02-04 Thread James Bottomley
If the gpa isn't specified, it's value is extracted from the OVMF properties table located below the reset vector (and if this doesn't exist, an error is returned). OVMF has defined the GUID for the SEV secret area as 4c2eb361-7d9b-4cc3-8081-127c90d3d294 and the format of the is: | where both

[PATCH v3 1/2] pc: add parser for OVMF reset block

2021-02-04 Thread James Bottomley
OVMF is developing a mechanism for depositing a GUIDed table just below the known location of the reset vector. The table goes backwards in memory so all entries are of the form |len| Where is arbtrary size and type, is a uint16_t and describes the entire length of the entry from the

Re: [PATCH 2/2] migration: dirty-bitmap: Allow control of bitmap persistence on destination

2021-02-04 Thread Eric Blake
On 2/3/21 7:00 AM, Peter Krempa wrote: > Bitmap's source persistence is transported over the migration stream and > the destination mirrors it. In some cases the destination might want to > persist bitmaps which are not persistent on the source (e.g. the result > of merge of bitmaps from a number

Re: [PATCH v2 04/93] tcg: Manage splitwx in tc_ptr_to_region_tree by hand

2021-02-04 Thread Richard Henderson
On 2/4/21 8:45 AM, Alex Bennée wrote: > > Richard Henderson writes: > >> On 2/4/21 5:01 AM, Alex Bennée wrote: >>> >>> Richard Henderson writes: >>> The use in tcg_tb_lookup is given a random pc that comes from the pc of a signal handler. Do not assert that the pointer is already

[PATCH v3 0/2] sev: enable secret injection to a self described area in OVMF

2021-02-04 Thread James Bottomley
v3: add bounds checking and remove misleading comment v2: fix build issues and update comments. Also drop the first patch which is now merged upstream The two patches introduce a parser for the optional OVMF description table which is placed just below the reset vector (the format of the

Re: [PATCH] tcg/s390: Fix compare instruction from extended-immediate facility

2021-02-04 Thread David Hildenbrand
On 04.02.21 19:29, Philippe Mathieu-Daudé wrote: The code is currently comparing c2 to the type promotion of uint32_t and int32_t. That is, the conversion rules are as: (common_type) c2 == (common_type) (uint32_t) (is_unsigned ? (uint32_t)c2

Re: [PULL 0/5] virtiofs queue: Security fix

2021-02-04 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210204183439.546918-1-dgilb...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210204183439.546918-1-dgilb...@redhat.com Subject: [PULL 0/5] virtiofs queue:

Re: [PATCH 1/2] migration: dirty-bitmap: Convert alias map inner members to a struct

2021-02-04 Thread Eric Blake
On 2/3/21 6:59 AM, Peter Krempa wrote: > Currently the alias mapping hash stores just strings of the target > objects internally. In further patches we'll be adding another member > which will need to be stored in the map so convert the members to a > struct. > > Signed-off-by: Peter Krempa >

  1   2   3   4   5   6   >