Re: [Qemu-devel] [PATCH] vhost-user: avoid misaligned access

2018-03-20 Thread Igor Mammedov
On Tue, 20 Mar 2018 04:36:48 +0200 "Michael S. Tsirkin" wrote: > On Tue, Mar 20, 2018 at 02:01:07AM +, Zhoujian (jay) wrote: > > > > > > > -Original Message- > > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > > Sent: Saturday, March 17, 2018 2:20 AM > > > To: qemu-devel@n

Re: [Qemu-devel] [PATCH] hax: Properly handle IA32_APIC_BASE MSR

2018-03-20 Thread Igor Mammedov
On Tue, 20 Mar 2018 13:29:24 +0800 "Qin, Chao" wrote: > On 3/20/2018 12:05 AM, Igor Mammedov wrote: > > On Mon, 19 Mar 2018 17:04:49 +0800 chao@linux.intel.com wrote: > >> > > From: Qin Chao / something horribly wrong with mail client used for reply / >> @@ > -933,6 +944,9 @@ static int

[Qemu-devel] [PATCH v2 0/2] two fixes for KVM GICv3 dist get/put functions

2018-03-20 Thread Shannon Zhao
Changes in V2: * patch 1 use the existing variable * patch 2 add more comments to explain the problem Shannon Zhao (2): arm_gicv3_kvm: increase clroffset accordingly arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR hw/intc/arm_gicv3_kvm.c | 39 ++

[Qemu-devel] [PATCH v2 1/2] arm_gicv3_kvm: increase clroffset accordingly

2018-03-20 Thread Shannon Zhao
It forgot to increase clroffset during the loop. So it only clear the first 4 bytes. Signed-off-by: Shannon Zhao --- hw/intc/arm_gicv3_kvm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3_kvm.c index ec37177..3536795 100644 --- a/hw/intc/arm_gicv3

[Qemu-devel] [PATCH v2 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-03-20 Thread Shannon Zhao
While we skip the GIC_INTERNAL irqs, we don't change the register offset accordingly. This will overlap the GICR registers value and leave the last GIC_INTERNAL irq's registers out of update. Fix this by skipping the registers banked by GICR. Signed-off-by: Shannon Zhao --- hw/intc/arm_gicv3_kv

Re: [Qemu-devel] [PATCH] hax: Properly handle IA32_APIC_BASE MSR

2018-03-20 Thread Qin, Chao
On 3/20/2018 3:12 PM, Igor Mammedov wrote: On Tue, 20 Mar 2018 13:29:24 +0800 "Qin, Chao" > wrote: > >> On 3/20/2018 12:05 AM, Igor Mammedov wrote: >>> On Mon, 19 Mar 2018 17:04:49 +0800 chao@linux.intel.com >>> wrote: > >> From: Qin Chao > / something horribly wrong with mail client u

Re: [Qemu-devel] [PATCH v2 1/2] arm_gicv3_kvm: increase clroffset accordingly

2018-03-20 Thread Auger Eric
Hi Shannon, On 20/03/18 08:26, Shannon Zhao wrote: > It forgot to increase clroffset during the loop. So it only clear the > first 4 bytes. Fixes 367b9f527becdd20ddf116e17a3c0c2bbc486920 ("hw/intc/arm_gicv3_kvm: Implement get/put functions") > > Signed-off-by: Shannon Zhao Reviewed-by: Eric Au

Re: [Qemu-devel] [PATCH] target/ppc: Fix backwards migration of msr_mask

2018-03-20 Thread Laurent Vivier
On 20/03/2018 03:23, David Gibson wrote: > 21b786f "PowerPC: Add TS bits into msr_mask" added the transaction states > to msr_mask for recent POWER CPUs to allow correct migration of machines > that are in certain interim transactional memory states. > > This was correct, but unfortunately breaks

[Qemu-devel] [Bug 1756807] Re: performance regression in qemu-user + proot

2018-03-20 Thread ChristianEhrhardt
*** This bug is a duplicate of bug 1740219 *** https://bugs.launchpad.net/bugs/1740219 Then lets join there and let your update give that thread some new life. ** This bug has been marked a duplicate of bug 1740219 static linux-user ARM emulation has several-second startup time -- You re

Re: [Qemu-devel] [PATCH v2 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-03-20 Thread Auger Eric
Hi Shannon, On 20/03/18 08:26, Shannon Zhao wrote: > While we skip the GIC_INTERNAL irqs, we don't change the register offset > accordingly. This will overlap the GICR registers value and leave the > last GIC_INTERNAL irq's registers out of update. > > Fix this by skipping the registers banked by

[Qemu-devel] [Bug 1740219] Re: static linux-user ARM emulation has several-second startup time

2018-03-20 Thread ChristianEhrhardt
>From Alistair Buxton (a-j-buxton) on bug 1756807: I just tested the patch from https://bugs.launchpad.net/qemu/+bug/1740219 and it fixes the problem for me. Specifically I only tried the final patch of the series. I duped the bugs onto this one since it is older and has a suggested patch on the

[Qemu-devel] [Bug 1740219] Re: static linux-user ARM emulation has several-second startup time

2018-03-20 Thread ChristianEhrhardt
Added an qemu(Ubuntu) task to further track this, keeping it incomplete there until this is resolved upstream. ** Changed in: qemu (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs

Re: [Qemu-devel] [PATCH] gdbstub: send a terminaison packet instead of crashing gdb

2018-03-20 Thread KONRAD Frederic
oops sorry for that, I'll resend. Thanks, Fred On 03/19/2018 06:43 PM, Eric Blake wrote: On 03/16/2018 11:23 AM, KONRAD Frederic wrote: In the subject: s/terminaison/termination/ Since the commit: commit 4486e89c219c0d1b9bd8dfa0b1dd5b0d51ff2268 Author: Stefan Hajnoczi Date:   Wed Mar 7 14:4

[Qemu-devel] [PULL 2/2] target/m68k: add a mechanism to automatically free TCGv

2018-03-20 Thread Laurent Vivier
SRC_EA() and gen_extend() can return either a temporary TCGv or a memory allocated one. Mark them when they are allocated, and free them automatically at end of the instruction translation. We want to free locally allocated TCGv to avoid overflow in sequence like: 0xc00ae406: movel %fp@(-132),

[Qemu-devel] [PULL 0/2] M68k for 2.12 patches

2018-03-20 Thread Laurent Vivier
The following changes since commit 55901900ec69d6fd6f332003d8ab81b2f8a38529: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-2.12-pull-request' into staging (2018-03-15 17:58:28 +) are available in the Git repository at: git://github.com/vivier/qemu-m68k.git tags/m68k

[Qemu-devel] [PULL 1/2] target/m68k: add DisasContext parameter to gen_extend()

2018-03-20 Thread Laurent Vivier
This parameter will be needed to manage automatic release of temporary allocated TCG variables. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20180319113544.704-2-laur...@vivier.eu> --- target/m68k/translate.c | 46 +++

Re: [Qemu-devel] qemu:handle_cpu_signal received signal outside vCPU context

2018-03-20 Thread Andreas Schwab
On Mär 19 2018, Michael Clark wrote: > I wonder what is the best way for me to reproduce on my side... a tarball > with binaries that I can use to trigger the fault? The easiest way, if you have an OBS account, is to check out the package at

[Qemu-devel] [Bug 1754542] Re: colo: vm crash with segmentation fault

2018-03-20 Thread 李穗恒
It is my trace event file. I read it many times, but still can't find the cause of the error. I just found after colo_vm_state_change ide_reset and ps2_kbd_reset ... ** Attachment added: "trace-pvm.log" https://bugs.launchpad.net/qemu/+bug/1754542/+attachment/5084770/+files/trace-pvm.log --

[Qemu-devel] [Bug 1754542] Re: colo: vm crash with segmentation fault

2018-03-20 Thread 李穗恒
It is svn trace even ** Attachment added: "trace-svm.log" https://bugs.launchpad.net/qemu/+bug/1754542/+attachment/5084771/+files/trace-svm.log -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/17545

Re: [Qemu-devel] [PATCH for-2.12] qapi: Force UTF8 encoding when parsing qapi files

2018-03-20 Thread Daniel P . Berrangé
On Mon, Mar 19, 2018 at 03:50:40PM -0500, Eric Blake wrote: > Commit d4e5ec877 already fixed things to work around Python 3's > lame bug of having LC_ALL=C not be 8-bit clean, when parsing the > main QMP qapi files; but failed to do likewise in the tests > directory. As a result, running 'LC_ALL=C

[Qemu-devel] [PATCH v2 for-2.12] gdbstub: send a termination packet instead of crashing gdb

2018-03-20 Thread KONRAD Frederic
Since the commit: commit 4486e89c219c0d1b9bd8dfa0b1dd5b0d51ff2268 Author: Stefan Hajnoczi Date: Wed Mar 7 14:42:05 2018 + vl: introduce vm_shutdown() GDB crashes when qemu exits (at least on sparc-softmmu): Remote communication error. Target disconnected.: Connection reset by peer. Qu

Re: [Qemu-devel] [PATCH] target/ppc: Fix backwards migration of msr_mask

2018-03-20 Thread Greg Kurz
On Tue, 20 Mar 2018 13:23:19 +1100 David Gibson wrote: > 21b786f "PowerPC: Add TS bits into msr_mask" added the transaction states > to msr_mask for recent POWER CPUs to allow correct migration of machines > that are in certain interim transactional memory states. > > This was correct, but unfor

Re: [Qemu-devel] [PULL 00/13] target-arm queue

2018-03-20 Thread Peter Maydell
On 19 March 2018 at 18:34, Peter Maydell wrote: > Arm patch queue -- these are all bug fix patches but we might > as well put them in to rc0... > > thanks > -- PMM > > The following changes since commit 2c8cfc0b52b5a4d123c26c0b5fdf941be24805be: > > Merge remote-tracking branch 'remotes/kevin/tag

Re: [Qemu-devel] [Qemu-block] [PATCH v1 1/1] iotests: fix test case 185

2018-03-20 Thread Kevin Wolf
Am 19.03.2018 um 18:53 hat Christian Borntraeger geschrieben: > > > On 03/19/2018 05:10 PM, Stefan Hajnoczi wrote: > > On Mon, Mar 19, 2018 at 9:35 AM, QingFeng Hao > > wrote: > >> Test case 185 failed since commit 4486e89c219 --- "vl: introduce > >> vm_shutdown()". > >> It's because of the ne

Re: [Qemu-devel] [PATCH] target/ppc: Initialize lazy_tlb_flush correctly

2018-03-20 Thread Thomas Huth
On 20.03.2018 03:03, David Gibson wrote: > ppc_tr_init_disas_context() correctly sets lazy_tlb_flush to true on > certain CPU models. However, it leaves it uninitialized, instead of > setting it to false on all others. > > It wasn't caught before now because we didn't have examples in the tests >

Re: [Qemu-devel] [PATCH v2] virtio_net: flush uncompleted TX on reset

2018-03-20 Thread Greg Kurz
On Tue, 20 Mar 2018 11:27:26 +0800 Jason Wang wrote: > >>   -static > >>   void qemu_flush_or_purge_queued_packets(NetClientState *nc, bool > >> purge) > >>   { > >>   nc->receive_disabled = 0; > >> > >> > > > > Applied and queued for -stable. > > > > Thanks > > > > Unfortunately, this

Re: [Qemu-devel] [PATCH for-2.12] hw/misc/macio: Fix crash when listing device properties of macio device

2018-03-20 Thread Thomas Huth
On 20.03.2018 06:05, Mark Cave-Ayland wrote: > On 19/03/18 14:00, Thomas Huth wrote: > >> The macio-newworld device can currently be used to abort QEMU >> unexpectedly: >> >> $ ppc-softmmu/qemu-system-ppc -S -M ref405ep,accel=qtest -qmp stdio >> {"QMP": {"version": {"qemu": {"micro": 50, "minor":

Re: [Qemu-devel] [PATCH] target/ppc: Initialize lazy_tlb_flush correctly

2018-03-20 Thread Greg Kurz
On Tue, 20 Mar 2018 13:03:45 +1100 David Gibson wrote: > ppc_tr_init_disas_context() correctly sets lazy_tlb_flush to true on > certain CPU models. However, it leaves it uninitialized, instead of > setting it to false on all others. > > It wasn't caught before now because we didn't have example

Re: [Qemu-devel] [PATCH for-2.12] rdma: Fix 32-bit compilation

2018-03-20 Thread Marcel Apfelbaum
Hi Eric, On 19/03/2018 23:53, Eric Blake wrote: > Use the correct printf formats, so that a 32-bit compile doesn't > spit out lots of warnings about %lx being incompatible with uint64_t. > Broken since initial commit ef6d4ccd. > > Signed-off-by: Eric Blake > --- > > I don't know if 'make vm-bui

Re: [Qemu-devel] [PATCH for-2.12] rdma: Fix 32-bit compilation

2018-03-20 Thread Marcel Apfelbaum
On 20/03/2018 0:08, Eric Blake wrote: > On 03/19/2018 04:53 PM, Eric Blake wrote: >> Use the correct printf formats, so that a 32-bit compile doesn't >> spit out lots of warnings about %lx being incompatible with uint64_t. >> Broken since initial commit ef6d4ccd. >> >> Signed-off-by: Eric Blake >>

Re: [Qemu-devel] [PATCH for-2.12] rdma: Fix 32-bit compilation

2018-03-20 Thread Yuval Shaia
On Mon, Mar 19, 2018 at 04:53:35PM -0500, Eric Blake wrote: > Use the correct printf formats, so that a 32-bit compile doesn't > spit out lots of warnings about %lx being incompatible with uint64_t. > Broken since initial commit ef6d4ccd. > > Signed-off-by: Eric Blake > --- > > I don't know if '

[Qemu-devel] [PATCH v3] virtio_net: flush uncompleted TX on reset

2018-03-20 Thread Greg Kurz
If the backend could not transmit a packet right away for some reason, the packet is queued for asynchronous sending. The corresponding vq element is tracked in the async_tx.elem field of the VirtIONetQueue, for later freeing when the transmission is complete. If a reset happens before completion,

Re: [Qemu-devel] [PATCH v2 0/5] block: Ensure non-protocol drivers can only be selected explicitly

2018-03-20 Thread Kevin Wolf
Am 12.03.2018 um 23:07 hat Fabiano Rosas geschrieben: > Block drivers can be selected by either protocol syntax: > > :[:options] > > or explicitly: > > driver=[,option=...] > > For the protocol syntax to work, drivers should set the protocol_name > field of the BlockDriver structure and pro

Re: [Qemu-devel] [PATCH] HMP: Initialize err before using

2018-03-20 Thread Dr. David Alan Gilbert
* Zhangjixiang (jixiang_zh...@h3c.com) wrote: > When bdrv_snapshot_delete return fail, the errp will not be > assigned a valid value in error_propagate as errp didn't be > initialized in hmp_delvm, then error_reportf_err will use an > uninitialized value(call by hmp_delvm), and qemu crash. > > Sig

Re: [Qemu-devel] [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of DISAS_EXIT

2018-03-20 Thread Peter Maydell
On 20 March 2018 at 06:12, Victor Kamensky wrote: > In OE project 4.15 linux kernel boot hang was observed under > single cpu aarch64 qemu. Kernel code was in a loop waiting for > vtimer arrival, spinning in TC generated blocks, while interrupt > was pending unprocessed. This happened because when

Re: [Qemu-devel] [PATCH v2 1/3] nvram: at24c: prevent segfault by checking "rom-size"

2018-03-20 Thread Wolfram Sang
> > +if (!ee->rsize) { > > +ERR("rom-size not allowed to be 0\n"); > > You can directly use error_report() in this patch. My reasoning was that this patch is suitable for stable while the error_report() stuff is not. I neither wanted to mix those two here nor did I want to make the s

Re: [Qemu-devel] [PATCH for-2.12] hmp: free sev info

2018-03-20 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > On 03/19/2018 12:58 PM, Marc-André Lureau wrote: > > Found thanks to ASAN: > > > > Direct leak of 16 byte(s) in 1 object(s) allocated from: > > #0 0x7efe20417a38 in __interceptor_calloc (/lib64/libasan.so.4+0xdea38) > > #1 0x7efe1f7b2f75 in g_mal

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-03-20 Thread Peter Maydell
On 20 March 2018 at 07:26, Shannon Zhao wrote: > While we skip the GIC_INTERNAL irqs, we don't change the register offset > accordingly. This will overlap the GICR registers value and leave the > last GIC_INTERNAL irq's registers out of update. > > Fix this by skipping the registers banked by GICR

[Qemu-devel] [PATCH] nvdimm: ensure that dsm memory is read in nvdimm_dsm_write

2018-03-20 Thread Artemis Tosini
This patch ensures that the client OS does not cause the host to read invalid memory from the NVDIMM DSM. It is not tested, since the Linux NVDIMM driver will not cause an invalid memory read. This patch is for my outreachy assignment, and is my first open source patch. >From bcb717b761ac62aded

Re: [Qemu-devel] [PULL v4 00/38] QAPI patches for 2018-03-12, 2.12 softfreeze

2018-03-20 Thread Peter Maydell
On 19 March 2018 at 20:23, Eric Blake wrote: > The following changes since commit 2c8cfc0b52b5a4d123c26c0b5fdf941be24805be: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2018-03-19 11:44:26 +) > > are available in the Git repository at: > > git://repo.

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-03-20 Thread Shannon Zhao
On 2018/3/20 19:22, Peter Maydell wrote: > On 20 March 2018 at 07:26, Shannon Zhao wrote: >> While we skip the GIC_INTERNAL irqs, we don't change the register offset >> accordingly. This will overlap the GICR registers value and leave the >> last GIC_INTERNAL irq's registers out of update. >> >>

Re: [Qemu-devel] [PATCH v4 26/26] RISC-V: Fix riscv_isa_string memory size bug

2018-03-20 Thread Peter Maydell
On 19 March 2018 at 21:18, Michael Clark wrote: > This version uses a constant size memory buffer sized for > the maximum possible ISA string length. It also uses g_new > instead of g_new0, uses more efficient logic to append > extensions and adds manual zero termination of the string. > > Cc: Pal

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-03-20 Thread Peter Maydell
On 20 March 2018 at 11:36, Shannon Zhao wrote: > > > On 2018/3/20 19:22, Peter Maydell wrote: >> On 20 March 2018 at 07:26, Shannon Zhao wrote: >>> While we skip the GIC_INTERNAL irqs, we don't change the register offset >>> accordingly. This will overlap the GICR registers value and leave the >>

Re: [Qemu-devel] [PATCH] vhost-user: avoid misaligned access

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 08:05:38AM +0100, Igor Mammedov wrote: > On Tue, 20 Mar 2018 04:36:48 +0200 > "Michael S. Tsirkin" wrote: > > > On Tue, Mar 20, 2018 at 02:01:07AM +, Zhoujian (jay) wrote: > > > > > > > > > > -Original Message- > > > > From: Michael S. Tsirkin [mailto:m...@

Re: [Qemu-devel] [PATCH v2 1/2] i386/kvm: add support for Hyper-V reenlightenment MSRs

2018-03-20 Thread Paolo Bonzini
On 19/03/2018 18:06, Roman Kagan wrote: >> +if (has_msr_hv_reenlightenment) { >> +env->features[FEAT_HYPERV_EAX] |= >> +HV_ACCESS_REENLIGHTENMENTS_CONTROL; >> +} > Can you please add a matching comment to the definition of > feature_word_info[FEAT_HYPERV_

Re: [Qemu-devel] [PATCH] target/ppc: Fix backwards migration of msr_mask

2018-03-20 Thread Lukáš Doktor
Dne 20.3.2018 v 03:23 David Gibson napsal(a): > 21b786f "PowerPC: Add TS bits into msr_mask" added the transaction states > to msr_mask for recent POWER CPUs to allow correct migration of machines > that are in certain interim transactional memory states. > > This was correct, but unfortunately br

Re: [Qemu-devel] [PATCH v9] vhost: used_memslots refactoring

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 03:39:17AM +, Zhoujian (jay) wrote: > > > > -Original Message- > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > Sent: Tuesday, March 20, 2018 10:51 AM > > To: Zhoujian (jay) > > Cc: qemu-devel@nongnu.org; imamm...@redhat.com; Huangweidong (C) > > ; wa

[Qemu-devel] [PATCH v10 01/14] hw/arm/smmu-common: smmu base device and datatypes

2018-03-20 Thread Eric Auger
The patch introduces the smmu base device and class for the ARM smmu. Devices for specific versions will be derived from this base device. We also introduce some important datatypes. Signed-off-by: Eric Auger Signed-off-by: Prem Mallappa Reviewed-by: Peter Maydell --- v9 -> v10: - invoke the

[Qemu-devel] [PATCH v10 00/14] ARM SMMUv3 Emulation Support

2018-03-20 Thread Eric Auger
This series implements the emulation code for ARM SMMUv3. SMMUv3 gets instantiated by adding ",iommu=smmuv3" to the virt machine option. VHOST integration will be handled in a separate series. VFIO integration is not targeted at the moment. Only stage 1 and AArch64 PTW are supported. Main change

[Qemu-devel] [PATCH v10 03/14] hw/arm/smmu-common: VMSAv8-64 page table walk

2018-03-20 Thread Eric Auger
This patch implements the page table walk for VMSAv8-64. Signed-off-by: Eric Auger Signed-off-by: Prem Mallappa --- v9 -> v10: - Add 64b single-copy atomicity comment related to PTE fetch - remove checks in get_block_pte_address and use formulae to compute block address offset - remove check_

[Qemu-devel] [PATCH v10 02/14] hw/arm/smmu-common: IOMMU memory region and address space setup

2018-03-20 Thread Eric Auger
We set up the infrastructure to enumerate all the PCI devices attached to the SMMU and create an associated IOMMU memory region and address space. Those info are stored in SMMUDevice objects. The devices are grouped according to the PCIBus they belong to. A hash table indexed by the PCIBus pointer

[Qemu-devel] [PATCH v10 10/14] hw/arm/smmuv3: Abort on vfio or vhost case

2018-03-20 Thread Eric Auger
At the moment, the SMMUv3 does not support notification on TLB invalidation. So let's log an error as soon as such notifier gets enabled. Signed-off-by: Eric Auger --- hw/arm/smmuv3.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index 4f5186d

[Qemu-devel] [PATCH v10 06/14] hw/arm/smmuv3: Queue helpers

2018-03-20 Thread Eric Auger
We introduce helpers to read/write into the command and event circular queues. smmuv3_write_eventq and smmuv3_cmq_consume will become static in subsequent patches. Invalidation commands are not yet dealt with. We do not cache data that need to be invalidated. This will change with vhost integrati

[Qemu-devel] [PATCH v10 04/14] hw/arm/smmuv3: Skeleton

2018-03-20 Thread Eric Auger
From: Prem Mallappa This patch implements a skeleton for the smmuv3 device. Datatypes and register definitions are introduced. The MMIO region, the interrupts and the queue are initialized. Only the MMIO read operation is implemented here. Signed-off-by: Prem Mallappa Signed-off-by: Eric Auger

[Qemu-devel] [PULL 2/2] hmp: free sev info

2018-03-20 Thread Dr. David Alan Gilbert (git)
From: Marc-André Lureau Found thanks to ASAN: Direct leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7efe20417a38 in __interceptor_calloc (/lib64/libasan.so.4+0xdea38) #1 0x7efe1f7b2f75 in g_malloc0 ../glib/gmem.c:124 #2 0x7efe1f7b3249 in g_malloc0_n ../glib/gmem.c:355 #3

[Qemu-devel] [PATCH v10 13/14] hw/arm/virt-acpi-build: Add smmuv3 node in IORT table

2018-03-20 Thread Eric Auger
From: Prem Mallappa This patch builds the smmuv3 node in the ACPI IORT table. The RID space of the root complex, which spans 0x0-0x1 maps to streamid space 0x0-0x1 in smmuv3, which in turn maps to deviceid space 0x0-0x1 in the ITS group. The guest must feature the IOMMU probe deferr

[Qemu-devel] [PATCH v10 07/14] hw/arm/smmuv3: Implement MMIO write operations

2018-03-20 Thread Eric Auger
Now we have relevant helpers for queue and irq management, let's implement MMIO write operations. Signed-off-by: Eric Auger Signed-off-by: Prem Mallappa --- v9 -> v10: - s/hwaddr/uint64_t in trace-events - added SMMU_FEATURE_2LVL_STE in this patch - removed smmu_write64 and created writel/write

[Qemu-devel] [PATCH v10 05/14] hw/arm/smmuv3: Wired IRQ and GERROR helpers

2018-03-20 Thread Eric Auger
We introduce some helpers to handle wired IRQs and especially GERROR interrupt. SMMU writes GERROR register on GERROR event and SW acks GERROR interrupts by setting GERRORn. The Wired interrupts are edge sensitive hence the pulse usage. Signed-off-by: Eric Auger Signed-off-by: Prem Mallappa --

[Qemu-devel] [PULL 1/2] HMP: Initialize err before using

2018-03-20 Thread Dr. David Alan Gilbert (git)
From: zhangjixiang When bdrv_snapshot_delete return fail, the errp will not be assigned a valid value in error_propagate as errp didn't be initialized in hmp_delvm, then error_reportf_err will use an uninitialized value(call by hmp_delvm), and qemu crash. Signed-off-by: zhangjixiang Reviewed-by

[Qemu-devel] [PATCH v10 14/14] hw/arm/virt: Introduce the iommu option

2018-03-20 Thread Eric Auger
ARM virt machine now exposes a new "iommu" option. The SMMUv3 IOMMU is instantiated using -machine virt,iommu=smmuv3. Signed-off-by: Eric Auger Signed-off-by: Prem Mallappa --- v9 -> v10: - remove no_iommu v7 -> v8: - Revert to machine option, now dubbed "iommu", preparing for virtio instant

[Qemu-devel] [PATCH v10 08/14] hw/arm/smmuv3: Event queue recording helper

2018-03-20 Thread Eric Auger
Let's introduce a helper function aiming at recording an event in the event queue. Signed-off-by: Eric Auger --- v9 -> v10: - rework SMMU_EVENT_STRING - trigger a GERROR EVENTQ_ABT_ERR in case of eventq write failure v8 -> v9: - add SMMU_EVENT_STRING v7 -> v8: - use dma_addr_t instead of hwadd

[Qemu-devel] [PATCH v10 11/14] target/arm/kvm: Translate the MSI doorbell in kvm_arch_fixup_msi_route

2018-03-20 Thread Eric Auger
In case the MSI is translated by an IOMMU we need to fixup the MSI route with the translated address. Signed-off-by: Eric Auger --- v9 -> v10: - use address_space_translate v5 -> v6: - use IOMMUMemoryRegionClass API --- target/arm/kvm.c| 27 +++ target/arm/trace

[Qemu-devel] [PULL 0/2] hmp queue

2018-03-20 Thread Dr. David Alan Gilbert (git)
t://github.com/dagrh/qemu.git tags/pull-hmp-20180320 for you to fetch changes up to 95372184b7acdfd82ee748b6f0c6df1d839982ba: hmp: free sev info (2018-03-20 12:32:06 +) ---

[Qemu-devel] [PATCH v10 09/14] hw/arm/smmuv3: Implement translate callback

2018-03-20 Thread Eric Auger
This patch implements the IOMMU Memory Region translate() callback. Most of the code relates to the translation configuration decoding and check (STE, CD). Signed-off-by: Eric Auger Signed-off-by: Prem Mallappa --- v9 -> v10: - s/hwaddr/uint64_t in trace-events - use qemu_log_mask(LOG_UNIMP, in

[Qemu-devel] [PATCH v10 12/14] hw/arm/virt: Add SMMUv3 to the virt board

2018-03-20 Thread Eric Auger
From: Prem Mallappa Add code to instantiate an smmuv3 in virt machine. A new iommu integer member is introduced in VirtMachineState to store the type of the iommu in use. Signed-off-by: Prem Mallappa Signed-off-by: Eric Auger Reviewed-by: Peter Maydell --- v9 -> v10: - add VirtIOMMUType - ad

[Qemu-devel] [PATCH 1/1] s390x/cpumodel: fix feature groups and breakage of MSA8

2018-03-20 Thread Christian Borntraeger
Since commit 46a99c9f73c7 ("s390x/cpumodel: model PTFF subfunctions for Multiple-epoch facility") -cpu help no longer shows the MSA8 feature group. Turns out that we forgot to add the new MEPOCH_PTFF group enum. Fixes: 46a99c9f73c7 ("s390x/cpumodel: model PTFF subfunctions for Multiple-epoch faci

Re: [Qemu-devel] [PATCH 4/5] migration/block: limit the number of parallel I/O requests

2018-03-20 Thread Peter Lieven
Am 08.03.2018 um 14:30 schrieb Peter Lieven: Am 08.03.2018 um 13:50 schrieb Juan Quintela: Peter Lieven wrote: the current implementation submits up to 512 I/O requests in parallel which is much to high especially for a background task. This patch adds a maximum limit of 16 I/O requests that c

Re: [Qemu-devel] [PATCH 1/1] s390x/cpumodel: fix feature groups and breakage of MSA8

2018-03-20 Thread Christian Borntraeger
David, Jason, Michael, the cpumodel code is somewhat fragile as we have to add maintain things in multiple places. I would like to have more robust code, e.g. by either generating more or by having build bug_ons or something like that. Any idea is highly welcome. Christian On 03/20/2018 02:07

Re: [Qemu-devel] [PATCH] nvdimm: ensure that dsm memory is read in nvdimm_dsm_write

2018-03-20 Thread no-reply
Hi, This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 1521545718.1125216.1309456936.3f023...@webmail.messagingengine.com Subject: [Qemu-devel] [

Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 09:58:23AM +0100, Laurent Vivier wrote: > Le 20/03/2018 à 02:54, Michael S. Tsirkin a écrit : > > QEMU coding style at the moment asks for all non-system > > include files to be used with #include "foo.h". > > However this rule actually does not make sense and > > creates is

Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 12:18:41PM +, Daniel P. Berrangé wrote: > On Tue, Mar 20, 2018 at 02:12:24PM +0200, Michael S. Tsirkin wrote: > > On Tue, Mar 20, 2018 at 09:44:06AM +, Daniel P. Berrangé wrote: > > > On Tue, Mar 20, 2018 at 09:58:23AM +0100, Laurent Vivier wrote: > > > > Le 20/03/20

Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 12:39:00PM +, Daniel P. Berrangé wrote: > On Tue, Mar 20, 2018 at 02:28:42PM +0200, Michael S. Tsirkin wrote: > > On Tue, Mar 20, 2018 at 12:18:41PM +, Daniel P. Berrangé wrote: > > > On Tue, Mar 20, 2018 at 02:12:24PM +0200, Michael S. Tsirkin wrote: > > > > On Tue,

[Qemu-devel] [PATCH] os: truncate pidfile on creation

2018-03-20 Thread Florian Larysch
qemu_create_pidfile does not truncate the pidfile when it creates it, but rather overwrites its contents with the new pid. This works fine as long as the length of the pid doesn't decrease, but this might happen in case of wraparounds, causing pidfiles to contain trailing garbage which breaks opera

Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Laurent Vivier
Le 20/03/2018 à 02:54, Michael S. Tsirkin a écrit : > QEMU coding style at the moment asks for all non-system > include files to be used with #include "foo.h". > However this rule actually does not make sense and > creates issues for when the included file is generated. If you change that, we can

[Qemu-devel] [Bug 1756807] Re: performance regression in qemu-user + proot

2018-03-20 Thread Alistair Buxton
I just tested the patch from https://bugs.launchpad.net/qemu/+bug/1740219 and it fixes the problem for me. Specifically I only tried the final patch of the series. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad

Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Peter Maydell
On 20 March 2018 at 09:44, Daniel P. Berrangé wrote: > We can follow what autoconf does, and add a check to configure to see if > there are generated files left in the source dir, when configuring with > builddir != srcdir, and exit with error, telling user to clean their > src dir first. We alre

Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Daniel P . Berrangé
On Tue, Mar 20, 2018 at 09:58:23AM +0100, Laurent Vivier wrote: > Le 20/03/2018 à 02:54, Michael S. Tsirkin a écrit : > > QEMU coding style at the moment asks for all non-system > > include files to be used with #include "foo.h". > > However this rule actually does not make sense and > > creates is

Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Daniel P . Berrangé
On Tue, Mar 20, 2018 at 10:01:24AM +, Peter Maydell wrote: > On 20 March 2018 at 09:44, Daniel P. Berrangé wrote: > > We can follow what autoconf does, and add a check to configure to see if > > there are generated files left in the source dir, when configuring with > > builddir != srcdir, and

Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 09:44:06AM +, Daniel P. Berrangé wrote: > On Tue, Mar 20, 2018 at 09:58:23AM +0100, Laurent Vivier wrote: > > Le 20/03/2018 à 02:54, Michael S. Tsirkin a écrit : > > > QEMU coding style at the moment asks for all non-system > > > include files to be used with #include "f

Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 10:27:19AM +, Daniel P. Berrangé wrote: > On Tue, Mar 20, 2018 at 10:01:24AM +, Peter Maydell wrote: > > On 20 March 2018 at 09:44, Daniel P. Berrangé wrote: > > > We can follow what autoconf does, and add a check to configure to see if > > > there are generated fil

Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 03:54:36AM +0200, Michael S. Tsirkin wrote: > QEMU coding style at the moment asks for all non-system > include files to be used with #include "foo.h". > However this rule actually does not make sense and > creates issues for when the included file is generated. > > In C, i

Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Daniel P . Berrangé
On Tue, Mar 20, 2018 at 02:12:24PM +0200, Michael S. Tsirkin wrote: > On Tue, Mar 20, 2018 at 09:44:06AM +, Daniel P. Berrangé wrote: > > On Tue, Mar 20, 2018 at 09:58:23AM +0100, Laurent Vivier wrote: > > > Le 20/03/2018 à 02:54, Michael S. Tsirkin a écrit : > > > > QEMU coding style at the mo

[Qemu-devel] [PATCH for-2.12 0/4] Fix various BRK/BKPT related bugs

2018-03-20 Thread Peter Maydell
The main aim of this patchset is to fix the bug reported in https://bugs.launchpad.net/qemu/+bug/1756927 where we don't report the correct FSR when a BKPT instruction causes us to take an exception to AArch32 with LPAE enabled. The other patches fix some minor bugs found along the way: * we weren

[Qemu-devel] [PATCH for-2.12 4/4] target/arm: Always set FAR to a known unknown value for debug exceptions

2018-03-20 Thread Peter Maydell
For debug exceptions due to breakpoints or the BKPT instruction which are taken to AArch32, the Fault Address Register is architecturally UNKNOWN. We were using that as license to simply not set env->exception.vaddress, but this isn't correct, because it will expose to the guest whatever old value

Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Daniel P . Berrangé
On Tue, Mar 20, 2018 at 02:28:42PM +0200, Michael S. Tsirkin wrote: > On Tue, Mar 20, 2018 at 12:18:41PM +, Daniel P. Berrangé wrote: > > On Tue, Mar 20, 2018 at 02:12:24PM +0200, Michael S. Tsirkin wrote: > > > On Tue, Mar 20, 2018 at 09:44:06AM +, Daniel P. Berrangé wrote: > > > > On Tue,

[Qemu-devel] [PATCH for-2.12 1/4] target/arm: Honour MDCR_EL2.TDE when routing exceptions due to BKPT/BRK

2018-03-20 Thread Peter Maydell
The MDCR_EL2.TDE bit allows the exception level targeted by debug exceptions to be set to EL2 for code executing at EL0. We handle this in the arm_debug_target_el() function, but this is only used for hardware breakpoint and watchpoint exceptions, not for the exception generated when the guest exe

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Stefan Hajnoczi
On Tue, Mar 20, 2018 at 03:54:36AM +0200, Michael S. Tsirkin wrote: > QEMU coding style at the moment asks for all non-system > include files to be used with #include "foo.h". > However this rule actually does not make sense and > creates issues for when the included file is generated. > > In C, i

[Qemu-devel] [PATCH for-2.12 2/4] target/arm: Factor out code to calculate FSR for debug exceptions

2018-03-20 Thread Peter Maydell
When a debug exception is taken to AArch32, it appears as a Prefetch Abort, and the Instruction Fault Status Register (IFSR) must be set. The IFSR has two possible formats, depending on whether LPAE is in use. Factor out the code in arm_debug_excp_handler() which picks an FSR value into its own uti

[Qemu-devel] [PATCH for-2.12 3/4] target/arm: Set FSR for BKPT, BRK when raising exception

2018-03-20 Thread Peter Maydell
Now that we have a helper function specifically for the BRK and BKPT instructions, we can set the exception.fsr there rather than in arm_cpu_do_interrupt_aarch32(). This allows us to use our new arm_debug_exception_fsr() helper. In particular this fixes a bug where we were hardcoding the short-for

Re: [Qemu-devel] Google Summer of Code 2018 - add Windows NT 4.0 PowerPC support

2018-03-20 Thread Stefan Hajnoczi
On Sun, Mar 18, 2018 at 04:02:10PM -0400, Programmingkid wrote: > Is there still time to add another idea to the Google Summer of Code 2018 > list? I just came across an interesting idea to add support for Windows NT > 4.0 PowerPC to QEMU. If there is still time, would there be anyone interested

Re: [Qemu-devel] [PATCH v3 2/3] qcow2: handle reopening bitmaps on bdrv_invalidate_cache

2018-03-20 Thread Max Reitz
On 2018-03-19 10:02, Vladimir Sementsov-Ogievskiy wrote: > Consider migration with shared storage. Persistent bitmaps are stored > on bdrv_inactivate. Then, on destination > process_incoming_migration_bh() calls bdrv_invalidate_cache_all() which > leads to qcow2_load_autoloading_dirty_bitmaps() whi

Re: [Qemu-devel] [PULL v3 0/7] Machine and x86 queue, 2018-03-19

2018-03-20 Thread Peter Maydell
On 19 March 2018 at 20:12, Eduardo Habkost wrote: > Changes v2 (2018-03-15) -> v3 (2018-03-19): > * Fix bogus warnings on machine-none-test > * Included Intel PT CPUID fix > > Changes v1 (2018-03-12) -> v2 (2018-03-15): > * Fix bsd-user build error > > The following changes since commit 2c8cfc0b52

[Qemu-devel] [PATCH] qcow2: Reset free_cluster_index when allocating a new refcount block

2018-03-20 Thread Alberto Garcia
When we try to allocate new clusters we first look for available ones starting from s->free_cluster_index and once we find them we increase their reference counts. Before we get to call update_refcount() to do this last step s->free_cluster_index is already pointing to the next cluster after the on

Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 02:46:46PM +0100, Thomas Huth wrote: > On 20.03.2018 14:32, Gerd Hoffmann wrote: > > Hi, > > > >>> So for these, we should use "". None of these are generated files though. > >> > >> That leads to crazy inconsistent message for developers where 50% of QEMU > >> header fi

Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Gerd Hoffmann
Hi, > > So for these, we should use "". None of these are generated files though. > > That leads to crazy inconsistent message for developers where 50% of QEMU > header files must use <> and the other 50% of header files must use "". The rules are pretty simple though: (1) Headers which a

Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 01:41:17PM +, Daniel P. Berrangé wrote: > On Tue, Mar 20, 2018 at 02:32:16PM +0100, Gerd Hoffmann wrote: > > Hi, > > > > > > So for these, we should use "". None of these are generated files > > > > though. > > > > > > That leads to crazy inconsistent message for d

Re: [Qemu-devel] [PATCH v3 1/3] qcow2-bitmap: add qcow2_reopen_bitmaps_rw_hint()

2018-03-20 Thread Max Reitz
On 2018-03-19 10:02, Vladimir Sementsov-Ogievskiy wrote: > Add version of qcow2_reopen_bitmaps_rw, which do the same work but > also return a hint about was header updated or not. This will be > used in the following fix for bitmaps reloading after migration. > > Signed-off-by: Vladimir Sementsov-

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 01:10:41PM +, Stefan Hajnoczi wrote: > On Tue, Mar 20, 2018 at 03:54:36AM +0200, Michael S. Tsirkin wrote: > > QEMU coding style at the moment asks for all non-system > > include files to be used with #include "foo.h". > > However this rule actually does not make sense a

Re: [Qemu-devel] [PATCH v3 3/3] iotests: enable shared migration cases in 169

2018-03-20 Thread Max Reitz
On 2018-03-19 10:02, Vladimir Sementsov-Ogievskiy wrote: > Shared migration for dirty bitmaps is fixed by previous patches, > so we can enable the test. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/169 | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-)

Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Thomas Huth
On 20.03.2018 14:32, Gerd Hoffmann wrote: > Hi, > >>> So for these, we should use "". None of these are generated files though. >> >> That leads to crazy inconsistent message for developers where 50% of QEMU >> header files must use <> and the other 50% of header files must use "". > > The rul

  1   2   3   4   >