Re: [Qemu-devel] [PATCH] pcie: set link state inactive/active after hot unplug/plug

2018-12-02 Thread Zheng Xiang
On 2018/12/3 11:38, Zheng Xiang wrote: > When VM boots from the latest version of linux kernel, after > hot-unpluging virtio-blk disks which are hotplugged into > pcie-root-port, the VM's dmesg log shows: > > [ 151.046242] pciehp :00:05.0:pcie004: pending interrupts 0x0001 from > Slot

[Qemu-devel] [PATCH] pcie: set link state inactive/active after hot unplug/plug

2018-12-02 Thread Zheng Xiang
When VM boots from the latest version of linux kernel, after hot-unpluging virtio-blk disks which are hotplugged into pcie-root-port, the VM's dmesg log shows: [ 151.046242] pciehp :00:05.0:pcie004: pending interrupts 0x0001 from Slot Status [ 151.046365] pciehp :00:05.0:pcie004:

[Qemu-devel] [PATCH] pcie: set link state inactive/active after hot unplug/plug

2018-12-02 Thread Zheng Xiang
When VM boots from the latest version of linux kernel, after hot-unpluging virtio-blk disks which are hotplugged into pcie-root-port, the VM's dmesg log shows: [ 151.046242] pciehp :00:05.0:pcie004: pending interrupts 0x0001 from Slot Status [ 151.046365] pciehp :00:05.0:pcie004:

Re: [Qemu-devel] [PATCH v2 2/6] monitor: accept chardev input from iothread

2018-12-02 Thread Markus Armbruster
Marc-André Lureau writes: > Chardev backends may not handle safely IO events from concurrent > threads. What exactly could go wrong? Or is this a well-known fact that doesn't need further elaboration? "safely handle I/O events" > Better to wake up the chardev from the monitor IO

Re: [Qemu-devel] [PATCH v2 3/6] char: add a QEMU_CHAR_FEATURE_GCONTEXT flag

2018-12-02 Thread Markus Armbruster
This one needs review by a chardev guy, with an eye on its use in the next patch. Paolo? Marc-André Lureau writes: > The feature should be set if the chardev is able to switch > GMainContext. Callers that want to put a chardev in a different thread > context can/should check this capabilities.

Re: [Qemu-devel] [PATCH v2 1/6] monitor: inline ambiguous helper functions

2018-12-02 Thread Markus Armbruster
Marc-André Lureau writes: > The function were not named with "mon_iothread", or following the AIO > vs GMainContext distinction. Inline them instead. > > Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v2 1/5] unify len and addr type for memory/address APIs

2018-12-02 Thread Li Zhijian
On 11/30/2018 09:40 PM, Peter Maydell wrote: On Wed, 21 Nov 2018 at 02:07, Li Zhijian wrote: Some address/memory APIs have different type between 'hwaddr addr' and 'int len'. It is very unsafety, espcially some APIs will be passed a non-int len by caller which might cause overflow quietly.

Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.0 2/2] target/s390x: Implement STCK et al for CONFIG_USER_ONLY

2018-12-02 Thread Thomas Huth
On 2018-11-30 20:22, Richard Henderson wrote: > This is a non-privileged instruction that was only implemented > for system mode. However, the stck instruction is used by glibc, > so this was causing SIGILL for programs run under debian stretch. > > Signed-off-by: Richard Henderson > --- >

Re: [Qemu-devel] [PATCH v2 2/5] change load_image() reture type to ssize_t

2018-12-02 Thread Li Zhijian
On 11/30/2018 11:14 PM, Peter Maydell wrote: I'm just about to send out a patchset which removes all the load_image() callers; that would make patches 2 and 4 in this set unnecessary. Got it, i will remove them at next version basing on your patch set. Thanks Zhijian

Re: [Qemu-devel] [PATCH v2 5/5] x86: allow load initrd below 4G for recent linux

2018-12-02 Thread Li Zhijian
On 11/30/2018 10:53 PM, Michael S. Tsirkin wrote: On Wed, Nov 21, 2018 at 10:06:06AM +0800, Li Zhijian wrote: a new field xloadflags was added to recent x86 linux, and BIT 1: XLF_CAN_BE_LOADED_ABOVE_4G is used to tell bootload that where initrd can be loaded saftly. safely Current QEMU

Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.0 1/2] target/s390x: Move TOD_UNIX_EPOCH to cpu.h

2018-12-02 Thread Thomas Huth
On 2018-11-30 20:22, Richard Henderson wrote: > We will need this from CONFIG_USER_ONLY as well, > which cannot access include/hw/. > > Signed-off-by: Richard Henderson > --- > include/hw/s390x/tod.h | 3 --- > target/s390x/cpu.h | 3 +++ > 2 files changed, 3 insertions(+), 3 deletions(-) >

Re: [Qemu-devel] [PATCH v10 6/7] migration/ram.c: add a function to disable the bulk stage

2018-12-02 Thread Peter Xu
On Mon, Dec 03, 2018 at 10:18:30AM +0800, Wei Wang wrote: > This patch adds a function to enable a precopy notifier callback outside > the migration subsystem to disable the bulk stage flag. This is needed by > the free page optimization offered by virtio-balloon. > > Signed-off-by: Wei Wang >

Re: [Qemu-devel] [PATCH v10 5/7] migration/ram.c: add a notifier chain for precopy

2018-12-02 Thread Peter Xu
On Mon, Dec 03, 2018 at 10:18:29AM +0800, Wei Wang wrote: > This patch adds a notifier chain for the memory precopy. This enables various > precopy optimizations to be invoked at specific places. > > Signed-off-by: Wei Wang > CC: Dr. David Alan Gilbert > CC: Juan Quintela > CC: Michael S.

Re: [Qemu-devel] [PATCH v10 4/7] migration: API to clear bits of guest free pages from the dirty bitmap

2018-12-02 Thread Peter Xu
On Mon, Dec 03, 2018 at 10:18:28AM +0800, Wei Wang wrote: > This patch adds an API to clear bits corresponding to guest free pages > from the dirty bitmap. Spilt the free page block if it crosses the QEMU > RAMBlock boundary. > > Signed-off-by: Wei Wang > CC: Dr. David Alan Gilbert > CC: Juan

[Qemu-devel] [PATCH v2] xen/pt: Fix a xen passthrough failure

2018-12-02 Thread Zhao Yan
For some pci device, even its PCI_INTERRUPT_PIN is not 0, it actually doesn't support INTx mode, so its machine irq read from host sysfs is 0. In that case, report PCI_INTERRUPT_PIN as 0 to guest and let passthrough continue. v2: fix some coding style issue Cc: Roger Pau Monné Cc: Jan Beulich

Re: [Qemu-devel] [PATCH v10 3/7] migration: use bitmap_mutex in migration_bitmap_clear_dirty

2018-12-02 Thread Peter Xu
On Mon, Dec 03, 2018 at 10:18:27AM +0800, Wei Wang wrote: > The bitmap mutex is used to synchronize threads to update the dirty > bitmap and the migration_dirty_pages counter. For example, the free > page optimization clears bits of free pages from the bitmap in an > iothread context. This patch

Re: [Qemu-devel] [PATCH] xen/pt: Fix a xen passthrough failure

2018-12-02 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20181203023728.26774-1-yan.y.z...@intel.com Type: series Subject: [Qemu-devel] [PATCH] xen/pt: Fix a xen passthrough failure === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

[Qemu-devel] [PATCH v10 7/7] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-12-02 Thread Wei Wang
The new feature enables the virtio-balloon device to receive hints of guest free pages from the free page vq. A notifier is registered to the migration precopy notifier chain. The notifier calls free_page_start after the migration thread syncs the dirty bitmap, so that the free page optimization

[Qemu-devel] [PATCH v10 6/7] migration/ram.c: add a function to disable the bulk stage

2018-12-02 Thread Wei Wang
This patch adds a function to enable a precopy notifier callback outside the migration subsystem to disable the bulk stage flag. This is needed by the free page optimization offered by virtio-balloon. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin

[Qemu-devel] [PATCH v10 5/7] migration/ram.c: add a notifier chain for precopy

2018-12-02 Thread Wei Wang
This patch adds a notifier chain for the memory precopy. This enables various precopy optimizations to be invoked at specific places. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin CC: Peter Xu --- include/migration/misc.h | 19 ++

[Qemu-devel] [PATCH v10 4/7] migration: API to clear bits of guest free pages from the dirty bitmap

2018-12-02 Thread Wei Wang
This patch adds an API to clear bits corresponding to guest free pages from the dirty bitmap. Spilt the free page block if it crosses the QEMU RAMBlock boundary. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin CC: Peter Xu ---

[Qemu-devel] [PATCH v10 0/7] virtio-balloon: free page hint support

2018-12-02 Thread Wei Wang
This is the deivce part implementation to add a new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT to the virtio-balloon device. The device receives the guest free page hints from the driver and clears the corresponding bits in the dirty bitmap, so that those free pages are not sent by the migration

[Qemu-devel] [PATCH v10 1/7] bitmap: fix bitmap_count_one

2018-12-02 Thread Wei Wang
BITMAP_LAST_WORD_MASK(nbits) returns 0x when "nbits=0", which makes bitmap_count_one fail to handle the "nbits=0" case. It appears to be preferred to remain BITMAP_LAST_WORD_MASK identical to the kernel implementation that it is ported from. So this patch fixes bitmap_count_one to handle

[Qemu-devel] [PATCH v10 2/7] bitmap: bitmap_count_one_with_offset

2018-12-02 Thread Wei Wang
Count the number of 1s in a bitmap starting from an offset. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin Reviewed-by: Dr. David Alan Gilbert --- include/qemu/bitmap.h | 13 + 1 file changed, 13 insertions(+) diff --git

[Qemu-devel] [PATCH v10 3/7] migration: use bitmap_mutex in migration_bitmap_clear_dirty

2018-12-02 Thread Wei Wang
The bitmap mutex is used to synchronize threads to update the dirty bitmap and the migration_dirty_pages counter. For example, the free page optimization clears bits of free pages from the bitmap in an iothread context. This patch makes migration_bitmap_clear_dirty update the bitmap and counter

[Qemu-devel] [PATCH] xen/pt: Fix a xen passthrough failure

2018-12-02 Thread Zhao Yan
For some pci device, even its PCI_INTERRUPT_PIN is not 0, it actually doesn't support INTx mode, so its machine irq read from host sysfs is 0. In that case, report PCI_INTERRUPT_PIN as 0 to guest and let passthrough continue. Cc: Roger Pau Monné Cc: Jan Beulich Signed-off-by: Zhao Yan ---

Re: [Qemu-devel] [PATCH v5 36/36] ppc/pnv: add XIVE support

2018-12-02 Thread David Gibson
On Fri, Nov 16, 2018 at 11:57:29AM +0100, Cédric Le Goater wrote: > This is simple model of the POWER9 XIVE interrupt controller for the > PowerNV machine. XIVE for baremetal is a complex controller and the > model only addresses the needs of the skiboot firmware. > > * Overall architecture > >

Re: [Qemu-devel] [PATCH v5 16/36] spapr: add hcalls support for the XIVE exploitation interrupt mode

2018-12-02 Thread David Gibson
On Fri, Nov 30, 2018 at 09:07:19AM +0100, Cédric Le Goater wrote: > On 11/30/18 2:23 AM, David Gibson wrote: > > On Thu, Nov 29, 2018 at 05:04:50PM +0100, Cédric Le Goater wrote: > >> On 11/29/18 2:23 AM, David Gibson wrote: > >>> On Wed, Nov 28, 2018 at 11:21:37PM +0100, Cédric Le Goater wrote: >

Re: [Qemu-devel] [PATCH v5 11/36] spapr/xive: use the VCPU id as a NVT identifier

2018-12-02 Thread David Gibson
On Fri, Nov 30, 2018 at 07:56:02AM +0100, Cédric Le Goater wrote: > On 11/30/18 2:11 AM, David Gibson wrote: > > On Thu, Nov 29, 2018 at 04:27:31PM +0100, Cédric Le Goater wrote: > >> [ ... ] > >> > >> +/* > >> + * The allocation of VP blocks is a complex operation in OPAL and the >

Re: [Qemu-devel] [PATCH v5 06/36] ppc/xive: add support for the END Event State buffers

2018-12-02 Thread David Gibson
On Fri, Nov 30, 2018 at 07:41:33AM +0100, Cédric Le Goater wrote: > On 11/30/18 2:04 AM, David Gibson wrote: > > On Thu, Nov 29, 2018 at 11:06:13PM +0100, Cédric Le Goater wrote: > >> On 11/22/18 6:13 AM, David Gibson wrote: > >>> On Fri, Nov 16, 2018 at 11:56:59AM +0100, Cédric Le Goater wrote: >

Re: [Qemu-devel] [PATCH for-3.2 v3 0/3] HMP/snapshot changes - do not use ID anymore

2018-12-02 Thread Daniel Henrique Barboza
Ping On 11/7/18 11:09 AM, Daniel Henrique Barboza wrote: changes in v3: - rebased to v3.1.0-rc0 tag - hmp-commands.hx documentation now mentions the change of semantics starting version 3.2. - previous version link: http://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg00629.html It is

[Qemu-devel] dual monitors

2018-12-02 Thread Jonathan Lapointe
I would like to use my two monitors with qemu. I was working before with qemu & virtio, but then the fullscreen mode was not a problem. But since, I have two monitors I cannot be in fullscreen mode otherwise I lost the other monitor, can't use it. I heard that qxl could fix this. When I

[Qemu-devel] [Bug 1806243] Re: ARM conditional branch after if-then instruction not working

2018-12-02 Thread Vincent Hamp
Oh damn it, you're right. Apparently encoding T3 of the branch instruction inside an IT block is always unpredictable... Guess the inline assembly version ignores the .w extension and creates some other encoding that simply works. I've attached the .elf which is causing GDB to halt. Currently

[Qemu-devel] [Bug 1806243] Re: ARM conditional branch after if-then instruction not working

2018-12-02 Thread Peter Maydell
The disassembler is giving you a hint here: 2000408e: itt lt 20004090: pushlt {r0, r1} 20004092: blt.w 0x20004082 ; unpredictable // <-- GDB hangs here Your code has a "blt" instruction inside an IT block in a way that is archictecturally UNPREDICTABLE, and the CPU is allowed to not behave in

[Qemu-devel] [Bug 1806243] [NEW] ARM conditional branch after if-then instruction not working

2018-12-02 Thread Vincent Hamp
Public bug reported: Hello There seems to be an issue with QEMU when debugging if-then condition blocks from the thumb2 instruction set. The following snippet runs fine during normal execution, but keeps hanging at the conditional branch when debugging. The jump at the branch should only be

Re: [Qemu-devel] [PATCH 02/10] hw/ppc/ppc405_boards: Don't use load_image()

2018-12-02 Thread David Gibson
On Fri, Nov 30, 2018 at 03:17:04PM +, Peter Maydell wrote: > The load_image() function is deprecated, as it does not let the > caller specify how large the buffer to read the file into is. > Instead use load_image_size(). > > Signed-off-by: Peter Maydell Acked-by: David Gibson > --- >

Re: [Qemu-devel] [PATCH 01/10] hw/ppc/mac_newworld, mac_oldworld: Don't use load_image()

2018-12-02 Thread David Gibson
On Fri, Nov 30, 2018 at 03:17:03PM +, Peter Maydell wrote: > The load_image() function is deprecated, as it does not let the > caller specify how large the buffer to read the file into is. > Use the glib g_file_get_contents() function instead, which does > the whole "allocate memory for the

Re: [Qemu-devel] [RFC PATCH v2 3/3] target/ppc: support single stepping with KVM HV

2018-12-02 Thread David Gibson
On Fri, Nov 30, 2018 at 06:46:21PM -0200, Fabiano Rosas wrote: > David Gibson writes: > > >> --- a/target/ppc/kvm.c > >> +++ b/target/ppc/kvm.c > >> @@ -94,6 +94,7 @@ static int cap_ppc_safe_indirect_branch; > >> static int cap_ppc_nested_kvm_hv; > >> > >> static uint32_t debug_inst_opcode;