[Qemu-devel] [PATCH v1 1/2] virtio: check VirtQueue Vring object is set

2017-11-23 Thread P J P
From: Prasad J Pandit An user could attempt to use an uninitialised VirtQueue object or unset Vring.align leading to a arithmetic exception. Add check to avoid it. Reported-by: Zhangboxian Signed-off-by: Prasad J Pandit

[Qemu-devel] [PATCH v1 0/2] check VirtiQueue Vring objects

2017-11-23 Thread P J P
From: Prasad J Pandit Hello, An user could attempt to use an uninitialised VirtQueue object or set Vring object with undue values, raising an unexpected exception in Qemu. This patch set fixes this issue and also adds a unit test to the suite. Thank you. -- Prasad J

[Qemu-devel] [PATCH v3] rcu: reduce more than 7MB heap memory by malloc_trim()

2017-11-23 Thread Yang Zhong
Since there are some issues in memory alloc/free machenism in glibc for little chunk memory, if Qemu frequently alloc/free little chunk memory, the glibc doesn't alloc little chunk memory from free list of glibc and still allocate from OS, which make the heap size bigger and bigger. This patch

[Qemu-devel] [PATCH v4 0/3] disable the decrementer interrupt when a CPU is unplugged

2017-11-23 Thread Cédric Le Goater
Hello, When a CPU is stopped with the 'stop-self' RTAS call, its state 'halted' is switched to 1 and, in this case, the MSR is not taken into account anymore in the cpu_has_work() routine. Only the pending hardware interrupts are checked with their LPCR:PECE* enablement bit. If the DECR timer

[Qemu-devel] [PATCH v4 3/3] spapr/rtas: do not reset the MSR in stop-self command

2017-11-23 Thread Cédric Le Goater
When a CPU is stopped with the 'stop-self' RTAS call, its state 'halted' is switched to 1 and, in this case, the MSR is not taken into account anymore in the cpu_has_work() routine. Only the pending hardware interrupts are checked with their LPCR:PECE* enablement bit. The CPU is now also

[Qemu-devel] [PATCH v4 1/3] spapr/rtas: disable the decrementer interrupt when a CPU is unplugged

2017-11-23 Thread Cédric Le Goater
When a CPU is stopped with the 'stop-self' RTAS call, its state 'halted' is switched to 1 and, in this case, the MSR is not taken into account anymore in the cpu_has_work() routine. Only the pending hardware interrupts are checked with their LPCR:PECE* enablement bit. If the DECR timer fires

[Qemu-devel] [PATCH v2 2/3] cpu: suffix cpu address spaces with cpu index

2017-11-23 Thread Peter Xu
Renaming cpu address space names so that they won't be the same when there are more than one. Signed-off-by: Peter Xu --- exec.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index d845542139..41f89f8164 100644 --- a/exec.c +++

[Qemu-devel] [PATCH v2 0/3] cpu: suffix cpu address spaces with indexes

2017-11-23 Thread Peter Xu
v2: - drop patch 1 since merged - add last patch as suggested by Paolo Please review, thanks. Peter Xu (3): cpu: refactor cpu_address_space_init() cpu: suffix cpu address spaces with cpu index cpu: put AddressSpace into CPUAddressSpace cpus.c | 5 + exec.c

Re: [Qemu-devel] [PATCH 01/25] ppc/xics: introduce an icp_create() helper

2017-11-23 Thread David Gibson
On Thu, Nov 23, 2017 at 02:29:31PM +0100, Cédric Le Goater wrote: > The sPAPR and the PowerNV core objects create the interrupt presenter > object of the CPUs in a very similar way. Let's provide a common > routine in which we use the presenter 'type' as a child identifier. > > Signed-off-by:

Re: [Qemu-devel] [PATCH 02/25] ppc/xics: assign of the CPU 'intc' pointer under the core

2017-11-23 Thread David Gibson
On Thu, Nov 23, 2017 at 02:29:32PM +0100, Cédric Le Goater wrote: > The 'intc' pointer of the CPU references the interrupt presenter in > the XICS interrupt mode. When the XIVE interrupt mode is available and > activated, the machine will need to reassign this pointer to reflect > the change. > >

Re: [Qemu-devel] [PATCH 05/25] spapr: introduce a spapr_irq_set() helper

2017-11-23 Thread David Gibson
On Thu, Nov 23, 2017 at 02:29:35PM +0100, Cédric Le Goater wrote: > It will make synchronisation easier with the XIVE interrupt mode when > available. The 'irq' parameter refers to the global IRQ number space. > > Signed-off-by: Cédric Le Goater s/spapr_irq_set/spapr_irq_set_lsi/

Re: [Qemu-devel] [PATCH 06/25] spapr: introduce a spapr_irq_get_qirq() helper

2017-11-23 Thread David Gibson
On Thu, Nov 23, 2017 at 02:29:36PM +0100, Cédric Le Goater wrote: > xics_get_qirq() is only used by the sPAPR machine. Let's move it there > and change its name to reflect its scope. It will be useful for XIVE > support which will use its own set of qirqs. > > Signed-off-by: Cédric Le Goater

[Qemu-devel] [QEMU-PPC] [PATCH 1/2] target/ppc: Move setting of patb_entry on hash table init

2017-11-23 Thread Suraj Jitindar Singh
The patb_entry is used to store the location of the process table in guest memory. The msb is also used to indicate the mmu mode of the guest, that is patb_entry & 1 << 63 ? radix_mode : hash_mode. Currently we set this to zero in spapr_setup_hpt_and_vrma() since if this function gets called then

Re: [Qemu-devel] [PATCH v8 4/5] crash: export paddr_vmcoreinfo_note()

2017-11-23 Thread Michael S. Tsirkin
On Thu, Nov 23, 2017 at 06:36:57AM -0800, Christoph Hellwig wrote: > On Thu, Nov 23, 2017 at 03:02:05PM +0100, Marc-André Lureau wrote: > > The following patch is going to use the symbol from the fw_cfg module, > > to call the function and write the note location details in the > > vmcoreinfo

Re: [Qemu-devel] [QEMU-PPC] [PATCH 0/2] target/ppc: hpt on radix and compat migration fixes

2017-11-23 Thread David Gibson
On Fri, Nov 24, 2017 at 03:23:23PM +1100, Suraj Jitindar Singh wrote: > The following patches fix 2 migration bugs. > > The first being that migration of a hpt guest on a radix host currently > doesn't work. The first patch fixes this by installing the correct value > in patb_entry. > > The

Re: [Qemu-devel] [PATCH] pcc: define the Power-saving mode Exit Cause Enable bits in PowerPCCPUClass

2017-11-23 Thread Cédric Le Goater
On 11/24/2017 01:09 AM, David Gibson wrote: > On Thu, Nov 23, 2017 at 06:05:24PM +0100, Cédric Le Goater wrote: >> and use the value to define precisely the default value of the LPCR in >> the helper routine cpu_ppc_set_papr() >> >> Signed-off-by: Cédric Le Goater > > Applied to

Re: [Qemu-devel] [PATCH 04/25] spapr: move the IRQ allocation routines under the machine

2017-11-23 Thread David Gibson
On Thu, Nov 23, 2017 at 02:29:34PM +0100, Cédric Le Goater wrote: > Also change the prototype to use a sPAPRMachineState and prefix them > with spapr_irq_. It will let us synchronise the IRQ allocation with > the XIVE interrupt mode when available. > > Signed-off-by: Cédric Le Goater

Re: [Qemu-devel] [PATCH 0/1] block: Workaround for the iotests errors

2017-11-23 Thread Jeff Cody
On Fri, Nov 24, 2017 at 01:57:46AM +0800, Fam Zheng wrote: > Jeff's block job patch made the latent drain bug visible, and I find this > patch, which by itself also makes some sense, can hide it again. :) With it > applied we are at least back to the ground where patchew's iotests (make >

Re: [Qemu-devel] [PATCH v2] rcu: reduce more than 7MB heap memory by malloc_trim()

2017-11-23 Thread Zhong Yang
On Thu, Nov 23, 2017 at 11:19:43AM +, Stefan Hajnoczi wrote: > On Thu, Nov 23, 2017 at 02:41:16PM +0800, Yang Zhong wrote: > > Since there are some issues in memory alloc/free machenism > > in glibc for little chunk memory, if Qemu frequently > > alloc/free little chunk memory, the glibc

Re: [Qemu-devel] [PATCH 2/3] cpu: refactor cpu_address_space_init()

2017-11-23 Thread Peter Xu
On Thu, Nov 23, 2017 at 05:06:31PM +0100, Paolo Bonzini wrote: > On 23/11/2017 10:23, Peter Xu wrote: > > +const char *prefix, MemoryRegion *mr) > > { > > CPUAddressSpace *newas; > > +AddressSpace *as = g_new0(AddressSpace, 1); > > + > > +assert(mr); > > +

[Qemu-devel] [PATCH v2 3/3] cpu: put AddressSpace into CPUAddressSpace

2017-11-23 Thread Peter Xu
Now we can put AddressSpace into CPUAddressSpace struct, then we don't need dynamic allocation of AddressSpaces. Suggested-by: Paolo Bonzini Signed-off-by: Peter Xu --- exec.c | 33 ++--- 1 file changed, 18 insertions(+), 15

[Qemu-devel] [PATCH v2 1/3] cpu: refactor cpu_address_space_init()

2017-11-23 Thread Peter Xu
Normally we create an address space for that CPU and pass that address space into the function. Let's just do it inside to unify address space creations. It'll simplify my next patch to rename those address spaces. Signed-off-by: Peter Xu --- cpus.c | 5

Re: [Qemu-devel] [RFC v4 09/27] monitor: create monitor dedicate iothread

2017-11-23 Thread Peter Xu
On Thu, Nov 23, 2017 at 10:53:08AM +, Daniel P. Berrange wrote: > On Thu, Nov 23, 2017 at 10:51:43AM +, Dr. David Alan Gilbert wrote: > > * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > Create one IOThread for the monitors, prepared

Re: [Qemu-devel] [PATCH for 2.11] virtio-net: don't touch virtqueue if vm is stopped

2017-11-23 Thread Jason Wang
On 2017年11月23日 18:59, Stefan Hajnoczi wrote: On Thu, Nov 23, 2017 at 11:37:46AM +0800, Jason Wang wrote: Guest state should not be touched if VM is stopped, unfortunately we didn't check running state and tried to drain tx queue unconditionally in virtio_net_set_status(). A crash was then

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 1/7] s390x/pci: factor out endianess conversion

2017-11-23 Thread Yi Min Zhao
在 2017/11/23 下午8:18, Thomas Huth 写道: On 23.11.2017 13:07, Yi Min Zhao wrote: 在 2017/11/23 下午6:33, Cornelia Huck 写道: On Thu, 23 Nov 2017 11:25:10 +0100 Thomas Huth wrote: On 23.11.2017 11:08, Cornelia Huck wrote: On Thu, 23 Nov 2017 11:01:23 +0100 Thomas Huth

Re: [Qemu-devel] [PATCH 1/3] pci: Initialize pci_dev->name before use

2017-11-23 Thread Peter Xu
On Fri, Nov 24, 2017 at 11:16:53AM +1100, Alexey Kardashevskiy wrote: > On 23/11/17 20:23, Peter Xu wrote: > > From: Alexey Kardashevskiy > > > > This moves pci_dev->name initialization earlier so > > pci_dev->bus_master_as could get a name instead of an empty string. > > > >

[Qemu-devel] [PATCH v1 2/2] tests: add test to check VirtQueue object

2017-11-23 Thread P J P
From: Prasad J Pandit An uninitialised VirtQueue object or one with Vring.align field set to zero(0) could lead to arithmetic exceptions. Add a unit test to validate it. Signed-off-by: Prasad J Pandit --- tests/virtio-blk-test.c | 21

Re: [Qemu-devel] [PATCH 01/25] ppc/xics: introduce an icp_create() helper

2017-11-23 Thread Cédric Le Goater
On 11/24/2017 03:51 AM, David Gibson wrote: > On Thu, Nov 23, 2017 at 02:29:31PM +0100, Cédric Le Goater wrote: >> The sPAPR and the PowerNV core objects create the interrupt presenter >> object of the CPUs in a very similar way. Let's provide a common >> routine in which we use the presenter

Re: [Qemu-devel] [RFC v4 15/27] monitor: let monitor_{suspend|resume} thread safe

2017-11-23 Thread Peter Xu
On Thu, Nov 23, 2017 at 11:23:16AM +, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > Monitor code now can be run in more than one thread. Let the suspend > > and resume code be thread safe. > > > > Reviewed-by: Fam Zheng > > Signed-off-by: Peter

[Qemu-devel] [QEMU-PPC] [PATCH 2/2] target/ppc: Fix setting of cpu->compat_pvr on incoming migration

2017-11-23 Thread Suraj Jitindar Singh
cpu->compat_pvr is used to store the current compat mode of the cpu. On the receiving side during incoming migration we check compatibility with the compat mode by calling ppc_set_compat(). However we fail to set the compat mode with the hypervisor since the "new" compat mode doesn't differ from

[Qemu-devel] [QEMU-PPC] [PATCH 0/2] target/ppc: hpt on radix and compat migration fixes

2017-11-23 Thread Suraj Jitindar Singh
The following patches fix 2 migration bugs. The first being that migration of a hpt guest on a radix host currently doesn't work. The first patch fixes this by installing the correct value in patb_entry. The second bug is that migration in a compat mode will currently result in no compat mode

[Qemu-devel] [PATCH v4 2/3] spapr/rtas: fix reboot of a a SMP TCG guest

2017-11-23 Thread Cédric Le Goater
Just like for hot unplug CPUs, when a guest is rebooted, the secondary CPUs can be awaken by the decrementer and start entering SLOF at the same time the boot CPU is. To be safe, let's disable on the secondaries all the exceptions which can cause an exit while the CPU is in power-saving mode.

Re: [Qemu-devel] [PATCH 2/5] qcow2: multiple clusters write compressed

2017-11-23 Thread Kevin Wolf
Am 23.11.2017 um 10:04 hat Anton Nefedov geschrieben: > > > On 21/11/2017 8:42 PM, Kevin Wolf wrote: > > Am 15.11.2017 um 17:30 hat Max Reitz geschrieben: > > > On 2017-11-15 17:28, Anton Nefedov wrote: > > > > On 15/11/2017 6:11 PM, Max Reitz wrote: > > > > > On 2017-11-14 11:16, Anton Nefedov

Re: [Qemu-devel] [PATCH v3 11/30] sdhci: Add i.MX specific subtype of SDHCI

2017-11-23 Thread Peter Maydell
On 22 November 2017 at 20:43, Andrey Smirnov wrote: > On Tue, Nov 21, 2017 at 10:02 AM, Peter Maydell > wrote: >> On 6 November 2017 at 15:47, Andrey Smirnov wrote: >>> +/* Controller does not provide

Re: [Qemu-devel] [PATCH] tcg: Fix complilation with TCG

2017-11-23 Thread Peter Maydell
On 22 November 2017 at 08:41, Juan Quintela wrote: > This commit started use tb_unlock() and tlb_set_dirty() on non TCG > code. Add the function as stubs. > > commit 27266271977c5a30f2f7d493e042be1897827bdd > Author: Peter Maydell > Date: Mon Nov

[Qemu-devel] Speak at FOSDEM18 Virt & IaaS Devroom!

2017-11-23 Thread Stefan Hajnoczi
FOSDEM 2018 will be held in Brussels, Belgium on February 3 & 4, 2018. The Virt & Iaas Devroom is hosting talks on KVM, Libvirt, QEMU, OpenStack, and more. The submission deadline for talks is 1 December 2017. See the Call For Papers below for details. I hope to see you there! Stefan --- I am

Re: [Qemu-devel] [RFC v4 09/27] monitor: create monitor dedicate iothread

2017-11-23 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Peter Xu (pet...@redhat.com) wrote: > > Create one IOThread for the monitors, prepared to handle all the > > input/output IOs using existing iothread framework. > > > > Signed-off-by: Peter Xu > > --- > > monitor.c |

Re: [Qemu-devel] [PATCH for 2.11] virtio-net: don't touch virtqueue if vm is stopped

2017-11-23 Thread Stefan Hajnoczi
On Thu, Nov 23, 2017 at 11:37:46AM +0800, Jason Wang wrote: > Guest state should not be touched if VM is stopped, unfortunately we > didn't check running state and tried to drain tx queue unconditionally > in virtio_net_set_status(). A crash was then noticed as a migration > destination when user

Re: [Qemu-devel] QEMU 3.0 ? (was: [PATCH for-2.12 v3 01/11] spapr: add pseries 2.12 machine type)

2017-11-23 Thread Daniel P. Berrange
On Thu, Nov 23, 2017 at 10:17:48AM +, Peter Maydell wrote: > On 23 November 2017 at 10:03, Cornelia Huck wrote: > > On Mon, 13 Nov 2017 08:14:28 +0100 > > Thomas Huth wrote: > > > >> By the way, before everybody now introduces "2.12" machine types ... is

Re: [Qemu-devel] QEMU 3.0 ?

2017-11-23 Thread Paolo Bonzini
On 23/11/2017 11:57, Thomas Huth wrote: > On 23.11.2017 11:17, Peter Maydell wrote: >> On 23 November 2017 at 10:03, Cornelia Huck wrote: >>> On Mon, 13 Nov 2017 08:14:28 +0100 >>> Thomas Huth wrote: >>> By the way, before everybody now introduces "2.12"

Re: [Qemu-devel] QEMU 3.0 ?

2017-11-23 Thread Paolo Bonzini
On 23/11/2017 12:57, Thomas Huth wrote: > On 23.11.2017 12:17, Paolo Bonzini wrote: >> On 23/11/2017 11:57, Thomas Huth wrote: > [...] >>> I've put "--accel kvm:hax:tcg" also on the doable list since I don't >>> remember any objections to that idea so far -- feel free to move it to >>> the

Re: [Qemu-devel] [PATCH v3 1/7] s390x/pci: factor out endianess conversion

2017-11-23 Thread Yi Min Zhao
在 2017/11/23 下午6:33, Cornelia Huck 写道: On Thu, 23 Nov 2017 11:25:10 +0100 Thomas Huth wrote: On 23.11.2017 11:08, Cornelia Huck wrote: On Thu, 23 Nov 2017 11:01:23 +0100 Thomas Huth wrote: On 23.11.2017 10:49, Cornelia Huck wrote: On Thu, 23 Nov

Re: [Qemu-devel] [PATCH v3 2/7] s390x/pci: rework PCI STORE

2017-11-23 Thread Cornelia Huck
On Wed, 22 Nov 2017 23:05:29 +0100 Pierre Morel wrote: > Enhance the fault detection, correction of the fault reporting. > > Signed-off-by: Pierre Morel > Reviewed-by: Yi Min Zhao > --- >

Re: [Qemu-devel] [PATCH v3 1/7] s390x/pci: factor out endianess conversion

2017-11-23 Thread Thomas Huth
On 23.11.2017 10:49, Cornelia Huck wrote: > On Thu, 23 Nov 2017 09:48:41 +0100 > Thomas Huth wrote: > >> On 22.11.2017 23:05, Pierre Morel wrote: >>> There are two places where the same endianness conversion >>> is done. >>> Let's factor this out into a static function. >>> >>>

Re: [Qemu-devel] QEMU 3.0 ? (was: [PATCH for-2.12 v3 01/11] spapr: add pseries 2.12 machine type)

2017-11-23 Thread Peter Maydell
On 23 November 2017 at 10:03, Cornelia Huck wrote: > On Mon, 13 Nov 2017 08:14:28 +0100 > Thomas Huth wrote: > >> By the way, before everybody now introduces "2.12" machine types ... is >> there already a consensus that the next version will be "2.12" ? >> >>

Re: [Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-23 Thread Stefan Hajnoczi
On Wed, Nov 22, 2017 at 07:04:26PM +0100, Kevin Wolf wrote: > Am 22.11.2017 um 18:06 hat Stefan Hajnoczi geschrieben: > > On Wed, Nov 22, 2017 at 07:33:28AM -0800, Deepa Srinivasan wrote: > > > Starting qemu with the following arguments causes qemu to segfault: > > > ... -device lsi,id=lsi0 -drive

Re: [Qemu-devel] QEMU 3.0 ?

2017-11-23 Thread Thomas Huth
On 23.11.2017 11:17, Peter Maydell wrote: > On 23 November 2017 at 10:03, Cornelia Huck wrote: >> On Mon, 13 Nov 2017 08:14:28 +0100 >> Thomas Huth wrote: >> >>> By the way, before everybody now introduces "2.12" machine types ... is >>> there already a

Re: [Qemu-devel] [PATCH for-2.12 v3 08/11] spapr: introduce a XICSFabric irq_is_lsi() operation

2017-11-23 Thread David Gibson
On Fri, Nov 17, 2017 at 08:23:00AM +0100, Cédric Le Goater wrote: > On 11/17/2017 05:54 AM, David Gibson wrote: > > On Fri, Nov 10, 2017 at 03:20:14PM +, Cédric Le Goater wrote: > >> It will be used later on to distinguish the allocation of an LSI > >> interrupt from an MSI and also to reduce

Re: [Qemu-devel] [PATCH for-2.12 v3 03/11] spapr: introduce new XICSFabric operations for an IRQ allocator

2017-11-23 Thread David Gibson
On Fri, Nov 17, 2017 at 08:16:47AM +0100, Cédric Le Goater wrote: > On 11/17/2017 05:48 AM, David Gibson wrote: > > On Fri, Nov 10, 2017 at 03:20:09PM +, Cédric Le Goater wrote: > >> Currently, the ICSState 'ics' object of the sPAPR machine acts as the > >> global interrupt source handler and

Re: [Qemu-devel] QEMU 3.0 ?

2017-11-23 Thread Daniel P. Berrange
On Thu, Nov 23, 2017 at 12:24:24PM +0100, Thomas Huth wrote: > On 23.11.2017 12:11, Daniel P. Berrange wrote: > > On Thu, Nov 23, 2017 at 11:57:34AM +0100, Thomas Huth wrote: > >> On 23.11.2017 11:17, Peter Maydell wrote: > >>> On 23 November 2017 at 10:03, Cornelia Huck wrote:

Re: [Qemu-devel] QEMU 3.0 ?

2017-11-23 Thread Thomas Huth
On 23.11.2017 12:33, Daniel P. Berrange wrote: > On Thu, Nov 23, 2017 at 12:24:24PM +0100, Thomas Huth wrote: >> On 23.11.2017 12:11, Daniel P. Berrange wrote: >>> On Thu, Nov 23, 2017 at 11:57:34AM +0100, Thomas Huth wrote: On 23.11.2017 11:17, Peter Maydell wrote: > On 23 November 2017

Re: [Qemu-devel] [PATCH v3 2/3] Enable 8-byte wide access to AMD CFI devices

2017-11-23 Thread Peter Maydell
On 13 November 2017 at 16:14, Mike Nawrocki wrote: > Signed-off-by: Mike Nawrocki > --- > hw/block/pflash_cfi02.c | 143 > ++-- > 1 file changed, 102 insertions(+), 41 deletions(-) >

Re: [Qemu-devel] QEMU 3.0 ?

2017-11-23 Thread Thomas Huth
On 23.11.2017 12:17, Paolo Bonzini wrote: > On 23/11/2017 11:57, Thomas Huth wrote: [...] >> I've put "--accel kvm:hax:tcg" also on the doable list since I don't >> remember any objections to that idea so far -- feel free to move it to >> the controversial list instead if you think it needs more

Re: [Qemu-devel] [PATCH v3 6/7] s390x/pci: move the memory region write from pcistg

2017-11-23 Thread Thomas Huth
On 22.11.2017 23:05, Pierre Morel wrote: > Let's move the memory region write from pcistg into a dedicated > function. > This allows us to prepare a later patch searching for subregions > inside of the memory region. > > Signed-off-by: Pierre Morel > Reviewed-by: Yi

Re: [Qemu-devel] [PATCH v3 04/30] imx_fec: Use ENET_FTRL to determine truncation length

2017-11-23 Thread Peter Maydell
On 22 November 2017 at 20:22, Andrey Smirnov wrote: > On Tue, Nov 21, 2017 at 9:31 AM, Peter Maydell > wrote: >> On 6 November 2017 at 15:47, Andrey Smirnov wrote: >>> Frame truncation length, TRUNC_FL, is determined

Re: [Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-23 Thread Paolo Bonzini
On 23/11/2017 11:23, Stefan Hajnoczi wrote: > You are right. I audited the blk_aio_preadv() callers and they all keep > qiov around until the request is complete. > > Actually this makes sense because even in the simple non-coroutine case > with aio=threads the qiov hasn't necessarily been read

Re: [Qemu-devel] [RFC v4 09/27] monitor: create monitor dedicate iothread

2017-11-23 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Create one IOThread for the monitors, prepared to handle all the > input/output IOs using existing iothread framework. > > Signed-off-by: Peter Xu > --- > monitor.c | 29 + > 1 file changed, 29 insertions(+)

Re: [Qemu-devel] [PATCH for-2.12 v3 05/11] spapr: introduce an IRQ allocator using a bitmap

2017-11-23 Thread David Gibson
On Mon, Nov 20, 2017 at 01:07:42PM +0100, Greg Kurz wrote: > On Fri, 17 Nov 2017 15:50:53 +1100 > David Gibson wrote: > > > On Tue, Nov 14, 2017 at 10:42:24AM +0100, Greg Kurz wrote: > > > On Fri, 10 Nov 2017 15:20:11 + > > > Cédric Le Goater

Re: [Qemu-devel] [PATCH for-2.12 v3 05/11] spapr: introduce an IRQ allocator using a bitmap

2017-11-23 Thread David Gibson
On Fri, Nov 17, 2017 at 08:19:23AM +0100, Cédric Le Goater wrote: > On 11/17/2017 05:50 AM, David Gibson wrote: > > On Tue, Nov 14, 2017 at 10:42:24AM +0100, Greg Kurz wrote: > >> On Fri, 10 Nov 2017 15:20:11 + > >> Cédric Le Goater wrote: > >> > >>> Let's define a new set of

Re: [Qemu-devel] [RFC v4 15/27] monitor: let monitor_{suspend|resume} thread safe

2017-11-23 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Monitor code now can be run in more than one thread. Let the suspend > and resume code be thread safe. > > Reviewed-by: Fam Zheng > Signed-off-by: Peter Xu > --- > monitor.c | 5 +++-- > 1 file changed, 3

Re: [Qemu-devel] QEMU 3.0 ?

2017-11-23 Thread Thomas Huth
On 23.11.2017 12:11, Daniel P. Berrange wrote: > On Thu, Nov 23, 2017 at 11:57:34AM +0100, Thomas Huth wrote: >> On 23.11.2017 11:17, Peter Maydell wrote: >>> On 23 November 2017 at 10:03, Cornelia Huck wrote: On Mon, 13 Nov 2017 08:14:28 +0100 Thomas Huth

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-11-23 Thread Wouter Verhelst
Ping. Should I write this up as a proper proposal? On Thu, Nov 16, 2017 at 05:20:29PM +0100, Wouter Verhelst wrote: > On Thu, Nov 16, 2017 at 09:30:41AM -0600, Eric Blake wrote: > > On 11/16/2017 03:51 AM, Wouter Verhelst wrote: > > > > >> I also remember from talking with Vladimir during KVM

Re: [Qemu-devel] [PATCH v3 7/7] s390x/pci: search for subregion inside the BARs

2017-11-23 Thread Thomas Huth
On 22.11.2017 23:05, Pierre Morel wrote: > When dispatching memory access to PCI BAR region, we must > look for possible subregions, used by the PCI device to map > different memory areas inside the same PCI BAR. > > Since the data offset we received is calculated starting at the > region start

Re: [Qemu-devel] [PATCH v3 1/7] s390x/pci: factor out endianess conversion

2017-11-23 Thread Thomas Huth
On 23.11.2017 11:08, Cornelia Huck wrote: > On Thu, 23 Nov 2017 11:01:23 +0100 > Thomas Huth wrote: > >> On 23.11.2017 10:49, Cornelia Huck wrote: >>> On Thu, 23 Nov 2017 09:48:41 +0100 >>> Thomas Huth wrote: On 22.11.2017 23:05, Pierre Morel wrote:

Re: [Qemu-devel] [PATCH v3 1/7] s390x/pci: factor out endianess conversion

2017-11-23 Thread Cornelia Huck
On Thu, 23 Nov 2017 11:25:10 +0100 Thomas Huth wrote: > On 23.11.2017 11:08, Cornelia Huck wrote: > > On Thu, 23 Nov 2017 11:01:23 +0100 > > Thomas Huth wrote: > > > >> On 23.11.2017 10:49, Cornelia Huck wrote: > >>> On Thu, 23 Nov 2017 09:48:41 +0100 >

Re: [Qemu-devel] [PATCH RFC 2/3] tcg/optimize: do copy propagation for memory locations

2017-11-23 Thread Kirill Batuzov
On Wed, 22 Nov 2017, Richard Henderson wrote: > On 11/09/2017 03:41 PM, Kirill Batuzov wrote: > > +typedef struct TCGMemLocation { > > +/* Offset is relative to ENV. Only fields of CPUState are accounted. > > */ > > +tcg_target_ulong offset; > > +tcg_target_ulong size; > > +

Re: [Qemu-devel] [PATCH v2] rcu: reduce more than 7MB heap memory by malloc_trim()

2017-11-23 Thread Stefan Hajnoczi
On Thu, Nov 23, 2017 at 02:41:16PM +0800, Yang Zhong wrote: > Since there are some issues in memory alloc/free machenism > in glibc for little chunk memory, if Qemu frequently > alloc/free little chunk memory, the glibc doesn't alloc > little chunk memory from free list of glibc and still >

Re: [Qemu-devel] [PATCH v3 1/3] Switch AMD CFI flash to use new MMIO API

2017-11-23 Thread Peter Maydell
On 23 November 2017 at 11:26, Peter Maydell wrote: > On 13 November 2017 at 16:14, Mike Nawrocki > wrote: >> Signed-off-by: Mike Nawrocki >> --- >> hw/block/pflash_cfi02.c | 97 >>

Re: [Qemu-devel] [RFC PATCH v2 1/3] s390x/ccs: add ccw-testdev emulated device

2017-11-23 Thread Halil Pasic
On 11/23/2017 09:20 AM, Dong Jia Shi wrote: > * Halil Pasic [2017-11-08 17:54:20 +0100]: > > Hi Halil, > >> Add a fake device meant for testing the correctness of our css emulation. >> >> What we currently have is writing a Fibonacci sequence of uint32_t to the >>

Re: [Qemu-devel] [PATCH v3 1/7] s390x/pci: factor out endianess conversion

2017-11-23 Thread Cornelia Huck
On Thu, 23 Nov 2017 09:48:41 +0100 Thomas Huth wrote: > On 22.11.2017 23:05, Pierre Morel wrote: > > There are two places where the same endianness conversion > > is done. > > Let's factor this out into a static function. > > > > Signed-off-by: Pierre Morel

Re: [Qemu-devel] QEMU 3.0 ? (was: [PATCH for-2.12 v3 01/11] spapr: add pseries 2.12 machine type)

2017-11-23 Thread Cornelia Huck
On Mon, 13 Nov 2017 08:14:28 +0100 Thomas Huth wrote: > By the way, before everybody now introduces "2.12" machine types ... is > there already a consensus that the next version will be "2.12" ? > > A couple of months ago, we discussed that we could maybe do a 3.0 after >

Re: [Qemu-devel] [PATCH v3 1/7] s390x/pci: factor out endianess conversion

2017-11-23 Thread Cornelia Huck
On Thu, 23 Nov 2017 11:01:23 +0100 Thomas Huth wrote: > On 23.11.2017 10:49, Cornelia Huck wrote: > > On Thu, 23 Nov 2017 09:48:41 +0100 > > Thomas Huth wrote: > > > >> On 22.11.2017 23:05, Pierre Morel wrote: > >>> There are two places where the same

Re: [Qemu-devel] [RFC v4 09/27] monitor: create monitor dedicate iothread

2017-11-23 Thread Daniel P. Berrange
On Thu, Nov 23, 2017 at 10:51:43AM +, Dr. David Alan Gilbert wrote: > * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > Create one IOThread for the monitors, prepared to handle all the > > > input/output IOs using existing iothread framework.

Re: [Qemu-devel] QEMU 3.0 ?

2017-11-23 Thread Daniel P. Berrange
On Thu, Nov 23, 2017 at 11:57:34AM +0100, Thomas Huth wrote: > On 23.11.2017 11:17, Peter Maydell wrote: > > On 23 November 2017 at 10:03, Cornelia Huck wrote: > >> On Mon, 13 Nov 2017 08:14:28 +0100 > >> Thomas Huth wrote: > >> > >>> By the way, before

Re: [Qemu-devel] QEMU 3.0 ?

2017-11-23 Thread Thomas Huth
On 23.11.2017 12:14, Daniel P. Berrange wrote: > On Thu, Nov 23, 2017 at 10:17:48AM +, Peter Maydell wrote: >> On 23 November 2017 at 10:03, Cornelia Huck wrote: >>> On Mon, 13 Nov 2017 08:14:28 +0100 >>> Thomas Huth wrote: >>> By the way, before

Re: [Qemu-devel] [PATCH v3 1/3] Switch AMD CFI flash to use new MMIO API

2017-11-23 Thread Peter Maydell
On 13 November 2017 at 16:14, Mike Nawrocki wrote: > Signed-off-by: Mike Nawrocki > --- > hw/block/pflash_cfi02.c | 97 > + > 1 file changed, 18 insertions(+), 79 deletions(-) >

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 1/7] s390x/pci: factor out endianess conversion

2017-11-23 Thread Thomas Huth
On 23.11.2017 11:33, Cornelia Huck wrote: > On Thu, 23 Nov 2017 11:25:10 +0100 > Thomas Huth wrote: > >> On 23.11.2017 11:08, Cornelia Huck wrote: >>> On Thu, 23 Nov 2017 11:01:23 +0100 >>> Thomas Huth wrote: >>> On 23.11.2017 10:49, Cornelia Huck

Re: [Qemu-devel] QEMU 3.0 ?

2017-11-23 Thread Cornelia Huck
On Thu, 23 Nov 2017 13:05:33 +0100 Paolo Bonzini wrote: > On 23/11/2017 12:57, Thomas Huth wrote: > > On 23.11.2017 12:17, Paolo Bonzini wrote: > >> On 23/11/2017 11:57, Thomas Huth wrote: > > [...] > >>> I've put "--accel kvm:hax:tcg" also on the doable list since I

[Qemu-devel] [Bug 1329956] Re: multi-core FreeBSD guest hangs after warm reboot

2017-11-23 Thread Matt Keys
** Also affects: debian Importance: Undecided Status: New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1329956 Title: multi-core FreeBSD guest hangs after warm reboot Status in QEMU:

Re: [Qemu-devel] [Qemu-block] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-23 Thread Paolo Bonzini
On 23/11/2017 03:55, Deepa Srinivasan wrote: > I agree that passing in QEMUIOVector to blk_aio_ioctl() as a holder of > the void* buffer used in blk_aio_ioctl_entry() is unnecessary. But, as > Kevin noted, read and write were using the QEMUIOVector in BlkRwCo. > > To avoid changes to the callers

[Qemu-devel] [PATCH 0/3] cpu: suffix cpu address spaces with indexes

2017-11-23 Thread Peter Xu
I picked up Alexey's patch to fix pci address space names (which is possibly lost on the list), and refactored cpu address spaces a bit more. Now most of the address spaces (I believe some corner cases are there) should have a valid and good name. I think this is pretty safe even for 2.11, but

[Qemu-devel] [PATCH] docs/devel/migration.txt: keep functions consistent with the code

2017-11-23 Thread Jay Zhou
Since the commit 11808bb0c422134bf09119f4aa22c59b0ce84bf3 removed the put_buffer callback and using an iovec based write handler instead, the docs should be sync with the code too. Signed-off-by: Jay Zhou --- docs/devel/migration.txt | 31 ++-

Re: [Qemu-devel] [PATCH v3 4/7] s390x/pci: rework PCI STORE BLOCK

2017-11-23 Thread Thomas Huth
On 22.11.2017 23:05, Pierre Morel wrote: > Enhance the fault detection. > > Fixup the precedence to check the destination path existance > before checking for the source accessibility. > > Add the maxstbl entry to both the Query PCI Function Group > response and the PCIBusDevice structure. > >

[Qemu-devel] [Bug 1329956] Re: multi-core FreeBSD guest hangs after warm reboot

2017-11-23 Thread Matt Keys
I'm able to reproduce this issue, but using latest debian 9. Debian 9 qemu version: 1:2.8+dfsg-6+deb9u3 kernel version: Linux vm2 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux I'm attempting to cold boot, or warm reboot, pfsense 2.4.2 amd64 iso image guest. If I have

Re: [Qemu-devel] [PATCH v3 2/7] s390x/pci: rework PCI STORE

2017-11-23 Thread Thomas Huth
On 22.11.2017 23:05, Pierre Morel wrote: > Enhance the fault detection, correction of the fault reporting. > > Signed-off-by: Pierre Morel > Reviewed-by: Yi Min Zhao > --- > hw/s390x/s390-pci-inst.c | 39

Re: [Qemu-devel] [PATCH 2/5] qcow2: multiple clusters write compressed

2017-11-23 Thread Anton Nefedov
On 21/11/2017 8:42 PM, Kevin Wolf wrote: Am 15.11.2017 um 17:30 hat Max Reitz geschrieben: On 2017-11-15 17:28, Anton Nefedov wrote: On 15/11/2017 6:11 PM, Max Reitz wrote: On 2017-11-14 11:16, Anton Nefedov wrote: From: Pavel Butsykin At the moment,

[Qemu-devel] [PATCH 2/3] cpu: refactor cpu_address_space_init()

2017-11-23 Thread Peter Xu
Normally we create an address space for that CPU and pass that address space into the function. Let's just do it inside to unify address space creations. It'll simplify my next patch to rename those address spaces. Signed-off-by: Peter Xu --- cpus.c | 5

[Qemu-devel] [PATCH 1/3] pci: Initialize pci_dev->name before use

2017-11-23 Thread Peter Xu
From: Alexey Kardashevskiy This moves pci_dev->name initialization earlier so pci_dev->bus_master_as could get a name instead of an empty string. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Signed-off-by: Alexey Kardashevskiy

Re: [Qemu-devel] [PATCH v3 5/7] s390x/pci: move the memory region read from pcilg

2017-11-23 Thread Thomas Huth
On 22.11.2017 23:05, Pierre Morel wrote: > Let's move the memory region read from pcilg into a dedicated function. > This allows us to prepare a later patch. > > Signed-off-by: Pierre Morel > Reviewed-by: Yi Min Zhao > --- >

Re: [Qemu-devel] [PATCH v3 1/7] s390x/pci: factor out endianess conversion

2017-11-23 Thread Thomas Huth
On 22.11.2017 23:05, Pierre Morel wrote: > There are two places where the same endianness conversion > is done. > Let's factor this out into a static function. > > Signed-off-by: Pierre Morel > Reviewed-by: Yi Min Zhao > --- >

[Qemu-devel] [PATCH 3/3] cpu: suffix cpu address spaces with cpu index

2017-11-23 Thread Peter Xu
Renaming cpu address space names so that they won't be the same when there are more than one. Signed-off-by: Peter Xu --- exec.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index b4abe75931..c6e4c20c8f 100644 --- a/exec.c +++

[Qemu-devel] [Bug 1329956] Re: multi-core FreeBSD guest hangs after warm reboot

2017-11-23 Thread Matt Keys
I found this bug report through https://redmine.pfsense.org/issues/7925 , btw. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1329956 Title: multi-core FreeBSD guest hangs after warm reboot Status

[Qemu-devel] [Bug 1329956] Re: multi-core FreeBSD guest hangs after warm reboot

2017-11-23 Thread Matt Keys
sorry, make that https://redmine.pfsense.org/issues/4377 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1329956 Title: multi-core FreeBSD guest hangs after warm reboot Status in QEMU: Fix

Re: [Qemu-devel] [RFC PATCH v2 1/3] s390x/ccs: add ccw-testdev emulated device

2017-11-23 Thread Dong Jia Shi
* Halil Pasic [2017-11-08 17:54:20 +0100]: Hi Halil, > Add a fake device meant for testing the correctness of our css emulation. > > What we currently have is writing a Fibonacci sequence of uint32_t to the > device via ccw write. The write is going to fail if it

[Qemu-devel] [RFC v3 2/4] hw/intc/arm_gicv3_its: Implement a minimalist reset

2017-11-23 Thread Eric Auger
At the moment the ITS is not properly reset and this causes various bugs on save/restore. We implement a minimalist reset through individual register writes but for kernel versions before v4.15 this fails voiding the vITS cache. We cannot claim we have a comprehensive reset (hence the error

[Qemu-devel] [RFC v3 4/4] hw/intc/arm_gicv3_its: Implement full reset

2017-11-23 Thread Eric Auger
Voiding the ITS caches is not supposed to happen via individual register writes. So we introduced a dedicated ITS KVM device ioctl to perform a cold reset of the ITS: KVM_DEV_ARM_VGIC_GRP_CTRL/KVM_DEV_ARM_ITS_CTRL_RESET. Let's use this latter if the kernel supports it. Signed-off-by: Eric Auger

[Qemu-devel] [RFC v3 1/4] hw/intc/arm_gicv3_its: Don't call post_load on reset

2017-11-23 Thread Eric Auger
>From the very beginning, post_load() was called from common reset. This is not standard and obliged to discriminate the reset case from the restore case using the iidr value. Let's get rid of that call. Signed-off-by: Eric Auger --- hw/intc/arm_gicv3_its_common.c | 2 --

Re: [Qemu-devel] QEMU 3.0 ?

2017-11-23 Thread Igor Mammedov
On Thu, 23 Nov 2017 12:17:54 +0100 Paolo Bonzini wrote: > On 23/11/2017 11:57, Thomas Huth wrote: > > On 23.11.2017 11:17, Peter Maydell wrote: > >> On 23 November 2017 at 10:03, Cornelia Huck wrote: > >>> On Mon, 13 Nov 2017 08:14:28 +0100 > >>>

Re: [Qemu-devel] QEMU 3.0 ?

2017-11-23 Thread Paolo Bonzini
On 23/11/2017 13:09, Cornelia Huck wrote: > On Thu, 23 Nov 2017 13:05:33 +0100 > Paolo Bonzini wrote: > >> On 23/11/2017 12:57, Thomas Huth wrote: >>> On 23.11.2017 12:17, Paolo Bonzini wrote: On 23/11/2017 11:57, Thomas Huth wrote: >>> [...] > I've put

Re: [Qemu-devel] QEMU 3.0 ?

2017-11-23 Thread Daniel P. Berrange
On Thu, Nov 23, 2017 at 01:39:24PM +0100, Cornelia Huck wrote: > On Thu, 23 Nov 2017 13:26:14 +0100 > Paolo Bonzini wrote: > > > On 23/11/2017 13:09, Cornelia Huck wrote: > > > On Thu, 23 Nov 2017 13:05:33 +0100 > > > Paolo Bonzini wrote: > > > > >

  1   2   3   >