Re: [Qemu-devel] [RFC PATCH] libcacard: Fix bug detected with 'smatch'

2015-09-14 Thread Marc-André Lureau
Hi On Mon, Sep 14, 2015 at 2:11 PM, Markus Armbruster wrote: > Stumbled over this while throwing out old mail. Copying Marc-André and > Jeremy. > Thanks, the patch is applied in my libcacard "next" branch (https://github.com/elmarco/libcacard/tree/next). > Thomas Huth writes: > >> 'smatch' co

[Qemu-devel] [PATCH 1/2] target-mips: correct MTC0 instruction on MIPS64

2015-09-14 Thread Leon Alrae
MTC0 on a 64-bit processor should move entire 64-bit GPR content to CP0 register. Signed-off-by: Leon Alrae --- target-mips/translate.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index cd0cf8b..8bb45df

[Qemu-devel] [PATCH 2/2] target-mips: remove gen_mfc0_load64() and use tcg_gen_ld32s_tl()

2015-09-14 Thread Leon Alrae
Remove misleading gen_mfc0_load64() which actually loads 32 or 64 bits depending whether MIPS32 or MIPS64 and also replace the pair of tcg_gen_ld_tl() + tcg_gen_ext32s_tl() with single tcg_gen_ld32s_tl(). Signed-off-by: Leon Alrae --- target-mips/translate.c | 43 +---

[Qemu-devel] [PATCH 0/2] target-mips: minor clean up in mtc0 and mfc0

2015-09-14 Thread Leon Alrae
This patchset removes the gen_mtc0_store64() which is actually incorrect as MTC0 instruction in MIPS64 is supposed to move entire content (if dst CP0 register is 64-bit) without sign extending. It also removes the gen_mfc0_load64() and replaces the pair of tcg_gen_ld_tl() + tcg_gen_ext32s_tl() with

[Qemu-devel] [PATCH] target-mips: fix corner case in TLBWR causing QEMU to hang

2015-09-14 Thread Leon Alrae
cpu_mips_get_random() function is used to generate a random index from CP0.Wired to TLBSize-1 range. Current implementation avoids generating the same as before value, hence the while loop. If the guest sets CP0.Wired to TLBSize-1 (which actually does not sound to be very practical) QEMU will get s

[Qemu-devel] virtio-gpu: cursor update not in sync with resource update

2015-09-14 Thread Marc-André Lureau
Hi Afaik, the goal of the seperate cursor queue is to update cursor quickly (probably to give good input responsiveness). However, the VIRTIO_GPU_CMD_UPDATE_CURSOR references a surface that is uploaded via the ctrl queue. The same resource id may be reused for cursor update. But there is no synchr

Re: [Qemu-devel] [PATCH 0/7] qapi-flattening and preparation of -audiodev option

2015-09-14 Thread Markus Armbruster
"Kővágó, Zoltán" writes: > As discussed here[1], I'm splitting the qapi related patches from my > previous -audiodev patch series. These are patches 2--7 and 9 from my > previous patches. (Patch 1 was merged into -trivial in the meanwhile.) > > Please review. > > [1]: http://lists.nongnu.org/ar

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-14 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 14/09/2015 13:45, David Gibson wrote: >>> >>> === * There is no way for a child to determine what its parent >>> is. It is not * a bidirectional relationship. This is by >>> design. === >>> >>> This part always confused me as there is "Objec

Re: [Qemu-devel] [RFC PATCH] libcacard: Fix bug detected with 'smatch'

2015-09-14 Thread Markus Armbruster
Stumbled over this while throwing out old mail. Copying Marc-André and Jeremy. Thomas Huth writes: > 'smatch' complains about two bugs and one style issue in card_7816.c: > > libcacard/card_7816.c:273 vcard_apdu_set_length() warn: should this be a > bitwise op? > libcacard/card_7816.c:295 vcar

Re: [Qemu-devel] [PATCH v2] hw/misc/zynq_slcr: Change CPU clock rate for Linux boots

2015-09-14 Thread Peter Maydell
On 13 September 2015 at 23:42, Peter Crosthwaite wrote: > On Sun, Sep 13, 2015 at 1:47 PM, Peter Maydell > wrote: >> On 13 September 2015 at 21:22, Peter Crosthwaite >> wrote: >>> There may be more changes worth making on is_linux. I don't have the >>> patch with the full list of FSBL-related S

Re: [Qemu-devel] [PATCH] rocker: Use g_new() & friends where that makes obvious sense

2015-09-14 Thread Jiri Pirko
Mon, Sep 14, 2015 at 01:52:23PM CEST, arm...@redhat.com wrote: >g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, >for two reasons. One, it catches multiplication overflowing size_t. >Two, it returns T * rather than void *, which lets the compiler catch >more type errors. > >Th

[Qemu-devel] [PATCH] qemu-char: Use g_new() & friends where that makes obvious sense

2015-09-14 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form si

Re: [Qemu-devel] [PATCH 0/2] target-mips: get rid of old debugging code

2015-09-14 Thread Leon Alrae
On 13/09/15 22:07, Aurelien Jarno wrote: > This patchset get rid of old debugging code in translate.c, that has > been superseded by other debugging way (e.g. (-d in_asm,op). It comes > from the discussion there: > > https://lists.gnu.org/archive/html/qemu-devel/2015-07/msg03162.html > > I had

[Qemu-devel] [PATCH] linux-user: Use g_new() & friends where that makes obvious sense

2015-09-14 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form si

[Qemu-devel] [PATCH] rocker: Use g_new() & friends where that makes obvious sense

2015-09-14 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form si

[Qemu-devel] [PATCH] migration: Use g_new() & friends where that makes obvious sense

2015-09-14 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form si

[Qemu-devel] [PATCH] qga: Use g_new() & friends where that makes obvious sense

2015-09-14 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form si

Re: [Qemu-devel] [PATCH qemu v2 2/2] spapr_pci: Remove constraints about VFIO-PCI devices

2015-09-14 Thread David Gibson
On Mon, Sep 14, 2015 at 06:56:35PM +1000, Alexey Kardashevskiy wrote: > On 09/14/2015 02:04 PM, David Gibson wrote: > >On Fri, Sep 11, 2015 at 02:03:38PM -0600, Alex Williamson wrote: > >>On Wed, 2015-09-09 at 20:43 -0600, Alex Williamson wrote: > >>>On Thu, 2015-09-03 at 14:40 +1000, Alexey Kardas

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-14 Thread David Gibson
On Mon, Sep 14, 2015 at 06:22:35PM +1000, Alexey Kardashevskiy wrote: > On 09/14/2015 11:41 AM, David Gibson wrote: > >The sPAPRDRConnector pseudo-device contains an owner field which is > >set in spapr_dr_connector_new(). However, that function also calls > >object_property_add_child() to set the

Re: [Qemu-devel] [PATCH] block/ssh: remove dead code

2015-09-14 Thread Richard W.M. Jones
On Mon, Sep 14, 2015 at 01:12:34PM +0200, Paolo Bonzini wrote: > The "err" label cannot be reached with qp != NULL. Remove the free-ing > of qp and avoid future regressions by removing the initializer. > > Signed-off-by: Paolo Bonzini > --- > block/ssh.c | 5 + > 1 file changed, 1 insertion

[Qemu-devel] [PATCH] block/ssh: remove dead code

2015-09-14 Thread Paolo Bonzini
The "err" label cannot be reached with qp != NULL. Remove the free-ing of qp and avoid future regressions by removing the initializer. Signed-off-by: Paolo Bonzini --- block/ssh.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index 8d06739..d3

[Qemu-devel] [PATCH] ui: Use g_new() & friends where that makes obvious sense

2015-09-14 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form si

[Qemu-devel] [PATCH] usb: Use g_new() & friends where that makes obvious sense

2015-09-14 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form si

[Qemu-devel] [PATCH] qxl: Use g_new() & friends where that makes obvious sense

2015-09-14 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form si

[Qemu-devel] [PATCH] audio: Use g_new() & friends where that makes obvious sense

2015-09-14 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form si

Re: [Qemu-devel] [PATCH] audio: Use g_new() & friends where that makes obvious sense WIP

2015-09-14 Thread Markus Armbruster
Sent out the patches with unfinished commit messages by mistake, please ignore.

[Qemu-devel] [PATCH] target-arm: implement arm_debug_target_el()

2015-09-14 Thread Sergey Fedorov
Implement debug exception routing according to ARM ARM D2.3.1 Pseudocode description of routing debug exceptions. Signed-off-by: Sergey Fedorov --- target-arm/cpu.h | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 318

[Qemu-devel] [PATCH] target-arm: fix CPU breakpoint handling

2015-09-14 Thread Sergey Fedorov
A QEMU breakpoint match is not definitely an architectural breakpoint match. If an exception is generated unconditionally during translation, it is hardly possible to ignore it in the debug exceptoin hanlder. Generate a call to helper to check CPU breakpoints and raise an exception only if any bre

[Qemu-devel] [PATCH 2/2] target-arm: Implement checking of fired watchpoint

2015-09-14 Thread Sergey Fedorov
ARM stops before access to a location covered by watchpoint. Also, QEMU watchpoint fire is not necessarily an architectural watchpoint match. Unfortunately, that is hardly possible to ignore a fired watchpoint in debug exception handler. So move watchpoint check from debug exception handler to the

[Qemu-devel] [PATCH 1/2] cpu: Add callback to check architectural watchpoint match

2015-09-14 Thread Sergey Fedorov
When QEMU watchpoint matches, that is not definitely an architectural watchpoint match yet. If it is a stop-before-access watchpoint then that is hardly possible to ignore it after throwing a TCG exception. A special callback is introduced to check for architectural watchpoint match before raising

[Qemu-devel] [PATCH] ui: Use g_new() & friends where that makes obvious sense WIP

2015-09-14 Thread Markus Armbruster
TODO credit coccinelle g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size

[Qemu-devel] [PATCH] audio: Use g_new() & friends where that makes obvious sense WIP

2015-09-14 Thread Markus Armbruster
TODO credit coccinelle g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size

[Qemu-devel] [PATCH] usb: Use g_new() & friends where that makes obvious sense WIP

2015-09-14 Thread Markus Armbruster
TODO credit coccinelle g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size

[Qemu-devel] [PATCH 0/2] Architectural watchpoint check

2015-09-14 Thread Sergey Fedorov
This series is intended to fix ARM watchpoint emulation misbehavior. QEMU hangs when QEMU watchpoint fires but it does not pass additional architectural checks in ARM CPU debug exception handler. For details, please see individual patches. The most relevant parts of the original discussion about AR

[Qemu-devel] [PATCH] qxl: Use g_new() & friends where that makes obvious sense WIP

2015-09-14 Thread Markus Armbruster
TODO credit coccinelle g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size

[Qemu-devel] [PATCH] piix: fix resource leak reported by Coverity

2015-09-14 Thread zhanghailiang
config_fd should be closed before return, or there will be a resource leak error. Signed-off-by: zhanghailiang --- hw/pci-host/piix.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index 1fb71c8..7b2fbf9 100644 --- a/hw/pci

[Qemu-devel] [PATCH] tcg/mips: Fix clobbering of qemu_ld inputs

2015-09-14 Thread James Hogan
The MIPS TCG backend implements qemu_ld with 64-bit targets using the v0 register (base) as a temporary to load the upper half of the QEMU TLB comparator (see line 5 below), however this happens before the input address is used (line 8 to mask off the low bits for the TLB comparison, and line 12 to

[Qemu-devel] [PATCH] linux-user: assert that target_mprotect cannot fail

2015-09-14 Thread Paolo Bonzini
All error conditions that target_mprotect checks are also checked by target_mmap. EACCESS cannot happen because we are just removing PROT_WRITE. ENOMEM should not happen because we are modifying a whole VMA (and we have bigger problems anyway if it happens). Fixes a Coverity false positive, wher

Re: [Qemu-devel] Windows does not support DataTableRegion at all [was: docs: describe QEMU's VMGenID design]

2015-09-14 Thread Laszlo Ersek
On 09/14/15 10:24, Igor Mammedov wrote: > On Sun, 13 Sep 2015 15:34:51 +0300 > "Michael S. Tsirkin" wrote: > >> On Sun, Sep 13, 2015 at 01:56:44PM +0200, Laszlo Ersek wrote: >>> As the subject suggests, I have terrible news. >>> >>> I'll preserve the full context here, so that it's easy to scroll

Re: [Qemu-devel] [PATCH 5/6] vhost-user: add multiple queue support

2015-09-14 Thread Jason Wang
On 09/14/2015 04:58 PM, Yuanhan Liu wrote: > From: Changchun Ouyang > > This patch is initially based a patch from Nikolay Nikolaev. > > Here is the latest version for adding vhost-user multiple queue support, > by creating a nc and vhost_net pair for each queue. > > What differs from last versi

[Qemu-devel] [PATCH] pc: check for underflow in load_linux

2015-09-14 Thread Paolo Bonzini
If (setup_size+1)*512 is small enough, kernel_size -= setup_size can allocate a huge amount of memory. Avoid that. Signed-off-by: Paolo Bonzini --- hw/i386/pc.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 56aecce..6a312bd 100644 --- a/hw/i386/pc.c +

Re: [Qemu-devel] [PULL 21/29] xen/pt: Sync up the dev.config and data values.

2015-09-14 Thread Paolo Bonzini
On 10/09/2015 19:15, Stefano Stabellini wrote: > + > +switch (reg->size) { > +case 1: rc = xen_host_pci_get_byte(&s->real_device, offset, (uint8_t > *)&val); A bit ugly, and it relies on the host being little endian. > +break; > +case 2: rc = xen_host_pc

Re: [Qemu-devel] [PATCH 6/7] vhost-user: add multiple queue support

2015-09-14 Thread Jason Wang
On 09/08/2015 03:38 PM, Yuanhan Liu wrote: > From: Ouyang Changchun > > This patch is initially based a patch from Nikolay Nikolaev. > > Here is the latest version for adding vhost-user multiple queue support, > by creating a nc and vhost_net pair for each queue. > > What differs from last versi

Re: [Qemu-devel] [PULL 0/19] xen-2015-09-08-tag

2015-09-14 Thread Paolo Bonzini
On 10/09/2015 12:29, Stefano Stabellini wrote: > +if (lseek(config_fd, pos, SEEK_SET) != pos) { > +return -errno; > +} > do { > -rc = pread(config_fd, (uint8_t *)&val, len, pos); > +rc = read(config_fd, (uint8_t *)&val, len); > } while (rc < 0 && (errno =

Re: [Qemu-devel] [PULL 00/23] Block layer patches

2015-09-14 Thread Kevin Wolf
Am 14.09.2015 um 11:46 hat Peter Maydell geschrieben: > On 11 September 2015 at 20:40, Kevin Wolf wrote: > > The following changes since commit 30c38c90bd3f1bb105ebc069ac1821067c980b7c: > > > > scripts/qemu-gdb: Add brief comment describing usage (2015-09-11 17:14:50 > > +0100) > > > > are avai

Re: [Qemu-devel] [PATCH v10 09/10] netfilter: add a netbuffer filter

2015-09-14 Thread Yang Hongyang
On 09/14/2015 05:04 PM, Daniel P. Berrange wrote: On Wed, Sep 09, 2015 at 03:24:40PM +0800, Yang Hongyang wrote: This filter is to buffer/release packets, this feature can be used when using MicroCheckpointing, or other Remus like VM FT solutions, you can also use it to simulate the network de

Re: [Qemu-devel] [PULL 00/23] Block layer patches

2015-09-14 Thread Peter Maydell
On 11 September 2015 at 20:40, Kevin Wolf wrote: > The following changes since commit 30c38c90bd3f1bb105ebc069ac1821067c980b7c: > > scripts/qemu-gdb: Add brief comment describing usage (2015-09-11 17:14:50 > +0100) > > are available in the git repository at: > > git://repo.or.cz/qemu/kevin.gi

Re: [Qemu-devel] [PULL 0/4] Queued tcg related patches

2015-09-14 Thread Peter Maydell
On 11 September 2015 at 17:12, Richard Henderson wrote: > Cherry pick some reviewed patches that touch generic TCG. > > Hopefully this unsticks both patch sets, since they now touch only > target-* code, which can be independently reviewed and committed. > > > r~ > > > The following changes since

[Qemu-devel] [PATCH V4 1/2] sd.h: Move sd.h to include/hw/sd/

2015-09-14 Thread Sai Pavan Boddu
Create a sd director under include/hw/ and move sd.h to same. Signed-off-by: Sai Pavan Boddu Reviewed-by: Alistair Francis --- Changes for V4: Fix commit message. Changes for V3: None. --- hw/sd/milkymist-memcard.c | 2 +- hw/sd/omap_mmc.c | 2 +- hw/sd/pl181.c | 2

Re: [Qemu-devel] [Question] QEMU 2.3 Assertion with `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed

2015-09-14 Thread Paolo Bonzini
On 14/09/2015 10:01, Gonglei (Arei) wrote: > [2015-09-11 13:42:44] domain is rebooting > qemu-kvm: /home/abuild/rpmbuild/BUILD/qemu-kvm-2.3.0/exec.c:1188: > register_subpage: Assertion `existing->mr->subpage || existing->mr == > &io_mem_unassigned' failed. > [2015-09-11 13:42:58]: shutting do

[Qemu-devel] [PATCH V4 2/2] sdhci: Split sdhci.h for public and internal device usage

2015-09-14 Thread Sai Pavan Boddu
Split sdhci.h into sdhci-common.h(pubilc Version in include/) and sdhci.h(internal version in hw/sd) base on register declarations and object declaration. Signed-off-by: Sai Pavan Boddu --- Changes for V4: Remain the name of internal version of sdchi.h as same. And change Re-Adding qemu-c

[Qemu-devel] [PATCH V4 0/2] Move sdhci.h to include/hw/sd

2015-09-14 Thread Sai Pavan Boddu
Move sdhci.h splitting it into common and internal. Create a new directory for sd in include/hw/. Correct paths of sd.h in at every instance of #include. Sai Pavan Boddu (2): sd.h: Move sd.h to include/hw/sd/ sdhci: Split sdhci.h for public and internal device usage hw/sd/milkymist-memcard.c

Re: [Qemu-devel] [PATCH v10 00/10] Add a netfilter object and netbuffer filter

2015-09-14 Thread Yang Hongyang
On 09/14/2015 05:05 PM, Daniel P. Berrange wrote: On Mon, Sep 14, 2015 at 01:09:25PM +0800, Yang Hongyang wrote: Hi Stefan,Jason, I've convert this series to base on QOM, and introducing NetQueue apis instead of using Netqueue internals as Stefan suggested. Could you please take a look at it?

Re: [Qemu-devel] [PATCH v10 02/10] init/cleanup of netfilter object

2015-09-14 Thread Yang Hongyang
On 09/14/2015 04:54 PM, Daniel P. Berrange wrote: On Wed, Sep 09, 2015 at 03:24:33PM +0800, Yang Hongyang wrote: Add a netfilter object based on QOM. A netfilter is attached to a netdev, captures all network packets that pass through the netdev. When we delete the netdev, we also delete the n

Re: [Qemu-devel] [PATCH v10 00/10] Add a netfilter object and netbuffer filter

2015-09-14 Thread Daniel P. Berrange
On Mon, Sep 14, 2015 at 01:09:25PM +0800, Yang Hongyang wrote: > Hi Stefan,Jason, > > I've convert this series to base on QOM, and introducing NetQueue apis > instead of using Netqueue internals as Stefan suggested. Could you please > take a > look at it? I won't look at the actual net filtering

Re: [Qemu-devel] [PATCH v10 09/10] netfilter: add a netbuffer filter

2015-09-14 Thread Daniel P. Berrange
On Wed, Sep 09, 2015 at 03:24:40PM +0800, Yang Hongyang wrote: > This filter is to buffer/release packets, this feature can be used > when using MicroCheckpointing, or other Remus like VM FT solutions, you > can also use it to simulate the network delay. > It has an interval option, if supplied, th

[Qemu-devel] [PATCH 4/6] vhost-user: add VHOST_USER_GET_QUEUE_NUM message

2015-09-14 Thread Yuanhan Liu
This is for querying how many queues the backend supports if it has mq support(when VHOST_USER_PROTOCOL_F_MQ flag is set from the quried protocol features). vhost_net_get_max_queues() is the interface to export that value, and to tell if the backend supports # of queues user requested, which is do

[Qemu-devel] [PATCH 5/6] vhost-user: add multiple queue support

2015-09-14 Thread Yuanhan Liu
From: Changchun Ouyang This patch is initially based a patch from Nikolay Nikolaev. Here is the latest version for adding vhost-user multiple queue support, by creating a nc and vhost_net pair for each queue. What differs from last version is that this patch addresses two major concerns from Mi

[Qemu-devel] [PATCH 1/6] vhost-user: use VHOST_USER_XXX macro for switch statement

2015-09-14 Thread Yuanhan Liu
So that we could let vhost_user_call to handle extented requests, such as VHOST_USER_GET/SET_PROTOCOL_FEATURES, instead of invoking vhost_user_read/write and constructing the msg again by ourself. Signed-off-by: Yuanhan Liu --- hw/virtio/vhost-user.c | 38 ++

[Qemu-devel] [PATCH 6/6] vhost-user: add a new message to disable/enable a specific virt queue.

2015-09-14 Thread Yuanhan Liu
From: Changchun Ouyang Add a new message, VHOST_USER_SET_VRING_ENABLE, to enable or disable a specific virt queue, which is similar to attach/detach queue for tap device. virtio driver on guest doesn't have to use max virt queue pair, it could enable any number of virt queue ranging from 1 to ma

[Qemu-devel] [PATCH 2/6] vhost-user: add protocol feature negotiation

2015-09-14 Thread Yuanhan Liu
From: "Michael S. Tsirkin" Support a separate bitmask for vhost-user protocol features, and messages to get/set protocol features. Invoke them at init. No features are defined yet. v2: leverage vhost_user_call for request handling -- Yuanhan Liu Signed-off-by: Michael S. Tsirkin Signed-off-b

[Qemu-devel] [PATCH 3/6] vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE

2015-09-14 Thread Yuanhan Liu
Quote from Michael: We really should rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE. Suggested-by: Michael S. Tsirkin Signed-off-by: Yuanhan Liu --- docs/specs/vhost-user.txt | 4 ++-- hw/net/vhost_net.c | 2 +- hw/virtio/vhost-user.c | 6 +++--- linux-headers/linux/vhost.h

[Qemu-devel] [PATCH 0/6 v8] vhost-user multiple queue support

2015-09-14 Thread Yuanhan Liu
Hi, Here is the updated patch set for enabling vhost-user multiple queue. This patch set introduces 2 more vhost user messages: VHOST_USER_GET_QUEUE_NUM, for querying how many queues the backend supports, and VHOST_USER_SET_VRING_ENABLE, for enabling/disabling a specific virt queue. Both of the

Re: [Qemu-devel] [PATCH qemu v2 2/2] spapr_pci: Remove constraints about VFIO-PCI devices

2015-09-14 Thread Alexey Kardashevskiy
On 09/14/2015 02:04 PM, David Gibson wrote: On Fri, Sep 11, 2015 at 02:03:38PM -0600, Alex Williamson wrote: On Wed, 2015-09-09 at 20:43 -0600, Alex Williamson wrote: On Thu, 2015-09-03 at 14:40 +1000, Alexey Kardashevskiy wrote: So far there were 2 limitations enforced on an emulated PHB rega

Re: [Qemu-devel] [PATCH v10 02/10] init/cleanup of netfilter object

2015-09-14 Thread Daniel P. Berrange
On Mon, Sep 14, 2015 at 09:54:42AM +0100, Daniel P. Berrange wrote: > On Wed, Sep 09, 2015 at 03:24:33PM +0800, Yang Hongyang wrote: > > Add a netfilter object based on QOM. > > > > A netfilter is attached to a netdev, captures all network packets > > that pass through the netdev. When we delete t

Re: [Qemu-devel] [PATCH v10 02/10] init/cleanup of netfilter object

2015-09-14 Thread Daniel P. Berrange
On Wed, Sep 09, 2015 at 03:24:33PM +0800, Yang Hongyang wrote: > Add a netfilter object based on QOM. > > A netfilter is attached to a netdev, captures all network packets > that pass through the netdev. When we delete the netdev, we also > delete the netfilter object attached to it, because if th

Re: [Qemu-devel] [RFC PATCH 3/3] acpi: arm: add fw_cfg device node to dsdt

2015-09-14 Thread Igor Mammedov
On Sat, 12 Sep 2015 19:30:42 -0400 "Gabriel L. Somlo" wrote: > Add a fw_cfg device node to the ACPI DSDT. This is mostly > informational, as the authoritative fw_cfg MMIO region(s) > are listed in the Device Tree. However, since we are building > ACPI tables, we might as well be thorough while at

Re: [Qemu-devel] [PATCH v3 2/4] block: Add 'ignore-backing' field to BlockdevOptionsGenericCOWFormat

2015-09-14 Thread Kevin Wolf
Am 14.09.2015 um 07:54 hat Alberto Garcia geschrieben: > On Fri 11 Sep 2015 07:33:41 PM CEST, Max Reitz wrote: > > >>> So why do we need the new flag? Because "backing: ''" is ugly? > >> > >> I guess it's just because you're the only one who actually reads the > >> documentation. When discussing

Re: [Qemu-devel] [PATCH v2 00/11] aio: Introduce handler type to fix nested aio_poll for dataplane

2015-09-14 Thread Kevin Wolf
Am 14.09.2015 um 09:27 hat Fam Zheng geschrieben: > On Fri, 09/11 14:22, Kevin Wolf wrote: > > Am 11.09.2015 um 13:46 hat Fam Zheng geschrieben: > > > On Fri, 09/11 12:39, Kevin Wolf wrote: > > > > Am 29.07.2015 um 06:42 hat Fam Zheng geschrieben: > > > > > v2: Switch to disable/enable model. [Paol

Re: [Qemu-devel] [RFC PATCH 3/3] acpi: arm: add fw_cfg device node to dsdt

2015-09-14 Thread Shannon Zhao
On 2015/9/13 7:30, Gabriel L. Somlo wrote: > Add a fw_cfg device node to the ACPI DSDT. This is mostly > informational, as the authoritative fw_cfg MMIO region(s) > are listed in the Device Tree. However, since we are building > ACPI tables, we might as well be thorough while at it... > > Signed

Re: [Qemu-devel] [PATCH 2/4] target-i386: Convert kvm_default_*features to property/value pairs

2015-09-14 Thread Paolo Bonzini
On 11/09/2015 21:25, Eduardo Habkost wrote: > Convert the kvm_default_features and kvm_default_unset_features arrays > into a simple list of property/value pairs that will be applied to > X86CPU objects when using KVM. > > Signed-off-by: Eduardo Habkost > --- > hw/i386/pc_piix.c | 8 ++--- >

Re: [Qemu-devel] Windows does not support DataTableRegion at all [was: docs: describe QEMU's VMGenID design]

2015-09-14 Thread Igor Mammedov
On Sun, 13 Sep 2015 15:34:51 +0300 "Michael S. Tsirkin" wrote: > On Sun, Sep 13, 2015 at 01:56:44PM +0200, Laszlo Ersek wrote: > > As the subject suggests, I have terrible news. > > > > I'll preserve the full context here, so that it's easy to scroll back to > > the ASL for reference. > > > > I

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-14 Thread Alexey Kardashevskiy
On 09/14/2015 11:41 AM, David Gibson wrote: The sPAPRDRConnector pseudo-device contains an owner field which is set in spapr_dr_connector_new(). However, that function also calls object_property_add_child() to set the DRConnector as the QOM child of the owner object. That means that owner is al

Re: [Qemu-devel] [RFCv2 2/2] spapr: Don't use QOM [*] syntax for DR connectors.

2015-09-14 Thread Alexey Kardashevskiy
On 09/14/2015 11:41 AM, David Gibson wrote: The dynamic reconfiguration (hotplug) code for the pseries machine type uses a "DR connector" QOM object for each resource it will be possible to hotplug. Each of these is added to its owner using object_property_add_child(owner, "dr-connector[*],

[Qemu-devel] [Question] QEMU 2.3 Assertion with `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed

2015-09-14 Thread Gonglei (Arei)
Hi, Recently, our test team found several Qemu crash problems with the next assertion messages: [2015-09-11 13:42:44] domain is rebooting qemu-kvm: /home/abuild/rpmbuild/BUILD/qemu-kvm-2.3.0/exec.c:1188: register_subpage: Assertion `existing->mr->subpage || existing->mr == &io_mem_unassigned'

Re: [Qemu-devel] [PATCH 2/4] Fix bad error handling after memory_region_init_ram()

2015-09-14 Thread Markus Armbruster
Peter Crosthwaite writes: > On Fri, Sep 11, 2015 at 7:51 AM, Markus Armbruster wrote: >> Symptom: >> >> $ qemu-system-x86_64 -m 1000 >> Unexpected error in ram_block_add() at /work/armbru/qemu/exec.c:1456: >> upstream-qemu: cannot set up guest memory 'pc.ram': Cannot allocate >>

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 1/2] spapr: Add support for hwrng when available

2015-09-14 Thread Alexander Graf
On 14.09.15 04:27, David Gibson wrote: > On Fri, Sep 11, 2015 at 11:43:02AM +0200, Alexander Graf wrote: >> >> >> On 11.09.15 02:46, David Gibson wrote: >>> On Thu, Sep 10, 2015 at 02:13:26PM +0200, Alexander Graf wrote: > Am 10.09.2015 um 14:03 schrieb Thomas Huth : > >> On

Re: [Qemu-devel] [PATCH 7/7] vhost-user: add a new message to disable/enable a specific virt queue.

2015-09-14 Thread Yuanhan Liu
On Wed, Sep 09, 2015 at 01:45:50PM +0300, Michael S. Tsirkin wrote: > On Tue, Sep 08, 2015 at 03:38:47PM +0800, Yuanhan Liu wrote: [snip ] > > diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c > > index 11e46b5..ca6f7fa 100644 > > --- a/hw/virtio/vhost-user.c > > +++ b/hw/virtio/vhos

Re: [Qemu-devel] [PATCH v2 00/11] aio: Introduce handler type to fix nested aio_poll for dataplane

2015-09-14 Thread Fam Zheng
On Fri, 09/11 14:22, Kevin Wolf wrote: > Am 11.09.2015 um 13:46 hat Fam Zheng geschrieben: > > On Fri, 09/11 12:39, Kevin Wolf wrote: > > > Am 29.07.2015 um 06:42 hat Fam Zheng geschrieben: > > > > v2: Switch to disable/enable model. [Paolo] > > > > > > > > Most existing nested aio_poll()'s in blo

Re: [Qemu-devel] [PATCH] q35: Remove old machine versions

2015-09-14 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Fri, Sep 11, 2015 at 03:44:47PM -0300, Eduardo Habkost wrote: >> Ping? >> >> So, what's the reason we are still keeping those old machines in the >> code? > > Victor also wanted to clean out some very old machine types for > the PIIX, too. > > But if someone cre

Re: [Qemu-devel] [RFC PATCH v1 02/25] s390x: virtio-ccw: Remove un-needed if guard

2015-09-14 Thread Cornelia Huck
On Thu, 10 Sep 2015 22:33:12 -0700 Peter Crosthwaite wrote: > error_propagate is already NULL safe. Remove these un-needed if > guards. > > Cc: Richard Henderson > Cc: Alexander Graf > Signed-off-by: Peter Crosthwaite > --- > > hw/s390x/virtio-ccw.c | 28 +++- > 1 fi

<    1   2   3   4