Re: [Qemu-devel] [PATCH v2] Change net/socket.c to use socket_*() functions

2016-06-21 Thread Ashijeet Acharya
On Tue, Jun 21, 2016 at 7:19 AM, Jason Wang wrote: > > > On 2016年06月20日 23:09, Peter Maydell wrote: >> >> On 20 June 2016 at 15:55, Paolo Bonzini wrote: >>> >>> >>> On 18/06/2016 09:54, Ashijeet Acharya wrote: Use socket_*() functions from include/qemu/sockets.h instead of listen()

Re: [Qemu-devel] [PATCH qemu v18 2/5] vfio: spapr: Add DMA memory preregistering (SPAPR IOMMU v2)

2016-06-21 Thread David Gibson
On Tue, Jun 21, 2016 at 11:14:02AM +1000, Alexey Kardashevskiy wrote: > This makes use of the new "memory registering" feature. The idea is > to provide the userspace ability to notify the host kernel about pages > which are going to be used for DMA. Having this information, the host > kernel can p

Re: [Qemu-devel] [PATCH qemu v18 3/5] vfio: Add host side DMA window capabilities

2016-06-21 Thread David Gibson
On Tue, Jun 21, 2016 at 11:14:03AM +1000, Alexey Kardashevskiy wrote: > There are going to be multiple IOMMUs per a container. This moves > the single host IOMMU parameter set to a list of VFIOHostDMAWindow. > > This should cause no behavioral change and will be used later by > the SPAPR TCE IOMMU

Re: [Qemu-devel] [RFC PATCH v0 1/1] spapr: Support setting of compat CPU type for CPU cores

2016-06-21 Thread Igor Mammedov
On Sat, 18 Jun 2016 14:04:06 +0530 Bharata B Rao wrote: > Compat CPU type is typically specified on -cpu cmdline option like: > -cpu host,compat=power7 or -cpu POWER8E,compat=power7 etc. > With the introduction of sPAPR CPU core devices, we need to support > the same for core devices too. > > Su

Re: [Qemu-devel] [PATCH v2 00/10] ACPI CPU hotplug refactoring to support unplug and more than 255 CPUs

2016-06-21 Thread Igor Mammedov
On Thu, 16 Jun 2016 18:55:33 +0200 Igor Mammedov wrote: Michael, Do you think that this series will make into 2.7? > Changelog: > > v1->v2: > > - d

Re: [Qemu-devel] [PATCH 1/2] hw/misc: Add a model for the ASPEED System Control Unit

2016-06-21 Thread Andrew Jeffery
On Tue, 2016-06-21 at 07:56 +0100, Peter Maydell wrote: > On 21 June 2016 at 04:49, Andrew Jeffery wrote: > > > > On Mon, 2016-06-20 at 14:57 +0100, Peter Maydell wrote: > > > > > > I think there are a couple of plausible ways you might model this: > > > > > > (a) just have a single property fo

Re: [Qemu-devel] [RFC v3 PATCH 02/14] tcg/i386: Add support for fence

2016-06-21 Thread Paolo Bonzini
On 18/06/2016 06:03, Pranith Kumar wrote: > Generate mfence/sfence/lfence instruction on SSE2 enabled > processors. For older processors, generate a 'lock orl $0,0(%esp)' > instruction which has full ordering semantics. > > Signed-off-by: Pranith Kumar > [rth: Check for sse2, fallback to locked

Re: [Qemu-devel] [RFC v3 PATCH 08/14] tcg/s390: Add support for fence

2016-06-21 Thread Paolo Bonzini
On 18/06/2016 06:03, Pranith Kumar wrote: > +case INDEX_op_mb: > +/* The host memory model is quite strong, we simply need to > + serialize the instruction stream. */ > +tcg_out_insn(s, RR, BCR, > + facilities & FACILITY_FAST_BCR_SER ? 14 : 15, 0);

Re: [Qemu-devel] [RFC v3 PATCH 14/14] target-i386: Generate fences for x86

2016-06-21 Thread Paolo Bonzini
On 18/06/2016 06:03, Pranith Kumar wrote: > Signed-off-by: Pranith Kumar > --- > target-i386/translate.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/target-i386/translate.c b/target-i386/translate.c > index bf33e6b..32b0f5c 100644 > --- a/target-i386/translate.c > +++ b/target

Re: [Qemu-devel] [RFC v3 PATCH 01/14] Introduce TCGOpcode for memory barrier

2016-06-21 Thread Paolo Bonzini
On 18/06/2016 06:03, Pranith Kumar wrote: > +typedef enum { > +TCG_MO_LD_LD= 1, > +TCG_MO_ST_LD= 2, > +TCG_MO_LD_ST= 4, > +TCG_MO_ST_ST= 8, I like the idea of making this a bitmask. However, most of the code you wrote for the backends looks at these as an enum.

Re: [Qemu-devel] [PATCH 1/1] block: ignore flush requests when storage is clean

2016-06-21 Thread Paolo Bonzini
On 20/06/2016 17:19, Denis V. Lunev wrote: > +/* Check if storage is actually dirty before flushing to disk */ > +if (!bs->dirty) { > +goto flush_parent; > +} > +bs->dirty = false; > + This should be cleared after the flush is complete. If you have write begin w

Re: [Qemu-devel] [PATCHv2] rtl8139: save/load RxMulOk counter (again)

2016-06-21 Thread Paolo Bonzini
On 21/06/2016 03:44, Jason Wang wrote: > > > On 2016年06月21日 01:53, David Vrabel wrote: >> Commit 9d29cdeaaca3a0383af764000b71492c4fc67c6e (rtl8139: port >> TallyCounters to vmstate) introduced in incompatibility in the v4 >> format as it omitted the RxOkMul counter. >> >> There are presumably n

Re: [Qemu-devel] [PATCH 1/3] Mediated device Core driver

2016-06-21 Thread Jike Song
On 06/21/2016 12:31 AM, Kirti Wankhede wrote: > + > +static int mdev_add_attribute_group(struct device *dev, > + const struct attribute_group **groups) > +{ > + return sysfs_create_groups(&dev->kobj, groups); > +} > + > +static void mdev_remove_attribute_group(st

Re: [Qemu-devel] [RFC PATCH v0 1/1] spapr: Support setting of compat CPU type for CPU cores

2016-06-21 Thread Igor Mammedov
On Tue, 21 Jun 2016 09:09:57 +0200 Igor Mammedov wrote: [...] > > However we are in progress [1] of converting legacy 1) https://www.mail-archive.com/qemu-devel@nongnu.org/msg378123.html > -cpu cpuname,feat1=x,feat2=y,... > into a set of global properties > -global cputype.feat1=x ... > > it

Re: [Qemu-devel] [PATCH 1/1] block: ignore flush requests when storage is clean

2016-06-21 Thread Kevin Wolf
Am 21.06.2016 um 09:32 hat Paolo Bonzini geschrieben: > > > On 20/06/2016 17:19, Denis V. Lunev wrote: > > +/* Check if storage is actually dirty before flushing to disk */ > > +if (!bs->dirty) { > > +goto flush_parent; > > +} > > +bs->dirty = false; > > + > > This should

[Qemu-devel] [PATCH v10 00/26] IOMMU: Enable interrupt remapping for Intel IOMMU

2016-06-21 Thread Peter Xu
This is v10 of Intel IOMMU IR support, based on patches: - [PATCH v2 0/3] enable iommu with -device https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg00554.html V9 introduced one bug when split irqchip is used with multiple vCPUs. V10 mainly fixes this issue, with several other trivial

[Qemu-devel] [PATCH v10 02/26] x86-iommu: provide x86_iommu_get_default

2016-06-21 Thread Peter Xu
Instead of searching the device tree every time, one static variable is declared for the default system x86 IOMMU device. Also, some VT-d macros are replaced by x86 ones. Signed-off-by: Peter Xu --- hw/i386/acpi-build.c | 9 ++--- hw/i386/intel_iommu.c | 9 ++--- hw/i

[Qemu-devel] [PATCH v10 01/26] x86-iommu: introduce parent class

2016-06-21 Thread Peter Xu
Introducing parent class for intel-iommu devices named "x86-iommu". This is preparation work to abstract shared functionalities out from Intel and AMD IOMMUs. Currently, only the parent class is introduced. It does nothing yet. Signed-off-by: Peter Xu --- hw/i386/Makefile.objs | 2 +- h

[Qemu-devel] [PATCH v10 12/26] intel_iommu: add IR translation faults defines

2016-06-21 Thread Peter Xu
Adding translation fault definitions for interrupt remapping. Please refer to VT-d spec section 7.1. Signed-off-by: Peter Xu --- hw/i386/intel_iommu_internal.h | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_internal.h index

[Qemu-devel] [PATCH v10 03/26] x86-iommu: q35: generalize find_add_as()

2016-06-21 Thread Peter Xu
Remove VT-d calls in common q35 codes. Instead, we provide a general find_add_as() for x86-iommu type. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 17 + include/hw/i386/intel_iommu.h | 5 - include/hw/i386/x86-iommu.h | 3 +++ 3 files changed, 12 insertion

[Qemu-devel] [PATCH v10 07/26] intel_iommu: set IR bit for ECAP register

2016-06-21 Thread Peter Xu
Enable IR in IOMMU Extended Capability register. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 6 ++ hw/i386/intel_iommu_internal.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index b170f97..e216fd3 100644 --- a/hw/i386/

[Qemu-devel] [PATCH v10 04/26] x86-iommu: introduce "intremap" property

2016-06-21 Thread Peter Xu
Adding one property for intel-iommu devices to specify whether we should support interrupt remapping. By default, IR is disabled. To enable it, we should use (take Intel IOMMU as example): -device intel_iommu,intremap=on This property can be shared by Intel and future AMD IOMMUs. Signed-off-by

[Qemu-devel] [PATCH v10 14/26] q35: ioapic: add support for emulated IOAPIC IR

2016-06-21 Thread Peter Xu
This patch translates all IOAPIC interrupts into MSI ones. One pseudo ioapic address space is added to transfer the MSI message. By default, it will be system memory address space. When IR is enabled, it will be IOMMU address space. Currently, only emulated IOAPIC is supported. Idea suggested by

[Qemu-devel] [PATCH v10 05/26] acpi: enable INTR for DMAR report structure

2016-06-21 Thread Peter Xu
In ACPI DMA remapping report structure, enable INTR flag when specified. Signed-off-by: Peter Xu --- hw/i386/acpi-build.c | 11 ++- include/hw/i386/intel_iommu.h | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c i

[Qemu-devel] [PATCH v10 06/26] intel_iommu: allow queued invalidation for IR

2016-06-21 Thread Peter Xu
Queued invalidation is required for IR. This patch add basic support for interrupt cache invalidate requests. Since we currently have no IR cache implemented yet, we can just skip all interrupt cache invalidation requests for now. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 9 ++

[Qemu-devel] [PATCH v10 11/26] intel_iommu: define several structs for IOMMU IR

2016-06-21 Thread Peter Xu
Several data structs are defined to better support the rest of the patches: IRTE to parse remapping table entries, and IOAPIC/MSI related structure bits to parse interrupt entries to be filled in by guest kernel. Signed-off-by: Peter Xu --- include/hw/i386/intel_iommu.h | 74

[Qemu-devel] [PATCH v10 16/26] intel_iommu: add support for split irqchip

2016-06-21 Thread Peter Xu
In split irqchip mode, IOAPIC is working in user space, only update kernel irq routes when entry changed. When IR is enabled, we directly update the kernel with translated messages. It works just like a kernel cache for the remapping entries. Since KVM irqfd is using kernel gsi routes to deliver i

[Qemu-devel] [PATCH v10 10/26] intel_iommu: handle interrupt remap enable

2016-06-21 Thread Peter Xu
Handle writting to IRE bit in global command register. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 26ef17a3..d061e2a 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i38

[Qemu-devel] [PATCH v10 08/26] acpi: add DMAR scope definition for root IOAPIC

2016-06-21 Thread Peter Xu
To enable interrupt remapping for intel IOMMU device, each IOAPIC device in the system reported via ACPI MADT must be explicitly enumerated under one specific remapping hardware unit. This patch adds the root-complex IOAPIC into the default DMAR device. Please refer to VT-d spec 8.3.1.1 for more i

[Qemu-devel] [PATCH v10 17/26] x86-iommu: introduce IEC notifiers

2016-06-21 Thread Peter Xu
This patch introduces x86 IOMMU IEC (Interrupt Entry Cache) invalidation notifier list. When vIOMMU receives IEC invalidate request, all the registered units will be notified with specific invalidation requests. Intel IOMMU is the first provider that generates such a event. Signed-off-by: Peter X

[Qemu-devel] [PATCH v10 18/26] ioapic: register IOMMU IEC notifier for ioapic

2016-06-21 Thread Peter Xu
Let IOAPIC the first consumer of x86 IOMMU IEC invalidation notifiers. This is only used for split irqchip case, when vIOMMU receives IR invalidation requests, IOAPIC will be notified to update kernel irq routes. For simplicity, we just update all IOAPIC routes, even if the invalidated entries are

[Qemu-devel] [PATCH v10 09/26] intel_iommu: define interrupt remap table addr register

2016-06-21 Thread Peter Xu
Defined Interrupt Remap Table Address register to store IR table pointer. Also, do proper handling on global command register writes to store table pointer and its size. One more debug flag "DEBUG_IR" is added for interrupt remapping. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c |

[Qemu-devel] [PATCH v10 13/26] intel_iommu: Add support for PCI MSI remap

2016-06-21 Thread Peter Xu
This patch enables interrupt remapping for PCI devices. To play the trick, one memory region "iommu_ir" is added as child region of the original iommu memory region, covering range 0xfeeX (which is the address range for APIC). All the writes to this range will be taken as MSI, and translation

[Qemu-devel] [PATCH v10 22/26] kvm-irqchip: i386: add hook for add/remove virq

2016-06-21 Thread Peter Xu
Adding two hooks to be notified when adding/removing msi routes. There are two kinds of MSI routes: - in kvm_irqchip_add_irq_route(): before assigning IRQFD. Used by vhost, vfio, etc. - in kvm_irqchip_send_msi(): when sending direct MSI message, if direct MSI not allowed, we will first create

[Qemu-devel] [PATCH v10 15/26] ioapic: introduce ioapic_entry_parse() helper

2016-06-21 Thread Peter Xu
Abstract IOAPIC entry parsing logic into a helper function. Signed-off-by: Peter Xu --- hw/intc/ioapic.c | 110 +++ 1 file changed, 54 insertions(+), 56 deletions(-) diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index 36dd42a..c4469e4 10064

[Qemu-devel] [PATCH v10 23/26] kvm-irqchip: x86: add msi route notify fn

2016-06-21 Thread Peter Xu
One more IEC notifier is added to let msi routes know about the IEC changes. When interrupt invalidation happens, all registered msi routes will be updated for all PCI devices. Since both vfio and vhost are possible gsi route consumers, this patch will go one step further to keep them safe in spli

[Qemu-devel] [PATCH v10 24/26] kvm-irqchip: do explicit commit when update irq

2016-06-21 Thread Peter Xu
In the past, we are doing gsi route commit for each irqchip route update. This is not efficient if we are updating lots of routes in the same time. This patch removes the committing phase in kvm_irqchip_update_msi_route(). Instead, we do explicit commit after all routes updated. Signed-off-by: Pet

[Qemu-devel] [PATCH v10 19/26] intel_iommu: Add support for Extended Interrupt Mode

2016-06-21 Thread Peter Xu
From: Jan Kiszka As neither QEMU nor KVM support more than 255 CPUs so far, this is simple: we only need to switch the destination ID translation in vtd_remap_irq_get if EIME is set. Once CFI support is there, it will have to take EIM into account as well. So far, nothing to do for this. This p

[Qemu-devel] [PATCH v10 25/26] intel_iommu: support all masks in interrupt entry cache invalidation

2016-06-21 Thread Peter Xu
From: Radim Krčmář Linux guests do not gracefully handle cases when the invalidation mask they wanted is not supported, probably because real hardware always allowed all. We can just say that all 16 masks are supported, because both ioapic_iec_notifier and kvm_update_msi_routes_all invalidate al

[Qemu-devel] [PATCH v10 26/26] kvm-all: add trace events for kvm irqchip ops

2016-06-21 Thread Peter Xu
These will help us monitoring irqchip route activities more easily. Signed-off-by: Peter Xu --- kvm-all.c| 5 + trace-events | 3 +++ 2 files changed, 8 insertions(+) diff --git a/kvm-all.c b/kvm-all.c index 3764ba9..ef81ca5 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1048,6 +1048,7 @@ v

[Qemu-devel] [PATCH v10 20/26] intel_iommu: add SID validation for IR

2016-06-21 Thread Peter Xu
This patch enables SID validation. Invalid interrupts will be dropped. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 69 --- include/hw/i386/intel_iommu.h | 17 +++ 2 files changed, 75 insertions(+), 11 deletions(-) diff --git a/hw/i

Re: [Qemu-devel] [PATCH 1/1] block: ignore flush requests when storage is clean

2016-06-21 Thread Denis V. Lunev
On 06/21/2016 10:45 AM, Kevin Wolf wrote: Am 21.06.2016 um 09:32 hat Paolo Bonzini geschrieben: On 20/06/2016 17:19, Denis V. Lunev wrote: +/* Check if storage is actually dirty before flushing to disk */ +if (!bs->dirty) { +goto flush_parent; +} +bs->dirty = false; +

Re: [Qemu-devel] [PATCH 1/1] block: ignore flush requests when storage is clean

2016-06-21 Thread Denis V. Lunev
On 06/21/2016 10:32 AM, Paolo Bonzini wrote: On 20/06/2016 17:19, Denis V. Lunev wrote: +/* Check if storage is actually dirty before flushing to disk */ +if (!bs->dirty) { +goto flush_parent; +} +bs->dirty = false; + This should be cleared after the flush is complete.

[Qemu-devel] [PATCH v10 21/26] kvm-irqchip: simplify kvm_irqchip_add_msi_route

2016-06-21 Thread Peter Xu
Changing the original MSIMessage parameter in kvm_irqchip_add_msi_route into the vector number. Vector index provides more information than the MSIMessage, we can retrieve the MSIMessage using the vector easily. This will avoid fetching MSIMessage every time before adding MSI routes. Meanwhile, th

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-21 Thread Mark Cave-Ayland
On 20/06/16 10:32, Benjamin Herrenschmidt wrote: > On Mon, 2016-06-20 at 18:02 +1000, Benjamin Herrenschmidt wrote: >> On Mon, 2016-06-20 at 17:08 +1000, Benjamin Herrenschmidt wrote: >>> >>> That fixed, it dies elsewhere in something related to page faults, >>> still digging. >>> >> Next prob

Re: [Qemu-devel] [PATCH v2 04/10] qdev: GlobalProperty.errp field

2016-06-21 Thread Igor Mammedov
On Mon, 20 Jun 2016 12:52:57 -0300 Eduardo Habkost wrote: > The new field will allow error handling to be configured by > qdev_prop_register_global() callers: &error_fatal and > &error_abort can be used to make QEMU exit or abort if any errors > are reported when applying the properties. > > Whi

[Qemu-devel] Qemu and heavily increased RSS usage

2016-06-21 Thread Peter Lieven
Hi, while upgrading from Qemu 2.2.0 to Qemu 2.5.1.1 I noticed that the RSS memory usage has heavily increased. We use hugepages so the RSS memory does not include VM memory. In Qemu 2.2.0 it used to be ~30MB per vServer and increased to up to 300 - 400MB for Qemu 2.5.1.1 (same with master). The

Re: [Qemu-devel] [PATCH RFC 3/7] hw/acpi: fix a DSDT table issue when a pxb is present.

2016-06-21 Thread Marcel Apfelbaum
On 06/17/2016 11:57 AM, Igor Mammedov wrote: On Tue, 31 May 2016 20:48:34 +0300 Marcel Apfelbaum wrote: PXBs do not support hotplug so they don't have a PCNT function. Since the PXB's PCI root-bus is a child bus of bus 0, the build_dsdt code will add a call to the corresponding PCNT function.

Re: [Qemu-devel] [PATCH 1/1] block: ignore flush requests when storage is clean

2016-06-21 Thread Kevin Wolf
Am 21.06.2016 um 10:17 hat Denis V. Lunev geschrieben: > On 06/21/2016 10:45 AM, Kevin Wolf wrote: > >Am 21.06.2016 um 09:32 hat Paolo Bonzini geschrieben: > >> > >>On 20/06/2016 17:19, Denis V. Lunev wrote: > >>>+/* Check if storage is actually dirty before flushing to disk */ > >>>+if (!b

Re: [Qemu-devel] [PATCH RFC 4/7] hw/apci: fix pcihp io initialization

2016-06-21 Thread Marcel Apfelbaum
On 06/17/2016 12:04 PM, Igor Mammedov wrote: On Tue, 31 May 2016 20:48:35 +0300 Marcel Apfelbaum wrote: The pm initialization code assigns the pcihp IO base and length to -1 on error, but the later code will assume 0 as invalid value. Fix it initializing the above value to 0 as expected. Sig

Re: [Qemu-devel] [PATCH RFC 6/7] hw/acpi: extend acpi pci hotplug support for pci express

2016-06-21 Thread Marcel Apfelbaum
On 06/20/2016 05:11 PM, Igor Mammedov wrote: On Tue, 31 May 2016 20:48:37 +0300 Marcel Apfelbaum wrote: subj doesn't match patch, it does opposite i.e. makes sure that pcie isn't counted in when building acpi hotplug aml Maybe I wasn't clear enough. Until now q35 had no acpi hotplug code. Th

Re: [Qemu-devel] [PATCH v3 0/7] virtio-blk: multiqueue support

2016-06-21 Thread Stefan Hajnoczi
On Mon, Jun 20, 2016 at 01:42:14PM +0200, Paolo Bonzini wrote: > > > On 20/06/2016 12:36, Stefan Hajnoczi wrote: > > On Tue, Jun 07, 2016 at 05:28:24PM +0100, Stefan Hajnoczi wrote: > >> v3: > >> * Drop Patch 1 to batch guest notify for non-dataplane > >> > >>The Linux AIO completion BH and

Re: [Qemu-devel] [PATCH v3 0/7] virtio-blk: multiqueue support

2016-06-21 Thread Stefan Hajnoczi
On Mon, Jun 20, 2016 at 03:29:43PM +0200, Roman Penyaev wrote: > Hi, Stefan. > > On Mon, Jun 20, 2016 at 12:36 PM, Stefan Hajnoczi wrote: > > On Tue, Jun 07, 2016 at 05:28:24PM +0100, Stefan Hajnoczi wrote: > >> v3: > >> * Drop Patch 1 to batch guest notify for non-dataplane > >> > >>The Lin

Re: [Qemu-devel] [PATCH RFC 7/7] hw/ich9: enable pci acpi hotplug

2016-06-21 Thread Marcel Apfelbaum
On 06/20/2016 05:27 PM, Igor Mammedov wrote: On Tue, 31 May 2016 20:48:38 +0300 Marcel Apfelbaum wrote: Re-use the pci acpi hotplug code and enable it only for the new machines using the 'acpi-pci-hotplug-with-bridge-support' compat property. Signed-off-by: Marcel Apfelbaum --- hw/acpi/ich

Re: [Qemu-devel] [PATCH v2 09/10] qdev: Remove qdev_prop_register_global_list()

2016-06-21 Thread Marcel Apfelbaum
On 06/20/2016 06:53 PM, Eduardo Habkost wrote: The function is not used by any QEMU code, except for the test-qdev-global-props unit test. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * (New patch in series) --- hw/core/qdev-properties.c | 9 - include/hw/qdev-propertie

Re: [Qemu-devel] [PATCH v2 10/10] machine: Skip global registration for non-existing classes

2016-06-21 Thread Marcel Apfelbaum
On 06/20/2016 06:53 PM, Eduardo Habkost wrote: MachineClass::compat_props may point to class names that are not compiled into the QEMU binary. Skip registering those as global properties. This will allow the qdev global property code to implement stricter checks on the global property values in t

[Qemu-devel] [PATCH] configure: don't optimize away avx2 test functions

2016-06-21 Thread Mohammed Gamal
The configure script contains an embedded test C function to test for avx2 support. It gets optimized away with gcc 4.7 on wheezy. Add __attribute__((optimize("O0"))) to it in order to prevent optimizing it away Signed-off-by: Mohammed Gamal --- configure | 2 +- 1 file changed, 1 insertion(+),

Re: [Qemu-devel] [PATCH] configure: don't optimize away avx2 test functions

2016-06-21 Thread Mohammed Gamal
Please drop this patch. I see it has already been fixed upstream On Tue, Jun 21, 2016 at 11:10 AM, Mohammed Gamal wrote: > The configure script contains an embedded test C function > to test for avx2 support. It gets optimized away with > gcc 4.7 on wheezy. > Add __attribute__((optimize("O0"))) t

Re: [Qemu-devel] [PATCH v4 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-21 Thread Stefan Hajnoczi
On Mon, Jun 20, 2016 at 02:40:35PM +0200, Lluís Vilanova wrote: > Stefan Hajnoczi writes: > > > On Fri, Jun 17, 2016 at 10:16:25PM +0200, Lluís Vilanova wrote: > >> Stefan Hajnoczi writes: > >> > >> > On Tue, Jun 14, 2016 at 03:11:12PM +0200, Lluís Vilanova wrote: > >> >> @@ -1116,6 +1117,7 @@ in

[Qemu-devel] [PATCH 00/17] block: Convert common I/O path to BdrvChild

2016-06-21 Thread Kevin Wolf
This series converts all I/O function in the core block layer up to bdrv_co_preadv/pwritev() to taking a BdrvChild as their first parameter instead of a BlockDriverState. The original motivation for this change were op blockers, where one of the biggest problems is making sure that every user of b

[Qemu-devel] [PATCH 04/17] block: Convert bdrv_co_readv() to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/crypto.c| 2 +- block/io.c| 8 block/parallels.c | 2 +- block/qcow.c | 5 ++--- block/raw_bsd.c | 2 +- block/vhdx.c | 2 +- include/block/block.h | 4 ++-- 7 files changed, 12 insertions(+), 13 deletion

[Qemu-devel] [PATCH 05/17] block: Convert bdrv_co_writev() to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/crypto.c| 2 +- block/io.c| 6 +++--- block/parallels.c | 2 +- block/qcow.c | 2 +- block/vhdx.c | 2 +- include/block/block.h | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/block/crypto.c b/b

[Qemu-devel] [PATCH 08/17] block: Convert bdrv_co_do_readv/writev to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/io.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/block/io.c b/block/io.c index 27721ce..299e9ec 100644 --- a/block/io.c +++ b/block/io.c @@ -33,7 +33,7 @@ #define NOT_DONE 0x7fff /* used while emula

[Qemu-devel] [PATCH 02/17] blkreplay: Convert to byte-based I/O

2016-06-21 Thread Kevin Wolf
The blkreplay driver only forwards the requests it gets, so converting it to byte granularity is trivial. Signed-off-by: Kevin Wolf --- block/blkreplay.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/block/blkreplay.c b/block/blkreplay.c index 525c2d5..196b

[Qemu-devel] [PATCH 07/17] block: Convert bdrv_aio_writev() to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/blkdebug.c | 2 +- block/blkverify.c | 4 ++-- block/io.c| 6 +++--- block/qed-table.c | 2 +- block/qed.c | 6 +++--- block/quorum.c| 4 ++-- include/block/block.h | 2 +- 7 files changed, 13 insertions(+), 13 deletio

[Qemu-devel] [PATCH 01/17] vvfat: Use BdrvChild for s->qcow

2016-06-21 Thread Kevin Wolf
vvfat uses a temporary qcow file to cache written data in read-write mode. In order to do things properly, this should show up in the BDS graph and I/O should go through BdrvChild like for every other node. Signed-off-by: Kevin Wolf --- block/vvfat.c | 66 ++--

[Qemu-devel] [PATCH 12/17] block: Convert bdrv_write() to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/io.c | 5 +++-- block/qcow.c | 10 +- block/qcow2-cluster.c | 2 +- block/qcow2-refcount.c | 2 +- block/qcow2.c | 10 +- block/vdi.c| 4 ++-- block/vvfat.c | 5 ++--- include/block/block

[Qemu-devel] [PATCH 10/17] block: Use BlockBackend for I/O in bdrv_commit()

2016-06-21 Thread Kevin Wolf
Just like block jobs, the HMP commit command should use its own BlockBackend for doing I/O on BlockDriverStates. Signed-off-by: Kevin Wolf --- block/commit.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/block/commit.c b/block/commit.c index

[Qemu-devel] [PATCH 03/17] vhdx: Some more BlockBackend use in vhdx_create()

2016-06-21 Thread Kevin Wolf
This does some easy conversions from bdrv_* to blk_* functions in vhdx_create(). We should avoid bypassing the BlockBackend layer whenever possible. Signed-off-by: Kevin Wolf --- block/vhdx.c | 41 + 1 file changed, 21 insertions(+), 20 deletions(-) diff

[Qemu-devel] [PATCH 17/17] block: Convert bdrv_co_preadv/pwritev to BdrvChild

2016-06-21 Thread Kevin Wolf
This is the final patch for converting the common I/O path to take a BdrvChild parameter instead of BlockDriverState. The completion of this conversion means that all users that perform I/O on an image need to actually hold a reference (in the form of BdrvChild, possible as part of a BlockBackend)

[Qemu-devel] [PATCH 14/17] block: Convert bdrv_pwrite(v/_sync) to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/io.c | 17 - block/parallels.c | 6 +++--- block/qcow.c | 14 +++--- block/qcow2-cache.c| 2 +- block/qcow2-cluster.c | 6 +++--- block/qcow2-refcount.c | 22 +++--- block/qcow2-snapshot

[Qemu-devel] [PATCH 06/17] block: Convert bdrv_aio_readv() to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/blkdebug.c | 2 +- block/blkverify.c | 4 ++-- block/io.c| 6 +++--- block/qed-table.c | 2 +- block/qed.c | 6 +++--- block/quorum.c| 4 ++-- include/block/block.h | 2 +- 7 files changed, 13 insertions(+), 13 deletio

[Qemu-devel] [PATCH 15/17] block: Convert bdrv_pwrite_zeroes() to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/block-backend.c | 5 + block/io.c | 9 + block/parallels.c | 2 +- block/qcow2-cluster.c | 2 +- block/qcow2.c | 4 ++-- include/block/block.h | 4 ++-- include/sysemu/bloc

[Qemu-devel] [PATCH 09/17] block: Move bdrv_commit() to block/commit.c

2016-06-21 Thread Kevin Wolf
No code changes, just moved from one file to another. Signed-off-by: Kevin Wolf --- block.c | 110 --- block/Makefile.objs | 3 +- block/commit.c | 111 3 files changed, 112 in

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

2016-06-21 Thread Peter Maydell
On 20 June 2016 at 21:29, Stefan Hajnoczi wrote: > The following changes since commit 5edbd4e30426d3a0d712510b2509a521e35192b1: > > Merge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20160620' > into staging (2016-06-20 12:53:35 +0100) > > are available in the git repository at: > >

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-21 Thread Benjamin Herrenschmidt
On Tue, 2016-06-21 at 09:21 +0100, Mark Cave-Ayland wrote: > A quick check with "info mtree" shows that this area of memory is PCI > configuration space. There was a patch added to uninorth in order to > suppress some PCI warnings on Darwin boot found by going over the source > to the Darwin MacRIS

[Qemu-devel] [PATCH 11/17] block: Convert bdrv_read() to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/io.c| 4 ++-- block/qcow2-cluster.c | 6 +++--- block/vdi.c | 4 ++-- block/vvfat.c | 2 +- include/block/block.h | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/block/io.c b/block/io.c index 299e9ec..d14c982

Re: [Qemu-devel] [PATCHv2] rtl8139: save/load RxMulOk counter (again)

2016-06-21 Thread David Vrabel
On 21/06/16 08:35, Paolo Bonzini wrote: > > > On 21/06/2016 03:44, Jason Wang wrote: >> >> >> On 2016年06月21日 01:53, David Vrabel wrote: >>> Commit 9d29cdeaaca3a0383af764000b71492c4fc67c6e (rtl8139: port >>> TallyCounters to vmstate) introduced in incompatibility in the v4 >>> format as it omitted

[Qemu-devel] [PATCH 16/17] block: Convert bdrv_prwv_co() to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/io.c | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/block/io.c b/block/io.c index 641cd49..78529fc 100644 --- a/block/io.c +++ b/block/io.c @@ -557,7 +557,7 @@ static int bdrv_check_request(BlockDrive

Re: [Qemu-devel] [PATCH 00/17] block: Convert common I/O path to BdrvChild

2016-06-21 Thread Paolo Bonzini
On 21/06/2016 11:21, Kevin Wolf wrote: > This series converts all I/O function in the core block layer up to > bdrv_co_preadv/pwritev() to taking a BdrvChild as their first parameter > instead of a BlockDriverState. > > The original motivation for this change were op blockers, where one of > the

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-21 Thread Benjamin Herrenschmidt
On Tue, 2016-06-21 at 19:33 +1000, Benjamin Herrenschmidt wrote: > On Tue, 2016-06-21 at 09:21 +0100, Mark Cave-Ayland wrote: > > A quick check with "info mtree" shows that this area of memory is > > PCI > > configuration space. There was a patch added to uninorth in order > > to > > suppress some

[Qemu-devel] [PATCH 13/17] block: Convert bdrv_pread(v) to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block.c| 7 --- block/bochs.c | 6 +++--- block/cloop.c | 8 block/crypto.c | 2 +- block/dmg.c| 21 +++-- block/io.c | 8 block/parallels.c | 4 ++-- b

Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] Dynamic module loading for block drivers

2016-06-21 Thread Stefan Hajnoczi
On Mon, Jun 20, 2016 at 11:32:38AM -0400, Colin Lord wrote: > On 06/17/2016 05:54 AM, Stefan Hajnoczi wrote: > > On Wed, Jun 15, 2016 at 02:40:53PM -0400, Colin Lord wrote: > >> 1) Denis Lunev suggested having block_module_load_one return the > >> loaded driver to reduce duplicated for loops in man

Re: [Qemu-devel] [PATCH 0/2] Dynamic module loading for block drivers

2016-06-21 Thread Paolo Bonzini
On 21/06/2016 11:32, Stefan Hajnoczi wrote: > I think the issue comes from the fact that you are considering something > like load_block_module(const char *filename) as the API instead of > request_block_driver(const char *driver_name). In the latter case it's > possible to return a BlockDriver

[Qemu-devel] [PATCH] Revert "virtio: sync the dataplane vring state to the virtqueue before virtio_save"

2016-06-21 Thread Stefan Hajnoczi
This reverts commit 10a06fd65f667a972848ebbbcac11bdba931b544. Dataplane has used the same virtqueue code as non-dataplane since commits e24a47c5b73e04f94030e2daa356c7582aebfca2 ("virtio-scsi: do not use vring in dataplane") and 03de2f527499ae0c6d16a379665d072345254f2c ("virtio-blk: do not use vrin

[Qemu-devel] [PATCH 03/24] qemu-char: check socket is actually connected

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Calling qemu_chr_fe_set_msgfds() on unconnected socket can lead to crash if s->ioc is NULL. Signed-off-by: Marc-André Lureau --- qemu-char.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 84f49ac..06eaba3 1

[Qemu-devel] [PATCH 04/24] vhost-user: check qemu_chr_fe_set_msgfds() return value

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Check return value, and drop the unnecessary 'if' check for fd_num. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 495e09f..5dae496

[Qemu-devel] [PATCH 02/24] vhost-user: minor simplification

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- net/vhost-user.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/vhost-user.c b/net/vhost-user.c index d72ce9b..392f982 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -310,7 +310,6 @@ static int net_

[Qemu-devel] [PATCH 00/24] vhost-user reconnect fixes

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Hi, Since 'vhost-user: simple reconnection support' was merged, it is possible to disconnect and reconnect a vhost-user backend. However, many code paths in qemu may trigger assert() when the backend is disconnected. Some assert() could simply be replaced by error_report

[Qemu-devel] [PATCH 08/24] vhost-user: return a read error

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Return read errors (not sure why those were ignored) Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index e51df27..819481d 100644 --- a

[Qemu-devel] [PATCH 06/24] vhost-user: check vhost_user_write() return value

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Just some more error checking. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c | 44 +++- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 5dae496..e

[Qemu-devel] [PATCH 07/24] vhost: use error_report() instead of fprintf(stderr, ...)

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Let's use qemu proper error reporting API. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index e2d1614..4e23d73 100644 --- a/hw/virt

[Qemu-devel] [PATCH 12/24] vhost: make vhost_dev_cleanup() idempotent

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau May be called on multiple code path, so it's easier to make it safe in the first place. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index

[Qemu-devel] [PATCH 11/24] vhost: add vhost device only after all success

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau This helps following vhost_dev_cleanup() patch to check if the device was added before removing it from the list. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vho

[Qemu-devel] [PATCH 19/24] vhost-net: success if backend has no ops->vhost_migration_done

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/net/vhost_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 22ea653..cc2f68a 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -383,7 +383,7 @@ void vh

[Qemu-devel] [PATCH 01/24] misc: indentation

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/net/vhost_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 50f4dcd..3f1fecc 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -313,7 +313,7 @@ int vho

[Qemu-devel] [PATCH 13/24] vhost-net: always call vhost_dev_cleanup() on failure

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau vhost_dev_init() may need to be cleaned up on failure too. Just call vhost_dev_cleanup() in all cases. But first zero-alloc the struct to avoid the garbage. Signed-off-by: Marc-André Lureau --- hw/net/vhost_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(

[Qemu-devel] [PATCH 16/24] vhost-user: keep vhost_net after a disconnection

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Lot of code path assumes get_vhost_net() return non-null. Keep it after a successful vhost_net_init(). vhost_net_cleanup() will clear the vhost-dev connection-related data after vhost_user_stop(). Signed-off-by: Marc-André Lureau --- hw/net/vhost_net.c | 1 - net/tap.c

[Qemu-devel] [PATCH 24/24] tests: add /vhost-user/connect-fail test

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Check early connection failure and resume. Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 37 + 1 file changed, 37 insertions(+) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 8b2164b..7fe12e6 10

[Qemu-devel] [PATCH 09/24] vhost: make vhost_log_put() idempotent

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Clear dev->log* when calling vhost_log_put() Signed-off-by: Marc-André Lureau --- hw/virtio/vhost.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 4e23d73..febf64f 100644 --- a/hw/virtio/vhost.c +++

  1   2   3   4   5   >