Re: [Qemu-devel] [RFC PATCH v3 1/5] coccinelle: add a script to optimize tcg op using tcg_gen_extract()

2017-05-11 Thread SF Markus Elfring via Qemu-devel
> create mode 100644 scripts/coccinelle/tcg_gen_extract.cocci Will an other subdirectory be more appropriate for this SmPL script? > +// Coccinelle helpful issue: > +// https://github.com/coccinelle/coccinelle/issues/86 I am curious if such an information source will trigger further software

Re: [Qemu-devel] [PATCHv6 0/5] HPT resizing for pseries guests (qemu part)

2017-05-11 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20170512050451.9979-1-da...@gibson.dropbear.id.au Subject: [Qemu-devel] [PATCHv6 0/5] HPT resizing for pseries guests (qemu part) Type: series === TEST SCRIPT BEGIN === #!/bin/bash

Re: [Qemu-devel] [RFC PATCH v3 1/5] coccinelle: add a script to optimize tcg op using tcg_gen_extract()

2017-05-11 Thread Philippe Mathieu-Daudé
Hi Julia, Sorry I planed to send you another mail but sent this mail to QEMU list first. I don't think I have seen earlier versions of this script. Are you proposing it to be added to the kernel? If so, it should be put in an appropriate subdirectory of Coccinelle. This script is

Re: [Qemu-devel] [PATCH v3 04/12] memory: fix address_space_get_iotlb_entry()

2017-05-11 Thread David Gibson
On Thu, May 11, 2017 at 05:36:03PM +0800, Peter Xu wrote: > On Thu, May 11, 2017 at 11:56:38AM +1000, David Gibson wrote: > > On Wed, May 10, 2017 at 04:01:47PM +0800, Peter Xu wrote: > > > This function has an assumption that we will definitely call translate() > > > once (or say, the addr will

Re: [Qemu-devel] [Qemu-ppc] [PATCH 7/8] target/ppc: optimize various functions using extract op

2017-05-11 Thread David Gibson
On Thu, May 11, 2017 at 10:46:01AM +0200, Laurent Vivier wrote: > On 11/05/2017 02:41, David Gibson wrote: > > On Wed, May 10, 2017 at 05:05:34PM -0300, Philippe Mathieu-Daudé wrote: > >> Applied using Coccinelle script. > >> > >> Signed-off-by: Philippe Mathieu-Daudé > > > >

Re: [Qemu-devel] [PATCH 7/8] target/ppc: optimize various functions using extract op

2017-05-11 Thread David Gibson
On Thu, May 11, 2017 at 10:48:42PM -0300, Philippe Mathieu-Daudé wrote: > Hi Nikunj, > > On 05/11/2017 01:54 AM, Nikunj A Dadhania wrote: > > Philippe Mathieu-Daudé writes: > > > > > Applied using Coccinelle script. > > > > > > Signed-off-by: Philippe Mathieu-Daudé

Re: [Qemu-devel] [Qemu-arm] [Qemu-devel PATCH 1/5] msf2: Add Smartfusion2 System timer

2017-05-11 Thread sundeep subbaraya
Hi Philippe, On Fri, May 12, 2017 at 10:08 AM, Philippe Mathieu-Daudé wrote: > On 05/10/2017 09:37 AM, sundeep subbaraya wrote: > >> Hi Phil, >> >> On Wed, May 10, 2017 at 3:11 PM, Philippe Mathieu-Daudé > > wrote: >> >>> Hi Subbaraya,

[Qemu-devel] [PATCHv6 0/5] HPT resizing for pseries guests (qemu part)

2017-05-11 Thread David Gibson
This series implements the host side of the PAPR ACR to allow runtime resizing of the Hashed Page Table (HPT) for pseries guests. Exercising this feature requires a guest OS which is also aware of it. Patches to implement the guest side in Linux are upstream as of v4.11. Availability of the

[Qemu-devel] [PATCHv6 5/5] pseries: Allow HPT resizing with KVM

2017-05-11 Thread David Gibson
So far, qemu implements the PAPR Hash Page Table (HPT) resizing extension with TCG. The same implementation will work with KVM PR, but we don't currently allow that. For KVM HV we can only implement resizing with the assistance of the host kernel, which needs a new capability and ioctl()s. This

[Qemu-devel] [PATCHv6 1/5] pseries: Stubs for HPT resizing

2017-05-11 Thread David Gibson
This introduces stub implementations of the H_RESIZE_HPT_PREPARE and H_RESIZE_HPT_COMMIT hypercalls which we hope to add in a PAPR extension to allow run time resizing of a guest's hash page table. It also adds a new machine property for controlling whether this new facility is available. For

[Qemu-devel] [PATCHv6 3/5] pseries: Enable HPT resizing for 2.10

2017-05-11 Thread David Gibson
We've now implemented a PAPR extensions which allows PAPR guests (i.e. "pseries" machine type) to resize their hash page table during runtime. However, that extension is only enabled if explicitly chosen on the command line. This patch enables it by default for spapr-2.10, but leaves it disabled

[Qemu-devel] [PATCHv6 4/5] pseries: Use smaller default hash page tables when guest can resize

2017-05-11 Thread David Gibson
We've now implemented a PAPR extension allowing PAPR guest to resize their hash page table (HPT) during runtime. This patch makes use of that facility to allocate smaller HPTs by default. Specifically when a guest is aware of the HPT resize facility, qemu sizes the HPT to the initial memory size,

[Qemu-devel] [PATCHv6 2/5] pseries: Implement HPT resizing

2017-05-11 Thread David Gibson
This patch implements hypercalls allowing a PAPR guest to resize its own hash page table. This will eventually allow for more flexible memory hotplug. The implementation is partially asynchronous, handled in a special thread running the hpt_prepare_thread() function. The state of a pending

Re: [Qemu-devel] [Qemu-devel PATCH 4/5] msf2: Add Smartfusion2 SoC.

2017-05-11 Thread Philippe Mathieu-Daudé
On 05/12/2017 12:17 AM, sundeep subbaraya wrote: Hi Philippe, On Wed, May 10, 2017 at 5:20 PM, Philippe Mathieu-Daudé wrote: Hi Subbaraya, On 05/09/2017 01:44 PM, Subbaraya Sundeep wrote: Smartfusion2 SoC has hardened Microcontroller subsystem and flash based FPGA

Re: [Qemu-devel] [Qemu-arm] [Qemu-devel PATCH 1/5] msf2: Add Smartfusion2 System timer

2017-05-11 Thread Philippe Mathieu-Daudé
On 05/10/2017 09:37 AM, sundeep subbaraya wrote: Hi Phil, On Wed, May 10, 2017 at 3:11 PM, Philippe Mathieu-Daudé > wrote: Hi Subbaraya, nice work! The timer you are modeling is the mss_timer, which is in particular used in the smartfusion2, I'd

[Qemu-devel] [PATCH v8 3/3] ramblock: add new hmp command "info ramblock"

2017-05-11 Thread Peter Xu
To dump information about ramblocks. It looks like: (qemu) info ramblock Block NamePSize Offset Used Total /objects/mem2 MiB 0x 0x8000 0x8000 vga.vram4 KiB

[Qemu-devel] [PATCH v8 1/3] ramblock: add RAMBLOCK_FOREACH()

2017-05-11 Thread Peter Xu
So that it can simplifies the iterators. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- exec.c | 22 +++--- include/exec/ramlist.h | 5 + migration/ram.c| 13 +++-- 3 files changed, 23

[Qemu-devel] [PATCH v8 2/3] utils: provide size_to_str()

2017-05-11 Thread Peter Xu
Moving the algorithm from print_type_size() into size_to_str() so that other component can also leverage it. With that, refactor print_type_size(). The assert() in that logic is removed though, since even UINT64_MAX would not overflow. Signed-off-by: Peter Xu ---

[Qemu-devel] [PATCH v8 0/3] ramblock: add hmp command "info ramblock"

2017-05-11 Thread Peter Xu
v8: - patch 1: add r-b for Dave - patch 2: use "uint64_t" for size_to_str() parameter, remove assert() since it's useless now [Dave] - drop patch 4 v7: - patch 1: removed Dave's r-b since the patch conflicted during rebase - patch 2: add r-b for Markus, with the nice function comment that

Re: [Qemu-devel] [Qemu-devel PATCH 2/5] msf2: Microsemi Smartfusion2 System Register block.

2017-05-11 Thread Philippe Mathieu-Daudé
On 05/12/2017 12:48 AM, sundeep subbaraya wrote: Hi Phiilippe, On Wed, May 10, 2017 at 4:04 PM, Philippe Mathieu-Daudé wrote: Hi Subbaraya, On 05/09/2017 01:44 PM, Subbaraya Sundeep wrote: Added Sytem register block of Smartfusion2. This block has PLL registers which are

Re: [Qemu-devel] [PATCH v7 2/4] utils: provide size_to_str()

2017-05-11 Thread Peter Xu
On Thu, May 11, 2017 at 02:05:26PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > Moving the algorithm from print_type_size() into size_to_str() so that > > other component can also leverage it. With that, refactor > > print_type_size(). > > > > Reviewed-by:

Re: [Qemu-devel] [RFC PATCH v3 1/5] coccinelle: add a script to optimize tcg op using tcg_gen_extract()

2017-05-11 Thread Julia Lawall
Hello, I don't think I have seen earlier versions of this script. Are you proposing it to be added to the kernel? If so, it should be put in an appropriate subdirectory of Coccinelle. Overall, could you explain at a high level what it is intended to do? It uses rather heavily regular

Re: [Qemu-devel] [Qemu-devel PATCH 3/5] msf2: Add Smartfusion2 SPI controller

2017-05-11 Thread Philippe Mathieu-Daudé
Hi Subbaraya, On 05/12/2017 12:31 AM, sundeep subbaraya wrote: Hi Philippe, On Wed, May 10, 2017 at 5:42 PM, Philippe Mathieu-Daudé wrote: Hi Subbaraya, Like my comment for the timer model, I'd name this model "mss_spi". The only difference I see in the SF2 is the STAT8

Re: [Qemu-devel] [Qemu-devel PATCH 2/5] msf2: Microsemi Smartfusion2 System Register block.

2017-05-11 Thread sundeep subbaraya
Hi Phiilippe, On Wed, May 10, 2017 at 4:04 PM, Philippe Mathieu-Daudé wrote: > Hi Subbaraya, > > > On 05/09/2017 01:44 PM, Subbaraya Sundeep wrote: > >> Added Sytem register block of Smartfusion2. >> This block has PLL registers which are accessed by guest. >> >> Signed-off-by:

Re: [Qemu-devel] [PATCH 2/3] migration: Remove use of old MigrationParams

2017-05-11 Thread Peter Xu
On Thu, May 11, 2017 at 06:32:27PM +0200, Juan Quintela wrote: > We have change in the previous patch to use migration capabilities for > it. Notice that we continue using the old command line flags from > migrate command from the time being. Remove the set_params method as > now it is empty. >

[Qemu-devel] [PATCH v3 3/5] target/m68k: optimize bcd_flags() using extract op

2017-05-11 Thread Philippe Mathieu-Daudé
Patch created mechanically using Coccinelle script via: $ spatch --macro-file scripts/cocci-macro-file.h --in-place \ --sp-file scripts/coccinelle/tcg_gen_extract.cocci --dir target Signed-off-by: Philippe Mathieu-Daudé Acked-by: Laurent Vivier

[Qemu-devel] [PATCH v3 5/5] target/sparc: optimize various functions using extract op

2017-05-11 Thread Philippe Mathieu-Daudé
Patch created mechanically using Coccinelle script via: $ spatch --macro-file scripts/cocci-macro-file.h --in-place \ --sp-file scripts/coccinelle/tcg_gen_extract.cocci --dir target Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/translate.c | 15

[Qemu-devel] [PATCH v3 2/5] target/arm: optimize rev16() using extract op

2017-05-11 Thread Philippe Mathieu-Daudé
Patch created mechanically using Coccinelle script via: $ spatch --macro-file scripts/cocci-macro-file.h --in-place \ --sp-file scripts/coccinelle/tcg_gen_extract.cocci --dir target Signed-off-by: Philippe Mathieu-Daudé --- target/arm/translate-a64.c | 6 ++ 1

[Qemu-devel] [PATCH v3 4/5] target/ppc: using various functions using extract op

2017-05-11 Thread Philippe Mathieu-Daudé
Patch created mechanically using Coccinelle script via: $ spatch --macro-file scripts/cocci-macro-file.h --in-place \ --sp-file scripts/coccinelle/tcg_gen_extract.cocci --dir target Signed-off-by: Philippe Mathieu-Daudé --- David I did not add your Reviewed-by as

[Qemu-devel] [RFC PATCH v3 1/5] coccinelle: add a script to optimize tcg op using tcg_gen_extract()

2017-05-11 Thread Philippe Mathieu-Daudé
If you have coccinelle installed you can apply this script using: $ spatch \ --macro-file scripts/cocci-macro-file.h \ --dir target --in-place You can also use directly Peter Senna Tschudin docker image (easier): $ docker run -v `pwd`:`pwd` -w `pwd` petersenna/coccinelle

[Qemu-devel] [PATCH v3 0/5] optimize various tcg_gen() functions using extract op

2017-05-11 Thread Philippe Mathieu-Daudé
Changes from v1: In my first attempt I misunderstood tcg_gen_extract() intrinsics, and Richard Henderson pointed that out. In this patchset the cocci script is corrected and clarified, it also print how arguments are checked while running. Also: - incorrect patches have been removed. (Richard

Re: [Qemu-devel] [Qemu-devel PATCH 3/5] msf2: Add Smartfusion2 SPI controller

2017-05-11 Thread sundeep subbaraya
Hi Philippe, On Wed, May 10, 2017 at 5:42 PM, Philippe Mathieu-Daudé wrote: > Hi Subbaraya, > > Like my comment for the timer model, I'd name this model "mss_spi". > The only difference I see in the SF2 is the STAT8 register. > No need to register both devices now but maybe you

Re: [Qemu-devel] [Qemu-devel PATCH 4/5] msf2: Add Smartfusion2 SoC.

2017-05-11 Thread sundeep subbaraya
Hi Philippe, On Wed, May 10, 2017 at 5:20 PM, Philippe Mathieu-Daudé wrote: > Hi Subbaraya, > > > On 05/09/2017 01:44 PM, Subbaraya Sundeep wrote: > >> Smartfusion2 SoC has hardened Microcontroller subsystem >> and flash based FPGA fabric. This patch adds support for >>

Re: [Qemu-devel] [PATCH] ram: Rename RAM_SAVE_FLAG_COMPRESS to RAM_SAVE_FLAG_ZERO

2017-05-11 Thread Peter Xu
On Thu, May 11, 2017 at 05:50:28PM +0200, Juan Quintela wrote: > Reflects better what it does now, and avoid confussions with > RAM_SAVE_FLAG_COMPRESS_PAGE. > > Signed-off-by: Juan Quintela Reviewed-by: Peter Xu > > --- > > Hi > > I always forgot the

Re: [Qemu-devel] [PATCH v2] migration: Pass Error ** argument to {save, load}_vmstate

2017-05-11 Thread Peter Xu
On Thu, May 11, 2017 at 05:34:40PM +0200, Juan Quintela wrote: > This way we use the "normal" way of printing errors for hmp commands. > > Signed-off-by: Juan Quintela > Suggested-by: Paolo Bonzini Reviewed-by: Peter Xu -- Peter

Re: [Qemu-devel] [PATCH 2/8] target/arm: optimize smul_dual() and neon_trn_u8() using extract op

2017-05-11 Thread Philippe Mathieu-Daudé
Hi Eric, On 05/10/2017 05:15 PM, Eric Blake wrote: On 05/10/2017 03:05 PM, Philippe Mathieu-Daudé wrote: Applied using Coccinelle script. Thinking forward a year - if I want to reproduce this (to see if other instances have crept in), I have to dig up a mail archive to learn the formula you

Re: [Qemu-devel] [PATCH 0/8] optimize various tcg_gen() functions using extract op

2017-05-11 Thread Philippe Mathieu-Daudé
Hi, The patch set Patchew intented to compile is incorrect, but this error worried me: On 05/10/2017 05:20 PM, no-re...@patchew.org wrote: This series failed build test on s390x host. Please find the details below. [...] CC mips64-softmmu/target/mips/translate.o

Re: [Qemu-devel] [PATCH 6/8] target/mips: optimize bshfl() using extract op

2017-05-11 Thread Philippe Mathieu-Daudé
Hi, As noticed by Richard in another patch, this one is also WRONG: $ docker run -it -v `pwd`:`pwd` -w `pwd` petersenna/coccinelle --sp-file scripts/coccinelle/tcg_gen_extract.cocci --macro-file scripts/cocci-macro-file.h target/mips/translate.c init_defs_builtins:

Re: [Qemu-devel] [RFC PATCH v2] coccinelle: add a script to optimize tcg op using tcg_gen_extract()

2017-05-11 Thread Philippe Mathieu-Daudé
>> Is this script likely to be rerun in the future? If yes, keeping it in >> scripts/coccinelle/ is a good idea. If no, I recommend to store it in >> the commit message instead. > > > It is unlikely to be rerun in the future, at least for this specific pattern. > But it can be easily adapted

Re: [Qemu-devel] [PATCH v2 0/3] Remove old MigrationParams

2017-05-11 Thread Hailiang Zhang
On 2017/5/12 0:32, Juan Quintela wrote: Hi Changes from v1: - make migrate_block_set_* take a boolean - disable block migration in colo to maintain semantics. Please review, Juan. [v1] Upon a time there were MigrationParms (only used for block migration) and then MigrationParams used for

Re: [Qemu-devel] [PATCH 2/3] migration: Remove use of old MigrationParams

2017-05-11 Thread Hailiang Zhang
On 2017/5/12 0:33, Juan Quintela wrote: Hailiang Zhang wrote: Hi, Hmm you don't seem to have replaced this with anything. I think that's a behavioural change; the trick COLO did (I'm not sure if this is still the way it works) is that they initiate the first

Re: [Qemu-devel] [RFC PATCH v2] coccinelle: add a script to optimize tcg op using tcg_gen_extract()

2017-05-11 Thread Philippe Mathieu-Daudé
Hi Markus, On 05/11/2017 06:03 AM, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: Ok I just understood Richard explanation, so this patch is WRONG and I need to get some real rest :( Ha! Get some sleep; we'll still be around in the morning ;) On 05/10/2017

Re: [Qemu-devel] [PATCH 5/8] target/m68k: optimize bcd_flags() using extract op

2017-05-11 Thread Philippe Mathieu-Daudé
This patch is correct: $ docker run -it -v `pwd`:`pwd` -w `pwd` petersenna/coccinelle --sp-file scripts/coccinelle/tcg_gen_extract.cocci --macro-file scripts/cocci-macro-file.h --dir target/m68k init_defs_builtins: /usr/lib64/coccinelle/standard.h init_defs: scripts/cocci-macro-file.h

Re: [Qemu-devel] [PATCH v3 12/12] vhost: iommu: cache static mapping if there is

2017-05-11 Thread Jason Wang
On 2017年05月11日 16:59, Peter Xu wrote: On Thu, May 11, 2017 at 04:35:21PM +0800, Jason Wang wrote: On 2017年05月10日 16:01, Peter Xu wrote: This patch pre-heat vhost iotlb cache when passthrough mode enabled. Sometimes, even if user specified iommu_platform for vhost devices, IOMMU might still

Re: [Qemu-devel] [PATCH 3/8] target/arm: optimize rev16() using extract op

2017-05-11 Thread Philippe Mathieu-Daudé
Hi, I'll resend as v3, just to confirm this patch is OK: $ docker run -it -v `pwd`:`pwd` -w `pwd` petersenna/coccinelle --sp-file scripts/coccinelle/tcg_gen_extract.cocci --macro-file scripts/cocci-macro-file.h target/arm/translate-a64.c init_defs_builtins: /usr/lib64/coccinelle/standard.h

[Qemu-devel] [PATCH V4 12/12] net/filter-rewriter.c: Make filter-rewriter support vnet_hdr_len

2017-05-11 Thread Zhang Chen
We get the vnet_hdr_len from NetClientState that make us parse net packet correctly. Signed-off-by: Zhang Chen --- net/filter-rewriter.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/net/filter-rewriter.c

[Qemu-devel] [PATCH V4 10/12] net/colo-compare.c: Add vnet packet's tcp/udp/icmp compare

2017-05-11 Thread Zhang Chen
COLO-Proxy just focus on packet payload, So we skip vnet header. Signed-off-by: Zhang Chen --- net/colo-compare.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index cb0b04e..bf565f3 100644

[Qemu-devel] [PATCH V4 11/12] net/filter-rewriter.c: Add new option to enable vnet support for filter-rewriter

2017-05-11 Thread Zhang Chen
We add the vnet_hdr option for filter-rewriter, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object filter-rewriter,id=rew0,netdev=hn0,queue=all,vnet_hdr=on Signed-off-by: Zhang Chen ---

Re: [Qemu-devel] [PATCH 8/8] target/sparc: optimize various functions using extract op

2017-05-11 Thread Philippe Mathieu-Daudé
This patch seems correct: $ docker run -it -v `pwd`:`pwd` -w `pwd` petersenna/coccinelle --sp-file scripts/coccinelle/tcg_gen_extract.cocci --macro-file scripts/cocci-macro-file.h --dir target/sparc init_defs_builtins: /usr/lib64/coccinelle/standard.h init_defs: scripts/cocci-macro-file.h

[Qemu-devel] [PATCH V4 07/12] net/colo.c: Make vnet_hdr_len as packet property

2017-05-11 Thread Zhang Chen
We can use this property flush and send packet with vnet_hdr_len. Signed-off-by: Zhang Chen --- net/colo-compare.c| 8 ++-- net/colo.c| 3 ++- net/colo.h| 4 +++- net/filter-rewriter.c | 2 +- 4 files changed, 12 insertions(+), 5

[Qemu-devel] [PATCH V4 09/12] net/colo.c: Add vnet packet parse feature in colo-proxy

2017-05-11 Thread Zhang Chen
Make colo-compare and filter-rewriter can parse vnet packet. Signed-off-by: Zhang Chen --- net/colo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/colo.c b/net/colo.c index 180eaed..28ce7c8 100644 --- a/net/colo.c +++ b/net/colo.c

[Qemu-devel] [PATCH V4 02/12] net/filter-mirror.c: Add new option to enable vnet support for filter-mirror

2017-05-11 Thread Zhang Chen
We add the vnet_hdr option for filter-mirror, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0,vnet_hdr=on Signed-off-by: Zhang Chen ---

Re: [Qemu-devel] [PATCH 7/8] target/ppc: optimize various functions using extract op

2017-05-11 Thread Philippe Mathieu-Daudé
Hi Nikunj, On 05/11/2017 01:54 AM, Nikunj A Dadhania wrote: Philippe Mathieu-Daudé writes: Applied using Coccinelle script. Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/translate.c | 9 +++-- target/ppc/translate/vsx-impl.inc.c |

[Qemu-devel] [PATCH V4 06/12] net/colo-compare.c: Add new option to enable vnet support for colo-compare

2017-05-11 Thread Zhang Chen
We add the vnet_hdr option for colo-compare, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0,vnet_hdr=on Signed-off-by: Zhang Chen

[Qemu-devel] [PATCH V4 05/12] net/net.c: Add vnet_hdr support in SocketReadState

2017-05-11 Thread Zhang Chen
Address Jason Wang's comments add vnet header length to SocketReadState. We add a flag to dicide whether net_fill_rstate() to read struct {int size; int vnet_hdr_len; const uint8_t buf[];} or not. Signed-off-by: Zhang Chen --- include/net/net.h | 9 +++--

[Qemu-devel] [PATCH V4 04/12] net/filter-mirror.c: Add new option to enable vnet support for filter-redirector

2017-05-11 Thread Zhang Chen
We add the vnet_hdr option for filter-redirector, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object filter-redirector,id=r0,netdev=hn0,queue=tx,outdev=red0,vnet_hdr=on Signed-off-by: Zhang Chen ---

[Qemu-devel] [PATCH V4 08/12] net/colo-compare.c: Make colo-compare support vnet_hdr_len

2017-05-11 Thread Zhang Chen
COLO-compare can get vnet header length from filter, Add vnet_hdr_len to struct packet and output packet with the vnet_hdr_len. Signed-off-by: Zhang Chen --- net/colo-compare.c | 45 ++--- 1 file changed, 34 insertions(+),

[Qemu-devel] [PATCH V4 03/12] net/filter-mirror.c: Make filter_mirror_send support vnet support.

2017-05-11 Thread Zhang Chen
In this patch, if vnet_hdr=on we change the send packet format from struct {int size; const uint8_t buf[];} to {int size; int vnet_hdr_len; const uint8_t buf[];}. make other module(like colo-compare) know how to parse net packet correctly. Signed-off-by: Zhang Chen

[Qemu-devel] [PATCH V4 01/12] net: Add vnet_hdr_len related arguments in NetClientState

2017-05-11 Thread Zhang Chen
Add vnet_hdr_len and using_vnet_hdr arguments in NetClientState that make othermodule get real vnet_hdr_len easily. Signed-off-by: Zhang Chen --- include/net/net.h | 2 ++ net/net.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/net/net.h

[Qemu-devel] [PATCH V4 00/12] Add COLO-proxy virtio-net support

2017-05-11 Thread Zhang Chen
If user use -device virtio-net-pci, virtio-net driver will add a header to raw net packet that colo-proxy can't handle it. COLO-proxy just focus on the packet payload, so we skip the virtio-net header to compare the sent packet that primary guest's to secondary guest's. V4: - Add vnet_hdr option

[Qemu-devel] [PATCH 2/3] net/filter-mirror.c: Rename filter_mirror_send() and fix codestyle

2017-05-11 Thread Zhang Chen
Because filter_mirror_receive_iov() and filter_redirector_receive_iov() both use the filter_mirror_send() to send packet, so I change filter_mirror_send() to filter_send() that looks more common. And fix some codestyle. Signed-off-by: Zhang Chen ---

[Qemu-devel] [PATCH 1/3] net/filter-mirror.c: Remove duplicate check code.

2017-05-11 Thread Zhang Chen
The s->outdev have checked in filter_mirror_set_outdev(). Signed-off-by: Zhang Chen --- net/filter-mirror.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/net/filter-mirror.c b/net/filter-mirror.c index 72fa7c2..fd0322f 100644 --- a/net/filter-mirror.c

[Qemu-devel] [PATCH 3/3] net/filter-rewriter: Remove unused option in filter-rewirter

2017-05-11 Thread Zhang Chen
Signed-off-by: Zhang Chen --- qemu-options.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index 70c0ded..f5e088e 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4038,7 +4038,8 @@ Create a

[Qemu-devel] [PATCH 0/3] Optimize filter-mirror and filter-rewriter

2017-05-11 Thread Zhang Chen
Fix some duplicate codes and remove unused codes. Zhang Chen (3): net/filter-mirror.c: Remove duplicate check code. net/filter-mirror.c: Rename filter_mirror_send() and fix codestyle net/filter-rewriter: Remove unused option in filter-rewirter net/filter-mirror.c | 35

Re: [Qemu-devel] [PATCH 2/8] target/arm: optimize smul_dual() and neon_trn_u8() using extract op

2017-05-11 Thread Philippe Mathieu-Daudé
Hi Richard, On 05/10/2017 05:32 PM, Philippe Mathieu-Daudé wrote: On 05/10/2017 05:20 PM, Richard Henderson wrote: On 05/10/2017 01:05 PM, Philippe Mathieu-Daudé wrote: -tcg_gen_shri_i32(t1, t1, 8); -tcg_gen_andi_i32(t1, t1, 0x00ff00ff); +tcg_gen_extract_i32(t1, t1, 8,

Re: [Qemu-devel] [PATCH 4/8] target/cris: optimize gen_swapb() using extract op

2017-05-11 Thread Philippe Mathieu-Daudé
Hi, As reviewd by Richard this patch is WRONG, so need to further review :) http://lists.nongnu.org/archive/html/qemu-devel/2017-05/msg02551.html On 05/10/2017 05:05 PM, Philippe Mathieu-Daudé wrote: Applied using Coccinelle script. Signed-off-by: Philippe Mathieu-Daudé ---

Re: [Qemu-devel] [RFC v1 8/9] virtio-crypto: add host feature bits support

2017-05-11 Thread Gonglei (Arei)
> > From: Cornelia Huck [mailto:cornelia.h...@de.ibm.com] > Sent: Thursday, May 11, 2017 11:05 PM > Subject: Re: [RFC v1 8/9] virtio-crypto: add host feature bits support > > On Mon, 8 May 2017 19:38:23 +0800 > Gonglei wrote: > > > We enable all feature bits

Re: [Qemu-devel] [PATCH] target/i386: enable A20 automatically in system management mode

2017-05-11 Thread Xu, Anthony
Hi Paolo, In KVM mode, seems A20 is ignored. Do you see any potential issue here? Anthony > -Original Message- > From: Kevin O'Connor [mailto:ke...@koconnor.net] > Sent: Thursday, May 11, 2017 9:35 AM > To: Paolo Bonzini > Cc: qemu-devel@nongnu.org; Xu, Anthony

Re: [Qemu-devel] KVM "fake DAX" device flushing

2017-05-11 Thread Dan Williams
[ adding nvdimm mailing list ] On Wed, May 10, 2017 at 8:56 AM, Pankaj Gupta wrote: > We are sharing initial project proposal for > 'KVM "fake DAX" device flushing' project for feedback. > Got the idea during discussion with 'Rik van Riel'. > > Also, request answers to

Re: [Qemu-devel] [PATCH] alpha-user: wire epoll_create, epoll_ctl, epoll_wait

2017-05-11 Thread Sergei Trofimovich
On Sat, 8 Apr 2017 20:33:22 +0100 Sergei Trofimovich wrote: > Noticed when ran GHC on alpha: > $ qemu-alpha -L /usr/alpha-unknown-linux-gnu/ /tmp/a > qemu: Unsupported syscall: 407 > > linux-user/syscall.c does have 'epoll_create' wiring, > but under nondeprecated

Re: [Qemu-devel] [PATCH v7 13/13] MAINTAINERS: Add vfio-ccw maintainer

2017-05-11 Thread Alex Williamson
On Fri, 5 May 2017 04:03:52 +0200 Dong Jia Shi wrote: > Add Cornelia Huck as the vfio-ccw maintainer. > > Signed-off-by: Dong Jia Shi > --- Acked-by: Alex Williamson > MAINTAINERS | 5 + > 1 file

Re: [Qemu-devel] [PATCH v7 12/13] vfio/ccw: update sense data if a unit check is pending

2017-05-11 Thread Alex Williamson
On Fri, 5 May 2017 04:03:51 +0200 Dong Jia Shi wrote: > Concurrent-sense data is currently not delivered. This patch stores > the concurrent-sense data to the subchannel if a unit check is pending > and the concurrent-sense bit is enabled. Then a TSCH can retreive

Re: [Qemu-devel] [PATCH v7 10/13] s390x/css: introduce and realize ccw-request callback

2017-05-11 Thread Alex Williamson
On Fri, 5 May 2017 04:03:49 +0200 Dong Jia Shi wrote: > From: Xiao Feng Ren > > Introduce a new callback on subchannel to handle ccw-request. > Realize the callback in vfio-ccw device. Besides, resort to > the event notifier handler to

Re: [Qemu-devel] [PATCH v7 07/13] vfio/ccw: vfio based subchannel passthrough driver

2017-05-11 Thread Alex Williamson
On Fri, 5 May 2017 04:03:46 +0200 Dong Jia Shi wrote: > From: Xiao Feng Ren > > We use the IOMMU_TYPE1 of VFIO to realize the subchannels > passthrough, implement a vfio based subchannels passthrough > driver called "vfio-ccw". > >

Re: [Qemu-devel] [PATCH v7 09/13] vfio/ccw: get irqs info and set the eventfd fd

2017-05-11 Thread Alex Williamson
On Fri, 5 May 2017 04:03:48 +0200 Dong Jia Shi wrote: > vfio-ccw resorts to the eventfd mechanism to communicate with userspace. > We fetch the irqs info via the ioctl VFIO_DEVICE_GET_IRQ_INFO, > register a event notifier to get the eventfd fd which is sent > to

Re: [Qemu-devel] [PATCH v7 08/13] vfio/ccw: get io region info

2017-05-11 Thread Alex Williamson
On Fri, 5 May 2017 04:03:47 +0200 Dong Jia Shi wrote: > vfio-ccw provides an MMIO region for I/O operations. We fetch its > information via ioctls here, then we can use it performing I/O > instructions and retrieving I/O results later on. > > Signed-off-by: Dong

Re: [Qemu-devel] KVM "fake DAX" device flushing

2017-05-11 Thread Rik van Riel
On Thu, 2017-05-11 at 14:17 -0400, Stefan Hajnoczi wrote: > On Wed, May 10, 2017 at 09:26:00PM +0530, Pankaj Gupta wrote: > > * For live migration use case, if host side backing file is  > >   shared storage, we need to flush the page cache for the disk  > >   image at the destination (new fadvise

Re: [Qemu-devel] [PATCH V2] migration: expose qemu_announce_self() via qmp

2017-05-11 Thread Vlad Yasevich
On 02/20/2017 07:16 PM, Germano Veit Michel wrote: > qemu_announce_self() is triggered by qemu at the end of migrations > to update the network regarding the path to the guest l2addr. > > however it is also useful when there is a network change such as > an active bond slave swap. Essentially,

Re: [Qemu-devel] KVM "fake DAX" device flushing

2017-05-11 Thread Rik van Riel
On Thu, 2017-05-11 at 12:15 -0700, Dan Williams wrote: > On Thu, May 11, 2017 at 11:17 AM, Stefan Hajnoczi m> wrote: > > On Wed, May 10, 2017 at 09:26:00PM +0530, Pankaj Gupta wrote: > > > We are sharing initial project proposal for > > > 'KVM "fake DAX" device flushing'

Re: [Qemu-devel] [PATCH v7 06/13] s390x/css: device support for s390-ccw passthrough

2017-05-11 Thread Alex Williamson
On Fri, 5 May 2017 04:03:45 +0200 Dong Jia Shi wrote: > In order to support subchannels pass-through, we introduce a s390 > subchannel device called "s390-ccw" to hold the real subchannel info. > The s390-ccw devices inherit from the abstract CcwDevice which connect

Re: [Qemu-devel] [PATCH 3/7] curl: avoid recursive locking of BDRVCURLState mutex

2017-05-11 Thread Jeff Cody
On Wed, May 10, 2017 at 04:32:01PM +0200, Paolo Bonzini wrote: > The curl driver has a ugly hack where, if it cannot find an empty CURLState, > it just uses aio_poll to wait for one to be empty. This is probably > buggy when used together with dataplane, and the simplest way to fix it > is to use

Re: [Qemu-devel] [Qemu-block] [PATCH v2 00/16] block: Protect AIO context change with perm API

2017-05-11 Thread Stefan Hajnoczi
On Wed, Apr 19, 2017 at 05:43:40PM +0800, Fam Zheng wrote: > v2: Address Stefan's comments: > > - Clean up redundancy in bdrv_format_default_perms change. > - Add a test case to check both success/failure cases. > A failure case is not possible at user interface level because of

Re: [Qemu-devel] [PATCH 2/7] curl: never invoke callbacks with s->mutex held

2017-05-11 Thread Jeff Cody
On Wed, May 10, 2017 at 04:32:00PM +0200, Paolo Bonzini wrote: > All curl callbacks go through curl_multi_do, and hence are called with > s->mutex held. Note that with comments, and make curl_read_cb drop the > lock before invoking the callback. > > Likewise for curl_find_buf, where the callback

Re: [Qemu-devel] [PATCH 1/7] curl: strengthen assertion in curl_clean_state

2017-05-11 Thread Jeff Cody
On Wed, May 10, 2017 at 04:31:59PM +0200, Paolo Bonzini wrote: > curl_clean_state should only be called after all AIOCBs have been > completed. This is not so obvious for the call from curl_detach_aio_context, > so assert that. > > Cc: qemu-sta...@nongnu.org > Cc: jc...@redhat.com >

Re: [Qemu-devel] [PATCH v2 16/16] tests: Add test case for BLK_PERM_AIO_CONTEXT_CHANGE

2017-05-11 Thread Stefan Hajnoczi
On Wed, Apr 19, 2017 at 05:43:56PM +0800, Fam Zheng wrote: > +static void test_aio_context_failure(void) > +{ > +Error *local_err = NULL; > +BlockBackend *blk1 = blk_new(BLK_PERM_AIO_CONTEXT_CHANGE, > + BLK_PERM_ALL & > ~BLK_PERM_AIO_CONTEXT_CHANGE); > +

Re: [Qemu-devel] [Qemu-block] [PATCH v2 15/16] block: Add perm assertion on blk_set_aio_context

2017-05-11 Thread Stefan Hajnoczi
On Wed, Apr 19, 2017 at 05:43:55PM +0800, Fam Zheng wrote: > Now that all BB users comply with the BLK_PERM_AIO_CONTEXT_CHANGE > rule, we can assert it. > > Signed-off-by: Fam Zheng > --- > block/block-backend.c | 4 > 1 file changed, 4 insertions(+) Reviewed-by: Stefan

Re: [Qemu-devel] [Qemu-block] [PATCH v2 13/16] blk: fix aio context loss on media change

2017-05-11 Thread Stefan Hajnoczi
On Wed, Apr 19, 2017 at 05:43:53PM +0800, Fam Zheng wrote: > From: Vladimir Sementsov-Ogievskiy > > If we have separate iothread for cdrom, we lose connection to it on > qmp_blockdev_change_medium, as aio_context is on bds which is dropped > and switched with new one. >

Re: [Qemu-devel] [Qemu-block] [PATCH v2 14/16] nbd: Allow BLK_PERM_AIO_CONTEXT_CHANGE on BB

2017-05-11 Thread Stefan Hajnoczi
On Wed, Apr 19, 2017 at 05:43:54PM +0800, Fam Zheng wrote: > This is safe because of the aio context notifier we'll register on this > node. So allow it. > > Signed-off-by: Fam Zheng > --- > nbd/server.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-)

Re: [Qemu-devel] [Qemu-block] [PATCH v2 12/16] virtio-blk: Request BLK_PERM_AIO_CONTEXT_CHANGE for dataplane

2017-05-11 Thread Stefan Hajnoczi
On Wed, Apr 19, 2017 at 05:43:52PM +0800, Fam Zheng wrote: > blk_set_aio_context is audited by perm API, so follow the protocol and > request for permission first. > > Previously the return code in error path was hardcoded as -EPERM, but > returning 'r' is more meaningful here both for the new

Re: [Qemu-devel] [Qemu-block] [PATCH v2 11/16] virtio-scsi: Request BLK_PERM_AIO_CONTEXT_CHANGE for dataplane

2017-05-11 Thread Stefan Hajnoczi
On Wed, Apr 19, 2017 at 05:43:51PM +0800, Fam Zheng wrote: > blk_set_aio_context is audited by perm API, so follow the protocol and > request for permission first. > > Signed-off-by: Fam Zheng > --- > hw/scsi/virtio-scsi.c | 4 > 1 file changed, 4 insertions(+)

Re: [Qemu-devel] [Qemu-block] [PATCH v2 10/16] mirror: Do initial aio context move of target via BB interface

2017-05-11 Thread Stefan Hajnoczi
On Wed, Apr 19, 2017 at 05:43:50PM +0800, Fam Zheng wrote: > diff --git a/blockdev.c b/blockdev.c > index dfd1385..53f9874 100644 > --- a/blockdev.c > +++ b/blockdev.c > @@ -3556,8 +3556,6 @@ void qmp_drive_mirror(DriveMirror *arg, Error **errp) > goto out; > } > > -

Re: [Qemu-devel] [PATCH v2 09/16] commit: Allow aio context change on s->base

2017-05-11 Thread Stefan Hajnoczi
On Wed, Apr 19, 2017 at 05:43:49PM +0800, Fam Zheng wrote: > The block job has the aio context change notifier, we should allow it > here as well. > > Signed-off-by: Fam Zheng > --- > block/commit.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Aside from my

Re: [Qemu-devel] [Qemu-block] [PATCH v2 08/16] mirror: Request aio context change permission on target

2017-05-11 Thread Stefan Hajnoczi
On Wed, Apr 19, 2017 at 05:43:48PM +0800, Fam Zheng wrote: > What's done in the source's context change notifier is moving the > target's context to follow the new one, so we request this permission > here. > > Signed-off-by: Fam Zheng > --- > block/mirror.c | 1 + > 1 file

Re: [Qemu-devel] [Qemu-block] [PATCH v2 07/16] backup: Do initial aio context move of target via BB interface

2017-05-11 Thread Stefan Hajnoczi
On Wed, Apr 19, 2017 at 05:43:47PM +0800, Fam Zheng wrote: > The old aio context check is hacky because when it was added we didn't > have the permission system to enforce a general rule. It only checks if > the target BDS has a BB, which is in fact insufficient because there may > be other BBs in

Re: [Qemu-devel] [Qemu-ppc] [PATCH v9 0/6] migration/ppc: migrating DRC, ccs_list and pending_events

2017-05-11 Thread Daniel Henrique Barboza
Hi Laurent, To easily reproduce the error scenario: 1 - start QEMU in both source and target host with the same devices (target qemu with the extra --incoming to accept the migration) 2 - in both QEMU instances add one or more cpus with device add: device_add

Re: [Qemu-devel] [PATCH v2 00/18] Block layer thread safety, part 1

2017-05-11 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20170511144208.24075-1-pbonz...@redhat.com Subject: [Qemu-devel] [PATCH v2 00/18] Block layer thread safety, part 1 Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

Re: [Qemu-devel] [Qemu-block] [PATCH v2 06/16] backup: Request BLK_PERM_AIO_CONTEXT_CHANGE on target

2017-05-11 Thread Stefan Hajnoczi
On Wed, Apr 19, 2017 at 05:43:46PM +0800, Fam Zheng wrote: > What's done in the source's context change notifier is moving the > target's context to follow the new one, so we request this permission > here. It's true that the backup block job must be able to set target's AioContext, but does this

Re: [Qemu-devel] [PATCH v2 04/16] blockjob: Allow aio context change on intermediate nodes

2017-05-11 Thread Stefan Hajnoczi
On Wed, Apr 19, 2017 at 05:43:44PM +0800, Fam Zheng wrote: > The intermediate nodes do work with aio context change, so allow that > operations. > > Signed-off-by: Fam Zheng > --- > block/commit.c | 3 ++- > block/mirror.c | 3 ++- > block/stream.c | 3 ++- > 3 files changed, 6

[Qemu-devel] [PULL 23/29] numa: use possible_cpus for not mapped CPUs check

2017-05-11 Thread Eduardo Habkost
From: Igor Mammedov and remove corresponding part in numa.c that uses node_cpu bitmaps. Signed-off-by: Igor Mammedov Reviewed-by: David Gibson Reviewed-by: Andrew Jones Message-Id:

Re: [Qemu-devel] [PATCH v2 03/16] blockjob: Add BLK_PERM_AIO_CONTEXT_CHANGE shared perm on bs

2017-05-11 Thread Stefan Hajnoczi
On Wed, Apr 19, 2017 at 05:43:43PM +0800, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > blockjob.c | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

  1   2   3   4   >