Re: [Qemu-devel] [PATCH] hw/i386: Deprecate the machines pc-0.10 to pc-0.15

2017-05-11 Thread Thomas Huth
On 11.05.2017 17:10, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > >> On Wed, May 10, 2017 at 06:15:39PM +0200, Paolo Bonzini wrote: >>> >>> >>> On 10/05/2017 16:47, Thomas Huth wrote: > So while we can delete pc-0.12, we can't delete associated features needed > by pc-0.12, w

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

2017-05-11 Thread Pankaj Gupta
> > 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' project for feedback. > > Got the idea during discussion with 'Rik van Riel'. > > CCing NVDIMM folks. > > > > > Also, request answers to 'Quest

Re: [Qemu-devel] [PATCH v2] target-ppc: Enable open-pic timers to count and generate interrupts

2017-05-11 Thread David Gibson
On Tue, May 02, 2017 at 07:57:22PM -0700, Aaron Larson wrote: > > Previous QEMU open-pic implemented the 4 open-pic timers including all > timer registers, but the timers did not "count" or generate any > interrupts. The patch makes the timers both count and generate > interrupts. The timer cloc

Re: [Qemu-devel] [PATCH v9 4/6] hw/ppc/spapr.c: migrate pending_dimm_unplugs of spapr state

2017-05-11 Thread David Gibson
On Fri, May 05, 2017 at 05:47:44PM -0300, Daniel Henrique Barboza wrote: > To allow for a DIMM unplug event to resume its work if a migration > occurs in the middle of it, this patch migrates the non-empty > pending_dimm_unplugs QTAILQ that stores the DIMM information > that the spapr_lmb_release()

Re: [Qemu-devel] [PATCH v9 6/6] migration: spapr: migrate pending_events of spapr state

2017-05-11 Thread David Gibson
On Fri, May 05, 2017 at 05:47:46PM -0300, Daniel Henrique Barboza wrote: > From: Jianjun Duan > > In racing situations between hotplug events and migration operation, > a rtas hotplug event could have not yet be delivered to the source > guest when migration is started. In this case the pending_e

Re: [Qemu-devel] [PATCH v9 2/6] hw/ppc: removing drc->detach_cb and drc->detach_cb_opaque

2017-05-11 Thread David Gibson
On Fri, May 05, 2017 at 05:47:42PM -0300, Daniel Henrique Barboza wrote: > The pointer drc->detach_cb is being used as a way of informing > the detach() function inside spapr_drc.c which cb to execute. This > information can also be retrieved simply by checking drc->type and > choosing the right ca

Re: [Qemu-devel] [PATCH v9 1/6] hw/ppc/spapr.c: adding pending_dimm_unplugs to sPAPRMachineState

2017-05-11 Thread David Gibson
On Fri, May 05, 2017 at 05:47:41PM -0300, Daniel Henrique Barboza wrote: > The LMB DRC release callback, spapr_lmb_release(), uses an opaque > parameter, a sPAPRDIMMState struct that stores the current LMBs that > are allocated to a DIMM (nr_lmbs). After each call to this callback, > the nr_lmbs is

Re: [Qemu-devel] [PATCH v9 3/6] hw/ppc: migrating the DRC state of hotplugged devices

2017-05-11 Thread David Gibson
On Fri, May 05, 2017 at 05:47:43PM -0300, Daniel Henrique Barboza wrote: > In pseries, a firmware abstraction called Dynamic Reconfiguration > Connector (DRC) is used to assign a particular dynamic resource > to the guest and provide an interface to manage configuration/removal > of the resource as

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-11 Thread Wanpeng Li
2017-05-11 22:18 GMT+08:00 Zhoujian (jay) : > Hi Wanpeng, > >> 2017-05-11 21:43 GMT+08:00 Wanpeng Li : >> > 2017-05-11 20:24 GMT+08:00 Paolo Bonzini : >> >> >> >> >> >> On 11/05/2017 14:07, Zhoujian (jay) wrote: >> >>> -* Scan sptes if dirty logging has been stopped, dropping >> those >> >>

Re: [Qemu-devel] [PATCH 04/17] qapi: merge QInt and QFloat in QNum

2017-05-11 Thread Markus Armbruster
Question for Luiz... Marc-André Lureau writes: [...] > diff --git a/tests/check-qnum.c b/tests/check-qnum.c > new file mode 100644 > index 00..d08d35e85a > --- /dev/null > +++ b/tests/check-qnum.c > @@ -0,0 +1,131 @@ > +/* > + * QNum unit-tests. > + * > + * Copyright (C) 2009 Red Hat Inc

Re: [Qemu-devel] [Qemu-block] [PATCH v4 2/6] replication: add shared-disk and shared-disk-id options

2017-05-11 Thread Hailiang Zhang
On 2017/5/12 3:08, Stefan Hajnoczi wrote: On Wed, Apr 12, 2017 at 10:05:17PM +0800, zhanghailiang wrote: We use these two options to identify which disk is shared Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen --- v4: - Add proper comment for primary_disk

Re: [Qemu-devel] [PATCH v4 2/6] replication: add shared-disk and shared-disk-id options

2017-05-11 Thread Hailiang Zhang
On 2017/4/18 13:59, Xie Changlong wrote: On 04/12/2017 10:05 PM, zhanghailiang wrote: We use these two options to identify which disk is shared Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen --- v4: - Add proper comment for primary_disk (Stefan) v2: - Mov

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 e

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 BASE=

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 specific

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 be

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é > > > > Reviewed-by: David G

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é > > > --- > > > target/ppc/

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, nice work! >>> >>> The timer you are

[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 featur

[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 now

[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 resiz

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 fabric. This patch adds

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é mailto:f4...@amsat.org>> wrote: Hi Subbaraya, nice work! The timer you are modeling is the mss_timer, which is in particular used in the smartfusion2, I'd rather name it mss_time

[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 0x00

[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 insertions(+), 17 deletions(-) diff --g

[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 --- include/qemu-common.h|

[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 prov

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 accessed by guest

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: Marku

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 expressio

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 register. No need to

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: Subbaraya Sundeep

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 --- target/m68k/translate.c | 3 +--

[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 +-- 1 file chang

[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 file changed, 2 in

[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 suggested by Lauren

[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 Hend

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 can add a comment

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 >> Microcontroller subsystem

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 diffe9rent between COMPRESS and COMPRESS

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 Xu

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 u

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 /var/tmp/patchew-test

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: /usr/lib64/coccinelle/stand

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 for

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 ever

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 migration with block migration ena

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 08:52 PM, Philippe Mat

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 HANDLING

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 in

[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 b/net/filter-rewriter.c index bc6d12a..be129c7 1006

[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 --- a/net/colo-compare.c +++ b/

[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 --- net/filter-rewriter.c | 38 ++

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 HAND

[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 deletions(-) diff --git a/net/col

[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 @@ -43,11 +43,11 @@ int parse_pa

[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 --- net/filter-mirror.c | 34

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 | 21 +++-- 2 files

[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 --- net/colo-c

[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 +++-- net/colo-compare.c | 4 ++-- n

[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 --- net/filter-mirror.c | 33 +++

[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(+), 11 deletions(-) diff --git a/net

[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 --- net/filter-mirror.c | 35

[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 b/include/net/net.h index 99b28d5

[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 --- net/filter-mirror.c | 29 -

[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 +++ b/net/filter-mirror.c @@ -194

[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 filter-redirector we need to differ outdev

[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, 0x00ff00ff);

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é --- target/cris/tran

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 acquiescently. > > > > Signed-off-by:

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 > Subject: Re: [PATCH

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 'Questions' section. > > Ab

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 name. > > Instead of

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 changed, 5 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index cae3b09..c1

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 the > right IRB data back to th

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 handling the ccw-request results. > 1. Pread the I/O resul

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". > > Support qemu parameters in the style of: > "-device 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 kernel via the ioctl VFIO_DEVICE_

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 Jia Shi > --- Acked-by: Alex

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, it'

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' project for feedback. > >

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 > to the existing virtual-css

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 othe

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 > Signed-off-by

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 Hajnoczi signatu

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. > > As an example result, a

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(-) Reviewed-by: Stefan Hajnoczi

  1   2   3   4   >