Re: [Qemu-devel] [PATCH V2 1/3] net/filter-traffic: add filter-traffic.h

2016-03-03 Thread Zhang Chen
On 03/03/2016 03:24 PM, Jason Wang wrote: On 03/03/2016 03:20 PM, Zhang Chen wrote: On 03/03/2016 02:48 PM, Jason Wang wrote: On 03/02/2016 03:25 PM, Zhang Chen wrote: On 03/02/2016 02:19 PM, Jason Wang wrote: On 02/29/2016 08:23 PM, Zhang Chen wrote: We can reuse filter-traffic by filte

[Qemu-devel] [PATCH v2 1/3] arm: qmp: add GICCapability struct

2016-03-03 Thread Peter Xu
Define new struct to describe whether we support specific GIC version. Signed-off-by: Peter Xu --- qapi-schema.json | 22 ++ 1 file changed, 22 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index 7b8f2a1..0b2de6c 100644 --- a/qapi-schema.json +++ b/qapi-sche

[Qemu-devel] [PATCH v2 0/3] ARM: add query-gic-capability SMP command

2016-03-03 Thread Peter Xu
This is a re-work of v1 patch: https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg05270.html This patch is to add ARM-specific command "query-gic-capability". The new command can report which kind of GIC device the host/QEMU support. The returned result is in the form of array. Changes fr

[Qemu-devel] [PATCH v2 2/3] arm: qmp: add query-gic-capability interface

2016-03-03 Thread Peter Xu
This implement the command "query-gic-capability" but not implemnet it. The command is ARM-only. Return of the command is a list of GICCapability struct that describes all GIC versions that current QEMU and system support. Signed-off-by: Peter Xu --- monitor.c| 8 qapi-sche

[Qemu-devel] [PATCH v2 3/3] arm: implement query-gic-capability

2016-03-03 Thread Peter Xu
For emulated ARM VM, only gicv2 is supported. We need to add gicv3 in when emulated gicv3 ready. For KVM accelerated ARM VM, we detect the capability bits using ioctls. if we want to know GIC kernel capabilities, we need to make sure we have enabled KVM when querying (like, with "-enable-kvm"). S

[Qemu-devel] [PATCH v3 0/4] rng-random: implement request queue

2016-03-03 Thread Ladi Prosek
As suggested by Paolo, I have moved the RngRequest implementation up to the RngBackend parent class and made both child classes use it. Apart from the refactoring, the only functional change compared to v1 is the use of heap instead of stack allocation for the read buffer in rng-random. The parent

[Qemu-devel] [PATCH v3 2/4] rng: move request queue from RngEgd to RngBackend

2016-03-03 Thread Ladi Prosek
The 'requests' field now lives in the RngBackend parent class. There are no functional changes in this commit. Signed-off-by: Ladi Prosek --- backends/rng-egd.c | 28 +--- include/sysemu/rng.h | 11 +++ 2 files changed, 20 insertions(+), 19 deletions(-) diff --

[Qemu-devel] [PATCH v3 1/4] rng: remove the unused request cancellation code

2016-03-03 Thread Ladi Prosek
rng_backend_cancel_requests had no callers and none of the code deleted in this commit ever ran. Signed-off-by: Ladi Prosek --- backends/rng-egd.c | 12 backends/rng.c | 9 - include/sysemu/rng.h | 11 --- 3 files changed, 32 deletions(-) diff --git a/backe

[Qemu-devel] [PATCH v3 3/4] rng: move request queue cleanup from RngEgd to RngBackend

2016-03-03 Thread Ladi Prosek
RngBackend is now in charge of cleaning up the linked list on instance finalization. It also exposes a function to finalize individual RngRequest instances, called by its child classes. Signed-off-by: Ladi Prosek --- backends/rng-egd.c | 25 + backends/rng.c | 32

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 2/3] hw/intc: Add (new) ASPEED AST2400 AVIC device model

2016-03-03 Thread Peter Maydell
On 3 March 2016 at 05:14, Andrew Jeffery wrote: > On Thu, 2016-02-25 at 16:29 +, Peter Maydell wrote: >> > +case 0x20: /* Interrupt Enable */ >> > +s->int_enable |= data; >> >> Are you sure this only ORs in new 1 bits? > > As in, am I sure I only want to take the newly set bits? If

[Qemu-devel] [PATCH v3 4/4] rng: add request queue support to rng-random

2016-03-03 Thread Ladi Prosek
Requests are now created in the RngBackend parent class and the code path is shared by both rng-egd and rng-random. This commit fixes the rng-random implementation which processed only one request at a time and simply discarded all but the most recent one. In the guest this manifested as delayed c

Re: [Qemu-devel] [PATCH v3 02/27] migration: remove use of qemu_bufopen from vmstate tests

2016-03-03 Thread Amit Shah
On (Fri) 26 Feb 2016 [15:10:05], Daniel P. Berrange wrote: > Some of the test-vmstate.c test cases use a temporary file > while others use a memory buffer. To facilitate the future > removal of the qemu_bufopen() function, convert all the tests > to use a temporary file. > > Reviewed-by: Dr. David

Re: [Qemu-devel] [PATCH v2] ui/cocoa.m: Replace pc/xt keyboard keycode array with QKeyCode

2016-03-03 Thread Peter Maydell
On 3 March 2016 at 03:23, Programmingkid wrote: > *Sorry but git send-email refuses to work on my system. If you tell us in what way it doesn't work we might be able to help you debug/configure it. Also, even if you can't use git send-email you can use git format-patch to create the emails with t

Re: [Qemu-devel] [PATCH 7/7] target-i386: Fix inhibit irq mask handling

2016-03-03 Thread Paolo Bonzini
On 03/03/2016 06:30, Richard Henderson wrote: > The patch in 7f0b714 was too simplistic, in that we wound up setting > the flag and then resetting it immediately in gen_eob. > > Fixes the reported boot problem with Windows XP. > > Reported-by: Hervé Poussineau > Signed-off-by: Richard Henderso

Re: [Qemu-devel] [PATCH v2 12/19] qapi: Fix command with named empty argument type

2016-03-03 Thread Markus Armbruster
Eric Blake writes: > The generator special-cased > > { 'command':'foo', 'data': {} } > > to avoid emitting a visitor variable, but failed to see that > > { 'struct':'NamedEmptyType, 'data': {} } > { 'command':'foo', 'data':'NamedEmptyType' } > > needs the same treatment. There, the generator

Re: [Qemu-devel] Doubts regarding parallelism on KVM, IO threads

2016-03-03 Thread Paolo Bonzini
On 03/03/2016 07:09, Gaurav Sharma wrote: > Hi was trying to do some digging for multi core scenarios both with and > without KVM. > > In short i have some devices and a user application that does some r/w > operations on those devices. > > As per my understanding, in case binary translation us

Re: [Qemu-devel] [PATCH v4 RFC 00/17] qcow2: persistent dirty bitmaps

2016-03-03 Thread Denis V. Lunev
On 02/17/2016 06:28 PM, Vladimir Sementsov-Ogievskiy wrote: This series add persistent dirty bitmaps feature to qcow2. Specification is in docs/spec/qcow2.txt (not merged yet, see [PATCH v10] spec: add qcow2 bitmaps extension specification) This series are based on Fam's [PATCH v2 00/13] Dirty b

Re: [Qemu-devel] [PATCH v2 13/19] qapi-visit: Simplify visit of empty branch in union

2016-03-03 Thread Markus Armbruster
Eric Blake writes: > Now that we have is_empty() and gen_visit_fields_call(), it's s/fields/members/. Better grep all the commit messages for "fields". > fairly easy to skip the visit of a variant type that has no > members. I figure that alone would've been just as easy before gen_visit_memb

[Qemu-devel] [PATCH] correct comment of MemoryHotplugState

2016-03-03 Thread Cao jin
correct comment and remove an unused macro. commit adcb4ee6 already correct its type Signed-off-by: Cao jin --- Btw, in pc_memory_init(), I don`t see in which condition, the following code will be executed: if ((pcms->hotplug_memory.base + hotplug_mem_size) < hotplug_mem_size) {

Re: [Qemu-devel] [V6 2/4] hw/core: Add AMD IOMMU to machine properties

2016-03-03 Thread Marcel Apfelbaum
On 03/02/2016 10:51 PM, David Kiarie wrote: On 21/02/16 23:09, Jan Kiszka wrote: On 2016-02-21 19:10, David Kiarie wrote: diff --git a/qemu-options.hx b/qemu-options.hx index 2f0465e..dad160f 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -38,7 +38,7 @@ DEF("machine", HAS_ARG, QEMU_OPT

Re: [Qemu-devel] [PATCH] rng-random: implement request queue

2016-03-03 Thread Ladi Prosek
On Thu, Mar 3, 2016 at 6:05 AM, Amit Shah wrote: > On (Thu) 04 Feb 2016 [13:07:35], Ladi Prosek wrote: >> - Original Message - >> > - Original Message - >> > > >> > > >> > > On 03/02/2016 13:36, Amit Shah wrote: >> > > > ... and this can lead to breaking migration (the queue of req

Re: [Qemu-devel] [RFC PATCH v0 5/6] qmp, spapr: Show hot-plugged/pluggable CPU slots in the Machine

2016-03-03 Thread Bharata B Rao
On Tue, Mar 01, 2016 at 02:55:02PM +0100, Igor Mammedov wrote: > On Tue, 1 Mar 2016 14:39:51 +0530 > Bharata B Rao wrote: > > > On Mon, Feb 29, 2016 at 11:46:42AM +0100, Igor Mammedov wrote: > > > On Thu, 25 Feb 2016 21:52:41 +0530 > > > Bharata B Rao wrote: > > > > > > > Implement query cpu-

Re: [Qemu-devel] [V6 1/4] hw/i386: Introduce AMD IOMMU

2016-03-03 Thread Marcel Apfelbaum
On 03/02/2016 06:00 AM, David Kiarie wrote: On Fri, Feb 26, 2016 at 9:23 AM, David Kiarie wrote: On Thu, Feb 25, 2016 at 6:43 PM, Marcel Apfelbaum wrote: On 02/21/2016 08:10 PM, David Kiarie wrote: Add AMD IOMMU emulaton to Qemu in addition to Intel IOMMU The IOMMU does basic translation, e

Re: [Qemu-devel] [V6 1/4] hw/i386: Introduce AMD IOMMU

2016-03-03 Thread Marcel Apfelbaum
On 03/02/2016 06:08 AM, David Kiarie wrote: On Wed, Mar 2, 2016 at 7:00 AM, David Kiarie wrote: On Fri, Feb 26, 2016 at 9:23 AM, David Kiarie wrote: On Thu, Feb 25, 2016 at 6:43 PM, Marcel Apfelbaum wrote: On 02/21/2016 08:10 PM, David Kiarie wrote: Add AMD IOMMU emulaton to Qemu in addit

[Qemu-devel] [PATCH 0/6] fix some coverity complains

2016-03-03 Thread Gonglei
Gonglei (6): egl-helpers: fix possible resource leak sheepdog: fix possible resouce leak and out-of-bounds access spice: fix coverity complains hostmem-file: fix memory leak spapr: fix possible Negative array index read smbus: fix memory leak backends/hostmem-file.c | 5 - block/

[Qemu-devel] [PATCH 2/6] sheepdog: fix possible resouce leak and out-of-bounds access

2016-03-03 Thread Gonglei
CID 1352418 (#1 of 1): Out-of-bounds access (INCOMPATIBLE_CAST) incompatible_cast: Pointer &snap_id points to an object whose effective type is unsigned int (32 bits, unsigned) but is dereferenced as a wider unsigned long (64 bits, unsigned). This may lead to memory corruption. We also need to fre

[Qemu-devel] [PATCH 4/6] hostmem-file: fix memory leak

2016-03-03 Thread Gonglei
Signed-off-by: Gonglei --- backends/hostmem-file.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c index fd59482..217f858 100644 --- a/backends/hostmem-file.c +++ b/backends/hostmem-file.c @@ -51,11 +51,14 @@ file_backend_m

[Qemu-devel] [PATCH 5/6] spapr: fix possible Negative array index read

2016-03-03 Thread Gonglei
fix CID 1351391. Signed-off-by: Gonglei --- hw/ppc/spapr.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index e9d4abf..57d19ab 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2221,6 +2221,10 @@ static void spapr_machine_device_plug(HotplugHandler

[Qemu-devel] [PATCH 6/6] smbus: fix memory leak

2016-03-03 Thread Gonglei
Signed-off-by: Gonglei --- hw/i2c/smbus_eeprom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/i2c/smbus_eeprom.c b/hw/i2c/smbus_eeprom.c index 5b7bd89..83c6b27 100644 --- a/hw/i2c/smbus_eeprom.c +++ b/hw/i2c/smbus_eeprom.c @@ -156,4 +156,6 @@ void smbus_eeprom_init(I2CBus *smbus, int

[Qemu-devel] [PATCH 3/6] spice: fix coverity complains

2016-03-03 Thread Gonglei
Remove the unnecessary NULL check. Signed-off-by: Gonglei --- ui/spice-display.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ui/spice-display.c b/ui/spice-display.c index 242ab5f..1ffbec1 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -769,9 +769,7 @@ stat

[Qemu-devel] [PATCH 1/6] egl-helpers: fix possible resource leak

2016-03-03 Thread Gonglei
CID 1352419, using g_strdup_printf instead of asprintf. Signed-off-by: Gonglei --- ui/egl-helpers.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c index 54be44c..2da1930 100644 --- a/ui/egl-helpers.c +++ b/ui/egl-helpers.c @@ -50,

Re: [Qemu-devel] [V6 4/4] hw/pci-host: Emulate AMD IOMMU

2016-03-03 Thread Michael S. Tsirkin
On Thu, Mar 03, 2016 at 01:04:31AM +0300, David Kiarie wrote: > On Thu, Mar 3, 2016 at 12:17 AM, Michael S. Tsirkin wrote: > > On Thu, Mar 03, 2016 at 12:09:28AM +0300, David Kiarie wrote: > >> > >> > >> On 22/02/16 14:22, Marcel Apfelbaum wrote: > >> >On 02/21/2016 08:11 PM, David Kiarie wrote: >

[Qemu-devel] [PATCH] virtio-rng: ask for more data if queue is not fully drained

2016-03-03 Thread Ladi Prosek
This commit effectively reverts: commit 4621c1768ef5d12171cca2aa1473595ecb9f1c9e Author: Amit Shah Date: Wed Nov 21 11:21:19 2012 +0530 virtio-rng: remove extra request for entropy but instead of calling virtio_rng_process unconditionally, it first checks to see if the queue is empty

Re: [Qemu-devel] [PATCH] input-keymap.c: Add keypad equal and power keys

2016-03-03 Thread Gerd Hoffmann
On Mi, 2016-03-02 at 11:29 -0500, Programmingkid wrote: > On Mar 2, 2016, at 11:12 AM, Gerd Hoffmann wrote: > > > On Mi, 2016-03-02 at 10:52 -0500, Programmingkid wrote: > >> Add the keypad equals and power keys to the qcode_to_number array. These > >> keys > >> are used on a Macintosh keyboard.

Re: [Qemu-devel] [PATCH v2 00/13] Introduce Intel 82574 GbE Controller Emulation (e1000e)

2016-03-03 Thread Leonid Bloch
Greetings Qemu-Devel, I am wondering if any of you have further comments on the series in issue. Links to individual patches are attached, for convenience. Kind regards, Leonid. http://patchwork.ozlabs.org/patch/586418 http://patchwork.ozlabs.org/patch/586422 http://patchwork.ozlabs.org/patch/5

Re: [Qemu-devel] [PATCH 4/7] target-i386: Dump illegal opcodes with -d unimp

2016-03-03 Thread Paolo Bonzini
> Do you want LOG_UNIMP or LOG_GUEST_ERROR? I would actually use LOG_IN_ASM. As you noticed, guests sometimes use illegal opcodes; another example is Xen's hypercall interface. On 03/03/2016 07:57, Hervé Poussineau wrote: > This patch is not quiet on some operating systems: > OS/2: > ILLOPC: 00

Re: [Qemu-devel] [PATCH RFC v2 1/2] Add param Error** to msi_init() & modify the callers

2016-03-03 Thread Marcel Apfelbaum
On 03/02/2016 11:13 AM, Markus Armbruster wrote: This got lost over the Christmas break, sorry. Cc'ing Marcel for additional PCI expertise. Cao jin writes: msi_init() is a supporting function in PCI device initialization, in order to convert .init() to .realize(), it should be modified first

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 2/3] hw/intc: Add (new) ASPEED AST2400 AVIC device model

2016-03-03 Thread Andrew Jeffery
On Thu, 2016-03-03 at 08:39 +, Peter Maydell wrote: > On 3 March 2016 at 05:14, Andrew Jeffery wrote: > > > > On Thu, 2016-02-25 at 16:29 +, Peter Maydell wrote: > > > > > > > > > > > +case 0x20: /* Interrupt Enable */ > > > > +s->int_enable |= data; > > > Are you sure this

Re: [Qemu-devel] [PATCH v4 06/10] pc: acpi: create MADT.lapic entries only for valid lapics

2016-03-03 Thread Marcel Apfelbaum
On 02/26/2016 03:59 PM, Igor Mammedov wrote: do not assume that all lapics in range 0..apic_id_limit are valid and do not create lapic entries for not possible lapics in MADT. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 19 --- 1 file changed, 12 insertions(+), 7

Re: [Qemu-devel] [PATCH RFC v2 1/2] Add param Error** to msi_init() & modify the callers

2016-03-03 Thread Michael S. Tsirkin
On Thu, Mar 03, 2016 at 12:12:27PM +0200, Marcel Apfelbaum wrote: > >>+int msi_init(struct PCIDevice *dev, uint8_t offset, unsigned int > >>nr_vectors, > >>+ bool msi64bit, bool msi_per_vector_mask, Error **errp) > >> { > >> unsigned int vectors_order; > >>-uint16_t flags; >

Re: [Qemu-devel] [PATCH v4 03/26] crypto: add support for generating initialization vectors

2016-03-03 Thread Daniel P. Berrange
On Wed, Mar 02, 2016 at 05:31:13PM -0700, Eric Blake wrote: > On 02/29/2016 05:00 AM, Daniel P. Berrange wrote: > > There are a number of different algorithms that can be used > > to generate initialization vectors for disk encryption. This > > introduces a simple internal QCryptoBlockIV object to

[Qemu-devel] [RFC qemu 3/4] migration: not set migration bitmap in setup stage

2016-03-03 Thread Liang Li
Set ram_list.dirty_memory instead of migration bitmap, the migration bitmap will be update when doing migration_bitmap_sync(). Set migration_dirty_pages to 0 and it will be updated by migration_dirty_pages() too. The following patch is based on this change. Signed-off-by: Liang Li --- migration

[Qemu-devel] [RFC qemu 0/4] A PV solution for live migration optimization

2016-03-03 Thread Liang Li
The current QEMU live migration implementation mark the all the guest's RAM pages as dirtied in the ram bulk stage, all these pages will be processed and that takes quit a lot of CPU cycles. >From guest's point of view, it doesn't care about the content in free pages. We can make use of this fact

[Qemu-devel] [RFC qemu 1/4] pc: Add code to get the lowmem form PCMachineState

2016-03-03 Thread Liang Li
The lowmem will be used by the following patch to get a correct free pages bitmap. Signed-off-by: Liang Li --- hw/i386/pc.c | 5 + hw/i386/pc_piix.c| 1 + hw/i386/pc_q35.c | 1 + include/hw/i386/pc.h | 3 ++- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/i3

[Qemu-devel] [RFC qemu 2/4] virtio-balloon: Add a new feature to balloon device

2016-03-03 Thread Liang Li
Extend the virtio balloon device to support a new feature, this new feature can help to get guest's free pages information, which can be used for live migration optimzation. Signed-off-by: Liang Li --- balloon.c | 30 - hw/virtio/virtio-balloon.c

[Qemu-devel] [RFC kernel 0/2]A PV solution for KVM live migration optimization

2016-03-03 Thread Liang Li
The current QEMU live migration implementation mark the all the guest's RAM pages as dirtied in the ram bulk stage, all these pages will be processed and that takes quit a lot of CPU cycles. >From guest's point of view, it doesn't care about the content in free pages. We can make use of this fact

[Qemu-devel] [RFC qemu 4/4] migration: filter out guest's free pages in ram bulk stage

2016-03-03 Thread Liang Li
Get the free pages information through virtio and filter out the free pages in the ram bulk stage. This can significantly reduce the total live migration time as well as network traffic. Signed-off-by: Liang Li --- migration/ram.c | 52 ++-- 1 file

[Qemu-devel] [RFC kernel 1/2] mm: Add the functions used to get free pages information

2016-03-03 Thread Liang Li
get_total_pages_count() tries to get the page count of the system RAM. get_free_pages() is intend to construct a free pages bitmap by traversing the free_list. The free pages information will be sent to QEMU through virtio and used for live migration optimization. Signed-off-by: Liang Li --- mm

[Qemu-devel] [RFC kernel 2/2] virtio-balloon: extend balloon driver to support a new feature

2016-03-03 Thread Liang Li
Extend the virio balloon to support the new feature VIRTIO_BALLOON_F_GET_FREE_PAGES, so that we can use it to send the free pages information from guest to QEMU, and then optimize the live migration process. Signed-off-by: Liang Li --- drivers/virtio/virtio_balloon.c | 106 ++

Re: [Qemu-devel] [PATCH v2 14/19] qapi: Don't special-case simple union wrappers

2016-03-03 Thread Markus Armbruster
Eric Blake writes: > Simple unions were carrying a special case that hid their 'data' > QMP member from the resulting C struct, via the hack method > QAPISchemaObjectTypeVariant.simple_union_type(). But using the > work we started by unboxing flat union and alternate branches, we > expose the si

Re: [Qemu-devel] [PATCH v1 01/10] qdict: implement a qdict_crumple method for un-flattening a dict

2016-03-03 Thread Daniel P. Berrange
On Wed, Mar 02, 2016 at 05:13:59PM +0100, Max Reitz wrote: > On 19.02.2016 17:47, Daniel P. Berrange wrote: > > The qdict_flatten() method will take a dict whose elements are > > further nested dicts/lists and flatten them by concatenating > > keys. > > > > The qdict_crumple() method aims todo the

Re: [Qemu-devel] [Qemu-ppc] [PATCH qemu v13 11/16] vfio: spapr: Add SPAPR IOMMU v2 support (DMA memory preregistering)

2016-03-03 Thread David Gibson
On Tue, Mar 01, 2016 at 08:10:36PM +1100, 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] [Qemu-ppc] [PATCH qemu v13 12/16] vmstate: Define VARRAY with VMS_ALLOC

2016-03-03 Thread David Gibson
On Tue, Mar 01, 2016 at 08:10:37PM +1100, Alexey Kardashevskiy wrote: > This allows dynamic allocation for migrating arrays. > > Already existing VMSTATE_VARRAY_UINT32 requires an array to be > pre-allocated, however there are cases when the size is not known in > advance and there is no real need

Re: [Qemu-devel] [Qemu-ppc] [PATCH qemu v13 10/16] vfio: Use different page size for different IOMMU types

2016-03-03 Thread David Gibson
On Tue, Mar 01, 2016 at 08:10:35PM +1100, Alexey Kardashevskiy wrote: > The existing memory listener is called on RAM or PCI address space > which implies potentially different page size. > > This uses new memory_region_iommu_get_page_sizes() for IOMMU regions > or falls back to qemu_real_host_pag

Re: [Qemu-devel] [Qemu-ppc] [PATCH qemu v13 13/16] spapr_iommu: Remove need_vfio flag from sPAPRTCETable

2016-03-03 Thread David Gibson
On Tue, Mar 01, 2016 at 08:10:38PM +1100, Alexey Kardashevskiy wrote: > sPAPRTCETable has a need_vfio flag which is passed to > kvmppc_create_spapr_tce() and controls whether to create a guest view > table in KVM as this depends on the host kernel ability to accelerate > H_PUT_TCE for VFIO devices.

Re: [Qemu-devel] [Qemu-ppc] [PATCH qemu v13 14/16] spapr_pci: Add and export DMA resetting helper

2016-03-03 Thread David Gibson
On Tue, Mar 01, 2016 at 08:10:39PM +1100, Alexey Kardashevskiy wrote: > This will be later used by the "ibm,reset-pe-dma-window" RTAS handler > which resets the DMA configuration to the defaults. > > Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson > --- > hw/ppc/spapr_pci.c

Re: [Qemu-devel] [PATCH 2/6] sheepdog: fix possible resouce leak and out-of-bounds access

2016-03-03 Thread Paolo Bonzini
On 03/03/2016 10:43, Gonglei wrote: > CID 1352418 (#1 of 1): Out-of-bounds access (INCOMPATIBLE_CAST) > incompatible_cast: Pointer &snap_id points to an object whose effective > type is unsigned int (32 bits, unsigned) but is dereferenced as a wider > unsigned long (64 bits, unsigned). This may l

Re: [Qemu-devel] [PATCH 6/6] smbus: fix memory leak

2016-03-03 Thread Paolo Bonzini
On 03/03/2016 10:43, Gonglei wrote: > Signed-off-by: Gonglei > --- > hw/i2c/smbus_eeprom.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/i2c/smbus_eeprom.c b/hw/i2c/smbus_eeprom.c > index 5b7bd89..83c6b27 100644 > --- a/hw/i2c/smbus_eeprom.c > +++ b/hw/i2c/smbus_eeprom.c > @@ -

Re: [Qemu-devel] [PATCH RFC v2 1/2] Add param Error** to msi_init() & modify the callers

2016-03-03 Thread Marcel Apfelbaum
On 03/03/2016 12:45 PM, Michael S. Tsirkin wrote: On Thu, Mar 03, 2016 at 12:12:27PM +0200, Marcel Apfelbaum wrote: +int msi_init(struct PCIDevice *dev, uint8_t offset, unsigned int nr_vectors, + bool msi64bit, bool msi_per_vector_mask, Error **errp) { unsigned int vectors_or

Re: [Qemu-devel] [PATCH 1/6] egl-helpers: fix possible resource leak

2016-03-03 Thread Paolo Bonzini
On 03/03/2016 10:43, Gonglei wrote: > CID 1352419, using g_strdup_printf instead of asprintf. > > Signed-off-by: Gonglei > --- > ui/egl-helpers.c | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c > index 54be44c..2da1930 1006

Re: [Qemu-devel] [PATCH 4/6] hostmem-file: fix memory leak

2016-03-03 Thread Paolo Bonzini
On 03/03/2016 10:43, Gonglei wrote: > Signed-off-by: Gonglei > --- > backends/hostmem-file.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c > index fd59482..217f858 100644 > --- a/backends/hostmem-file.c > +++ b/ba

Re: [Qemu-devel] [PATCH 3/6] spice: fix coverity complains

2016-03-03 Thread Paolo Bonzini
On 03/03/2016 10:43, Gonglei wrote: > Remove the unnecessary NULL check. > > Signed-off-by: Gonglei > --- > ui/spice-display.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/ui/spice-display.c b/ui/spice-display.c > index 242ab5f..1ffbec1 100644 > --- a/ui/spice-d

Re: [Qemu-devel] [PATCH 5/6] spapr: fix possible Negative array index read

2016-03-03 Thread Paolo Bonzini
On 03/03/2016 10:43, Gonglei wrote: > fix CID 1351391. > > Signed-off-by: Gonglei > --- > hw/ppc/spapr.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index e9d4abf..57d19ab 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -2221,6 +222

Re: [Qemu-devel] [PATCH v4 03/10] machine: introduce MachineClass.possible_cpu_arch_ids() hook

2016-03-03 Thread Marcel Apfelbaum
On 02/26/2016 03:59 PM, Igor Mammedov wrote: on x86 currently range 0..max_cpus is used to generate architecture-dependent CPU ID (APIC Id) for each present and possible CPUs. However architecture-dependent CPU IDs list could be sparse and code that needs to enumerate all IDs (ACPI) ended up doin

Re: [Qemu-devel] [PATCH v4 08/10] pc: acpi: drop cpu->found_cpus bitmap

2016-03-03 Thread Marcel Apfelbaum
On 02/26/2016 03:59 PM, Igor Mammedov wrote: cpu->found_cpus bitmap is used for setting present flag in CPON AML package. But it takes a bunch of code to fill bitmap and could be simplified by getting presense info from possible CPUs list directly. So drop cpu->found_cpus bitmap and unroll possi

Re: [Qemu-devel] [PATCH RFC v2 1/2] Add param Error** to msi_init() & modify the callers

2016-03-03 Thread Michael S. Tsirkin
On Thu, Mar 03, 2016 at 01:19:09PM +0200, Marcel Apfelbaum wrote: > On 03/03/2016 12:45 PM, Michael S. Tsirkin wrote: > >On Thu, Mar 03, 2016 at 12:12:27PM +0200, Marcel Apfelbaum wrote: > +int msi_init(struct PCIDevice *dev, uint8_t offset, unsigned int > nr_vectors, > + b

Re: [Qemu-devel] [PATCH v4 01/10] tests: pc: acpi: piix4: add sparse CPU hotplug case

2016-03-03 Thread Marcel Apfelbaum
On 02/26/2016 03:59 PM, Igor Mammedov wrote: Signed-off-by: Igor Mammedov --- tests/acpi-test-data/pc/APIC.cpuhp_sparse | Bin 0 -> 168 bytes tests/acpi-test-data/pc/DSDT.cpuhp_sparse | Bin 0 -> 5889 bytes tests/acpi-test-data/pc/SRAT.cpuhp_sparse | Bin 0 -> 280 bytes tests/bios-tables-te

Re: [Qemu-devel] [V6 4/4] hw/pci-host: Emulate AMD IOMMU

2016-03-03 Thread David Kiarie
On Thu, Mar 3, 2016 at 12:49 PM, Michael S. Tsirkin wrote: > On Thu, Mar 03, 2016 at 01:04:31AM +0300, David Kiarie wrote: >> On Thu, Mar 3, 2016 at 12:17 AM, Michael S. Tsirkin wrote: >> > On Thu, Mar 03, 2016 at 12:09:28AM +0300, David Kiarie wrote: >> >> >> >> >> >> On 22/02/16 14:22, Marcel A

Re: [Qemu-devel] [PATCH v2 2/3] arm: qmp: add query-gic-capability interface

2016-03-03 Thread Andrew Jones
On Thu, Mar 03, 2016 at 04:21:11PM +0800, Peter Xu wrote: > This implement the command "query-gic-capability" but not implemnet > it. The command is ARM-only. Return of the command is a list of > GICCapability struct that describes all GIC versions that current > QEMU and system support. > > Signe

Re: [Qemu-devel] [PATCH v2 15/19] qapi-visit: Move error check into gen_visit_members_call()

2016-03-03 Thread Markus Armbruster
Eric Blake writes: > When first introduced, neither branch of gen_visit_members_call() > would output a goto. But now that the implicit struct visit > always ends with a goto, we should do the same for regular > struct visits, so that callers don't have to worry about whether > they are creating

Re: [Qemu-devel] [V6 4/4] hw/pci-host: Emulate AMD IOMMU

2016-03-03 Thread Marcel Apfelbaum
On 03/03/2016 01:47 PM, David Kiarie wrote: On Thu, Mar 3, 2016 at 12:49 PM, Michael S. Tsirkin wrote: On Thu, Mar 03, 2016 at 01:04:31AM +0300, David Kiarie wrote: On Thu, Mar 3, 2016 at 12:17 AM, Michael S. Tsirkin wrote: On Thu, Mar 03, 2016 at 12:09:28AM +0300, David Kiarie wrote: On

Re: [Qemu-devel] [PATCH 2/6] sheepdog: fix possible resouce leak and out-of-bounds access

2016-03-03 Thread Gonglei (Arei)
Regards, -Gonglei > -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Thursday, March 03, 2016 7:18 PM > To: Gonglei (Arei); qemu-devel@nongnu.org > Cc: qemu-triv...@nongnu.org > Subject: Re: [PATCH 2/6] sheepdog: fix possible resouce leak and out-of-bounds

Re: [Qemu-devel] [V6 4/4] hw/pci-host: Emulate AMD IOMMU

2016-03-03 Thread Marcel Apfelbaum
On 03/03/2016 02:02 PM, Marcel Apfelbaum wrote: On 03/03/2016 01:47 PM, David Kiarie wrote: On Thu, Mar 3, 2016 at 12:49 PM, Michael S. Tsirkin wrote: On Thu, Mar 03, 2016 at 01:04:31AM +0300, David Kiarie wrote: On Thu, Mar 3, 2016 at 12:17 AM, Michael S. Tsirkin wrote: On Thu, Mar 03, 201

Re: [Qemu-devel] [PATCH v3 0/4] rng-random: implement request queue

2016-03-03 Thread Amit Shah
On (Thu) 03 Mar 2016 [09:37:14], Ladi Prosek wrote: > As suggested by Paolo, I have moved the RngRequest implementation > up to the RngBackend parent class and made both child classes use > it. Apart from the refactoring, the only functional change > compared to v1 is the use of heap instead of sta

Re: [Qemu-devel] [PATCH] virtio-rng: ask for more data if queue is not fully drained

2016-03-03 Thread Amit Shah
On (Thu) 03 Mar 2016 [10:48:34], Ladi Prosek wrote: > This commit effectively reverts: > > commit 4621c1768ef5d12171cca2aa1473595ecb9f1c9e > Author: Amit Shah > Date: Wed Nov 21 11:21:19 2012 +0530 > > virtio-rng: remove extra request for entropy > > but instead of calling virtio_rng_

Re: [Qemu-devel] [PATCH 2/6] sheepdog: fix possible resouce leak and out-of-bounds access

2016-03-03 Thread Paolo Bonzini
On 03/03/2016 13:00, Gonglei (Arei) wrote: >>> > > >>> > > -ret = find_vdi_name(s, s->name, snap_id, snap_tag, &vid, true, >>> > > +ret = find_vdi_name(s, s->name, hdr.snapid, snap_tag, &vid, true, >>> > > &local_err); >>> > > if (ret) { >>> > > +erro

Re: [Qemu-devel] [PATCH 6/6] smbus: fix memory leak

2016-03-03 Thread Gonglei (Arei)
> Subject: Re: [PATCH 6/6] smbus: fix memory leak > > > > On 03/03/2016 10:43, Gonglei wrote: > > Signed-off-by: Gonglei > > --- > > hw/i2c/smbus_eeprom.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/hw/i2c/smbus_eeprom.c b/hw/i2c/smbus_eeprom.c > > index 5b7bd89..83c6b27 1

Re: [Qemu-devel] [V6 1/4] hw/i386: Introduce AMD IOMMU

2016-03-03 Thread Marcel Apfelbaum
On 03/02/2016 09:11 PM, David Kiarie wrote: On 25/02/16 18:43, Marcel Apfelbaum wrote: On 02/21/2016 08:10 PM, David Kiarie wrote: Add AMD IOMMU emulaton to Qemu in addition to Intel IOMMU The IOMMU does basic translation, error checking and has a mininal IOTLB implementation Hi, Signed-

Re: [Qemu-devel] [RFC qemu 4/4] migration: filter out guest's free pages in ram bulk stage

2016-03-03 Thread Cornelia Huck
On Thu, 3 Mar 2016 18:44:28 +0800 Liang Li wrote: > Get the free pages information through virtio and filter out the free > pages in the ram bulk stage. This can significantly reduce the total > live migration time as well as network traffic. > > Signed-off-by: Liang Li > --- > migration/ram.

Re: [Qemu-devel] [V6 4/4] hw/pci-host: Emulate AMD IOMMU

2016-03-03 Thread David Kiarie
On Thu, Mar 3, 2016 at 3:06 PM, Marcel Apfelbaum wrote: > On 03/03/2016 02:02 PM, Marcel Apfelbaum wrote: >> >> On 03/03/2016 01:47 PM, David Kiarie wrote: >>> >>> On Thu, Mar 3, 2016 at 12:49 PM, Michael S. Tsirkin >>> wrote: On Thu, Mar 03, 2016 at 01:04:31AM +0300, David Kiarie wrote

Re: [Qemu-devel] [Qemu-arm] [PATCH] linux-user: arm: Remove ARM_cpsr and similar #defines

2016-03-03 Thread Peter Maydell
Typoed qemu-devel email address again, sorry. I must figure out a way to automate "cc the usual suspects"... thanks -- PMM On 3 March 2016 at 12:11, Peter Maydell wrote: > The #defines of ARM_cpsr and friends in linux-user/arm/target-syscall.h > can clash with versions in the system headers if b

Re: [Qemu-devel] [PATCH v2 3/3] arm: implement query-gic-capability

2016-03-03 Thread Andrea Bolognani
On Thu, 2016-03-03 at 16:21 +0800, Peter Xu wrote: > For emulated ARM VM, only gicv2 is supported. We need to add gicv3 in > when emulated gicv3 ready. For KVM accelerated ARM VM, we detect the > capability bits using ioctls. >  > if we want to know GIC kernel capabilities, we need to make sure we

Re: [Qemu-devel] [RFC qemu 2/4] virtio-balloon: Add a new feature to balloon device

2016-03-03 Thread Cornelia Huck
On Thu, 3 Mar 2016 18:44:26 +0800 Liang Li wrote: > Extend the virtio balloon device to support a new feature, this > new feature can help to get guest's free pages information, which > can be used for live migration optimzation. Do you have a spec for this, e.g. as a patch to the virtio spec?

Re: [Qemu-devel] [PATCH 2/6] sheepdog: fix possible resouce leak and out-of-bounds access

2016-03-03 Thread Gonglei (Arei)
Regards, -Gonglei > -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Thursday, March 03, 2016 8:12 PM > To: Gonglei (Arei); qemu-devel@nongnu.org > Cc: qemu-triv...@nongnu.org > Subject: Re: [PATCH 2/6] sheepdog: fix possible resouce leak and out-of-bounds

[Qemu-devel] [PULL 0/6] virtio-rng

2016-03-03 Thread Amit Shah
The following changes since commit ed6128ebbdd7cd885d39980659dad4b5c8ae8158: Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging (2016-03-01 15:54:03 +) are available in the git repository at: https://git.kernel.org/pub/scm/virt/qemu/amit/virtio-rng.gi

[Qemu-devel] [PULL 1/6] MAINTAINERS: Add an entry for the include/sysemu/rng*.h files

2016-03-03 Thread Amit Shah
From: Thomas Huth These headers are used by the virtio-rng and rng backends code, so they should be listed in the same section in MAINTAINERS, too. Signed-off-by: Thomas Huth Reviewed-by: Amit Shah Message-Id: <1456404260-26928-1-git-send-email-th...@redhat.com> Signed-off-by: Amit Shah ---

[Qemu-devel] [PULL 2/6] rng: remove the unused request cancellation code

2016-03-03 Thread Amit Shah
From: Ladi Prosek rng_backend_cancel_requests had no callers and none of the code deleted in this commit ever ran. Signed-off-by: Ladi Prosek Reviewed-by: Amit Shah Message-Id: <1456994238-9585-2-git-send-email-lpro...@redhat.com> Signed-off-by: Amit Shah --- backends/rng-egd.c | 12 --

[Qemu-devel] [PULL 3/6] rng: move request queue from RngEgd to RngBackend

2016-03-03 Thread Amit Shah
From: Ladi Prosek The 'requests' field now lives in the RngBackend parent class. There are no functional changes in this commit. Signed-off-by: Ladi Prosek Reviewed-by: Amit Shah Message-Id: <1456994238-9585-3-git-send-email-lpro...@redhat.com> Signed-off-by: Amit Shah --- backends/rng-egd.c

[Qemu-devel] [PULL 5/6] rng: add request queue support to rng-random

2016-03-03 Thread Amit Shah
From: Ladi Prosek Requests are now created in the RngBackend parent class and the code path is shared by both rng-egd and rng-random. This commit fixes the rng-random implementation which processed only one request at a time and simply discarded all but the most recent one. In the guest this man

[Qemu-devel] [PULL 4/6] rng: move request queue cleanup from RngEgd to RngBackend

2016-03-03 Thread Amit Shah
From: Ladi Prosek RngBackend is now in charge of cleaning up the linked list on instance finalization. It also exposes a function to finalize individual RngRequest instances, called by its child classes. Signed-off-by: Ladi Prosek Reviewed-by: Amit Shah Message-Id: <1456994238-9585-4-git-send-

[Qemu-devel] [PULL 6/6] virtio-rng: ask for more data if queue is not fully drained

2016-03-03 Thread Amit Shah
From: Ladi Prosek This commit effectively reverts: commit 4621c1768ef5d12171cca2aa1473595ecb9f1c9e Author: Amit Shah Date: Wed Nov 21 11:21:19 2012 +0530 virtio-rng: remove extra request for entropy but instead of calling virtio_rng_process unconditionally, it first checks to see if

Re: [Qemu-devel] [RFC qemu 4/4] migration: filter out guest's free pages in ram bulk stage

2016-03-03 Thread Daniel P. Berrange
On Thu, Mar 03, 2016 at 06:44:28PM +0800, Liang Li wrote: > Get the free pages information through virtio and filter out the free > pages in the ram bulk stage. This can significantly reduce the total > live migration time as well as network traffic. > > Signed-off-by: Liang Li > --- > migration

Re: [Qemu-devel] [ipxe-devel] [PATCH ipxe] build: Enable IPv6 for qemu

2016-03-03 Thread Tore Anderson
* Michael Brown > I've been thinking for some time now that it would be useful to have a > "minimal" configuration used for building real BIOS option ROM images > and a "normal" configuration for everything else (undionly.kpxe, > ipxe.efi, UEFI ROMs, qemu ROMs, etc). There are several feature

Re: [Qemu-devel] [RFC qemu 2/4] virtio-balloon: Add a new feature to balloon device

2016-03-03 Thread Michael S. Tsirkin
On Thu, Mar 03, 2016 at 06:44:26PM +0800, Liang Li wrote: > Extend the virtio balloon device to support a new feature, this > new feature can help to get guest's free pages information, which > can be used for live migration optimzation. > > Signed-off-by: Liang Li I don't understand why we need

Re: [Qemu-devel] [V6 4/4] hw/pci-host: Emulate AMD IOMMU

2016-03-03 Thread Michael S. Tsirkin
On Thu, Mar 03, 2016 at 03:18:18PM +0300, David Kiarie wrote: > >> Actually we have good news on this front. > >> You can use as many pxb-pcie devices as you want to create extra PCI root > >> buses. > >> Assigning them different IOMMUs would be great. (long term, of course) > >> > > > > Even witho

Re: [Qemu-devel] [PATCH v2 16/19] qapi: Allow anonymous base for flat union

2016-03-03 Thread Markus Armbruster
Eric Blake writes: > Rather than requiring all flat unions to explicitly create > a separate base struct, we can allow the qapi schema to specify > the common members via an inline dictionary. This is similar to > how commands can specify an inline anonymous type for its 'data', Suggest to end t

Re: [Qemu-devel] [PATCH v2 17/19] qapi: Use anonymous base in SchemaInfo

2016-03-03 Thread Markus Armbruster
Eric Blake writes: > Now that the generator supports it, we might as well use an > anonymous base rather than breaking out a single-use > SchemaInfoBase structure. > > Oddly enough, this change does not affect the resulting > introspection output (because we already inline the members of > a base

Re: [Qemu-devel] [PATCH v2 18/19] qapi: Use anonymous base in CpuInfo

2016-03-03 Thread Markus Armbruster
Eric Blake writes: > Now that the generator supports it, we might as well use an > anonymous base rather than breaking out a single-use CpuInfoBase > structure. > > Signed-off-by: Eric Blake Again, introspection value remains the same. Patch looks good. Should we eliminate more base types?

Re: [Qemu-devel] [PATCH v5 2/5] nvdimm acpi: introduce patched dsm memory

2016-03-03 Thread Michael S. Tsirkin
On Wed, Mar 02, 2016 at 07:50:38PM +0800, Xiao Guangrong wrote: > The dsm memory is used to save the input parameters and store > the dsm result which is filled by QEMU. > > The address of dsm memory is decided by bios and patched into > int32 object named "MEMA" > > Signed-off-by: Xiao Guangrong

[Qemu-devel] [PATCH] rng: switch request queue to QSIMPLEQ

2016-03-03 Thread Ladi Prosek
QSIMPLEQ supports appending to tail in O(1) and is intrusive so it doesn't require extra memory allocations for the bookkeeping data. Suggested-by: Paolo Bonzini Signed-off-by: Ladi Prosek --- backends/rng-egd.c| 9 - backends/rng-random.c | 6 +++--- backends/rng.c| 17 ++

  1   2   3   >