Re: [Qemu-devel] [PATCH 11/51] ram: Move dup_pages into RAMState

2017-03-29 Thread Peter Xu
On Tue, Mar 28, 2017 at 08:43:37PM +0200, Juan Quintela wrote: > Peter Xu wrote: > > On Thu, Mar 23, 2017 at 09:45:04PM +0100, Juan Quintela wrote: > >> Once there rename it to its actual meaning, zero_pages. > >> > >> Signed-off-by: Juan Quintela > >> Reviewed-by: Dr. David Alan Gilbert > > >

Re: [Qemu-devel] [PATCH for 2.9] vhost: generalize iommu memory region

2017-03-29 Thread Maxime Coquelin
On 03/29/2017 06:10 AM, Jason Wang wrote: We assumes the iommu_ops were attached to the root region of address space. This may not be true for all kinds of IOMMU implementation and especially after commit 3716d5902d74 ("pci: introduce a bus master container"). So fix this by not assuming as->ro

Re: [Qemu-devel] [PATCH v3 1/8] ppc/xics: introduce an 'icp' backlink under PowerPCCPU

2017-03-29 Thread Cédric Le Goater
On 03/29/2017 06:11 AM, David Gibson wrote: > On Tue, Mar 28, 2017 at 09:32:25AM +0200, Cédric Le Goater wrote: >> Today, the ICPState array of the sPAPR machine is indexed with >> 'cpu_index' of the CPUState. This numbering of CPUs is internal to >> QEMU and the guest only knows about what is expo

Re: [Qemu-devel] [PATCH v3 7/8] ppc/pnv: link the CPUs to the machine XICSFabric

2017-03-29 Thread Cédric Le Goater
On 03/29/2017 07:20 AM, David Gibson wrote: > On Tue, Mar 28, 2017 at 09:32:31AM +0200, Cédric Le Goater wrote: >> This assigns the ICPState object to the CPU using the PIR number for >> lookups before calling the XICS layer to finish the job. >> >> Signed-off-by: Cédric Le Goater >> Reviewed-by:

Re: [Qemu-devel] [RFC v3 2/3] hw/intc/arm_gicv3_its: Implement state save/restore

2017-03-29 Thread Auger Eric
Hi Juan, On 28/03/2017 21:45, Juan Quintela wrote: > Eric Auger wrote: >> We need to handle both registers and ITS tables. While >> register handling is standard, ITS table handling is more >> challenging since the kernel API is devised so that the >> tables are flushed into guest RAM and not in

Re: [Qemu-devel] [RFC v3 3/3] hw/intc/arm_gicv3_its: Allow save/restore

2017-03-29 Thread Auger Eric
Hi Juan, On 28/03/2017 21:47, Juan Quintela wrote: > Eric Auger wrote: >> We change the restoration priority of both the GICv3 and ITS. The >> GICv3 must be restored before the ITS and the ITS needs to be restored >> before PCIe devices since it translates their MSI transactions. >> >> Signed-off

[Qemu-devel] issues of region cache and iommu reset

2017-03-29 Thread Jason Wang
Hi: I meet an issue when doing reboot for a guest with two virtio-net-pci cards when iommu is enabled. What happens is: 1) vtd was reset first 2) during the reset of virtio-net-pci #1, deletion of msix subregion will cause a commit of all memory listeners 3) virito-net-pci #2's region cac

Re: [Qemu-devel] [RFC PATCH qemu 1/3] memory: Add get_fd() hook for IOMMU MR

2017-03-29 Thread Paolo Bonzini
On 29/03/2017 05:04, Alex Williamson wrote: >>> What if we used this as a prototype: >>> >>> int (*get_fd)(IOMMUFdType type, MemoryRegion *iommu); >>> >>> And then we defined: >>> >>> typedef enum { >>> SPAPR_IOMMU_TABLE_FD = 0, >>> } IOMMUFdType; >> >> Where do I put this enum definition?

Re: [Qemu-devel] [PATCH v4 1/8] xen: import ring.h from xen

2017-03-29 Thread Paolo Bonzini
On 29/03/2017 01:54, Stefano Stabellini wrote: >>> I understand your point of view, and honestly it wouldn't be a problem >>> doing it the way you suggested either. However, I think that going >>> forward it will be less of a maintenance pain to keep ring.h in sync, >>> compared to maintaining a

Re: [Qemu-devel] issues of region cache and iommu reset

2017-03-29 Thread Paolo Bonzini
On 29/03/2017 10:00, Jason Wang wrote: > > > 1) vtd was reset first > > 2) during the reset of virtio-net-pci #1, deletion of msix subregion > will cause a commit of all memory listeners > > 3) virito-net-pci #2's region cache will be update, but since vtd has > already been reset, it can't g

Re: [Qemu-devel] [PATCH v3 5/8] ppc/pnv: create the ICP and ICS objects under the machine

2017-03-29 Thread Cédric Le Goater
On 03/29/2017 07:18 AM, David Gibson wrote: > On Tue, Mar 28, 2017 at 09:32:29AM +0200, Cédric Le Goater wrote: >> Like this is done for the sPAPR machine, we use a simple array under >> the PowerNV machine to store the Interrupt Control Presenters (ICP) >> objects, one for each vCPU. This array is

Re: [Qemu-devel] issues of region cache and iommu reset

2017-03-29 Thread Peter Xu
On Wed, Mar 29, 2017 at 04:00:37PM +0800, Jason Wang wrote: > Hi: > > I meet an issue when doing reboot for a guest with two virtio-net-pci cards > when iommu is enabled. What happens is: > > > 1) vtd was reset first I'll add an extra question: Currently with Q35 and VT-d, our system qtree loo

Re: [Qemu-devel] [PATCH 11/51] ram: Move dup_pages into RAMState

2017-03-29 Thread Juan Quintela
Peter Xu wrote: > On Tue, Mar 28, 2017 at 08:43:37PM +0200, Juan Quintela wrote: >> Peter Xu wrote: >> > On Thu, Mar 23, 2017 at 09:45:04PM +0100, Juan Quintela wrote: >> >> Once there rename it to its actual meaning, zero_pages. >> >> >> >> Signed-off-by: Juan Quintela >> >> Reviewed-by: Dr. D

Re: [Qemu-devel] [PATCH] tcg/i386: Display AMD HT warning only for KVM

2017-03-29 Thread Paolo Bonzini
On 29/03/2017 06:32, Pranith Kumar wrote: > TCG uses the AMD cpu which warns when we use hyperthreading. Disable > the warning for TCG since it is not necessary. > > Signed-off-by: Pranith Kumar > --- > target/i386/cpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a

Re: [Qemu-devel] issues of region cache and iommu reset

2017-03-29 Thread Jason Wang
On 2017年03月29日 16:09, Paolo Bonzini wrote: On 29/03/2017 10:00, Jason Wang wrote: 1) vtd was reset first 2) during the reset of virtio-net-pci #1, deletion of msix subregion will cause a commit of all memory listeners 3) virito-net-pci #2's region cache will be update, but since vtd has al

Re: [Qemu-devel] issues of region cache and iommu reset

2017-03-29 Thread Paolo Bonzini
On 29/03/2017 10:37, Jason Wang wrote: >> >> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c >> index 03592c5..73e69ac 100644 >> --- a/hw/virtio/virtio.c >> +++ b/hw/virtio/virtio.c >> @@ -176,6 +176,10 @@ err_used: >> address_space_cache_destroy(&new->desc); >> err_desc: >> g_

Re: [Qemu-devel] issues of region cache and iommu reset

2017-03-29 Thread Cornelia Huck
On Wed, 29 Mar 2017 10:09:10 +0200 Paolo Bonzini wrote: > On 29/03/2017 10:00, Jason Wang wrote: > > > > > > 1) vtd was reset first > > > > 2) during the reset of virtio-net-pci #1, deletion of msix subregion > > will cause a commit of all memory listeners > > > > 3) virito-net-pci #2's regio

Re: [Qemu-devel] [PATCH v3] Allow setting NUMA distance for different NUMA nodes

2017-03-29 Thread He Chen
On Thu, Mar 23, 2017 at 10:29:55AM +0100, Igor Mammedov wrote: > On Wed, 22 Mar 2017 17:32:46 +0800 > He Chen wrote: > > > Current, QEMU does not provide a clear command to set vNUMA distance for > > guest although we already have `-numa` command to set vNUMA nodes. > > > > vNUMA distance makes

Re: [Qemu-devel] [RFC] Split migration bitmaps by ramblock

2017-03-29 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> Note that there are two reason for this, ARM and PPC do things like >> guests with 4kb pages on hosts with 16/64kb hosts, and then we have >> HugePages. Note all the workarounds that postcopy has to do because >> to

Re: [Qemu-devel] [PATCH 05/51] ram: Move bitmap_sync_count into RAMState

2017-03-29 Thread Juan Quintela
Peter Xu wrote: > On Tue, Mar 28, 2017 at 12:56:06PM +0200, Juan Quintela wrote: >> Peter Xu wrote: >> > On Thu, Mar 23, 2017 at 09:44:58PM +0100, Juan Quintela wrote: >> >> Signed-off-by: Juan Quintela >> >> Reviewed-by: Dr. David Alan Gilbert >> > >> > Reviewed-by: Peter Xu >> > >> > (I see

Re: [Qemu-devel] Python support in Risu

2017-03-29 Thread Peter Maydell
On 29 March 2017 at 03:27, G 3 wrote: > I was wondering if someone wrote a risugen_*.pm file in python and it still > worked with risugen, would you accept that patch? This isn't possible, it is a perl program, not a python program. thanks -- PMM

Re: [Qemu-devel] [PATCH 31/51] ram: Create ram_dirty_sync_count()

2017-03-29 Thread Peter Xu
On Thu, Mar 23, 2017 at 09:45:24PM +0100, Juan Quintela wrote: > This is a ram field that was inside MigrationState. Move it to > RAMState and make it the same that the other ram stats. > > Signed-off-by: Juan Quintela Reviewed-by: Peter Xu -- peterx

Re: [Qemu-devel] [PATCH 05/51] ram: Move bitmap_sync_count into RAMState

2017-03-29 Thread Peter Xu
On Wed, Mar 29, 2017 at 10:56:22AM +0200, Juan Quintela wrote: > Peter Xu wrote: > > On Tue, Mar 28, 2017 at 12:56:06PM +0200, Juan Quintela wrote: > >> Peter Xu wrote: > >> > On Thu, Mar 23, 2017 at 09:44:58PM +0100, Juan Quintela wrote: > >> >> Signed-off-by: Juan Quintela > >> >> Reviewed-by:

Re: [Qemu-devel] issues of region cache and iommu reset

2017-03-29 Thread Jason Wang
On 2017年03月29日 16:41, Paolo Bonzini wrote: On 29/03/2017 10:37, Jason Wang wrote: diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 03592c5..73e69ac 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -176,6 +176,10 @@ err_used: address_space_cache_destroy(&new->desc);

Re: [Qemu-devel] issues of region cache and iommu reset

2017-03-29 Thread Paolo Bonzini
On 29/03/2017 11:09, Jason Wang wrote: >>> This looks a good fix but may not solve this issue completely. Depends >>> on the iova that guest uses, address_space_cache_init() may succeed even >>> in this case since vtd does a passthrough translation in this case. >> Can you explain this more?

Re: [Qemu-devel] issues of region cache and iommu reset

2017-03-29 Thread Jason Wang
On 2017年03月29日 16:45, Cornelia Huck wrote: On Wed, 29 Mar 2017 10:09:10 +0200 Paolo Bonzini wrote: On 29/03/2017 10:00, Jason Wang wrote: 1) vtd was reset first 2) during the reset of virtio-net-pci #1, deletion of msix subregion will cause a commit of all memory listeners 3) virito-net-

Re: [Qemu-devel] issues of region cache and iommu reset

2017-03-29 Thread Jason Wang
On 2017年03月29日 17:11, Paolo Bonzini wrote: On 29/03/2017 11:09, Jason Wang wrote: This looks a good fix but may not solve this issue completely. Depends on the iova that guest uses, address_space_cache_init() may succeed even in this case since vtd does a passthrough translation in this case.

Re: [Qemu-devel] [PATCH v3 00/11] MTTCG fix-ups for 2.9

2017-03-29 Thread Alex Bennée
Pavel Dovgalyuk writes: >> From: mttcg-requ...@listserver.greensocs.com >> [mailto:mttcg-requ...@listserver.greensocs.com] >> Pavel Dovgalyuk writes: >> >> >> From: Alex Bennée [mailto:alex.ben...@linaro.org] >> >> Pavel Dovgalyuk writes: >> >> >> From: Alex Bennée [mailto:alex.ben...@linaro.

Re: [Qemu-devel] [PATCH v2] configure: eliminate Python dependency for --help

2017-03-29 Thread Stefan Hajnoczi
On Tue, Mar 28, 2017 at 02:44:18PM +0100, Stefan Hajnoczi wrote: > The ./configure script should produce --help output even if Python is > not installed. > > Listing trace backends is simple: show the names of all Python modules > in scripts/tracetool/backend/ whose source code contains 'PUBLIC =

Re: [Qemu-devel] qemu-devel mailing list vs DMARC and microsoft.com's p=reject policy

2017-03-29 Thread Stefan Hajnoczi
On Tue, Mar 28, 2017 at 06:35:55PM +0100, Peter Maydell wrote: > Hi; it's been pointed out to me that we have a problem with qemu-devel > unsubscribing people because of DMARC. Specifically: > * microsoft.com publishes a DMARC policy that has p=reject > * some subscribers use mail systems that ho

Re: [Qemu-devel] [RFC 0/2] Disable hotplug during migration

2017-03-29 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> Hi >> >> This series disable hotplug/unplug during migration. Thank to Markus >> for explaining where I had to put the checks. Why? Because during >> migration we will fail if there are changes. For instance, in

Re: [Qemu-devel] [PATCH 1/1] parallels: wrong call to bdrv_truncate

2017-03-29 Thread Kevin Wolf
Am 28.03.2017 um 19:12 hat Denis V. Lunev geschrieben: > On 03/28/2017 07:26 PM, Kevin Wolf wrote: > > [ Cc: qemu-block ] > > > > Am 27.03.2017 um 16:38 hat Denis V. Lunev geschrieben: > >> Parallels driver should not call bdrv_truncate if the image was opened > >> in the read-only mode. Without th

Re: [Qemu-devel] [RFC 0/2] Disable hotplug during migration

2017-03-29 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> Hi >> >> This series disable hotplug/unplug during migration. Thank to Markus >> for explaining where I had to put the checks. Why? Because during >> migration we will fail if there are changes. For instance, in

Re: [Qemu-devel] qemu-devel mailing list vs DMARC and microsoft.com's p=reject policy

2017-03-29 Thread Thomas Huth
On 29.03.2017 08:46, Markus Armbruster wrote: > "Michael S. Tsirkin" writes: > >> On Tue, Mar 28, 2017 at 06:35:55PM +0100, Peter Maydell wrote: >>> Hi; it's been pointed out to me that we have a problem with qemu-devel >>> unsubscribing people because of DMARC. Specifically: >>> * microsoft.com

Re: [Qemu-devel] [PATCH 1/1] virtio: fail device if set_event_notifier fails

2017-03-29 Thread Halil Pasic
On 03/23/2017 06:09 PM, Michael S. Tsirkin wrote: > On Mon, Mar 06, 2017 at 05:04:41PM +0100, Cornelia Huck wrote: >> On Mon, 6 Mar 2017 16:21:13 +0100 >> Halil Pasic wrote: >> >>> On 03/06/2017 03:56 PM, Cornelia Huck wrote: On Fri, 3 Mar 2017 14:08:37 +0100 Halil Pasic wrote: >

Re: [Qemu-devel] [PULL 0/3] slirp updates

2017-03-29 Thread Stefan Hajnoczi
On Wed, Mar 29, 2017 at 12:53:24AM +0200, Samuel Thibault wrote: > The following changes since commit df9046363220e57d45818312759b954c033c58ab: > > Update version for v2.9.0-rc2 release (2017-03-28 19:11:16 +0100) > > are available in the git repository at: > > http://people.debian.org/~sthi

Re: [Qemu-devel] qemu-devel mailing list vs DMARC and microsoft.com's p=reject policy

2017-03-29 Thread Markus Armbruster
Thomas Huth writes: > On 29.03.2017 08:46, Markus Armbruster wrote: >> "Michael S. Tsirkin" writes: >> >>> On Tue, Mar 28, 2017 at 06:35:55PM +0100, Peter Maydell wrote: Hi; it's been pointed out to me that we have a problem with qemu-devel unsubscribing people because of DMARC. Speci

Re: [Qemu-devel] issues of region cache and iommu reset

2017-03-29 Thread Cornelia Huck
On Wed, 29 Mar 2017 17:18:00 +0800 Jason Wang wrote: > On 2017年03月29日 16:45, Cornelia Huck wrote: > > On Wed, 29 Mar 2017 10:09:10 +0200 > > Paolo Bonzini wrote: > > > >> On 29/03/2017 10:00, Jason Wang wrote: > >>> > >>> 1) vtd was reset first > >>> > >>> 2) during the reset of virtio-net-pci #

Re: [Qemu-devel] [PATCH v3] Allow setting NUMA distance for different NUMA nodes

2017-03-29 Thread Igor Mammedov
On Wed, 29 Mar 2017 16:50:00 +0800 He Chen wrote: > On Thu, Mar 23, 2017 at 10:29:55AM +0100, Igor Mammedov wrote: > > On Wed, 22 Mar 2017 17:32:46 +0800 > > He Chen wrote: > > > > > Current, QEMU does not provide a clear command to set vNUMA distance for > > > guest although we already have

Re: [Qemu-devel] [PATCH for-2.10 05/23] numa: move source of default CPUs to NUMA node mapping into boards

2017-03-29 Thread Igor Mammedov
On Wed, 29 Mar 2017 13:24:49 +1100 David Gibson wrote: > On Tue, Mar 28, 2017 at 12:53:10PM +0200, Igor Mammedov wrote: > > On Tue, 28 Mar 2017 15:19:20 +1100 > > David Gibson wrote: > > > > > On Wed, Mar 22, 2017 at 02:32:30PM +0100, Igor Mammedov wrote: > > > > Originally CPU threads were

Re: [Qemu-devel] [PATCH] tcg/i386: Display AMD HT warning only for KVM

2017-03-29 Thread Eduardo Habkost
On Wed, Mar 29, 2017 at 10:31:13AM +0200, Paolo Bonzini wrote: > On 29/03/2017 06:32, Pranith Kumar wrote: > > TCG uses the AMD cpu which warns when we use hyperthreading. Disable > > the warning for TCG since it is not necessary. > > > > Signed-off-by: Pranith Kumar > > --- > > target/i386/cpu.

Re: [Qemu-devel] [PATCH] kvm: pass the virtual SEI syndrome to guest OS

2017-03-29 Thread Laszlo Ersek
(This ought to be one of the longest address lists I've ever seen :) Thanks for the CC. I'm glad Shannon is already on the CC list. For good measure, I'm adding MST and Igor.) On 03/29/17 12:36, Achin Gupta wrote: > Hi gengdongjiu, > > On Wed, Mar 29, 2017 at 05:36:37PM +0800, gengdongjiu wrote:

Re: [Qemu-devel] [PATCH for-2.10 22/23] numa: add '-numa cpu, ...' option for property based node mapping

2017-03-29 Thread Igor Mammedov
On Wed, 29 Mar 2017 13:27:23 +1100 David Gibson wrote: > On Tue, Mar 28, 2017 at 01:09:11PM +0200, Igor Mammedov wrote: > > On Tue, 28 Mar 2017 16:16:02 +1100 > > David Gibson wrote: > > > > > On Wed, Mar 22, 2017 at 02:32:47PM +0100, Igor Mammedov wrote: > > > > legacy cpu to node mapping

Re: [Qemu-devel] [PATCH v3] Allow setting NUMA distance for different NUMA nodes

2017-03-29 Thread Andrew Jones
On Wed, Mar 29, 2017 at 01:44:58PM +0200, Igor Mammedov wrote: > On Wed, 29 Mar 2017 16:50:00 +0800 > He Chen wrote: > > > > +static void default_numa_distance(void) > > > > +{ > > > > +int src, dst; > > > > + > > > fill in defaults only if there weren't any '-numa dist' on CLI > > > and ref

Re: [Qemu-devel] [PATCH] kvm: pass the virtual SEI syndrome to guest OS

2017-03-29 Thread gengdongjiu
Hi Laszlo/Biesheuvel/Qemu developer, Now I encounter a issue and want to consult with you in ARM64 platform, as described below: when guest OS happen synchronous or asynchronous abort, kvm needs to send the error address to Qemu or UEFI through sigbus to dynamically generate APEI table.

Re: [Qemu-devel] [PATCH] kvm: pass the virtual SEI syndrome to guest OS

2017-03-29 Thread Achin Gupta
Hi gengdongjiu, On Wed, Mar 29, 2017 at 05:36:37PM +0800, gengdongjiu wrote: > > Hi Laszlo/Biesheuvel/Qemu developer, > >Now I encounter a issue and want to consult with you in ARM64 platform, as > described below: > >when guest OS happen synchronous or asynchronous abort, kvm needs to se

Re: [Qemu-devel] [PATCH v4 0/3] Introduce vhost-user-scsi and sample application

2017-03-29 Thread Michael S. Tsirkin
On Thu, Mar 02, 2017 at 08:43:00AM -0800, Felipe Franciosi wrote: > Based on various discussions on the 2016 KVM Forum, I'm sending over a > vhost-user-scsi implementation for your consideration. > > This patchset introduces a new vhost-user SCSI device. While heavily > based on vhost-scsi, it is

Re: [Qemu-devel] [PATCH] kvm: pass the virtual SEI syndrome to guest OS

2017-03-29 Thread Michael S. Tsirkin
On Wed, Mar 29, 2017 at 01:58:29PM +0200, Laszlo Ersek wrote: > (8) When QEMU gets SIGBUS from the kernel -- I hope that's going to come > through a signalfd -- QEMU can format the CPER right into guest memory, > and then inject whatever interrupt (or assert whatever GPIO line) is > necessary for n

Re: [Qemu-devel] [RFC] migration/block:limit the time used for block migration

2017-03-29 Thread 858585 jemmy
On Tue, Mar 28, 2017 at 5:47 PM, Juan Quintela wrote: > Lidong Chen wrote: >> when migration with quick speed, mig_save_device_bulk invoke >> bdrv_is_allocated too frequently, and cause vnc reponse slowly. >> this patch limit the time used for bdrv_is_allocated. >> >> Signed-off-by: Lidong Chen

Re: [Qemu-devel] [PATCH] kvm: pass the virtual SEI syndrome to guest OS

2017-03-29 Thread Laszlo Ersek
On 03/29/17 14:51, Michael S. Tsirkin wrote: > On Wed, Mar 29, 2017 at 01:58:29PM +0200, Laszlo Ersek wrote: >> (8) When QEMU gets SIGBUS from the kernel -- I hope that's going to come >> through a signalfd -- QEMU can format the CPER right into guest memory, >> and then inject whatever interrupt (

[Qemu-devel] [Bug 1677247] [NEW] QEMU e500 kvm no video and kernel crashing in virtios modules

2017-03-29 Thread luigiburdo
Public bug reported: Hi, i been attached the log of my issue on Qoriq e5500 when i start qemu-system-ppc64 -cpu e5500 -M ppce500 --enable-kvm -device virtio-gpu-pci --nodefaults -display gtk and so and so . i have crashes in virtio modules in the VM and continue traces on the host machine. If

Re: [Qemu-devel] [PATCH] pci: correctly initialize bus master as name

2017-03-29 Thread Marcel Apfelbaum
On 03/29/2017 09:38 AM, Jason Wang wrote: After commit b86eacb804bdb ("hw/pci: delay bus_master_enable_region initialization"), if the device is hotplugged, bus master as will be initialized before pci_dev->name which will cause a NULL address space name. Things will be even worse after 3716d5902

[Qemu-devel] [PATCH v4 0/9] ppc/pnv: interrupt controller (POWER8)

2017-03-29 Thread Cédric Le Goater
Hello, Here is a series adding support for the interrupt controller as found on a POWER8 system. POWER9 uses a different interrupt controller called XIVE, still to be worked on. The initial patches are more cleanups of the XICS layer which move the IRQ 'server' number mapping under the machine ha

[Qemu-devel] [PATCH v4 1/9] ppc/xics: introduce an 'intc' backlink under PowerPCCPU

2017-03-29 Thread Cédric Le Goater
Today, the ICPState array of the sPAPR machine is indexed with 'cpu_index' of the CPUState. This numbering of CPUs is internal to QEMU and the guest only knows about what is exposed in the device tree, that is the 'cpu_dt_id'. This is why sPAPR uses the helper xics_get_cpu_index_by_dt_id() to do th

[Qemu-devel] [PATCH v4 2/9] spapr: move the IRQ server number mapping under the machine

2017-03-29 Thread Cédric Le Goater
This is the second step to abstract the IRQ 'server' number of the XICS layer. Now that the prereq cleanups have been done in the previous patch, we can move down the 'cpu_dt_id' to 'cpu_index' mapping in the sPAPR machine handler. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson --- h

[Qemu-devel] [PATCH v4 6/9] ppc/pnv: add a helper to calculate MMIO addresses registers

2017-03-29 Thread Cédric Le Goater
Some controllers (ICP, PSI) have a base register address which is calculated using the chip id. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson --- include/hw/ppc/pnv.h | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/hw/ppc/pnv.h b/include/hw/p

Re: [Qemu-devel] qemu-devel mailing list vs DMARC and microsoft.com's p=reject policy

2017-03-29 Thread Michael S. Tsirkin
On Wed, Mar 29, 2017 at 12:44:27PM +0200, Thomas Huth wrote: > On 29.03.2017 08:46, Markus Armbruster wrote: > > "Michael S. Tsirkin" writes: > > > >> On Tue, Mar 28, 2017 at 06:35:55PM +0100, Peter Maydell wrote: > >>> Hi; it's been pointed out to me that we have a problem with qemu-devel > >>>

[Qemu-devel] [PATCH v4 3/9] ppc/xics: add a realize() handler to ICPStateClass

2017-03-29 Thread Cédric Le Goater
It will be used by derived classes in PowerNV for customization. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson --- hw/intc/xics.c| 5 + include/hw/ppc/xics.h | 1 + 2 files changed, 6 insertions(+) diff --git a/hw/intc/xics.c b/hw/intc/xics.c index 56fe70cd10e9..625d9f7

[Qemu-devel] [PATCH v4 8/9] ppc/pnv: extend the machine with a InterruptStatsProvider interface

2017-03-29 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 17 + 1 file changed, 17 insertions(+) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 57560b09e04e..15a908f4306a 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -33,6 +33,8 @@ #include "exec/address-spaces.h" #include "qemu/cut

[Qemu-devel] [PATCH v4 5/9] ppc/pnv: create the ICP object under PnvCore

2017-03-29 Thread Cédric Le Goater
Each thread of a core is linked to an ICP. This allocates a PnvICPState object when the PowerPCCPU object is realized and lets the XICSFabric do the store under the 'intc' backlink when xics_cpu_setup() is called. This modeling removes the need of maintaining an array of ICP objects under the Powe

[Qemu-devel] [PATCH v4 4/9] ppc/pnv: add a PnvICPState object

2017-03-29 Thread Cédric Le Goater
This provides a new ICPState object for the PowerNV machine (POWER8). Access to the Interrupt Management area is done though a memory region. It contains the registers of the Interrupt Control Presenters of each thread which are used to accept, return, forward interrupts in the system. Signed-off-

[Qemu-devel] [PATCH v4 9/9] ppc/pnv: add memory regions for the ICP registers

2017-03-29 Thread Cédric Le Goater
This provides to a PowerNV chip (POWER8) access to the Interrupt Management area, which contains the registers of the Interrupt Control Presenters of each thread. These are used to accept, return, forward interrupts in the system. This area is modeled with a per-chip container memory region holdin

[Qemu-devel] [PATCH v4 7/9] ppc/pnv: extend the machine with a XICSFabric interface

2017-03-29 Thread Cédric Le Goater
A XICSFabric QOM interface is used by the XICS layer to manipulate the ICP and ICS objects. Let's define the associated handlers for the PowerNV machine. All handlers should be defined even if there is no ICS under the PowerNV machine yet. Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 42 ++

Re: [Qemu-devel] [PATCH] kvm: pass the virtual SEI syndrome to guest OS

2017-03-29 Thread Michael S. Tsirkin
On Wed, Mar 29, 2017 at 03:36:59PM +0200, Laszlo Ersek wrote: > On 03/29/17 14:51, Michael S. Tsirkin wrote: > > On Wed, Mar 29, 2017 at 01:58:29PM +0200, Laszlo Ersek wrote: > >> (8) When QEMU gets SIGBUS from the kernel -- I hope that's going to come > >> through a signalfd -- QEMU can format the

Re: [Qemu-devel] [PATCH 1/1] parallels: wrong call to bdrv_truncate

2017-03-29 Thread Kevin Wolf
Am 29.03.2017 um 15:53 hat Denis V. Lunev geschrieben: > On 03/29/2017 01:41 PM, Kevin Wolf wrote: > > Am 28.03.2017 um 19:12 hat Denis V. Lunev geschrieben: > >> On 03/28/2017 07:26 PM, Kevin Wolf wrote: > >>> [ Cc: qemu-block ] > >>> > >>> Am 27.03.2017 um 16:38 hat Denis V. Lunev geschrieben: >

Re: [Qemu-devel] [PATCH] target/s390x/kvm: Fix problem when running with SELinux under z/VM

2017-03-29 Thread Thomas Huth
On 24.03.2017 10:39, Christian Borntraeger wrote: > On 03/24/2017 10:26 AM, Thomas Huth wrote: >> When running QEMU with KVM under z/VM, the memory for the guest >> is allocated via legacy_s390_alloc() since the KVM_CAP_S390_COW >> extension is not supported on z/VM. legacy_s390_alloc() then uses >

[Qemu-devel] [Bug 1390520] Re: virtual machine fails to start with connected audio cd

2017-03-29 Thread ChristianEhrhardt
I'm actually not so convinced this is "supposed" or expected to work, it might be worth to subscribe upstream qemu to get an expertise on that. ** Also affects: qemu Importance: Undecided Status: New -- You received this bug notification because you are a member of qemu- devel-ml, whic

Re: [Qemu-devel] [PATCH] target/s390x/kvm: Fix problem when running with SELinux under z/VM

2017-03-29 Thread Christian Borntraeger
On 03/29/2017 04:21 PM, Thomas Huth wrote: > On 24.03.2017 10:39, Christian Borntraeger wrote: >> On 03/24/2017 10:26 AM, Thomas Huth wrote: >>> When running QEMU with KVM under z/VM, the memory for the guest >>> is allocated via legacy_s390_alloc() since the KVM_CAP_S390_COW >>> extension is not s

Re: [Qemu-devel] [PATCH 1/1] parallels: wrong call to bdrv_truncate

2017-03-29 Thread Denis V. Lunev
On 03/29/2017 01:41 PM, Kevin Wolf wrote: > Am 28.03.2017 um 19:12 hat Denis V. Lunev geschrieben: >> On 03/28/2017 07:26 PM, Kevin Wolf wrote: >>> [ Cc: qemu-block ] >>> >>> Am 27.03.2017 um 16:38 hat Denis V. Lunev geschrieben: Parallels driver should not call bdrv_truncate if the image was

Re: [Qemu-devel] [PATCH 1/1] parallels: wrong call to bdrv_truncate

2017-03-29 Thread Kevin Wolf
Am 29.03.2017 um 16:18 hat Denis V. Lunev geschrieben: > On 03/29/2017 05:11 PM, Kevin Wolf wrote: > > Am 29.03.2017 um 15:53 hat Denis V. Lunev geschrieben: > >> On 03/29/2017 01:41 PM, Kevin Wolf wrote: > >>> The question is what the contract of bdrv_truncate() is. I think "you > >>> can only cal

Re: [Qemu-devel] [PATCH] kvm: pass the virtual SEI syndrome to guest OS

2017-03-29 Thread Christoffer Dall
On Wed, Mar 29, 2017 at 10:36:51PM +0800, gengdongjiu wrote: > Hi Achin, > Thanks for your mail and answer. > > 2017-03-29 18:36 GMT+08:00, Achin Gupta : > > Hi gengdongjiu, > > > > On Wed, Mar 29, 2017 at 05:36:37PM +0800, gengdongjiu wrote: > >> > >> Hi Laszlo/Biesheuvel/Qemu developer, > >>

Re: [Qemu-devel] [PATCH] Dead code removal: removing code for unsupported DEPTH.

2017-03-29 Thread Iwona Kotlarska
Hi, I wanted to say that I think this patch is beyond me, I tried working on it having considered the additional feedback, but it needs a bit more understanding of the code and I won't make it on time (I wanted to apply to Outreachy internships), so I'm very sorry for bothering you without rea

Re: [Qemu-devel] [PATCH 3/4] savevm: fix savevm after migration

2017-03-29 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 28/03/2017 15:16, Vladimir Sementsov-Ogievskiy wrote: > > 28.03.2017 15:09, Kevin Wolf wrote: > >> Am 28.03.2017 um 13:13 hat Dr. David Alan Gilbert geschrieben: > >>> * Kevin Wolf (kw...@redhat.com) wrote: > Am 28.03.2017 um 12:55 hat Dr

Re: [Qemu-devel] [PATCH] kvm: pass the virtual SEI syndrome to guest OS

2017-03-29 Thread Laszlo Ersek
On 03/29/17 16:48, Christoffer Dall wrote: > On Wed, Mar 29, 2017 at 10:36:51PM +0800, gengdongjiu wrote: >> 2017-03-29 18:36 GMT+08:00, Achin Gupta : >>> Qemu is essentially fulfilling the role of secure firmware at the >>> EL2/EL1 interface (as discussed with Christoffer below). So it >>> should

Re: [Qemu-devel] [PATCH 3/4] savevm: fix savevm after migration

2017-03-29 Thread Paolo Bonzini
On 29/03/2017 17:29, Dr. David Alan Gilbert wrote: >>> 'abort' is not very good too I think. migration is completed, nothing to >>> abort.. (may be successful migration to file for suspend, some kind of >>> vm cloning, etc) >> There is already migrate_cancel. Does it make sense to make it >> rea

Re: [Qemu-devel] [PATCH 1/1] parallels: wrong call to bdrv_truncate

2017-03-29 Thread Denis V. Lunev
On 03/29/2017 05:11 PM, Kevin Wolf wrote: > Am 29.03.2017 um 15:53 hat Denis V. Lunev geschrieben: >> On 03/29/2017 01:41 PM, Kevin Wolf wrote: >>> Am 28.03.2017 um 19:12 hat Denis V. Lunev geschrieben: On 03/28/2017 07:26 PM, Kevin Wolf wrote: > [ Cc: qemu-block ] > > Am 27.03.201

Re: [Qemu-devel] [RFC] migration/block:limit the time used for block migration

2017-03-29 Thread Juan Quintela
858585 jemmy wrote: > On Tue, Mar 28, 2017 at 5:47 PM, Juan Quintela wrote: >> Lidong Chen wrote: >>> when migration with quick speed, mig_save_device_bulk invoke >>> bdrv_is_allocated too frequently, and cause vnc reponse slowly. >>> this patch limit the time used for bdrv_is_allocated. >>> >>>

Re: [Qemu-devel] [PATCH 2/3] libqtest: Add a generic function to run a callback function for every machine

2017-03-29 Thread Thomas Huth
On 28.03.2017 10:17, Dr. David Alan Gilbert wrote: > * Thomas Huth (th...@redhat.com) wrote: >> On 27.03.2017 16:24, Dr. David Alan Gilbert wrote: >>> * Thomas Huth (th...@redhat.com) wrote: Some tests need to run single tests for every available machine of the current QEMU binary. To avo

Re: [Qemu-devel] Deprecating old machine types

2017-03-29 Thread Thomas Huth
On 27.03.2017 21:04, John Snow wrote: > > On 03/27/2017 04:06 AM, Thomas Huth wrote: >> On 24.03.2017 23:10, John Snow wrote: [...] >>> I have a list of things I want to axe... >> >> I've started a Wiki page with such a list here: >> >> http://wiki.qemu-project.org/Features/LegacyRemoval >> >> Fee

[Qemu-devel] [for-2.9 3/8] io vnc sockets: Clean up SocketAddressKind switches

2017-03-29 Thread Markus Armbruster
We have quite a few switches over SocketAddressKind. Some have case labels for all enumeration values, others rely on a default label. Some abort when the value isn't a valid SocketAddressKind, others report an error then. Unify as follows. Always provide case labels for all enumeration values,

[Qemu-devel] [for-2.9 8/8] sheepdog: Fix blockdev-add

2017-03-29 Thread Markus Armbruster
Commit 831acdc "sheepdog: Implement bdrv_parse_filename()" and commit d282f34 "sheepdog: Support blockdev-add" have different ideas on how the QemuOpts parameters for the server address are named. Fix that. While there, rename BlockdevOptionsSheepdog member addr to server, for consistency with Blo

[Qemu-devel] [for-2.9 5/8] gluster: Prepare for SocketAddressFlat extension

2017-03-29 Thread Markus Armbruster
qemu_gluster_glfs_init() and qemu_gluster_parse_json() rely on the fact that SocketAddressFlatType has only two members SOCKET_ADDRESS_FLAT_TYPE_INET and SOCKET_ADDRESS_FLAT_TYPE_UNIX. Correct, but won't stay correct. Make them more robust. Signed-off-by: Markus Armbruster --- block/gluster.c |

[Qemu-devel] [for-2.9 7/8] nbd: Tidy up blockdev-add interface

2017-03-29 Thread Markus Armbruster
SocketAddress is a simple union, and simple unions are awkward: they have their variant members wrapped in a "data" object on the wire, and require additional indirections in C. I intend to limit its use to existing external interfaces, and convert all internal interfaces to SocketAddressFlat. Bl

[Qemu-devel] [for-2.9 2/8] char: Fix socket with "type": "vsock" address

2017-03-29 Thread Markus Armbruster
Watch this: $ qemu-system-x86_64 -nodefaults -S -display none -qmp stdio {"QMP": {"version": {"qemu": {"micro": 91, "minor": 8, "major": 2}, "package": " (v2.8.0-1195-gf84141e-dirty)"}, "capabilities": []}} { "execute": "qmp_capabilities" } {"return": {}} { "execute": "chardev

[Qemu-devel] [for-2.9 0/8] Fixes and cleanups around SocketAddress

2017-03-29 Thread Markus Armbruster
What makes this 2.9 material is the crash bug fixed in PATCH 2 and the QAPI/QMP interface cleanups in PATCH 7+8. Sheepdog tests still in progress (with Kashyap's help), but I'm sending this out now in the hope of getting a head start on review. Markus Armbruster (8): nbd sockets vnc: Mark probl

[Qemu-devel] [for-2.9 6/8] qapi-schema: SocketAddressFlat variants 'vsock' and 'fd'

2017-03-29 Thread Markus Armbruster
Note that the new variants are impossible in qemu_gluster_glfs_init(), because the gconf->server can only come from qemu_gluster_parse_uri() or qemu_gluster_parse_json(), and neither can create anything but 'tcp' or 'unix'. Signed-off-by: Markus Armbruster --- block/gluster.c | 2 ++ qapi-sche

Re: [Qemu-devel] [for-2.9 2/8] char: Fix socket with "type": "vsock" address

2017-03-29 Thread Marc-André Lureau
Hi - Original Message - > Watch this: > > $ qemu-system-x86_64 -nodefaults -S -display none -qmp stdio > {"QMP": {"version": {"qemu": {"micro": 91, "minor": 8, "major": 2}, > "package": " (v2.8.0-1195-gf84141e-dirty)"}, "capabilities": []}} > { "execute": "qmp_capabilitie

[Qemu-devel] [for-2.9 1/8] nbd sockets vnc: Mark problematic address family tests TODO

2017-03-29 Thread Markus Armbruster
Certain features make sense only with certain address families. For instance, passing file descriptors requires AF_UNIX. Testing SocketAddress's saddr->type == SOCKET_ADDRESS_KIND_UNIX is obvious, but problematic: it can't recognize AF_UNIX when type == SOCKET_ADDRESS_KIND_FD. Mark such tests of

[Qemu-devel] [for-2.9 4/8] block: Document -drive problematic code and bugs

2017-03-29 Thread Markus Armbruster
-blockdev and blockdev_add convert their arguments via QObject to BlockdevOptions for qmp_blockdev_add(), which converts them back to QObject, then to a flattened QDict. The QDict's members are typed according to the QAPI schema. -drive converts its argument via QemuOpts to a (flat) QDict. This

Re: [Qemu-devel] Deprecating old machine types

2017-03-29 Thread Dr. David Alan Gilbert
* Thomas Huth (th...@redhat.com) wrote: > On 27.03.2017 21:04, John Snow wrote: > > > > On 03/27/2017 04:06 AM, Thomas Huth wrote: > >> On 24.03.2017 23:10, John Snow wrote: > [...] > >>> I have a list of things I want to axe... > >> > >> I've started a Wiki page with such a list here: > >> > >> h

Re: [Qemu-devel] [for-2.9 2/8] char: Fix socket with "type": "vsock" address

2017-03-29 Thread Marc-André Lureau
- Original Message - > > Hi > > - Original Message - > > Watch this: > > > > $ qemu-system-x86_64 -nodefaults -S -display none -qmp stdio > > {"QMP": {"version": {"qemu": {"micro": 91, "minor": 8, "major": 2}, > > "package": " (v2.8.0-1195-gf84141e-dirty)"}, "capabi

[Qemu-devel] [PATCH] hmp: fix "info cpu" segfault

2017-03-29 Thread Iwona Kotlarska
Running "dump-guest-memory /dev/null 0 8192" results in segfault. Fix by checking if we have CPU. Signed-off-by: Iwona Kotlarska --- target/i386/arch_dump.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/i386/arch_dump.c b/target/i386/arch_dump.c index 5a2e4be5

Re: [Qemu-devel] Deprecating old machine types

2017-03-29 Thread Thomas Huth
On 29.03.2017 18:46, Dr. David Alan Gilbert wrote: > * Thomas Huth (th...@redhat.com) wrote: >> On 27.03.2017 21:04, John Snow wrote: >>> >>> On 03/27/2017 04:06 AM, Thomas Huth wrote: On 24.03.2017 23:10, John Snow wrote: >> [...] > I have a list of things I want to axe... I've

Re: [Qemu-devel] Deprecating old machine types

2017-03-29 Thread Paolo Bonzini
On 29/03/2017 18:46, Dr. David Alan Gilbert wrote: >> By the way, what about old machine types like "pc-0.10" ? Do we want to >> carry them along forever (e.g. since it is not too complicated to >> maintain?), or shall we get rid of those one day (e.g. with QEMU 3.0), too? > It seems reasonable t

Re: [Qemu-devel] [for-2.9 7/8] nbd: Tidy up blockdev-add interface

2017-03-29 Thread Paolo Bonzini
On 29/03/2017 18:45, Markus Armbruster wrote: > Unfortunately, SocketAddress is also visible in -drive since 2.8. Add > still more gunk to nbd_process_legacy_socket_options(). You can now > shorten > > -drive > if=none,driver=nbd,server.type=inet,server.data.host=127.0.0.1,server.data.por

Re: [Qemu-devel] [PATCH 23/51] ram: Everything was init to zero, so use memset

2017-03-29 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > And then init only things that are not zero by default. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 25 +++-- > 1 file changed, 3 insertions(+), 22 deletions(-) > > diff --gi

Re: [Qemu-devel] [PATCH] kvm: pass the virtual SEI syndrome to guest OS

2017-03-29 Thread gengdongjiu
Hi Achin, Thanks for your mail and answer. 2017-03-29 18:36 GMT+08:00, Achin Gupta : > Hi gengdongjiu, > > On Wed, Mar 29, 2017 at 05:36:37PM +0800, gengdongjiu wrote: >> >> Hi Laszlo/Biesheuvel/Qemu developer, >> >>Now I encounter a issue and want to consult with you in ARM64 platform, >>

Re: [Qemu-devel] [PATCH] kvm: pass the virtual SEI syndrome to guest OS

2017-03-29 Thread Punit Agrawal
Laszlo Ersek writes: > On 03/29/17 14:51, Michael S. Tsirkin wrote: >> On Wed, Mar 29, 2017 at 01:58:29PM +0200, Laszlo Ersek wrote: >>> (8) When QEMU gets SIGBUS from the kernel -- I hope that's going to come >>> through a signalfd -- QEMU can format the CPER right into guest memory, >>> and the

Re: [Qemu-devel] [PATCH] hmp: fix "info cpu" segfault

2017-03-29 Thread Marcel Apfelbaum
On 03/29/2017 07:52 PM, Iwona Kotlarska wrote: Running "dump-guest-memory /dev/null 0 8192" results in segfault. Fix by checking if we have CPU. Hi Iwona, Thank you for contributing to the QEMU project. Please state the whole command line that causes the problem, not only the hmp command:

Re: [Qemu-devel] [PATCH 26/51] ram: Move bytes_transferred into RAMState

2017-03-29 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 35 +-- > 1 file changed, 17 insertions(+), 18 deletions(-) > > diff --git a/migration/ram.c b/migration/ram.c > index 0900

  1   2   >