Re: [PATCH] arm/aspeed: Rework NIC attachment

2020-05-20 Thread Cédric Le Goater
On 5/20/20 8:34 AM, Markus Armbruster wrote: > Cédric Le Goater writes: > >> The AST2400 and AST2500 SoCs have two MACs but only the first MAC0 is >> active on the Aspeed machines using these SoCs. The AST2600 has four >> MACs. The AST2600 EVB machine activates MAC1, MAC2 and MAC3 and the >> Taco

Re: [PATCH] replay: synchronize on every virtual timer callback

2020-05-20 Thread Philippe Mathieu-Daudé
+Cleber On 5/20/20 8:54 AM, Pavel Dovgalyuk wrote: On 19.05.2020 18:42, Philippe Mathieu-Daudé wrote: On 5/19/20 12:38 PM, Pavel Dovgalyuk wrote: On 19.05.2020 13:32, Alex Bennée wrote: Pavel Dovgalyuk writes: On 19.05.2020 11:11, Alex Bennée wrote: Pavel Dovgalyuk writes: On 18.05.20

Re: [RFC PATCH 0/3] block: Synchronous bdrv_*() from coroutine in different AioContext

2020-05-20 Thread Denis Plotnikov
I'm not quite sure I understand the point. Let's see all the picture of async snapshot: our goal is to minimize a VM downtime during the snapshot. When we do async snapshot we save vmstate except RAM when a VM is stopped using the current L1 table (further initial L1 table). Then, we want the V

Re: kvm_buf_set_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

2020-05-20 Thread Paolo Bonzini
On 20/05/20 05:50, Li Feng wrote: > qemu-system-x86_64: error: failed to set MSR 0x48f to 0x7fefff00036dfb The high 32 bits are 0111 1110 . The low 32 bits are 0011 0110 1101 1011. The features that are set are the xor, so 0111 1100 1000 0010 0100: - b

Re: [PATCH 03/55] qdev: New qdev_new(), qdev_realize(), etc.

2020-05-20 Thread Markus Armbruster
Alistair Francis writes: > On Tue, May 19, 2020 at 9:26 PM Markus Armbruster wrote: >> >> Alistair Francis writes: >> >> > On Tue, May 19, 2020 at 8:11 AM Markus Armbruster >> > wrote: >> >> >> >> We commonly plug devices into their bus right when we create them, >> >> like this: >> >> >> >>

[Bug 1879425] Re: The thread of "CPU 0 /KVM" keeping 99.9%CPU

2020-05-20 Thread cliff chen
** Description changed: Hi Expert: The VM is hung here after (2, or 3, or 5 and the longest time is 10 hours) by qemu-kvm. - Notes: + Notes: for VM: - OS: RHEL 7.6 - CPU: 1 - MEM:4G - For qemu-kvm: - 1) version: - /usr/libexec/qemu-kvm -version - QEMU emulator version

Re: [PATCH 0/2] revert 9pfs reply truncation, wait for free room to reply

2020-05-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/alpine.DEB.2.21.2005191651130.27502@sstabellini-ThinkPad-T480s/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: alpine.DEB.2.21.2005191651130.27502@sstabellini-ThinkPad-T480s Subject: [PATCH 0/2

[PATCH v4 3/3] block: make BlockConf.*_size properties 32-bit

2020-05-20 Thread Roman Kagan
Devices (virtio-blk, scsi, etc.) and the block layer are happy to use 32-bit for logical_block_size, physical_block_size, and min_io_size. However, the properties in BlockConf are defined as uint16_t limiting the values to 32768. This appears unnecessary tight, and we've seen bigger block sizes ha

[PATCH v4 1/3] virtio-blk: store opt_io_size with correct size

2020-05-20 Thread Roman Kagan
The width of opt_io_size in virtio_blk_topology is 32bit. Use the appropriate accessor to store it. Signed-off-by: Roman Kagan --- v4: new patch hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index f5f6fc9

[PATCH v4 0/3] block: make BlockConf.*_size properties 32-bit

2020-05-20 Thread Roman Kagan
Devices (virtio-blk, scsi, etc.) and the block layer are happy to use 32-bit for logical_block_size, physical_block_size, and min_io_size. However, the properties in BlockConf are defined as uint16_t limiting the values to 32768. This appears unnecessary tight, and we've seen bigger block sizes ha

[PATCH v4 2/3] block: consolidate blocksize properties consistency checks

2020-05-20 Thread Roman Kagan
Several block device properties related to blocksize configuration must be in certain relationship WRT each other: physical block must be no smaller than logical block; min_io_size, opt_io_size, and discard_granularity must be a multiple of a logical block. To ensure these requirements are met, ad

Re: [PATCH 50/55] s390x/event-facility: Simplify creation of SCLP event devices

2020-05-20 Thread David Hildenbrand
[...] > The common code in question is bus_set_realized(), which has a TODO > comment asking for recursive realization. It's been asking for years. > > The only devices sclp_events_bus_realize() will ever realize are the > two init_event_facility() puts there. > > Simplify as follows: > > * Mak

[Bug 1879646] [NEW] [Feature request] x86: dump MSR features in human form

2020-05-20 Thread Philippe Mathieu-Daudé
Public bug reported: QEMU might fail because host/guest cpu features are not properly configured: qemu-system-x86_64: error: failed to set MSR 0x48f to 0x7fefff00036dfb qemu-system-x86_64: /root/qemu-master/target/i386/kvm.c:2695: kvm_buf_set_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' faile

Re: [PATCH 03/55] qdev: New qdev_new(), qdev_realize(), etc.

2020-05-20 Thread Markus Armbruster
Paolo Bonzini writes: > On 19/05/20 16:54, Markus Armbruster wrote: >> + >> +object_ref(OBJECT(dev)); >> +object_property_set_bool(OBJECT(dev), true, "realized", &err); >> +if (err) { >> +error_propagate_prepend(errp, err, >> +"Initialization of

Re: [PATCH 07/55] qdev: Convert to qdev_unrealize() manually

2020-05-20 Thread Markus Armbruster
Paolo Bonzini writes: > On 19/05/20 16:55, Markus Armbruster wrote: >> @@ -493,6 +493,11 @@ bool qdev_realize(DeviceState *dev, BusState *bus, >> Error **errp) >> return !err; >> } >> >> +void qdev_unrealize(DeviceState *dev) >> +{ >> +object_property_set_bool(OBJECT(dev), false, "re

Re: [PATCH 08/55] qdev: Convert uses of qdev_create() with Coccinelle

2020-05-20 Thread Markus Armbruster
Paolo Bonzini writes: > On 19/05/20 16:55, Markus Armbruster wrote: >> expression bus, type_name, dev; >> @@ >> -dev = qdev_create(bus, type_name); >> +dev = qdev_new(type_name); >> ... >> -qdev_init_nofail(dev); >> +qdev_realize_and_unref(dev, bus

Re: [PATCH 03/55] qdev: New qdev_new(), qdev_realize(), etc.

2020-05-20 Thread Paolo Bonzini
On 20/05/20 10:11, Markus Armbruster wrote: >> On 19/05/20 16:54, Markus Armbruster wrote: >>> + >>> +object_ref(OBJECT(dev)); >>> +object_property_set_bool(OBJECT(dev), true, "realized", &err); >>> +if (err) { >>> +error_propagate_prepend(errp, err, >>> +

Re: kvm_buf_set_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

2020-05-20 Thread Li Feng
Paolo Bonzini 于2020年5月20日周三 下午3:28写道: > > On 20/05/20 05:50, Li Feng wrote: > > qemu-system-x86_64: error: failed to set MSR 0x48f to > > 0x7fefff00036dfb > > The high 32 bits are 0111 1110 . > > The low 32 bits are 0011 0110 1101 1011. > > The featur

Re: Question: How do I discard any changes for the device which is set by blockdev option?

2020-05-20 Thread Kevin Wolf
Am 19.05.2020 um 19:56 hat Masayoshi Mizuma geschrieben: > Hello, > > I would like to discard any changes while the qemu guest OS is done. > I can do that with snapshot and drive option. > However, snapshot option doesn't work for the device which set by > blockdev option like as: > > $QEMU --ena

Re: kvm_buf_set_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

2020-05-20 Thread Paolo Bonzini
On 20/05/20 10:22, Li Feng wrote: >> - bit 2, vmx-exit-nosave-debugctl >> - bit 9, host address space size, is handled automatically by QEMU >> - bit 15, vmx-exit-ack-intr >> - bit 17, vmx-exit-save-pat >> - bit 18, vmx-exit-load-pat >> - bit 19, vmx-exit-save-efer >> - bit 20, vmx-exit-load-efer >

[PATCH v3 1/5] block/io: fix bdrv_co_block_status_above

2020-05-20 Thread Vladimir Sementsov-Ogievskiy
bdrv_co_block_status_above has several design problems with handling short backing files: 1. With want_zeros=true, it may return ret with BDRV_BLOCK_ZERO but without BDRV_BLOCK_ALLOCATED flag, when actually short backing file which produces these after-EOF zeros is inside requested backing sequenc

[PATCH v3 2/5] block/io: bdrv_common_block_status_above: support include_base

2020-05-20 Thread Vladimir Sementsov-Ogievskiy
In order to reuse bdrv_common_block_status_above in bdrv_is_allocated_above, let's support include_base parameter. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block/io.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/block/io

[PATCH v3 0/5] fix & merge block_status_above and is_allocated_above

2020-05-20 Thread Vladimir Sementsov-Ogievskiy
Hi all! v3: fix regression in 01 [Eric] These series are here to address the following problem: block-status-above functions may consider space after EOF of intermediate backing files as unallocated, which is wrong, as these backing files are the reason of producing zeroes, we never go further by

[PATCH v3 4/5] block/io: fix bdrv_is_allocated_above

2020-05-20 Thread Vladimir Sementsov-Ogievskiy
bdrv_is_allocated_above wrongly handles short backing files: it reports after-EOF space as UNALLOCATED which is wrong, as on read the data is generated on the level of short backing file (if all overlays has unallocated area at that place). Reusing bdrv_common_block_status_above fixes the issue an

Re: Migration with ``drive-mirror`` + NBD will let quorum qcow2 image become larger

2020-05-20 Thread Tao Xu
On 5/19/2020 10:49 PM, Alberto Garcia wrote: On Tue 19 May 2020 11:15:44 AM CEST, Kevin Wolf wrote: But maybe it could return a limited set of flags at least so that the mirror job can get the BDRV_BLOCK_ZERO information if the quorum children agree on it. Yeah, maybe it is possible to impleme

[PATCH v3 3/5] block/io: bdrv_common_block_status_above: support bs == base

2020-05-20 Thread Vladimir Sementsov-Ogievskiy
We are going to reuse bdrv_common_block_status_above in bdrv_is_allocated_above. bdrv_is_allocated_above may be called with include_base == false and still bs == base (for ex. from img_rebase()). So, support this corner case. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf -

[PATCH v3 5/5] iotests: add commit top->base cases to 274

2020-05-20 Thread Vladimir Sementsov-Ogievskiy
These cases are fixed by previous patches around block_status and is_allocated. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/274 | 20 tests/qemu-iotests/274.out | 65 ++ 2 files changed, 85 insertions(+) diff --git a/te

[PULL 00/11] Ui 20200520 patches

2020-05-20 Thread Gerd Hoffmann
The following changes since commit debe78ce14bf8f8940c2bdf3ef387505e9e035a9: Merge remote-tracking branch 'remotes/rth/tags/pull-fpu-20200515' into staging (2020-05-15 19:51:16 +0100) are available in the Git repository at: git://git.kraxel.org/qemu tags/ui-20200520-pull-reques

[PULL 05/11] ui/gtk: remove unused variable ignore_keys

2020-05-20 Thread Gerd Hoffmann
From: Volker Rümelin Since the removal of GTK2 code in commit 89d85cde75 the code around ignore_keys is unused. See commit 1a01716a30 "gtk: Avoid accel key leakage into guest on console switch" why it was only needed for GTK2. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Volker Rümelin M

Re: [PATCH v6 10/16] floppy: move cmos_get_fd_drive_type() from pc

2020-05-20 Thread Gerd Hoffmann
On Tue, May 19, 2020 at 04:51:44PM +0200, Philippe Mathieu-Daudé wrote: > Missing "Signed-off-by: Gerd Hoffmann ", > otherwise: Signed-off-by: Gerd Hoffmann mst, can you pick that up or should I respin? thanks, Gerd

[PULL 02/11] ui/gtk: fix handling of AltGr key on Windows

2020-05-20 Thread Gerd Hoffmann
From: Volker Rümelin Wire up the keyboard hooking code on Windows to fix the AltGr key and improve keyboard grabbing. Signed-off-by: Volker Rümelin Message-id: 20200516072014.7766-2-vr_q...@t-online.de Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 30 +- 1 file chang

[PULL 09/11] ui/gtk: don't pass on win keys without keyboard grab

2020-05-20 Thread Gerd Hoffmann
From: Volker Rümelin Without keyboard grab Windows currently handles the two win keys and the key events are also sent to the guest. This is undesir- able. Only one program should handle key events. This patch ap- plies commit c68f74b02e "win32: do not handle win keys when the keyboard is not gra

[PULL 04/11] ui/gtk: remove unused code

2020-05-20 Thread Gerd Hoffmann
From: Volker Rümelin This code was last used before commit 2ec78706d1 "ui: convert GTK and SDL1 frontends to keycodemapdb". Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Volker Rümelin Message-id: 20200516072014.7766-4-vr_q...@t-online.de Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 9 --

[PULL 10/11] ui/gtk: use native keyboard scancodes on Windows

2020-05-20 Thread Gerd Hoffmann
From: Volker Rümelin Since GTK 3.22 the function gdk_event_get_scancode() is available. On Windows this function returns keyboard scancodes and some extended flags. These raw keyboard scancodes are much better suited for this use case than the half-cooked win32 virtual-key codes because scancodes

[PULL 06/11] ui/sdl2: fix handling of AltGr key on Windows

2020-05-20 Thread Gerd Hoffmann
From: Volker Rümelin Wire up the keyboard hooking code on Windows to fix the AltGr key and improve keyboard grabbing. Signed-off-by: Volker Rümelin Message-id: 20200516072014.7766-6-vr_q...@t-online.de Signed-off-by: Gerd Hoffmann --- ui/sdl2.c | 24 1 file changed, 2

[PULL 01/11] ui/win32-kbd-hook: handle AltGr in a hook procedure

2020-05-20 Thread Gerd Hoffmann
From: Volker Rümelin Import win32 keyboard hooking code from project spice-gtk. This patch removes the extra left control key up/down input events inserted by Windows for the right alt key up/down input events with international keyboard layouts. Additionally there's some code to grab the keyboar

[PULL 03/11] ui/gkt: release all keys on grab-broken-event

2020-05-20 Thread Gerd Hoffmann
From: Volker Rümelin There is no way to grab the Ctrl-Alt-Del key combination on Windows. This key combination will leave all three keys in a stuck condition. This patch uses the grab-broken-event to release the keys. Signed-off-by: Volker Rümelin Message-id: 20200516072014.7766-3-vr_q...@t-onl

[PULL 07/11] ui/sdl2: start in full screen with grab enabled

2020-05-20 Thread Gerd Hoffmann
From: Volker Rümelin QEMU with SDL 1.2 display used to enable keyboard and mouse grab- bing when started in full screen. The SDL 2.0 code tries to do the same but fails to enable grabbing because sdl_grab_start(0) returns early. To do it's work the sdl_grab_start() function needs a pointer to a s

Re: [PATCH 25/55] usb: New usb_new(), usb_realize_and_unref()

2020-05-20 Thread Gerd Hoffmann
On Tue, May 19, 2020 at 04:55:21PM +0200, Markus Armbruster wrote: > I'm converting from qdev_create()/qdev_init_nofail() to > qdev_new()/qdev_realize_and_unref(); recent commit "qdev: New > qdev_new(), qdev_realize(), etc." explains why. > > USB devices use qdev_create() through usb_create(). >

Re: [PATCH 27/55] usb: usb_create() is now unused, drop

2020-05-20 Thread Gerd Hoffmann
On Tue, May 19, 2020 at 04:55:23PM +0200, Markus Armbruster wrote: > Cc: Gerd Hoffmann > Signed-off-by: Markus Armbruster Reviewed-by: Gerd Hoffmann

[PULL 11/11] ui: increase min required GTK version to 3.22.0

2020-05-20 Thread Gerd Hoffmann
From: Volker Rümelin Based on a mail on the qemu-devel mailing list at https://lists.nongnu.org/archive/html/qemu-devel/2020-05/msg02909.html and some internet research the GTK3 versions on supported platforms are: RHEL-7.4: 3.22.10 RHEL-7.5: 3.22.26 Debian (Stretch): 3.22.11 Deb

Re: [PATCH v4 1/3] virtio-blk: store opt_io_size with correct size

2020-05-20 Thread Philippe Mathieu-Daudé
On 5/20/20 10:06 AM, Roman Kagan wrote: The width of opt_io_size in virtio_blk_topology is 32bit. Use the appropriate accessor to store it. Signed-off-by: Roman Kagan --- v4: new patch hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/virtio

[PULL 08/11] ui/sdl2-input: use trace-events to debug key events

2020-05-20 Thread Gerd Hoffmann
From: Volker Rümelin Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Volker Rümelin Message-id: 20200516072014.7766-8-vr_q...@t-online.de Signed-off-by: Gerd Hoffmann --- ui/sdl2-input.c | 3 +++ ui/trace-events | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ui/sdl2-input.c b/ui/s

Re: [PATCH 26/55] usb: Convert uses of usb_create()

2020-05-20 Thread Gerd Hoffmann
On Tue, May 19, 2020 at 04:55:22PM +0200, Markus Armbruster wrote: > Replace > > dev = usb_create(bus, type_name); > ... > object_property_set_bool(OBJECT(dev), true, "realized", &err); > > by > > dev = isa_new(type_name); > ... > usb_realize_and_unref(dev, bus, &err); >

Re: [PATCH 28/55] usb: Eliminate usb_try_create_simple()

2020-05-20 Thread Gerd Hoffmann
On Tue, May 19, 2020 at 04:55:24PM +0200, Markus Armbruster wrote: > usb_try_create_simple() is qdev_try_new() and qdev_realize_and_unref() > with more verbose error messages. Of its two users, one ignores > errors, and the other asserts they are impossible. > > Make them use qdev_try_new() and q

Re: [PATCH 03/55] qdev: New qdev_new(), qdev_realize(), etc.

2020-05-20 Thread Gerd Hoffmann
> This commit creates infrastructure to do this: > > dev = qdev_new(type_name); > ... > qdev_realize_and_unref(dev, bus, errp) Note that this also allows to solve some initialization order issues, specifically you can easily create devices (then do object operations like adding/aliasi

RE: [PATCH 0/4] RISC-V multi-socket support

2020-05-20 Thread Anup Patel
> -Original Message- > From: Alistair Francis > Sent: 20 May 2020 02:50 > To: Anup Patel > Cc: Peter Maydell ; Palmer Dabbelt > ; Alistair Francis ; Sagar > Karandikar ; Atish Patra ; > open list:RISC-V ; qemu-devel@nongnu.org > Developers ; Anup Patel > Subject: Re: [PATCH 0/4] RISC-V

Re: kvm_buf_set_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

2020-05-20 Thread Li Feng
Paolo Bonzini 于2020年5月20日周三 下午4:32写道: > > On 20/05/20 10:22, Li Feng wrote: > >> - bit 2, vmx-exit-nosave-debugctl > >> - bit 9, host address space size, is handled automatically by QEMU > >> - bit 15, vmx-exit-ack-intr > >> - bit 17, vmx-exit-save-pat > >> - bit 18, vmx-exit-load-pat > >> - bit 1

Re: [PATCH] es1370: check total frame count against current frame

2020-05-20 Thread Gerd Hoffmann
On Wed, May 20, 2020 at 12:05:48AM +0530, P J P wrote: > +-- On Fri, 15 May 2020, P J P wrote --+ > | From: Prasad J Pandit > | > | A guest user may set channel frame count via es1370_write() > | such that, in es1370_transfer_audio(), total frame count > | 'size' is lesser than the number of fram

Re: [PATCH v4 2/3] block: consolidate blocksize properties consistency checks

2020-05-20 Thread Philippe Mathieu-Daudé
Hi Roman, On 5/20/20 10:06 AM, Roman Kagan wrote: Several block device properties related to blocksize configuration must be in certain relationship WRT each other: physical block must be no smaller than logical block; min_io_size, opt_io_size, and discard_granularity must be a multiple of a log

Re: QEMU 5.1: Can we require each new device/machine to provided a test?

2020-05-20 Thread Daniel P . Berrangé
On Tue, May 19, 2020 at 07:06:40PM -0400, John Snow wrote: > > > On 5/19/20 5:04 AM, Daniel P. Berrangé wrote: > > On Mon, May 18, 2020 at 03:56:36PM -0400, John Snow wrote: > >> > >> > >> On 5/15/20 6:23 AM, Daniel P. Berrangé wrote: > >>> On Fri, May 15, 2020 at 12:11:17PM +0200, Thomas Huth wr

Re: [PATCH v4 2/3] block: consolidate blocksize properties consistency checks

2020-05-20 Thread Philippe Mathieu-Daudé
On Wed, May 20, 2020 at 10:57 AM Philippe Mathieu-Daudé wrote: > > Hi Roman, > > On 5/20/20 10:06 AM, Roman Kagan wrote: > > Several block device properties related to blocksize configuration must > > be in certain relationship WRT each other: physical block must be no > > smaller than logical blo

Re: QEMU 5.1: Can we require each new device/machine to provided a test?

2020-05-20 Thread Daniel P . Berrangé
On Wed, May 20, 2020 at 08:13:07AM +0200, Thomas Huth wrote: > On 20/05/2020 01.06, John Snow wrote: > > > > > > On 5/19/20 5:04 AM, Daniel P. Berrangé wrote: > >> On Mon, May 18, 2020 at 03:56:36PM -0400, John Snow wrote: > >>> > >>> > >>> On 5/15/20 6:23 AM, Daniel P. Berrangé wrote: > On

Re: [PATCH v4 3/3] block: make BlockConf.*_size properties 32-bit

2020-05-20 Thread Philippe Mathieu-Daudé
On 5/20/20 10:06 AM, Roman Kagan wrote: Devices (virtio-blk, scsi, etc.) and the block layer are happy to use 32-bit for logical_block_size, physical_block_size, and min_io_size. However, the properties in BlockConf are defined as uint16_t limiting the values to 32768. This appears unnecessary t

RE: [PATCH 0/7] Latest COLO tree queued patches

2020-05-20 Thread Zhang, Chen
It looks ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases. And Lukas's patch maybe touch it. What do we need to do? Thanks Zhang Chen > -Original Message- > From: no-re...@patchew.org > Sent: Wednesday, May 20, 2020 12:41 PM > T

Re: [RFC PATCH 2/8] riscv: Generate payload scripts

2020-05-20 Thread LIU Zhiwei
On 2020/5/20 13:41, Richard Henderson wrote: On 5/19/20 7:37 PM, LIU Zhiwei wrote: On 2020/5/12 1:40, Richard Henderson wrote: On 4/30/20 12:21 AM, LIU Zhiwei wrote: +    # sequence of li rd, 0x1234567887654321 +    # +    #  0:   002471b7    lui rd,0x247 +    #  4:   8ad181

Re: [RFC PATCH 3/3] block: Assert we're running in the right thread

2020-05-20 Thread Philippe Mathieu-Daudé
On 5/14/20 4:30 PM, Kevin Wolf wrote: Am 14.05.2020 um 15:52 hat Stefan Reiter geschrieben: On 5/12/20 4:43 PM, Kevin Wolf wrote: tracked_request_begin() is called for most I/O operations, so it's a good place to assert that we're indeed running in the home thread of the node's AioContext. I

Re: [RFC PATCH 1/3] block: Factor out bdrv_run_co()

2020-05-20 Thread Philippe Mathieu-Daudé
On 5/12/20 5:37 PM, Eric Blake wrote: On 5/12/20 9:43 AM, Kevin Wolf wrote: We have a few bdrv_*() functions that can either spawn a new coroutine and wait for it with BDRV_POLL_WHILE() or use a fastpath if they are alreeady running in a coroutine. All of them duplicate basically the already

Re: [PATCH v4 5/5] target/i386: remove Icelake-Client CPU model

2020-05-20 Thread Daniel P . Berrangé
On Wed, May 20, 2020 at 10:10:07AM +0800, Chenyi Qiang wrote: > There are no Icelake Desktop products in the market. Remove the > Icelake-Client CPU model. QEMU has been shipping this CPU model for 2 years now. Regardless of what CPUs Intel are selling, it is possible for users to be running VMs w

Re: kvm_buf_set_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

2020-05-20 Thread Paolo Bonzini
On 20/05/20 10:55, Li Feng wrote: >>> After computing xor, the result is 0b10. >>> The bit 9 is set. >> Are you running KVM with a 32-bit kernel. >> > No, I'm running 64 bit. > > $ uname -a > Linux 31_216 5.6.7-1.el7.centos.x86_64 #1 SMP Mon Apr 27 15:26:08 CST > 2020 x86_64 x86_64 x86_64

Re: [PATCH v5 00/31] Add subcluster allocation to qcow2

2020-05-20 Thread Derek Su
Hi, Berto Excuse me, I'd like to test v5, but I failed to apply the series to master branch. Which commit can I use? Thanks. Regards, Derek On 2020/5/6 上午1:38, Alberto Garcia wrote: Hi, here's the new version of the patches to add subcluster allocation support to qcow2. Please refer to th

Re: kvm_buf_set_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

2020-05-20 Thread Li Feng
Paolo Bonzini 于2020年5月20日周三 下午5:34写道: > > On 20/05/20 10:55, Li Feng wrote: > >>> After computing xor, the result is 0b10. > >>> The bit 9 is set. > >> Are you running KVM with a 32-bit kernel. > >> > > No, I'm running 64 bit. > > > > $ uname -a > > Linux 31_216 5.6.7-1.el7.centos.x86_64 #

[PATCH v7 2/8] fw_cfg: Write the extra roots into the fw_cfg

2020-05-20 Thread Yubo Miao
Write the extra roots into the fw_cfg, therefore the uefi could get the extra roots. Only if the uefi knows there are extra roots, the config space of devices behind the root could be obtained. Signed-off-by: Yubo Miao --- hw/arm/virt.c | 8 hw/i386/pc.c | 18

[PATCH v7 0/8] pci_expander_brdige:acpi: Support pxb-pcie for ARM

2020-05-20 Thread Yubo Miao
Changes with v6 v6->v7: Refactor fw_cfg_write_extra_pci_roots Add API PCI_GET_PCIE_HOST_STATE Fix typos I have one question for patch [PATCH v7 8/8] unit-test: Add the binary file and clear diff. I followed instructions in tests/qtest/bios-tables-test.c to updated golden master binaries and empty

[PATCH v7 3/8] acpi: Extract crs build form acpi_build.c

2020-05-20 Thread Yubo Miao
Extract crs build form acpi_build.c, the function could also be used to build the crs for pxbs for arm. The resources are composed by two parts: 1. The bar space of pci-bridge/pcie-root-ports 2. The resources needed by devices behind PXBs. The base and limit of memory/io are obtained from the confi

[PATCH v7 4/8] acpi: Refactor the source of host bridge and build tables for pxb

2020-05-20 Thread Yubo Miao
The resources of pxbs are obtained by crs_build and the resources used by pxbs would be moved from the resources defined for host-bridge. The resources for pxb are composed of following two parts 1. The bar space of the pci-bridge/pcie-root-port behined it 2. The config space of devices behind it.

[PATCH v7 5/8] acpi: Align the size to 128k

2020-05-20 Thread Yubo Miao
If table size is changed between virt_acpi_build and virt_acpi_build_update, the table size would not be updated to UEFI, therefore, just align the size to 128kb, which is enough and same with x86. It would warn if 64k is not enough and the align size should be updated. Signed-off-by: Yubo Miao -

[PATCH v7 6/8] unit-test: The files changed.

2020-05-20 Thread Yubo Miao
The unit-test is seperated into three patches: 1. The files changed and list in bios-tables-test-allowed-diff.h 2. The unit-test 3. The binary file and clear bios-tables-test-allowed-diff.h The ASL diff would also be listed. Sice there are 1000+lines diff, some changes would be omitted. * Origi

[PATCH v7 1/8] acpi: Extract two APIs from acpi_dsdt_add_pci

2020-05-20 Thread Yubo Miao
Extract two APIs acpi_dsdt_add_pci_route_table and acpi_dsdt_add_pci_osc form acpi_dsdt_add_pci. The first API is used to specify the pci route table and the second API is used to declare the operation system capabilities. These two APIs would be used to specify the pxb-pcie in DSDT. Signed-off-by

[PATCH v7 8/8] unit-test: Add the binary file and clear diff.h

2020-05-20 Thread Yubo Miao
Add the binary file DSDT.pxb and clear bios-tables-test-allowed-diff.h Signed-off-by: Yubo Miao --- tests/data/acpi/virt/DSDT.pxb | Bin 0 -> 7802 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-) create mode 100644 tests/data/acpi/virt/DSDT

[PATCH v7 7/8] unit-test: Add testcase for pxb

2020-05-20 Thread Yubo Miao
Add testcase for pxb to make sure the ACPI table is correct for guest. Signed-off-by: Yubo Miao --- tests/qtest/bios-tables-test.c | 58 ++ 1 file changed, 52 insertions(+), 6 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test

Re: [PATCH V2] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-05-20 Thread Igor Mammedow
On Fri, 15 May 2020 12:13:53 + Ani Sinha wrote: > > On May 14, 2020, at 1:13 AM, Igor Mammedov > > wrote: > >> > >> > >>> Will following hack work for you? > >>> possible permutations > >>> 1) ACPI hotplug everywhere > >>> -global PIIX4_PM.acpi-pci-hotplug=on -global > >>> PIIX4_PM.acpi

Re: [PATCH V2] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-05-20 Thread Michael S. Tsirkin
On Wed, May 20, 2020 at 11:43:54AM +0200, Igor Mammedow wrote: > On Fri, 15 May 2020 12:13:53 + > Ani Sinha wrote: > > > > On May 14, 2020, at 1:13 AM, Igor Mammedov > > > wrote: > > >> > > >> > > >>> Will following hack work for you? > > >>> possible permutations > > >>> 1) ACPI hotplu

Re: [PATCH v5 00/31] Add subcluster allocation to qcow2

2020-05-20 Thread Alberto Garcia
On Wed 20 May 2020 11:35:09 AM CEST, Derek Su wrote: > Hi, Berto > > Excuse me, I'd like to test v5, but I failed to apply the series to > master branch. Which commit can I use? Try applying the patches on top of commit e4d7019e1a Berto

Re: [PATCH V2] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-05-20 Thread Igor Mammedow
On Wed, 20 May 2020 05:47:53 -0400 "Michael S. Tsirkin" wrote: > On Wed, May 20, 2020 at 11:43:54AM +0200, Igor Mammedow wrote: > > On Fri, 15 May 2020 12:13:53 + > > Ani Sinha wrote: > > > > > > On May 14, 2020, at 1:13 AM, Igor Mammedov > > > > wrote: > > > >> > > > >> > > > >

Re: [RFC PATCH] qom: Implement qom-get HMP command

2020-05-20 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert" writes: > > > * Markus Armbruster (arm...@redhat.com) wrote: > >> Cédric Le Goater writes: > >> > >> > From: "Dr. David Alan Gilbert" > >> > > >> > Reimplement it based on qmp_qom_get() to avoid converting QObjects back

[PATCH v2 2/3] virtio-balloon: fix free page hinting check on unrealize

2020-05-20 Thread David Hildenbrand
Checking against guest features is wrong. We allocated data structures based on host features. We can rely on "free_page_bh" as an indicator whether to un-do stuff instead. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alexander Duyck Fixes: c13c4153f76d ("virtio-balloon: VIRTIO_BALLOON_F_FRE

[PATCH v2 0/3] virtio-balloon: free page hinting fixes

2020-05-20 Thread David Hildenbrand
Some fixes for VIRTIO_BALLOON_F_FREE_PAGE_HINT. First issue was reported by Alexander Bulekov [1], the other ones were discovered by me when digging into the details. We keep finding more issues, let's see how we'll proceed with this feature long-term. These patches can be backported to stable QEM

[PATCH v2 3/3] virtio-balloon: unref the iothread when unrealizing

2020-05-20 Thread David Hildenbrand
We took a reference when realizing, so let's drop that reference when unrealizing. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alexander Duyck Fixes: c13c4153f76d ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") Cc: qemu-sta...@nongnu.org Cc: Wei Wang Cc: Alexander Duyck Cc: Michael S.

Re: [PATCH V2] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-05-20 Thread Daniel P . Berrangé
On Wed, May 20, 2020 at 11:56:26AM +0200, Igor Mammedow wrote: > On Wed, 20 May 2020 05:47:53 -0400 > "Michael S. Tsirkin" wrote: > > > On Wed, May 20, 2020 at 11:43:54AM +0200, Igor Mammedow wrote: > > > On Fri, 15 May 2020 12:13:53 + > > > Ani Sinha wrote: > > > > > > > > On May 14, 202

[PATCH v2 1/3] virtio-balloon: fix free page hinting without an iothread

2020-05-20 Thread David Hildenbrand
In case we don't have an iothread, we mark the feature as abscent but still add the queue. 'free_page_bh' remains set to NULL. qemu-system-i386 \ -M microvm \ -nographic \ -device virtio-balloon-device,free-page-hint=true \ -nographic \ -display none \

Re: [RFC PATCH] hw/sparc/sun4m: Use memdev backend for main RAM

2020-05-20 Thread Igor Mammedow
On Thu, 14 May 2020 14:13:11 +0200 Philippe Mathieu-Daudé wrote: > On 5/14/20 12:09 PM, Igor Mammedov wrote: > > On Sun, 10 May 2020 13:35:05 +0200 > > Philippe Mathieu-Daudé wrote: > > > >> Since commit 82b911aaff3, machine_run_board_init() checks for > >> ram_memdev_id and consume it. As TY

Re: [PATCH Kernel v22 3/8] vfio iommu: Cache pgsize_bitmap in struct vfio_iommu

2020-05-20 Thread Cornelia Huck
On Mon, 18 May 2020 11:26:32 +0530 Kirti Wankhede wrote: > Calculate and cache pgsize_bitmap when iommu->domain_list is updated > and iommu->external_domain is set for mdev device. > Add iommu->lock protection when cached pgsize_bitmap is accessed. > > Signed-off-by: Kirti Wankhede > Reviewed-b

Re: kvm_buf_set_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

2020-05-20 Thread Paolo Bonzini
On 20/05/20 11:36, Li Feng wrote: >> Can you do "rdmsr 0x48f" (as root)? On my machine for example I get >> 1ff00036dfb. >> > $ rdmsr 0x48f > 3f00036dfb > Hmm, weird. What is exactly your QEMU command line? Paolo

Re: kvm_buf_set_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

2020-05-20 Thread Li Feng
Paolo Bonzini 于2020年5月20日周三 下午6:10写道: > > On 20/05/20 11:36, Li Feng wrote: > >> Can you do "rdmsr 0x48f" (as root)? On my machine for example I get > >> 1ff00036dfb. > >> > > $ rdmsr 0x48f > > 3f00036dfb > > > > Hmm, weird. What is exactly your QEMU command line? > /root/qemu-master/x86

[Bug 1879672] [NEW] QEMU installer with WHPX support

2020-05-20 Thread Philippe Mathieu-Daudé
Public bug reported: People often ask the community to add WHPX support to the QEMU installer for Windows, but it is impossible due to the license limitations of the WHPX SDK. The WinHvEmulation.h and WinHvPlatform.h header files needed are "All rights reserved". However these headers only cont

Re: [PATCH v6 15/16] acpi: drop build_piix4_pm()

2020-05-20 Thread Igor Mammedow
On Fri, 15 May 2020 17:04:20 +0200 Gerd Hoffmann wrote: > The _SB.PCI0.PX13.P13C opregion (holds isa device enable bits) > is not used any more, remove it from DSDT. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedow > --- > hw/i386/acpi-build.c | 16 > 1 file chan

Re: [PATCH v9] audio/jack: add JACK client audiodev

2020-05-20 Thread Gerd Hoffmann
On Wed, Apr 29, 2020 at 03:53:58PM +1000, Geoffrey McRae wrote: > This commit adds a new audiodev backend to allow QEMU to use JACK as > both an audio sink and source. No comments from the QOM folks. I'll take that as "no objections". Backend code looks sane too. Added to audio patch queue. tha

Re: [PATCH 0/2] testing: Build WHPX enabled binaries

2020-05-20 Thread Philippe Mathieu-Daudé
+launchpad ticket On 9/19/19 1:26 PM, Philippe Mathieu-Daudé wrote: On 9/19/19 1:18 PM, Stefan Weil wrote: Am 19.09.2019 um 12:59 schrieb Philippe Mathieu-Daudé: Add a job to cross-build QEMU with WHPX enabled. Use the Win10SDK headers from the Android Project, as commented in https://lists.g

Re: [PATCH v2 0/3] testing: Build WHPX enabled binaries

2020-05-20 Thread Philippe Mathieu-Daudé
+launchpad ticket On 9/20/19 6:53 PM, Justin Terry (VM) wrote: Hey Phil, I have contacted our legal department for guidance on this specific use case and will update you when I hear back. Thank you for your patience. Justin Terry -Original Message- From: Philippe Mathieu-Daudé Sent

Re: [PATCH v2] WHPX: support for xcr0

2020-05-20 Thread Philippe Mathieu-Daudé
+launchpad ticket On 11/7/19 11:52 PM, Sunil Muthuswamy wrote: You will need the Windows 10 SDK for RS5 (build 17763) or above to to be able to compile this patch because of the definition of the XCR0 register. Changes since v1: - Added a sign-off line in the patch. I am not very happy with

Re: [PATCH V2] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-05-20 Thread Michael S. Tsirkin
On Wed, May 20, 2020 at 11:56:26AM +0200, Igor Mammedow wrote: > On Wed, 20 May 2020 05:47:53 -0400 > "Michael S. Tsirkin" wrote: > > > On Wed, May 20, 2020 at 11:43:54AM +0200, Igor Mammedow wrote: > > > On Fri, 15 May 2020 12:13:53 + > > > Ani Sinha wrote: > > > > > > > > On May 14, 202

Re: kvm_buf_set_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

2020-05-20 Thread Paolo Bonzini
On 20/05/20 12:15, Li Feng wrote: > /root/qemu-master/x86_64-softmmu/qemu-system-x86_64 -enable-kvm > -device virtio-balloon -cpu > host,-vmx-exit-nosave-debugctl,-vmx-exit-ack-intr,-vmx-exit-save-pat,-vmx-exit-load-pat,-vmx-exit-save-efer,-vmx-exit-load-efer,-vmx-exit-save-preemption-timer > -smp

Re: [PATCH Kernel v22 6/8] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap

2020-05-20 Thread Cornelia Huck
On Tue, 19 May 2020 12:24:13 +0530 Kirti Wankhede wrote: > DMA mapped pages, including those pinned by mdev vendor drivers, might > get unpinned and unmapped while migration is active and device is still > running. For example, in pre-copy phase while guest driver could access > those pages, host

Re: [EXTERNAL] Re: [PATCH] WHPX: Assigning maintainer for Windows Hypervisor Platform

2020-05-20 Thread Philippe Mathieu-Daudé
Hi Sunil, On 5/19/20 11:59 PM, Sunil Muthuswamy wrote: -Original Message- From: Stefan Weil Sent: Thursday, February 20, 2020 11:54 PM To: Justin Terry (SF) ; Philippe Mathieu-Daudé ; Sunil Muthuswamy ; Eduardo Habkost ; Paolo Bonzini ; Richard Henderson Cc: qemu-devel@nongnu.org Sub

Re: [EXTERNAL] Re: [PATCH] WHPX: Assigning maintainer for Windows Hypervisor Platform

2020-05-20 Thread Philippe Mathieu-Daudé
+Mike Battista & lanchpad ticket On 2/24/20 8:43 PM, Sunil Muthuswamy wrote: -Original Message- From: Stefan Weil Sent: Thursday, February 20, 2020 11:54 PM To: Justin Terry (SF) ; Philippe Mathieu-Daudé ; Sunil Muthuswamy ; Eduardo Habkost ; Paolo Bonzini ; Richard Henderson Cc: qem

Re: [PATCH v6 10/16] floppy: move cmos_get_fd_drive_type() from pc

2020-05-20 Thread Michael S. Tsirkin
On Wed, May 20, 2020 at 10:43:03AM +0200, Gerd Hoffmann wrote: > On Tue, May 19, 2020 at 04:51:44PM +0200, Philippe Mathieu-Daudé wrote: > > Missing "Signed-off-by: Gerd Hoffmann ", > > otherwise: > > Signed-off-by: Gerd Hoffmann > > mst, can you pick that up or should I respin? > > thanks, >

[Bug 1879672] Re: QEMU installer with WHPX support

2020-05-20 Thread Daniel Berrange
Has anyone raised an RFE with the mingw64 project to provide these headers / APIs ? That's what provides the interfaces we usually rely on for Windows builds, and they're likely familiar with what they can & can't do from a legal POV. I don't see this as something QEMU needs to solve itself. -- Y

Re: [PATCH V2] Add a new PIIX option to control global PCI hot-plugging

2020-05-20 Thread Igor Mammedow
On Fri, 15 May 2020 17:27:30 + Ani Sinha wrote: > A new option "acpi-pci-hotplug" is introduced for PIIX which will > globally disable hot-plugging of both hot plugged and > cold plugged PCI devices. This will prevent > hot-plugging and hot un-plugging of devices from within Windows based > g

Re: [PATCH Kernel v22 7/8] vfio iommu: Add migration capability to report supported features

2020-05-20 Thread Cornelia Huck
On Mon, 18 May 2020 11:26:36 +0530 Kirti Wankhede wrote: > Added migration capability in IOMMU info chain. > User application should check IOMMU info chain for migration capability > to use dirty page tracking feature provided by kernel module. > User application must check page sizes supported a

  1   2   3   4   5   >