Re: [Qemu-devel] ideas for improving TLB performance (help with TCG backend wanted)

2018-10-01 Thread Alex Bennée
Emilio G. Cota writes: > On Thu, Sep 20, 2018 at 01:19:51 +0100, Alex Bennée wrote: >> If we are going to have an indirection then we can also drop the >> requirement to scale the TLB according to the number of MMU indexes we >> have to support. It's fairly wasteful when a bunch of them are alm

[Qemu-devel] [PULL 0/1] libfdt queue 20181002

2018-10-01 Thread David Gibson
The following changes since commit a2ef4d9e95400cd387ab4ae19a317741e458fb07: Merge remote-tracking branch 'remotes/kraxel/tags/ui-20181001-pull-request' into staging (2018-10-01 15:44:30 +0100) are available in the Git repository at: git://github.com/dgibson/qemu.git tags/libfd

[Qemu-devel] [PULL 1/1] Update dtc/libfdt submodule to v1.4.7

2018-10-01 Thread David Gibson
dtc v1.4.7 contains a bunch of improvements to make libfdt safer against handling a corrupted or malicious tree, which is a good thing to have. It also includes an explicit fdt checking function that we'll be wanting in future. Signed-off-by: David Gibson --- dtc | 2 +- 1 file changed, 1 inser

[Qemu-devel] Have multiple virtio-net devices, but only one of them receives all traffic

2018-10-01 Thread Jintack Lim
Hi, I'm using QEMU 3.0.0 and Linux kernel 4.15.0 on x86 machines. I'm observing pretty weird behavior when I have multiple virtio-net devices. My KVM VM has two virtio-net devices (vhost=off) and I'm using a Linux bridge in the host. The two devices have different MAC/IP addresses. When I tried t

Re: [Qemu-devel] [PATCH] PPC: e500: convert SysBus init method to a realize method

2018-10-01 Thread David Gibson
On Mon, Oct 01, 2018 at 05:04:13PM +0200, Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater Applied to ppc-for-3.1, thanks. > --- > hw/pci-host/ppce500.c | 14 ++ > 1 file changed, 6 insertions(+), 8 deletions(-) > > diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.

Re: [Qemu-devel] [PATCH 0/2] ppc: convert SysBus init method to a realize method

2018-10-01 Thread David Gibson
On Mon, Oct 01, 2018 at 01:44:19PM +0200, Cédric Le Goater wrote: > Hello, > > Here are a couple of patches converting the SysBus init method to a > realize method. make check tested only. Applied to ppc-for-3.1, thanks. > > Thanks, > > C. > > > Cédric Le Goater (2): > ppc440_pcix: convert

Re: [Qemu-devel] ideas for improving TLB performance (help with TCG backend wanted)

2018-10-01 Thread Emilio G. Cota
On Mon, Oct 01, 2018 at 15:40:37 -0500, Richard Henderson wrote: > On 10/1/18 1:34 PM, Emilio G. Cota wrote: > > On Thu, Sep 20, 2018 at 01:19:51 +0100, Alex Bennée wrote: > >> If we are going to have an indirection then we can also drop the > >> requirement to scale the TLB according to the number

[Qemu-devel] [Bug 1795527] [NEW] Malformed audio and video output stuttering after upgrade to QEMU 3.0

2018-10-01 Thread tlloss
Public bug reported: My host is an x86_64 Arch Linux OS with a recompiled 4.18.10 hardened kernel, running a few KVM guests with varying OSes and configurations managed through a Libvirt stack. Among these guests I have two Windows 10 VMs with VGA passthrough and PulseAudio-backed virtual audio d

[Qemu-devel] [PATCH 04/15] hw/ssi/xilinx_spi: Use DeviceState::realize rather than SysBusDevice::init

2018-10-01 Thread Philippe Mathieu-Daudé
Move from the legacy SysBusDevice::init method to using DeviceState::realize. Signed-off-by: Philippe Mathieu-Daudé --- hw/ssi/xilinx_spi.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/ssi/xilinx_spi.c b/hw/ssi/xilinx_spi.c index 83585bc8b2..3dae303d5b 100644 -

[Qemu-devel] [PATCH 02/15] hw/timer/sun4v-rtc: Convert from DPRINTF() macro to trace events

2018-10-01 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/timer/sun4v-rtc.c | 13 +++-- hw/timer/trace-events | 4 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/hw/timer/sun4v-rtc.c b/hw/timer/sun4v-rtc.c index 310523225f..13be94f8da 100644 --- a/hw/timer/sun4v-rtc.c +++ b/hw/

[Qemu-devel] [PATCH 05/15] hw/sh4/sh_pci: Use DeviceState::realize rather than SysBusDevice::init

2018-10-01 Thread Philippe Mathieu-Daudé
Move from the legacy SysBusDevice::init method to using DeviceState::realize. Signed-off-by: Philippe Mathieu-Daudé --- hw/sh4/sh_pci.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/hw/sh4/sh_pci.c b/hw/sh4/sh_pci.c index 4ec2e35500..84c52df067 100644

[Qemu-devel] [PATCH 10/15] hw/sparc64/niagara: Replace 'empty_slot' by 'unimplemented_device'

2018-10-01 Thread Philippe Mathieu-Daudé
The TYPE_EMPTY_SLOT and TYPE_UNIMPLEMENTED_DEVICE are identical devices, however the later use more recent APIs and is more widely used. Replace 'empty_slot' by 'unimplemented_device' to simplify devices code maintenance. Signed-off-by: Philippe Mathieu-Daudé --- default-configs/sparc64-softmmu

[Qemu-devel] [PATCH 07/15] hw/mips/gt64xxx_pci: Convert gt64120_reset() function into Device reset method

2018-10-01 Thread Philippe Mathieu-Daudé
Convert the gt64120_reset() function into a proper Device reset method. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/gt64xxx_pci.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c index 24ad0ad024..dcd1a6632

[Qemu-devel] [PATCH 08/15] hw/mips/gt64xxx_pci: Mark as bridge device

2018-10-01 Thread Philippe Mathieu-Daudé
The gt64120 is currently listed as uncategorized device. Mark it as bridge device. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/gt64xxx_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c index dcd1a66329..1cd8aac658 100644 --- a/hw/mips/g

[Qemu-devel] [RFC PATCH 13/15] hw/alpha/typhoon: Remove unuseful code

2018-10-01 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/alpha/typhoon.c | 13 - 1 file changed, 13 deletions(-) diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c index d74b5b55e1..8004afe45b 100644 --- a/hw/alpha/typhoon.c +++ b/hw/alpha/typhoon.c @@ -932,23 +932,10 @@ PCIBus *typhoon_init(r

[Qemu-devel] [PATCH 03/15] hw/timer/sun4v-rtc: Use DeviceState::realize rather than SysBusDevice::init

2018-10-01 Thread Philippe Mathieu-Daudé
Move from the legacy SysBusDevice::init method to using DeviceState::realize. Signed-off-by: Philippe Mathieu-Daudé --- hw/timer/sun4v-rtc.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/timer/sun4v-rtc.c b/hw/timer/sun4v-rtc.c index 13be94f8da..4e7f6a1eff 100

[Qemu-devel] [PATCH 09/15] hw/mips/malta: Replace 'empty_slot' by 'unimplemented_device'

2018-10-01 Thread Philippe Mathieu-Daudé
The TYPE_EMPTY_SLOT and TYPE_UNIMPLEMENTED_DEVICE are identical devices, however the later use more recent APIs and is more widely used. Replace 'empty_slot' by 'unimplemented_device' to simplify devices code maintenance. Signed-off-by: Philippe Mathieu-Daudé --- default-configs/mips-softmmu-co

[Qemu-devel] [PATCH 11/15] hw/sparc/sun4m: Replace 'empty_slot' by 'unimplemented_device'

2018-10-01 Thread Philippe Mathieu-Daudé
The TYPE_EMPTY_SLOT and TYPE_UNIMPLEMENTED_DEVICE are identical devices, however the later use more recent APIs and is more widely used. Replace 'empty_slot' by 'unimplemented_device' to simplify devices code maintenance. Signed-off-by: Philippe Mathieu-Daudé --- default-configs/sparc-softmmu.m

[Qemu-devel] [PATCH 12/15] hw/core: Remove the 'empty_slot' device

2018-10-01 Thread Philippe Mathieu-Daudé
All previous users of TYPE_EMPTY_SLOT now use TYPE_UNIMPLEMENTED_DEVICE. Since TYPE_EMPTY_SLOT is no more used/referenced, remove it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/empty_slot.h | 7 --- hw/core/empty_slot.c| 103 hw/core/Make

[Qemu-devel] [PATCH 00/15] another SysBusDevice::init to Device::realize cleanup

2018-10-01 Thread Philippe Mathieu-Daudé
Peter suggested [1] another crusade for this merge window, then Cédric jumped on his horse [2]. My turn on my dromedary. - convert few devices to DeviceState::realize, - kill the empty_slot device, - remove unuseful class_init() code [RFC, do we want to keep this?] - few other minor fixes catched

[Qemu-devel] [RFC PATCH 15/15] hw/mips/malta: Remove unuseful code

2018-10-01 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/mips_malta.c | 13 - 1 file changed, 13 deletions(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 4ccfa87c35..b6633fa141 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -1422,23 +1422,10 @@ void mips_

[Qemu-devel] [PATCH 01/15] trace-events: Fix copy/paste typo

2018-10-01 Thread Philippe Mathieu-Daudé
Missed while reviewing 5dd85b4b486. Signed-off-by: Philippe Mathieu-Daudé --- hw/timer/trace-events | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/timer/trace-events b/hw/timer/trace-events index fa4213df5b..ca9ad6321a 100644 --- a/hw/timer/trace-events +++ b/hw/timer/tra

[Qemu-devel] [RFC PATCH 14/15] hw/hppa/dino: Remove unuseful code

2018-10-01 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/hppa/dino.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c index 564b938e3a..31e09942b5 100644 --- a/hw/hppa/dino.c +++ b/hw/hppa/dino.c @@ -488,17 +488,10 @@ PCIBus *dino_init(MemoryRegion *addr_space, r

[Qemu-devel] [PATCH 06/15] hw/pci-host/bonito: Use DeviceState::realize rather than SysBusDevice::init

2018-10-01 Thread Philippe Mathieu-Daudé
Move from the legacy SysBusDevice::init method to using DeviceState::realize. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 9868e2eccc..03d1ec33e3 10064

Re: [Qemu-devel] ideas for improving TLB performance (help with TCG backend wanted)

2018-10-01 Thread Richard Henderson
On 10/1/18 1:34 PM, Emilio G. Cota wrote: > On Thu, Sep 20, 2018 at 01:19:51 +0100, Alex Bennée wrote: >> If we are going to have an indirection then we can also drop the >> requirement to scale the TLB according to the number of MMU indexes we >> have to support. It's fairly wasteful when a bunch

[Qemu-devel] [PATCH] lsi: Reselection needed to remove pending commands from queue

2018-10-01 Thread George Kennedy
Under heavy IO (e.g. fio) the queue is not checked frequently enough for pending commands. As a result some pending commands are timed out by the linux sym53c8xx driver, which sends SCSI Abort messages for the timed out commands. The SCSI Abort messages result in linux errors, which show up in /var

Re: [Qemu-devel] [PATCH v4 3/3] tests: Add unit tests for image locking

2018-10-01 Thread Max Reitz
On 21.08.18 02:58, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > tests/Makefile.include | 2 + > tests/test-image-locking.c | 154 + > 2 files changed, 156 insertions(+) > create mode 100644 tests/test-image-locking.c > > diff --git a/tests/Makefi

[Qemu-devel] [PATCH v5 2/9] x86_iommu: move vtd_generate_msi_message in common file

2018-10-01 Thread Singh, Brijesh
The vtd_generate_msi_message() in intel-iommu is used to construct a MSI Message from IRQ. A similar function will be needed when we add interrupt remapping support in amd-iommu. Moving the function in common file to avoid the code duplication. Rename it to x86_iommu_irq_to_msi_message(). There is

[Qemu-devel] [PATCH v5 9/9] x86_iommu/amd: Enable Guest virtual APIC support

2018-10-01 Thread Singh, Brijesh
Now that amd-iommu support interrupt remapping, enable the GASup in IVRS table and GASup in extended feature register to indicate that IOMMU support guest virtual APIC mode. GASup provides option to guest OS to make use of 128-bit IRTE. Note that the GAMSup is set to zero to indicate that amd-iomm

[Qemu-devel] [Bug 1701449] Re: high memory usage when using rbd with client caching

2018-10-01 Thread Jason Dillaman
@Nick: if you can recreate the librbd memory growth, any chance you can help test a potential fix [1]? [1] https://github.com/ceph/ceph/pull/24297 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/170144

[Qemu-devel] [PATCH v5 1/9] x86_iommu: move the kernel-irqchip check in common code

2018-10-01 Thread Singh, Brijesh
Interrupt remapping needs kernel-irqchip={off|split} on both Intel and AMD platforms. Move the check in common place. Signed-off-by: Brijesh Singh Reviewed-by: Peter Xu Cc: Peter Xu Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Marcel Apfelbaum Cc

[Qemu-devel] [PATCH v5 7/9] i386: acpi: add IVHD device entry for IOAPIC

2018-10-01 Thread Singh, Brijesh
When interrupt remapping is enabled, add a special IVHD device (type IOAPIC). Signed-off-by: Brijesh Singh Acked-by: Peter Xu Cc: Peter Xu Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Marcel Apfelbaum Cc: Tom Lendacky Cc: Suravee Suthikulpanit

[Qemu-devel] [PATCH v5 6/9] x86_iommu/amd: Add interrupt remap support when VAPIC is not enabled

2018-10-01 Thread Singh, Brijesh
Emulate the interrupt remapping support when guest virtual APIC is not enabled. For more info Refer: AMD IOMMU spec Rev 3.0 - section 2.2.5.1 When VAPIC is not enabled, it uses interrupt remapping as defined in Table 20 and Figure 15 from IOMMU spec. Signed-off-by: Brijesh Singh Cc: Peter Xu C

[Qemu-devel] [PATCH v5 4/9] x86_iommu/amd: make the address space naming consistent with intel-iommu

2018-10-01 Thread Singh, Brijesh
To be consistent with intel-iommu: - rename the address space to use '_' instead of '-' - update the memory region relationships Signed-off-by: Brijesh Singh Reviewed-by: Peter Xu Cc: Peter Xu Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Marcel A

[Qemu-devel] [PATCH v5 0/9] x86_iommu/amd: add interrupt remap support

2018-10-01 Thread Singh, Brijesh
This series adds the interrupt remapping support for amd-iommu device. IOMMU spec is available at: https://support.amd.com/TechDocs/48882_IOMMU.pdf To enable the interrupt remap use below qemu cli # $QEMU \ -device amd-iommu,intremap=on I have tested FC-28 and Ubuntu 18.04 guest. Linux guest

[Qemu-devel] [PATCH v5 5/9] x86_iommu/amd: Prepare for interrupt remap support

2018-10-01 Thread Singh, Brijesh
Register the interrupt remapping callback and read/write ops for the amd-iommu-ir memory region. amd-iommu-ir is set to higher priority to ensure that this region won't be masked out by other memory regions. Signed-off-by: Brijesh Singh Cc: Peter Xu Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini

[Qemu-devel] [PATCH v5 3/9] x86_iommu/amd: remove V=1 check from amdvi_validate_dte()

2018-10-01 Thread Singh, Brijesh
Currently, the amdvi_validate_dte() assumes that a valid DTE will always have V=1. This is not true. The V=1 means that bit[127:1] are valid. A valid DTE can have IV=1 and V=0 (i.e address translation disabled and interrupt remapping enabled) Remove the V=1 check from amdvi_validate_dte(), make th

Re: [Qemu-devel] [PATCH v4 2/3] file-posix: Drop s->lock_fd

2018-10-01 Thread Max Reitz
On 21.08.18 02:58, Fam Zheng wrote: > The lock_fd field is not strictly necessary because transferring locked > bytes from old fd to the new one shouldn't fail anyway. This spares the > user one fd per image. > > Signed-off-by: Fam Zheng > --- > block/file-posix.c | 37 +-

Re: [Qemu-devel] [PATCH v4 1/3] file-posix: Skip effectiveless OFD lock operations

2018-10-01 Thread Max Reitz
On 21.08.18 02:58, Fam Zheng wrote: > If we know we've already locked the bytes, don't do it again; similarly > don't unlock a byte if we haven't locked it. This doesn't change the > behavior, but fixes a corner case explained below. > > Libvirt had an error handling bug that an image can get its

[Qemu-devel] [Bug 1701449] Re: high memory usage when using rbd with client caching

2018-10-01 Thread Andreas Hasenack
Any reason we are keeping this bug and #1674481 separate? We are not sure? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1701449 Title: high memory usage when using rbd with client caching Status

Re: [Qemu-devel] [PATCH v3 2/3] scripts: add render_block_graph function for QEMUMachine

2018-10-01 Thread Max Reitz
On 23.08.18 17:46, Vladimir Sementsov-Ogievskiy wrote: > Render block nodes graph with help of graphviz. This new function is > for debugging, so there is no sense to put it into qemu.py as a method > of QEMUMachine. Let's instead put it separately. > > Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [Qemu-devel] [PATCH v4 22/24] numa: handle virtio-pmem in NUMA stats

2018-10-01 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > Account the memory to node 0 for now. Once (if ever) virtio-pmem > supports NUMA, we can account it to the right node. > > Signed-off-by: David Hildenbrand Reviewed-by: Dr. David Alan Gilbert > --- > numa.c | 24 > 1 fil

Re: [Qemu-devel] [PATCH v4 21/24] hmp: handle virtio-pmem when printing memory device infos

2018-10-01 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > Print the memory device info just like for PCDIMM/NVDIMM. > > Signed-off-by: David Hildenbrand Reviewed-by: Dr. David Alan Gilbert > --- > hmp.c | 27 +++ > 1 file changed, 15 insertions(+), 12 deletions(-) > > diff --gi

Re: [Qemu-devel] ideas for improving TLB performance (help with TCG backend wanted)

2018-10-01 Thread Emilio G. Cota
On Thu, Sep 20, 2018 at 01:19:51 +0100, Alex Bennée wrote: > If we are going to have an indirection then we can also drop the > requirement to scale the TLB according to the number of MMU indexes we > have to support. It's fairly wasteful when a bunch of them are almost > never used unless you are

Re: [Qemu-devel] [PATCH v6 00/25] Fixing record/replay and adding reverse debugging

2018-10-01 Thread Artem Pisarenko
I've posted bug report with extended tests (incl. case without sleep=off). You may find guest image (kernel) in bug description. https://bugs.launchpad.net/qemu/+bug/1795369 The most annoying thing is that some issues are almost not reproducible. There are definitely race conditions somewhere in q

[Qemu-devel] [PULL 00/15] target/xtensa: preparation for FLIX support

2018-10-01 Thread Max Filippov
9-25 16:47:35 +0100) are available in the git repository at: git://github.com/OSLL/qemu-xtensa.git tags/20181001-xtensa for you to fetch changes up to d74624e59a6087ccf233843b936aedc9f8a8050a: target/xtensa: extract gen_check_interrupts call (2018-10-01 11:0

Re: [Qemu-devel] racing between pause_all_vcpus() and qemu_cpu_stop()

2018-10-01 Thread Alex Bennée
Peter Maydell writes: > I've been investigating a race condition where sometimes when my > guest writes to a device register which triggers a > qemu_system_reset_request(), it doesn't actually cause a clean reset, > but instead the guest CPU continues to execute instructions. > I managed to rep

[Qemu-devel] [PULL 15/23] qcow2: Assign the L2 cache relatively to the image size

2018-10-01 Thread Kevin Wolf
From: Leonid Bloch Sufficient L2 cache can noticeably improve the performance when using large images with frequent I/O. Previously, unless 'cache-size' was specified and was large enough, the L2 cache was set to a certain size without taking the virtual image size into account. Now, the L2 cac

[Qemu-devel] [PULL 22/23] test-replication: Lock AioContext around blk_unref()

2018-10-01 Thread Kevin Wolf
Recently, the test case has started failing because some job related functions want to drop the AioContext lock even though it hasn't been taken: (gdb) bt #0 0x7f51c067c9fb in raise () from /lib64/libc.so.6 #1 0x7f51c067e77d in abort () from /lib64/libc.so.6 #2 0x558

[Qemu-devel] [PULL 18/23] qcow2: Set the default cache-clean-interval to 10 minutes

2018-10-01 Thread Kevin Wolf
From: Leonid Bloch The default cache-clean-interval is set to 10 minutes, in order to lower the overhead of the qcow2 caches (before the default was 0, i.e. disabled). * For non-Linux platforms the default is kept at 0, because cache-clean-interval is not supported there yet. Signed-off-by: L

[Qemu-devel] [PULL 21/23] qcow2: Fix cache-clean-interval documentation

2018-10-01 Thread Kevin Wolf
From: Leonid Bloch Fixing cache-clean-interval documentation following the recent change to a default of 600 seconds on supported plarforms (only Linux currently). Signed-off-by: Leonid Bloch Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- qapi/block-core.json | 3 ++- docs/qcow2-cach

[Qemu-devel] [PULL 13/23] qcow2: Make sizes more humanly readable

2018-10-01 Thread Kevin Wolf
From: Leonid Bloch Signed-off-by: Leonid Bloch Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow2.h | 9 + block/qcow2.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/block/qcow2.h b/block/qcow2.h index 81b844e936..a

[Qemu-devel] [PULL 23/23] tests/test-bdrv-drain: Fix too late qemu_event_reset()

2018-10-01 Thread Kevin Wolf
qemu_event_reset() must be called before the AIO request in a different iothread is submitted. Otherwise the request could be completed before we do the qemu_event_reset() and the test would hang in qemu_event_wait(). Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Tested-by: Max Reitz --- te

[Qemu-devel] [PULL 20/23] block-backend: Set werror/rerror defaults in blk_new()

2018-10-01 Thread Kevin Wolf
Currently, the default values for werror and rerror have to be set explicitly with blk_set_on_error() by the callers of blk_new(). The only caller actually doing this is blockdev_init(), which is called for BlockBackends created using -drive. In particular, anonymous BlockBackends created with -de

[Qemu-devel] [PULL 12/23] include: Add a lookup table of sizes

2018-10-01 Thread Kevin Wolf
From: Leonid Bloch Adding a lookup table for the powers of two, with the appropriate size prefixes. This is needed when a size has to be stringified, in which case something like '(1 * KiB)' would become a literal '(1 * (1L << 10))' string. Powers of two are used very often for sizes, so such a t

[Qemu-devel] [PULL 16/23] qcow2: Increase the default upper limit on the L2 cache size

2018-10-01 Thread Kevin Wolf
From: Leonid Bloch The upper limit on the L2 cache size is increased from 1 MB to 32 MB on Linux platforms, and to 8 MB on other platforms (this difference is caused by the ability to set intervals for cache cleaning on Linux platforms only). This is done in order to allow default full coverage

[Qemu-devel] [PULL 14/23] qcow2: Avoid duplication in setting the refcount cache size

2018-10-01 Thread Kevin Wolf
From: Leonid Bloch The refcount cache size does not need to be set to its minimum value in read_cache_sizes(), as it is set to at least its minimum value in qcow2_update_options_prepare(). Signed-off-by: Leonid Bloch Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wol

[Qemu-devel] [PULL 07/23] block: Forbid trying to change unsupported options during reopen

2018-10-01 Thread Kevin Wolf
From: Alberto Garcia The bdrv_reopen_prepare() function checks all options passed to each BlockDriverState (in the reopen_state->options QDict) and makes all necessary preparations to apply the option changes requested by the user. Options are removed from the QDict as they are processed, so at

[Qemu-devel] [PULL 11/23] qcow2: Options' documentation fixes

2018-10-01 Thread Kevin Wolf
From: Leonid Bloch Signed-off-by: Leonid Bloch Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- docs/qcow2-cache.txt | 21 ++--- qemu-options.hx | 9 ++--- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/docs/qcow2-c

[Qemu-devel] [PULL 09/23] block: Allow changing 'discard' on reopen

2018-10-01 Thread Kevin Wolf
From: Alberto Garcia 'discard' is one of the basic BlockdevOptions available for all drivers, but it's not handled by bdrv_reopen_prepare() so any attempt to change it results in an error: (qemu) qemu-io virtio0 "reopen -o discard=on" Cannot change the option 'discard' Since there's no re

[Qemu-devel] [PULL 04/23] block: Remove child references from bs->{options, explicit_options}

2018-10-01 Thread Kevin Wolf
From: Alberto Garcia Block drivers allow opening their children using a reference to an existing BlockDriverState. These references remain stored in the 'options' and 'explicit_options' QDicts, but we don't need to keep them once everything is open. What is more important, these values can becom

[Qemu-devel] [PULL 08/23] file-posix: Forbid trying to change unsupported options during reopen

2018-10-01 Thread Kevin Wolf
From: Alberto Garcia The file-posix code is used for the "file", "host_device" and "host_cdrom" drivers, and it allows reopening images. However the only option that is actually processed is "x-check-cache-dropped", and changes in all other options (e.g. "filename") are silently ignored: (qem

[Qemu-devel] [PULL 19/23] qcow2: Explicit number replaced by a constant

2018-10-01 Thread Kevin Wolf
From: Leonid Bloch Signed-off-by: Leonid Bloch Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 95e1c98daa..7277feda13 100644 --- a/block

[Qemu-devel] [PULL 10/23] block: Allow changing 'detect-zeroes' on reopen

2018-10-01 Thread Kevin Wolf
From: Alberto Garcia 'detect-zeroes' is one of the basic BlockdevOptions available for all drivers, but it's not handled by bdrv_reopen_prepare(), so any attempt to change it results in an error: (qemu) qemu-io virtio0 "reopen -o detect-zeroes=on" Cannot change the option 'detect-zeroes'

[Qemu-devel] [PULL 17/23] qcow2: Resize the cache upon image resizing

2018-10-01 Thread Kevin Wolf
From: Leonid Bloch The caches are now recalculated upon image resizing. This is done because the new default behavior of assigning L2 cache relatively to the image size, implies that the cache will be adapted accordingly after an image resize. Signed-off-by: Leonid Bloch Reviewed-by: Alberto Ga

[Qemu-devel] [PULL 01/23] file-posix: Include filename in locking error message

2018-10-01 Thread Kevin Wolf
From: Fam Zheng Image locking errors happening at device initialization time doesn't say which file cannot be locked, for instance, -device scsi-disk,drive=drive-1: Failed to get shared "write" lock Is another process using the image? could refer to either the overlay image or its backi

[Qemu-devel] [PULL 03/23] file-posix: x-check-cache-dropped should default to false on reopen

2018-10-01 Thread Kevin Wolf
From: Alberto Garcia The default value of x-check-cache-dropped is false. There's no reason to use the previous value as a default in raw_reopen_prepare() because bdrv_reopen_queue_child() already takes care of putting the old options in the BDRVReopenState.options QDict. If x-check-cache-droppe

[Qemu-devel] [PULL 06/23] block: Allow child references on reopen

2018-10-01 Thread Kevin Wolf
From: Alberto Garcia In the previous patches we removed all child references from bs->{options,explicit_options} because keeping them is useless and wrong. Because of this, any attempt to reopen a BlockDriverState using a child reference as one of its options would result in a failure, because b

[Qemu-devel] [PULL 05/23] block: Don't look for child references in append_open_options()

2018-10-01 Thread Kevin Wolf
From: Alberto Garcia In the previous patch we removed child references from bs->options, so there's no need to look for them here anymore. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block.c | 13 + 1 file changed, 1 insertion(+), 12 deletio

[Qemu-devel] [PULL 00/23] Block layer patches

2018-10-01 Thread Kevin Wolf
The following changes since commit 07f426c35eddd79388a23d11cb278600d7e3831d: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180926' into staging (2018-09-28 18:56:09 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch

[Qemu-devel] [PULL 02/23] qemu-io: Fix writethrough check in reopen

2018-10-01 Thread Kevin Wolf
From: Alberto Garcia "qemu-io reopen" doesn't allow changing the writethrough setting of the cache, but the check is wrong, causing an error even on a simple reopen with the default parameters: $ qemu-img create -f qcow2 hd.qcow2 1M $ qemu-system-x86_64 -monitor stdio -drive if=virtio,file

Re: [Qemu-devel] [PULL v3 00/79] Misc patches for 2018-09-30

2018-10-01 Thread Peter Maydell
On 1 October 2018 at 16:29, Paolo Bonzini wrote: > The following changes since commit 042938f46e1c477419d1931381fdadffaa49d45e: > > Merge remote-tracking branch > 'remotes/dgilbert/tags/pull-migration-20180926a' into staging (2018-09-28 > 17:07:23 +0100) > > are available in the Git repository

Re: [Qemu-devel] [PATCH v2 06/15] gdbstub: add multiprocess support to (f|s)ThreadInfo and ThreadExtraInfo

2018-10-01 Thread Philippe Mathieu-Daudé
On 01/10/2018 13:56, Luc Michel wrote: > Change the thread info related packets handling to support multiprocess > extension. > > Add the CPUs class name in the extra info to help differentiate > them in multiprocess mode. > > Signed-off-by: Luc Michel > --- > gdbstub.c | 32

Re: [Qemu-devel] [PATCH v2 03/15] gdbstub: add multiprocess support to 'H' and 'T' packets

2018-10-01 Thread Philippe Mathieu-Daudé
On 01/10/2018 13:56, Luc Michel wrote: > Add a couple of helper functions to cope with GDB threads and processes. > > The gdb_get_process() function looks for a process given a pid. > > The gdb_get_cpu() function returns the CPU corresponding to the (pid, > tid) pair given as parameters. > > The

[Qemu-devel] racing between pause_all_vcpus() and qemu_cpu_stop()

2018-10-01 Thread Peter Maydell
I've been investigating a race condition where sometimes when my guest writes to a device register which triggers a qemu_system_reset_request(), it doesn't actually cause a clean reset, but instead the guest CPU continues to execute instructions. I managed to repro it under 'rr', which let me walk

Re: [Qemu-devel] [PATCH v2 04/15] gdbstub: add multiprocess support to vCont packets

2018-10-01 Thread Philippe Mathieu-Daudé
On 01/10/2018 13:56, Luc Michel wrote: > Add the gdb_first_cpu() and gdb_next_cpu() to iterate over all > the CPUs in currently attached processes. > > Add the gdb_first_cpu_in_process() and gdb_next_cpu_in_process() to > iterate over CPUs of a given process. > > Use them to add multiprocess exte

Re: [Qemu-devel] [PATCH] qcow2: Fix cache-clean-interval documentation

2018-10-01 Thread Kevin Wolf
Am 01.10.2018 um 16:35 hat Eric Blake geschrieben: > On 9/29/18 4:54 AM, Leonid Bloch wrote: > > Fixing cache-clean-interval documentation following the recent change to > > a default of 600 seconds on supported plarforms (only Linux currently). > > > > Signed-off-by: Leonid Bloch > > --- > > d

Re: [Qemu-devel] [PATCH v2 11/15] gdbstub: add support for vAttach packets

2018-10-01 Thread Philippe Mathieu-Daudé
Hi Luc, On 01/10/2018 13:57, Luc Michel wrote: > Add support for the vAttach packets. In multiprocess mode, GDB sends > them to attach to additional processes. > > Signed-off-by: Luc Michel > --- > gdbstub.c | 32 > 1 file changed, 32 insertions(+) > > diff --g

Re: [Qemu-devel] [PATCH v2 10/15] gdbstub: add support for extended mode packet

2018-10-01 Thread Philippe Mathieu-Daudé
Hi Luc, On 01/10/2018 13:56, Luc Michel wrote: > Add support for the '!' extended mode packet. This is required for the > multiprocess extension. > > Signed-off-by: Luc Michel > --- > gdbstub.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/gdbstub.c b/gdbstub.c > index 299783b3b8

Re: [Qemu-devel] [PATCH v2 14/15] gdbstub: add multiprocess extension support

2018-10-01 Thread Philippe Mathieu-Daudé
On 01/10/2018 13:57, Luc Michel wrote: > Add multiprocess extension support by enabling multiprocess mode when > the peer requests it, and by replying that we actually support it in the > qSupported reply packet. > > Signed-off-by: Luc Michel > --- > gdbstub.c | 4 > 1 file changed, 4 inser

Re: [Qemu-devel] [PATCH v2 08/15] gdbstub: add multiprocess support to gdb_vm_state_change()

2018-10-01 Thread Philippe Mathieu-Daudé
On 01/10/2018 13:56, Luc Michel wrote: > Add support for multiprocess extension in gdb_vm_state_change() > function. > > Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé > --- > gdbstub.c | 15 --- > 1 file changed, 12 insertions(+), 3 deletions(-) > > diff --git a/g

Re: [Qemu-devel] [PATCH v2 07/15] gdbstub: add multiprocess support to Xfer:features:read:

2018-10-01 Thread Philippe Mathieu-Daudé
Hi Luc, On 01/10/2018 13:56, Luc Michel wrote: > Change the Xfer:features:read: packet handling to support the > multiprocess extension. This packet is used to request the XML > description of the CPU. In multiprocess mode, different descriptions can > be sent for different processes. > > This fu

Re: [Qemu-devel] [PATCH 4/7] qcow2: async scheme for qcow2_co_preadv

2018-10-01 Thread Vladimir Sementsov-Ogievskiy
01.10.2018 18:49, Max Reitz wrote: On 01.10.18 17:33, Vladimir Sementsov-Ogievskiy wrote: 27.09.2018 21:35, Max Reitz wrote: On 07.08.18 19:43, Vladimir Sementsov-Ogievskiy wrote: Start several async requests instead of read chunk by chunk. Signed-off-by: Vladimir Sementsov-Ogievskiy ---  

Re: [Qemu-devel] [PATCH v2 01/15] gdbstub: introduce GDB processes

2018-10-01 Thread Philippe Mathieu-Daudé
Hi Luc, On 01/10/2018 13:56, Luc Michel wrote: > Add a structure GDBProcess that represent processes from the GDB > semantic point of view. > > CPUs can be split into different processes, by grouping them under a QOM > container named after the GDB_CPU_GROUP_NAME macro (`gdb-group[*]'). > Each oc

Re: [Qemu-devel] [PATCH] test-replication: Lock AioContext around blk_unref()

2018-10-01 Thread Paolo Bonzini
On 01/10/2018 18:03, Kevin Wolf wrote: >> Given the backtrace, I think bdrv_close should be taking the AioContext >> lock instead of blockdev_close_all_bdrv_states. > Conversely, that would mean that calling bdrv_unref() with the > AioContext lock held is a bug (because close callbacks can involve

Re: [Qemu-devel] [PATCH] tests/test-bdrv-drain: Fix too late qemu_event_reset()

2018-10-01 Thread Max Reitz
On 01.10.18 17:10, Kevin Wolf wrote: > qemu_event_reset() must be called before the AIO request in a different > iothread is submitted. Otherwise the request could be completed before > we do the qemu_event_reset() and the test would hang in > qemu_event_wait(). > > Signed-off-by: Kevin Wolf > --

Re: [Qemu-devel] [Qemu-block] [PULL 00/42] Block patches

2018-10-01 Thread Kevin Wolf
Am 01.10.2018 um 16:14 hat Kevin Wolf geschrieben: > Am 01.10.2018 um 15:03 hat Peter Maydell geschrieben: > > On 28 September 2018 at 15:36, Peter Maydell > > wrote: > > > I'm finding that test-bdrv-drain hangs intermittently on my OSX host. > > > > Ping? Between this and test-replication I'm f

Re: [Qemu-devel] [PATCH] test-replication: Lock AioContext around blk_unref()

2018-10-01 Thread Kevin Wolf
Am 01.10.2018 um 17:40 hat Paolo Bonzini geschrieben: > On 01/10/2018 16:32, Kevin Wolf wrote: > > Recently, the test case has started failing because some job related > > functions want to drop the AioContext lock even though it hasn't been > > taken: > > > > (gdb) bt > > #0 0x7f51c0

Re: [Qemu-devel] [PATCH 3/7] qcow2: split out reading normal clusters from qcow2_co_preadv

2018-10-01 Thread Vladimir Sementsov-Ogievskiy
01.10.2018 18:39, Max Reitz wrote: On 01.10.18 17:14, Vladimir Sementsov-Ogievskiy wrote: 27.09.2018 20:35, Max Reitz wrote: On 07.08.18 19:43, Vladimir Sementsov-Ogievskiy wrote: Memory allocation may become less efficient for encrypted case. It's a payment for further asynchronous scheme. S

Re: [Qemu-devel] [PATCH 1/7] qcow2: move qemu_co_mutex_lock below decryption procedure

2018-10-01 Thread Vladimir Sementsov-Ogievskiy
27.09.2018 20:02, Max Reitz wrote: On 27.09.18 18:58, Max Reitz wrote: On 07.08.18 19:43, Vladimir Sementsov-Ogievskiy wrote: From: "Denis V. Lunev" We are not working with a shared state data in the decruption code and (*decryption) thus this operation is safe. On the other hand this sign

Re: [Qemu-devel] [PATCH] scripts/device-crash-test: Remove entries for serial devices

2018-10-01 Thread Eduardo Habkost
On Mon, Oct 01, 2018 at 04:13:10PM +0200, Thomas Huth wrote: > The problem with the various serial devices has been fixed a while > ago in commit 47c4f85a0c27888e12af827471cfef87deb49821 ("hw/char/serial: > Allow disconnected chardevs") already, so we can remove these entries > from the "ignore" li

Re: [Qemu-devel] [PATCH 4/7] qcow2: async scheme for qcow2_co_preadv

2018-10-01 Thread Max Reitz
On 01.10.18 17:33, Vladimir Sementsov-Ogievskiy wrote: > 27.09.2018 21:35, Max Reitz wrote: >> On 07.08.18 19:43, Vladimir Sementsov-Ogievskiy wrote: >>> Start several async requests instead of read chunk by chunk. >>> >>> Signed-off-by: Vladimir Sementsov-Ogievskiy >>> --- >>>   block/qcow2.c | 2

Re: [Qemu-devel] [PATCH 5/7] qcow2: refactor qcow2_co_pwritev: split out qcow2_co_do_pwritev

2018-10-01 Thread Max Reitz
On 01.10.18 17:43, Vladimir Sementsov-Ogievskiy wrote: > 28.09.2018 17:23, Max Reitz wrote: >> On 07.08.18 19:43, Vladimir Sementsov-Ogievskiy wrote: >>> Split out block which will be reused in async scheme. >>> >>> Signed-off-by: Vladimir Sementsov-Ogievskiy >>> --- >>>   block/qcow2.c | 138 >>>

Re: [Qemu-devel] [PATCH 7/7] qcow2: async scheme for qcow2_co_pwritev

2018-10-01 Thread Vladimir Sementsov-Ogievskiy
28.09.2018 17:35, Max Reitz wrote: On 07.08.18 19:43, Vladimir Sementsov-Ogievskiy wrote: Start several async requests instead of read chunk by chunk. Iotest 026 output is changed, as because of async io error path has changed. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c

Re: [Qemu-devel] [PATCH 5/7] qcow2: refactor qcow2_co_pwritev: split out qcow2_co_do_pwritev

2018-10-01 Thread Vladimir Sementsov-Ogievskiy
28.09.2018 17:23, Max Reitz wrote: On 07.08.18 19:43, Vladimir Sementsov-Ogievskiy wrote: Split out block which will be reused in async scheme. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 138 -- 1 file changed, 86

Re: [Qemu-devel] [PATCH] test-replication: Lock AioContext around blk_unref()

2018-10-01 Thread Paolo Bonzini
On 01/10/2018 16:32, Kevin Wolf wrote: > Recently, the test case has started failing because some job related > functions want to drop the AioContext lock even though it hasn't been > taken: > > (gdb) bt > #0 0x7f51c067c9fb in raise () from /lib64/libc.so.6 > #1 0x7f51c067e77

Re: [Qemu-devel] [PATCH 3/7] qcow2: split out reading normal clusters from qcow2_co_preadv

2018-10-01 Thread Max Reitz
On 01.10.18 17:14, Vladimir Sementsov-Ogievskiy wrote: > 27.09.2018 20:35, Max Reitz wrote: >> On 07.08.18 19:43, Vladimir Sementsov-Ogievskiy wrote: >>> Memory allocation may become less efficient for encrypted case. It's a >>> payment for further asynchronous scheme. >>> >>> Signed-off-by: Vladim

Re: [Qemu-devel] [PULL 0/3] Ui 20181001 patches

2018-10-01 Thread Peter Maydell
git repository at: > > git://git.kraxel.org/qemu tags/ui-20181001-pull-request > > for you to fetch changes up to e8b1386ea1719525a1a92df03377764703fe8c64: > > gtk: add zoom-to-fit to gtk options. (2018-10-01 11:29:03 +0200) > > ---

Re: [Qemu-devel] [Qemu-ppc] [PATCH] PPC: e500: convert SysBus init method to a realize method

2018-10-01 Thread Greg Kurz
On Mon, 1 Oct 2018 17:04:13 +0200 Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater > --- Reviewed-by: Greg Kurz > hw/pci-host/ppce500.c | 14 ++ > 1 file changed, 6 insertions(+), 8 deletions(-) > > diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c > index eb7

Re: [Qemu-devel] [PATCH 4/7] qcow2: async scheme for qcow2_co_preadv

2018-10-01 Thread Vladimir Sementsov-Ogievskiy
27.09.2018 21:35, Max Reitz wrote: On 07.08.18 19:43, Vladimir Sementsov-Ogievskiy wrote: Start several async requests instead of read chunk by chunk. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 208 -- 1 file chang

  1   2   3   >