[Qemu-devel] [PATCH 3/6] net/filter-rewriter: Use the tcp_header structure

2019-08-08 Thread Philippe Mathieu-Daudé
The tcp_header structure comes convenient macros to avoid manipulating the TCP header flags/offset bits manually. Replace the tcp_hdr structure by the tcp_header equivalent, and use the TCP_HEADER_FLAGS macro. Signed-off-by: Philippe Mathieu-Daudé --- net/filter-rewriter.c | 37 +

[Qemu-devel] [RFC PATCH 2/6] net/colo-compare: Use the tcp_header structure

2019-08-08 Thread Philippe Mathieu-Daudé
The tcp_header structure comes convenient macros to avoid manipulating the TCP header flags/offset bits manually. Replace the tcp_hdr structure by the tcp_header equivalent, and use the macros. Signed-off-by: Philippe Mathieu-Daudé --- RFC: Verify th_off endianess net/colo-compare.c | 14 ++

[Qemu-devel] [RFC PATCH 4/6] hw/net/vmxnet3: Use the tcp_header structure

2019-08-08 Thread Philippe Mathieu-Daudé
The tcp_header structure comes convenient macros to avoid manipulating the TCP header flags/offset bits manually. Replace the tcp_hdr structure by the tcp_header equivalent, and use the macros. Since we will remove the duplicated TCP_FLAG_ACK definition in the next commit, replace its use now. Si

Re: [Qemu-devel] [PATCH v6 08/26] hw/vfio: Access MemoryRegion with MemOp

2019-08-08 Thread Cornelia Huck
On Wed, 7 Aug 2019 08:28:40 + wrote: > The memory_region_dispatch_{read|write} operand "unsigned size" is > being converted into a "MemOp op". > > Convert interfaces by using no-op size_memop. > > After all interfaces are converted, size_memop will be implemented > and the memory_region_dis

[Qemu-devel] [PATCH 5/6] net/eth: Remove the unused tcp_hdr structure

2019-08-08 Thread Philippe Mathieu-Daudé
Commit 75020a70215 introduced 2 very similar structures: tcp_header and tcp_hdr. We replaced the uses of struct tcp_hdr with the equivalent struct tcp_header. Remove the unused one. Signed-off-by: Philippe Mathieu-Daudé --- I prefer the TCP_FLAG_XXX name, but there is only one single use of TCP_

[Qemu-devel] [PATCH 6/6] net/eth: Remove the single use of udp_hdr structure

2019-08-08 Thread Philippe Mathieu-Daudé
Commit 75020a70215 introduced 2 very equivalent structures: udp_header and udp_hdr. Replace the single use of udp_hdr by udp_header (which has few more uses in the codebase) and remove the now unused structure. Signed-off-by: Philippe Mathieu-Daudé --- hw/net/net_tx_pkt.c | 2 +- include/net/et

Re: [Qemu-devel] [PATCH v2 2/3] qcow2: rework the cluster compression routine

2019-08-08 Thread Max Reitz
On 04.07.19 15:09, Denis Plotnikov wrote: > The patch allow to process image compression type defined > in the image header and choose an appropriate method for > image clusters (de)compression. > > Signed-off-by: Denis Plotnikov > --- > block/qcow2.c | 93 +++

Re: [Qemu-devel] [PATCH v2 3/3] qcow2: add zstd cluster compression

2019-08-08 Thread Max Reitz
On 04.07.19 15:09, Denis Plotnikov wrote: > zstd significantly reduces cluster compression time. > It provides better compression performance maintaining > the same level of compression ratio in comparison with > zlib, which, by the moment, has been the only compression > method available. > > The

Re: [Qemu-devel] [PATCH v6 12/26] hw/s390x: Hard code size with MO_{8|16|32|64}

2019-08-08 Thread Cornelia Huck
On Wed, 7 Aug 2019 08:30:04 + wrote: > Temporarily no-op size_memop was introduced to aid the conversion of > memory_region_dispatch_{read|write} operand "unsigned size" into > "MemOp op". > > Now size_memop is implemented, again hard coded size but with "Now that size_memop has been implem

[Qemu-devel] [PATCH v2 0/2] Add dbus-vmstate

2019-08-08 Thread Marc-André Lureau
Hi, With external processes or helpers participating to the VM support, it becomes necessary to handle their migration. Various options exist to transfer their state: 1) as the VM memory, RAM or devices (we could say that's how vhost-user devices can be handled today, they are expected to re

[Qemu-devel] [PATCH v2 2/2] Add dbus-vmstate object

2019-08-08 Thread Marc-André Lureau
When instanciated, this object will connect to the given D-Bus bus. During migration, it will take the data from org.qemu.VMState1 instances. See documentation for further details. Signed-off-by: Marc-André Lureau --- MAINTAINERS | 6 + backends/Makefile.objs| 4 +

[Qemu-devel] [PATCH v2 1/2] qemu-file: move qemu_{get, put}_counted_string() declarations

2019-08-08 Thread Marc-André Lureau
Move migration helpers for strings under include/, so they can be used outside of migration/ Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela --- include/migration/qemu-file-types.h | 4 migration/qemu-file.h | 4 2 files changed, 4 insertions(+), 4 deletions(

Re: [Qemu-devel] [PATCH v2 2/2] Add dbus-vmstate object

2019-08-08 Thread Marc-André Lureau
Hi On Thu, Aug 8, 2019 at 7:03 PM Marc-André Lureau wrote: > > When instanciated, this object will connect to the given D-Bus > bus. During migration, it will take the data from org.qemu.VMState1 > instances. I forgot to update the commit message. When instantiated, this object will connect to

[Qemu-devel] configure and submodules capstone, slirp, dtc

2019-08-08 Thread Markus Armbruster
configure --help documents capstone like any other generic optional feature. This leaves --enable-capstone=git and =system undocumented there. Anyone care to improve this? It documents slirp unlike other generic optional features, and shows only --disable-slirp. Anyone care to improve this? Th

Re: [Qemu-devel] [PATCH] qtest: Rename qtest.c:qtest_init()

2019-08-08 Thread Stefan Hajnoczi
On Mon, Aug 05, 2019 at 03:13:01AM +, Oleinik, Alexander wrote: > Both the qtest client, libqtest.c, and server, qtest.c, used the same > name for initialization functions which can cause confusion. > > Signed-off-by: Alexander Oleinik > --- > Thank you, Thomas Huth for the suggestion. > >

[Qemu-devel] Does i386-linux-user build on an i686 host?

2019-08-08 Thread Markus Armbruster
Fails for me, but perhaps I'm doing it wrong: $ uname -a Linux gcc45 3.16.0-7-686-pae #1 SMP Debian 3.16.59-1 (2018-10-03) i686 GNU/Linux $ ../configure --target-list=i386-linux-user Install prefix/usr/local BIOS directory/usr/local/share/qemu firmware path /usr/local/share/qemu-firmwa

Re: [Qemu-devel] [PATCH v3 07/33] automatically add vmstate for reset support in devices

2019-08-08 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Mon, 29 Jul 2019 at 15:59, Damien Hedde wrote: > > > > This add the reset related sections for every QOM > > device. > > A bit more detail in the commit message would help, I think -- > this is adding extra machinery which has to copy and mod

Re: [Qemu-devel] [PATCH 11/67] target/arm: Add stubs for aa32 decodetree

2019-08-08 Thread Richard Henderson
On 8/8/19 4:41 AM, Aleksandar Markovic wrote: > +/* > + * Include the generated decoders. > + * Note that the T32 decoder reuses some of the trans_* functions > + * initially declared by the A32 decoder, which results in duplicate > + * declaration warnings.  Suppress them. >

[Qemu-devel] [PATCH v1 3/7] fpu: make softfloat-macros "self-contained"

2019-08-08 Thread Alex Bennée
The macros use the "flags" type and to be consistent if anyone just needs the macros we should bring in the header we need. There is an outstanding TODO to audit the use of "flags" and replace with bool at which point this include could be dropped. Signed-off-by: Alex Bennée --- include/fpu/soft

[Qemu-devel] [PATCH v1 1/7] fpu: move LIT64 helper to softfloat-types

2019-08-08 Thread Alex Bennée
This simple pasting helper can be used by those who don't need the entire softfloat api. Move it to the smaller types header. Signed-off-by: Alex Bennée --- include/fpu/softfloat-types.h | 2 ++ include/fpu/softfloat.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/

[Qemu-devel] [PATCH v1 0/7] softfloat header cleanups

2019-08-08 Thread Alex Bennée
Hi Markus, As promised here is a softfloat specific follow-up to your headers clean-up series: From: Markus Armbruster Date: Tue, 6 Aug 2019 17:14:06 +0200 Message-Id: <20190806151435.10740-1-arm...@redhat.com> Subject: [Qemu-devel] [PATCH v2 00/29] Tame a few "touch this, recompile the

[Qemu-devel] [PATCH v1 2/7] fpu: move inline helpers into a separate header

2019-08-08 Thread Alex Bennée
There are a bunch of users of the inline helpers who do not need access to the entire softfloat API. Move those inline helpers into a new header file which can be included without bringing in the rest of the world. Signed-off-by: Alex Bennée --- include/fpu/softfloat-helpers.h | 118

[Qemu-devel] [PATCH v1 6/7] target/riscv: rationalise softfloat includes

2019-08-08 Thread Alex Bennée
We should avoid including the whole of softfloat headers in cpu.h and explicitly include it only where we will be calling softfloat functions. We can use the -types.h and -helpers.h in cpu.h for the few bits that are global. Signed-off-by: Alex Bennée --- target/riscv/cpu.c| 1 + target/

[Qemu-devel] [PATCH v1 4/7] fpu: rename softfloat-specialize.h -> .inc.c

2019-08-08 Thread Alex Bennée
This is not a normal header and should only be included in the main softfloat.c file to bring in the various target specific specialisations. Indeed as it contains non-inlined C functions it is not even a legal header. Rename it to match our included C convention. Signed-off-by: Alex Bennée ---

[Qemu-devel] [PATCH v1 5/7] target/mips: rationalise softfloat includes

2019-08-08 Thread Alex Bennée
We should avoid including the whole of softfloat headers in cpu.h and explicitly include it only where we will be calling softfloat functions. We can use the -types.h and -helpers.h in cpu.h for the few bits that are global. Signed-off-by: Alex Bennée --- target/mips/cpu.h| 3 ++- target

[Qemu-devel] [PATCH v1 7/7] targets (various): use softfloat-helpers.h where we can

2019-08-08 Thread Alex Bennée
Generally the cpu and non-FP helper files just want to manipulate the softfloat flags. For this they can just use the -helpers.h include which brings in a minimal number of inline helpers. Signed-off-by: Alex Bennée --- target/alpha/helper.c | 2 +- target/microblaze/cpu.c | 2 +- target/s390x

Re: [Qemu-devel] [PATCH v1 0/7] softfloat header cleanups

2019-08-08 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190808164117.23348-1-alex.ben...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH v1 0/7] softfloat header cleanups Message-id: 20190808164117.23348-1

Re: [Qemu-devel] [PATCH v1 1/7] fpu: move LIT64 helper to softfloat-types

2019-08-08 Thread Richard Henderson
On 8/8/19 9:41 AM, Alex Bennée wrote: > This simple pasting helper can be used by those who don't need the > entire softfloat api. Move it to the smaller types header. > > Signed-off-by: Alex Bennée > --- > include/fpu/softfloat-types.h | 2 ++ > include/fpu/softfloat.h | 2 -- > 2 files c

Re: [Qemu-devel] [PATCH v1 2/7] fpu: move inline helpers into a separate header

2019-08-08 Thread Richard Henderson
On 8/8/19 9:41 AM, Alex Bennée wrote: > +static inline void set_float_detect_tininess(int val, float_status *status) > +{ > +status->float_detect_tininess = val; > +} > +static inline void set_float_rounding_mode(int val, float_status *status) > +{ > +status->float_rounding_mode = val; > +}

Re: [Qemu-devel] [PATCH v2] migration: rename migration_bitmap_sync_range to ramblock_sync_dirty_bitmap

2019-08-08 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > Rename for better understanding of the code. > > Suggested-by: Paolo Bonzini > Signed-off-by: Wei Yang Reviewed-by: Dr. David Alan Gilbert and queued. > > --- > v2: > * rebase on top of "just pass RAMBlock is enough" > > --- > migratio

Re: [Qemu-devel] [PATCH v1 0/7] softfloat header cleanups

2019-08-08 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190808164117.23348-1-alex.ben...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH v1 0/7] softfloat header cleanups Message-id: 20190808164117.23348-1

Re: [Qemu-devel] [PATCH v3] migration/postcopy: use mis->bh instead of allocating a QEMUBH

2019-08-08 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > On Wed, Aug 07, 2019 at 07:35:34PM +0100, Dr. David Alan Gilbert wrote: > >* Wei Yang (richardw.y...@linux.intel.com) wrote: > >> For migration incoming side, it either quit in precopy or postcopy. It > >> is safe to use the mis->bh for both inste

Re: [Qemu-devel] [PATCH v1 3/7] fpu: make softfloat-macros "self-contained"

2019-08-08 Thread Richard Henderson
On 8/8/19 9:41 AM, Alex Bennée wrote: > The macros use the "flags" type and to be consistent if anyone just > needs the macros we should bring in the header we need. There is an > outstanding TODO to audit the use of "flags" and replace with bool at > which point this include could be dropped. Ind

Re: [Qemu-devel] [PATCH v1 4/7] fpu: rename softfloat-specialize.h -> .inc.c

2019-08-08 Thread Richard Henderson
On 8/8/19 9:41 AM, Alex Bennée wrote: > This is not a normal header and should only be included in the main > softfloat.c file to bring in the various target specific > specialisations. Indeed as it contains non-inlined C functions it is > not even a legal header. Rename it to match our included C

Re: [Qemu-devel] [PATCH v1 5/7] target/mips: rationalise softfloat includes

2019-08-08 Thread Richard Henderson
On 8/8/19 9:41 AM, Alex Bennée wrote: > index 21c0615e020..f146924623c 100644 > --- a/target/mips/cpu.h > +++ b/target/mips/cpu.h > @@ -5,7 +5,8 @@ > > #include "cpu-qom.h" > #include "exec/cpu-defs.h" > -#include "fpu/softfloat.h" > +#include "fpu/softfloat-types.h" > +#include "fpu/softfloat-

Re: [Qemu-devel] [PATCH v1 6/7] target/riscv: rationalise softfloat includes

2019-08-08 Thread Richard Henderson
On 8/8/19 9:41 AM, Alex Bennée wrote: > We should avoid including the whole of softfloat headers in cpu.h and > explicitly include it only where we will be calling softfloat > functions. We can use the -types.h and -helpers.h in cpu.h for the few > bits that are global. > > Signed-off-by: Alex Ben

Re: [Qemu-devel] [PATCH v1 0/7] softfloat header cleanups

2019-08-08 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190808164117.23348-1-alex.ben...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH v1 0/7] softfloat header cleanups Message-id: 20190808164117.23348-1

Re: [Qemu-devel] [PATCH v1 7/7] targets (various): use softfloat-helpers.h where we can

2019-08-08 Thread Richard Henderson
On 8/8/19 9:41 AM, Alex Bennée wrote: > Generally the cpu and non-FP helper files just want to manipulate the > softfloat flags. For this they can just use the -helpers.h include > which brings in a minimal number of inline helpers. > > Signed-off-by: Alex Bennée > --- > target/alpha/helper.c

Re: [Qemu-devel] [PATCH v3 03/15] target/arm/monitor: Introduce qmp_query_cpu_model_expansion

2019-08-08 Thread Richard Henderson
On 8/8/19 1:50 AM, Andrew Jones wrote: > I'm not sure. Of course I'd need to experiment with it to be sure, but > I'm reluctant to go through that exercise, because I believe that a > deferred validation will result in less specific errors messages. For > example, how would the validator know in wh

Re: [Qemu-devel] [PATCH v1 0/7] softfloat header cleanups

2019-08-08 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190808164117.23348-1-alex.ben...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH v1 0/7] softfloat header cleanups Message-id: 20190808164117.23348-1

Re: [Qemu-devel] Is network backend netmap worth keeping?

2019-08-08 Thread Vincenzo Maffione
Yes, indeed. Netmap is actively maintained on FreeBSD, and QEMU is packaged on FreeBSD with netmap support enabled. Also keep in mind that, differently from Linux, the (current) tap driver on FreeBSD does not support offloads (e.g. IFF_VNET_HDR, TUNSETVNETHDRSIZE and so on). On the contrary, netmap

[Qemu-devel] [PATCH 0/7] target/arm: Misc cleanups

2019-08-08 Thread Richard Henderson
Some of these were cleanups that I was making simultaneous with the decodetree split. Let's do those beforehand to make the split easier to read. Some of these are new, noticed while I was in the area. r~ Richard Henderson (7): target/arm: Use tcg_gen_extract_i32 for shifter_out_im target

[Qemu-devel] [PATCH 4/7] target/arm: Use ror32 instead of open-coding the operation

2019-08-08 Thread Richard Henderson
The helper function is more documentary, and also already handles the case of rotate by zero. Signed-off-by: Richard Henderson --- target/arm/translate.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 3ddc404b3b..b

[Qemu-devel] [PATCH 5/7] target/arm: Use tcg_gen_rotri_i32 for gen_swap_half

2019-08-08 Thread Richard Henderson
Rotate is the more compact and obvious way to swap 16-bit elements of a 32-bit word. Signed-off-by: Richard Henderson --- target/arm/translate.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index b40f163bab..ddc54e77e4 1

[Qemu-devel] [PATCH 2/7] target/arm: Use tcg_gen_deposit_i32 for PKHBT, PKHTB

2019-08-08 Thread Richard Henderson
Use deposit as the composit operation to merge the bits from the two inputs. Signed-off-by: Richard Henderson --- target/arm/translate.c | 26 ++ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 43e005d1

[Qemu-devel] [PATCH 1/7] target/arm: Use tcg_gen_extract_i32 for shifter_out_im

2019-08-08 Thread Richard Henderson
Extract is a compact combination of shift + and. Signed-off-by: Richard Henderson --- target/arm/translate.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 846052acea..43e005d191 100644 --- a/target/arm/translate.

[Qemu-devel] [PATCH 3/7] target/arm: Remove redundant shift tests

2019-08-08 Thread Richard Henderson
The immediate shift generator functions already test for, and eliminate, the case of a shift by zero. Signed-off-by: Richard Henderson --- target/arm/translate.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate

[Qemu-devel] [PATCH 6/7] target/arm: Simplify SMMLA, SMMLAR, SMMLS, SMMLSR

2019-08-08 Thread Richard Henderson
All of the inputs to these instructions are 32-bits. Rather than extend each input to 64-bits and then extract the high 32-bits of the output, use tcg_gen_muls2_i32 and other 32-bit generator functions. Signed-off-by: Richard Henderson --- target/arm/translate.c | 72 +++

[Qemu-devel] [PATCH 7/7] target/arm: Use tcg_gen_extrh_i64_i32 to extract the high word

2019-08-08 Thread Richard Henderson
Separate shift + extract low will result in one extra insn for hosts like RISC-V, MIPS, and Sparc. Signed-off-by: Richard Henderson --- target/arm/translate.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c i

Re: [Qemu-devel] [PATCH] ide: ahci: add check to avoid null dereference (CVE-2019-12067)

2019-08-08 Thread John Snow
On 8/8/19 5:11 AM, Philippe Mathieu-Daudé wrote: > Hi Prasad, > > On 8/8/19 8:56 AM, P J P wrote: >> From: Prasad J Pandit >> >> AHCI emulator while committing DMA buffer in ahci_commit_buf() >> may do a NULL dereference if the command header 'ad->cur_cmd' >> is null. Add check to avoid it. >>

Re: [Qemu-devel] [PATCH] hw/ide/atapi: Use the ldst API

2019-08-08 Thread John Snow
On 8/8/19 9:04 AM, Philippe Mathieu-Daudé wrote: > The big-endian load/store functions are already provided > by "qemu/bswap.h". > Avoid code duplication, use the generic API. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/ide/atapi.c | 80 ++-

Re: [Qemu-devel] [Fail] tests/test-util-filemonitor fails

2019-08-08 Thread Wei Yang
On Thu, Aug 08, 2019 at 10:22:13AM +0100, Daniel P. Berrangé wrote: >On Thu, Aug 08, 2019 at 04:46:53PM +0800, Wei Yang wrote: >> On Thu, Aug 08, 2019 at 09:02:29AM +0100, Daniel P. Berrangé wrote: >> >On Thu, Aug 08, 2019 at 10:07:23AM +0800, Wei Yang wrote: >> >> Current qemu fails tests/test-uti

Re: [Qemu-devel] [PATCH] numa: Introduce MachineClass::auto_enable_numa for implicit NUMA node

2019-08-08 Thread David Gibson
On Wed, Aug 07, 2019 at 02:52:56PM -0300, Eduardo Habkost wrote: > On Tue, Aug 06, 2019 at 02:50:55PM +0200, Igor Mammedov wrote: > > On Mon, 5 Aug 2019 15:13:02 +0800 > > Tao Xu wrote: > > > > > Add MachineClass::auto_enable_numa field. When it is true, a NUMA node > > > is expected to be creat

Re: [Qemu-devel] [PATCH v3 05/33] Switch to new api in qdev/bus

2019-08-08 Thread David Gibson
On Wed, Jul 31, 2019 at 01:31:28PM +0200, Philippe Mathieu-Daudé wrote: > On 7/31/19 11:29 AM, Damien Hedde wrote: > > On 7/31/19 8:05 AM, David Gibson wrote: > >> On Mon, Jul 29, 2019 at 04:56:26PM +0200, Damien Hedde wrote: > >>> Deprecate old reset apis and make them use the new one while they >

Re: [Qemu-devel] [PATCH] numa: Introduce MachineClass::auto_enable_numa for implicit NUMA node

2019-08-08 Thread David Gibson
On Thu, Aug 08, 2019 at 04:35:00PM +1000, David Gibson wrote: > On Wed, Aug 07, 2019 at 02:52:56PM -0300, Eduardo Habkost wrote: > > On Tue, Aug 06, 2019 at 02:50:55PM +0200, Igor Mammedov wrote: > > > On Mon, 5 Aug 2019 15:13:02 +0800 > > > Tao Xu wrote: > > > > > > > Add MachineClass::auto_ena

Re: [Qemu-devel] [PATCH v3 09/33] add doc about Resettable interface

2019-08-08 Thread David Gibson
On Wed, Aug 07, 2019 at 11:34:41AM +0100, Peter Maydell wrote: > On Wed, 31 Jul 2019 at 07:33, David Gibson > wrote: > > > > On Mon, Jul 29, 2019 at 04:56:30PM +0200, Damien Hedde wrote: > > > +The function *resettable_reset* is used to trigger a reset on a given > > > +object. > > > +void resett

Re: [Qemu-devel] [PATCH v3 05/33] Switch to new api in qdev/bus

2019-08-08 Thread David Gibson
On Wed, Jul 31, 2019 at 11:29:36AM +0200, Damien Hedde wrote: > > > On 7/31/19 8:05 AM, David Gibson wrote: > > On Mon, Jul 29, 2019 at 04:56:26PM +0200, Damien Hedde wrote: > >> Deprecate old reset apis and make them use the new one while they > >> are still used somewhere. > >> > >> Signed-off-

[Qemu-devel] [PATCH] target-arm: Make the counter tick relative to cntfrq

2019-08-08 Thread Andrew Jeffery
The use of GTIMER_SCALE assumes the clock feeding the generic timer is 62.5MHz for all platforms. This is untrue in general, for example the ASPEED AST2600 feeds the counter with either an 800 or 1200MHz clock, and CNTFRQ is configured appropriately by u-boot. To cope with these values we need to

[Qemu-devel] qemu icount mode timer accuracy

2019-08-08 Thread Wu, Wentong
Hi, Recently I'm working to enable Qemu icount mode with TCG, with source code review I found that Qemu can give deterministic execution for guest code timeout. But for exact time point for guest OS, I have a question: For armv7m_systick.c example, guest OS will use systick_read which will ca

Re: [Qemu-devel] [PATCH] target-arm: Make the counter tick relative to cntfrq

2019-08-08 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190809031321.14760-1-and...@aj.id.au/ Hi, This series failed build test on s390x host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that has

[Qemu-devel] [PATCH] Update the avx2 configure test to be compatible with clang

2019-08-08 Thread Rebecca Cran
clang doesn't support the GCC pragma to enable AVX2, but instead requires the command line option -mavx2. Since GCC also supports that, remove the pragma lines and add the -mavx2 option when building the test. Signed-off-by: Rebecca Cran --- configure | 4 +--- 1 file changed, 1 insertion(+), 3

[Qemu-devel] [PATCH v2] Update the avx2 configure test to be compatible with clang

2019-08-08 Thread Rebecca Cran
clang doesn't support the GCC pragma to enable AVX2, but instead requires the command line option -mavx2. Since GCC also supports that, remove the pragma lines and add the -mavx2 option when building the test. If AVX2 is supported, update QEMU_CFLAGS to include -mavx2 . Signed-off-by: Rebecca Cran

Re: [Qemu-devel] configure and submodules capstone, slirp, dtc

2019-08-08 Thread David Gibson
On Thu, Aug 08, 2019 at 05:17:36PM +0200, Markus Armbruster wrote: > configure --help documents capstone like any other generic optional > feature. This leaves --enable-capstone=git and =system undocumented > there. Anyone care to improve this? > > It documents slirp unlike other generic optiona

Re: [Qemu-devel] [RFC PATCH 6/6] hw/ppc/pnv_homer: add python interface support for homer/occ common area

2019-08-08 Thread David Gibson
On Wed, Aug 07, 2019 at 12:44:45PM +0530, Balamuruhan S wrote: > use python interface APIs in homer/occ common area emulation to > interact with scripts if provided else fallback to normal flow, > it shows how simple to use the interface to call python methods > with any number of arguments in any

Re: [Qemu-devel] [RFC PATCH 0/6] Enhancing Qemu MMIO emulation with scripting interface

2019-08-08 Thread David Gibson
On Wed, Aug 07, 2019 at 10:15:48AM +0200, Cédric Le Goater wrote: > On 07/08/2019 09:14, Balamuruhan S wrote: > > Hi All, > > > > This is a proposal to extend mmio callbacks in Qemu with scripting interface > > that is prototyped with python in this implementation. It gives ability to > > feed run

Re: [Qemu-devel] [RFC PATCH 5/6] hw/ppc/pnv_xscom: retrieve homer/occ base address from PBA BARs

2019-08-08 Thread David Gibson
On Wed, Aug 07, 2019 at 12:44:44PM +0530, Balamuruhan S wrote: > During PowerNV boot skiboot populates the device tree by retrieving > base address of homer/occ common area from PBA BARs and prd ipoll > mask by accessing xscom read/write accesses. > > Signed-off-by: Balamuruhan S Again seems unr

Re: [Qemu-devel] [RFC PATCH 1/6] utils/python_api: add scripting interface for Qemu with python lib

2019-08-08 Thread David Gibson
On Thu, Aug 08, 2019 at 02:45:02PM +0200, Philippe Mathieu-Daudé wrote: > On 8/8/19 12:49 PM, Daniel P. Berrangé wrote: > > On Wed, Aug 07, 2019 at 12:44:40PM +0530, Balamuruhan S wrote: > >> Adds scripting interface with python library to call functions in > >> python modules from Qemu that can be

Re: [Qemu-devel] [RFC PATCH 4/6] hw/ppc/pnv: initialize and realize homer/occ common area

2019-08-08 Thread David Gibson
On Wed, Aug 07, 2019 at 12:44:43PM +0530, Balamuruhan S wrote: > homer and occ common area region base address are initialized > to create device tree and realized to map the address with > mmio callbacks during `pnv_chip_realize()`. > > `SysBusNum` enum is introduced to set sysbus for XSCOM, ICP,

Re: [Qemu-devel] [RFC PATCH 3/6] hw/ppc/pnv_homer: add homer/occ common area emulation for PowerNV

2019-08-08 Thread David Gibson
On Wed, Aug 07, 2019 at 09:54:55AM +0200, Cédric Le Goater wrote: > On 07/08/2019 09:14, Balamuruhan S wrote: > > Add mmio callback functions to enable homer/occ common area > > to emulate pstate table, occ-sensors, slw, occ static and > > dynamic values for Power8 and Power9 chips. It also works f

Re: [Qemu-devel] [PATCH] Update the avx2 configure test to be compatible with clang

2019-08-08 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190809041952.57302-1-rebe...@bsdio.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash make d

Re: [Qemu-devel] [PATCH] target-arm: Make the counter tick relative to cntfrq

2019-08-08 Thread Andrew Jeffery
On Fri, 9 Aug 2019, at 13:36, no-re...@patchew.org wrote: > Patchew URL: https://patchew.org/QEMU/20190809031321.14760-1-and...@aj.id.au/ > > > > Hi, > > This series failed build test on s390x host. Please find the details below. > > === TEST SCRIPT BEGIN === > #!/bin/bash > # Testing scrip

Re: [Qemu-devel] [PATCH v3] spapr: quantify error messages regarding capability settings

2019-08-08 Thread David Gibson
On Mon, Aug 05, 2019 at 03:09:58PM +1000, Daniel Black wrote: > Its not immediately obvious how cap-X=Y setting need to be applied > to the command line so, for spapr capability hints, this has been clarified > to: > > ..try appending -machine cap-X=Y > > The wrong value messages have been lef

Re: [Qemu-devel] [PATCH v2] Update the avx2 configure test to be compatible with clang

2019-08-08 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190809042909.74988-1-rebe...@bsdio.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash make d

Re: [Qemu-devel] [PATCH] Update the avx2 configure test to be compatible with clang

2019-08-08 Thread Richard Henderson
On 8/8/19 9:19 PM, Rebecca Cran wrote: > clang doesn't support the GCC pragma to enable AVX2, but instead > requires the command line option -mavx2. Since GCC also supports that, > remove the pragma lines and add the -mavx2 option when building the > test. No, this means we're not testing what we

[Qemu-devel] [PATCH v2] target-arm: Make the counter tick relative to cntfrq

2019-08-08 Thread Andrew Jeffery
The use of GTIMER_SCALE assumes the clock feeding the generic timer is 62.5MHz for all platforms. This is untrue in general, for example the ASPEED AST2600 feeds the counter with either an 800 or 1200MHz clock, and CNTFRQ is configured appropriately by u-boot. To cope with these values we need to

Re: [Qemu-devel] [PATCH v2] Update the avx2 configure test to be compatible with clang

2019-08-08 Thread Richard Henderson
On 8/8/19 9:29 PM, Rebecca Cran wrote: > clang doesn't support the GCC pragma to enable AVX2, but instead > requires the command line option -mavx2. Since GCC also supports that, > remove the pragma lines and add the -mavx2 option when building the > test. If AVX2 is supported, update QEMU_CFLAGS t

Re: [Qemu-devel] [PATCH v3 08/33] Add function to control reset with gpio inputs

2019-08-08 Thread David Gibson
On Wed, Aug 07, 2019 at 11:37:51AM +0100, Peter Maydell wrote: > On Wed, 31 Jul 2019 at 07:33, David Gibson > wrote: > > > > On Mon, Jul 29, 2019 at 04:56:29PM +0200, Damien Hedde wrote: > > > It adds the possibility to add 2 gpios to control the warm and cold reset. > > > With theses ios, the re

Re: [Qemu-devel] [PATCH v1 0/7] softfloat header cleanups

2019-08-08 Thread Markus Armbruster
Alex Bennée writes: > Hi Markus, > > As promised here is a softfloat specific follow-up to your headers > clean-up series: > > From: Markus Armbruster > Date: Tue, 6 Aug 2019 17:14:06 +0200 > Message-Id: <20190806151435.10740-1-arm...@redhat.com> > Subject: [Qemu-devel] [PATCH v2 00/29]

[Qemu-devel] [PATCH v3 0/2] scsi: lsi: break infinite loop after 10k instructions

2019-08-08 Thread P J P
From: Prasad J Pandit Hello, While executing script, the LSI SCSI Adapter emulator could run into an infinite loop, if next instruction read by 's->dsp' index has an empty opcode. Raise an illegal instruction interrupt and exit the loop after 10k iterations. -> https://lists.gnu.org/archive/ht

[Qemu-devel] [PATCH v3 1/2] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-08 Thread P J P
From: Prasad J Pandit When executing script in lsi_execute_script(), the LSI scsi adapter emulator advances 's->dsp' index to read next opcode. This can lead to an infinite loop if the next opcode is empty. Exit such loop after reading 10k empty opcodes. Reported-by: Bugs SysSec Signed-off-by:

[Qemu-devel] [PATCH v3 2/2] scsi: lsi: use macro LSI_MAX_INSN instead of a magic number

2019-08-08 Thread P J P
From: Prasad J Pandit Use macro 'LSI_MAX_INSN' instead of a magic number 1. Signed-off-by: Prasad J Pandit --- hw/scsi/lsi53c895a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index e703ef4c9d..f6786607f8 100644 --- a/hw/s

Re: [Qemu-devel] [PATCH v2] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-08 Thread P J P
+-- On Thu, 8 Aug 2019, Philippe Mathieu-Daudé wrote --+ | >> trace_lsi_execute_script_tc_illegal(); | >> lsi_script_dma_interrupt(s, LSI_DSTAT_IID); | | So we agree using DSTAT.IID is the correct thing to do. Any volunteer to fix | this? :) Sent patch v3. Thank you. -- Prasad J Pandit /

[Qemu-devel] [PATCH v3 04/29] memory: Fix type of IOMMUMemoryRegionClass member @parent_class

2019-08-08 Thread Markus Armbruster
TYPE_IOMMU_MEMORY_REGION is a direct subtype of TYPE_MEMORY_REGION. Its instance struct is IOMMUMemoryRegion, and its first member is a MemoryRegion. Correct. Its class struct is IOMMUMemoryRegionClass, and its first member is a DeviceClass. Wrong. Messed up when commit 1221a474676 introduced t

[Qemu-devel] [PATCH v3 00/29] Tame a few "touch this, recompile the world" headers

2019-08-08 Thread Markus Armbruster
We have quite a few "touch this, recompile the world" headers. My "build everything" tree has some 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). Touching any of 54 headers triggers a recompile of more than half of them. This series reduces them to 46. Six of t

[Qemu-devel] [PATCH v3 02/29] Include generated QAPI headers less

2019-08-08 Thread Markus Armbruster
Some of the generated qapi-types-MODULE.h are included all over the place. Changing a QAPI type can trigger massive recompiling. Top scorers recompile more than 1000 out of some 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h): 6300 qapi/qapi-builtin-types.h

[Qemu-devel] [PATCH v3 06/29] trace: Eliminate use of TARGET_FMT_plx

2019-08-08 Thread Markus Armbruster
hw/tpm/trace-events uses TARGET_FMT_plx formats with uint64_t arguments. That's wrong, TARGET_FMT_plx takes hwaddr. Since hwaddr happens to be uint64_t, it works anyway. Messed up in commit ec427498da5, v2.12.0. Clean up by replacing TARGET_FMT_plx with its macro expansion. scripts/tracetool/f

[Qemu-devel] [PATCH v3 09/29] Include migration/qemu-file-types.h a lot less

2019-08-08 Thread Markus Armbruster
In my "build everything" tree, changing migration/qemu-file-types.h triggers a recompile of some 2600 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). The culprit is again hw/hw.h, which supposedly includes it for convenience. Include migration/qemu-file-typ

[Qemu-devel] [PATCH v3 24/29] Include sysemu/hostmem.h less

2019-08-08 Thread Markus Armbruster
Move the HostMemoryBackend typedef from sysemu/hostmem.h to qemu/typedefs.h. This renders a few inclusions of sysemu/hostmem.h superfluous; drop them. Cc: Eduardo Habkost Cc: Igor Mammedov Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Eduardo Habkost Revie

[Qemu-devel] [PATCH v3 01/29] include: Make headers more self-contained

2019-08-08 Thread Markus Armbruster
Back in 2016, we discussed[1] rules for headers, and these were generally liked: 1. Have a carefully curated header that's included everywhere first. We got that already thanks to Peter: osdep.h. 2. Headers should normally include everything they need beyond osdep.h. If exceptions are need

[Qemu-devel] [PATCH v3 05/29] queue: Drop superfluous #include qemu/atomic.h

2019-08-08 Thread Markus Armbruster
When commit 5f7d05ecfda added QLIST_INSERT_HEAD_RCU() to qemu/queue.h, it had to include qemu/atomic.h. Commit 341774fe6cc removed QLIST_INSERT_HEAD_RCU() again, but neglected to remove the #include. Do that now. Signed-off-by: Markus Armbruster Reviewed-by: Thomas Huth Reviewed-by: Philippe Ma

[Qemu-devel] [PATCH v3 10/29] ide: Include hw/ide/internal a bit less outside hw/ide/

2019-08-08 Thread Markus Armbruster
According to hw/ide/internal's file comment, only files in hw/ide/ are supposed to include it. Drag reality slightly closer to supposition. Three includes outside hw/ide remain: hw/arm/sbsa-ref.c, include/hw/ide/pci.h, and include/hw/misc/macio/macio.h. Turns out board code needs ide-internal.h

[Qemu-devel] [PATCH v3 22/29] Include hw/boards.h a bit less

2019-08-08 Thread Markus Armbruster
hw/boards.h pulls in almost 60 headers. The less we include it into headers, the better. As a first step, drop superfluous inclusions, and downgrade some more to what's actually needed. Gets rid of just one inclusion into a header. Cc: Eduardo Habkost Cc: Marcel Apfelbaum Signed-off-by: Marku

[Qemu-devel] [PATCH v3 19/29] Include qemu/queue.h slightly less

2019-08-08 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/scsi/vhost-scsi.c| 1 - hw/vfio/ap.c| 1 - include/exec/cpu-defs.h | 1 - include/hw/xen/xen_common.h | 1 - include/net/can_emu.h | 1 + include/net/filter.h| 1 + include/qemu/range.h| 2 -- include/qom/ob

[Qemu-devel] [PATCH v3 28/29] sysemu: Move the VMChangeStateEntry typedef to qemu/typedefs.h

2019-08-08 Thread Markus Armbruster
In my "build everything" tree, changing sysemu/sysemu.h triggers a recompile of some 1800 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h, down from 5400 due to the previous commit). Several headers include sysemu/sysemu.h just to get typedef VMChangeStateEntr

[Qemu-devel] [PATCH v3 11/29] typedefs: Separate incomplete types and function types

2019-08-08 Thread Markus Armbruster
While there, drop the obsolete file comment. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- include/qemu/typedefs.h | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/qemu/typedefs.h b/include/qem

[Qemu-devel] [PATCH v3 25/29] numa: Move remaining NUMA declarations from sysemu.h to numa.h

2019-08-08 Thread Markus Armbruster
Commit e35704ba9c "numa: Move NUMA declarations from sysemu.h to numa.h" left a few NUMA-related macros behind. Move them now. Cc: Eduardo Habkost Cc: Marcel Apfelbaum Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Eduardo Habkost --- exec.c

[Qemu-devel] [PATCH v3 17/29] Include qom/object.h slightly less

2019-08-08 Thread Markus Armbruster
hw/hw.h used to include headers hardware emulation "usually" needs. The previous commits removed all but one of them, to good effect. Only qom/object.h is left. Remove that one, too. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- inc

[Qemu-devel] [PATCH v3 16/29] Include exec/memory.h slightly less

2019-08-08 Thread Markus Armbruster
Drop unnecessary inclusions from headers. Downgrade a few more to exec/hwaddr.h. Signed-off-by: Markus Armbruster --- hw/audio/lm4549.h | 1 + hw/display/edid-region.c| 1 + hw/display/tc6393xb.c | 1 + hw/net/can/can_sja1000.h| 1 + hw/ne

[Qemu-devel] [PATCH v3 07/29] trace: Do not include qom/cpu.h into generated trace.h

2019-08-08 Thread Markus Armbruster
docs/devel/tracing.txt explains "since many source files include trace.h, [the generated trace.h use] a minimum of types and other header files included to keep the namespace clean and compile times and dependencies down." Commit 4815185902 "trace: Add per-vCPU tracing states for events with the '

[Qemu-devel] [PATCH v3 12/29] Include hw/irq.h a lot less

2019-08-08 Thread Markus Armbruster
In my "build everything" tree, changing hw/irq.h triggers a recompile of some 5400 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). hw/hw.h supposedly includes it for convenience. Several other headers include it just to get qemu_irq and.or qemu_irq_handler.

  1   2   >