Re: [PATCH] os: deprecate the -enable-fips option and QEMU's FIPS enforcement

2020-10-20 Thread Thomas Huth
On 20/10/2020 18.22, Daniel P. Berrangé wrote: > The -enable-fips option was added a long time ago to prevent the use of > single DES when VNC when FIPS mode is enabled. It should never have been > added, because apps are supposed to unconditionally honour FIPS mode > based on the

Re: [PATCH v26 05/17] vfio: Add VM state change handler to know state of VM

2020-10-20 Thread Kirti Wankhede
On 10/20/2020 4:21 PM, Cornelia Huck wrote: On Sun, 18 Oct 2020 01:54:56 +0530 Kirti Wankhede wrote: On 9/29/2020 4:33 PM, Dr. David Alan Gilbert wrote: * Cornelia Huck (coh...@redhat.com) wrote: On Wed, 23 Sep 2020 04:54:07 +0530 Kirti Wankhede wrote: VM state change handler gets

Re: [RFC PATCH 00/15] softfloat: alternate conversion of float128_addsub

2020-10-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201021045149.1582203-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201021045149.1582203-1-richard.hender...@linaro.org Subject: [RFC PATCH

[RFC PATCH 14/15] softfloat: Use float_cmask for addsub_floats

2020-10-20 Thread Richard Henderson
Testing more than one class at a time is better done with masks. Sort a few case combinations before the NaN check, which should be assumed to be least probable. Share the pick_nan call between the add and subtract cases. Signed-off-by: Richard Henderson --- fpu/softfloat-parts.c.inc | 70

[RFC PATCH 12/15] softfloat: Streamline FloatFmt

2020-10-20 Thread Richard Henderson
The fields being removed are now computed in round_canonical. Signed-off-by: Richard Henderson --- fpu/softfloat.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 3651f4525d..1bd21435e7 100644 --- a/fpu/softfloat.c +++

[RFC PATCH 10/15] softfloat: Inline float_raise

2020-10-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- include/fpu/softfloat.h| 5 - fpu/softfloat-specialize.c.inc | 12 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index 78ad5ca738..019c2ec66d 100644 ---

[Bug 1856834] Re: PCI broken in qemu ppc e500 in v2.12.0 and other versions

2020-10-20 Thread Andrej Krutak
Sorry, above I meant "virtio-blk freeze" (no virtio_rng). But in any case it's obviously not directly related to this bug, so disregard it... Sorry for the noise. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[RFC PATCH 08/15] softfloat: Tidy a * b + inf return

2020-10-20 Thread Richard Henderson
No reason to set values in 'a', when we already have float_class_inf in 'c', and can flip that sign. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- fpu/softfloat.c | 5 ++--- 1 file changed, 2 insertions(+), 3

[RFC PATCH 15/15] softfloat: Improve subtraction of equal exponent

2020-10-20 Thread Richard Henderson
Rather than compare the fractions before subtracting, do the subtract and examine the result, possibly negating it. Looking toward re-using addsub_floats(N**2) for the addition stage of muladd_floats(N), this will important because of the longer fraction sizes. Signed-off-by: Richard Henderson

[RFC PATCH 13/15] Test float128_addsub

2020-10-20 Thread Richard Henderson
--- fpu/softfloat.c| 310 +++-- fpu/softfloat-specialize.c.inc | 33 2 files changed, 137 insertions(+), 206 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 1bd21435e7..294c573fb9 100644 --- a/fpu/softfloat.c +++

[RFC PATCH 07/15] softfloat: Use int128.h for some operations

2020-10-20 Thread Richard Henderson
Use our Int128, which wraps the compiler's __int128_t, instead of open-coding shifts and arithmetic. We'd need to extend Int128 to to replace more than these four. Reviewed-by: Alex Bennée Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- include/fpu/softfloat-macros.h | 65

[RFC PATCH 11/15] Test split to softfloat-parts.c.inc

2020-10-20 Thread Richard Henderson
--- fpu/softfloat.c | 438 -- fpu/softfloat-parts.c.inc | 327 2 files changed, 421 insertions(+), 344 deletions(-) create mode 100644 fpu/softfloat-parts.c.inc diff --git a/fpu/softfloat.c b/fpu/softfloat.c index

[RFC PATCH 09/15] softfloat: Add float_cmask and constants

2020-10-20 Thread Richard Henderson
Testing more than one class at a time is better done with masks. This reduces the static branch count. Reviewed-by: Alex Bennée Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- fpu/softfloat.c | 31 --- 1 file changed, 24 insertions(+), 7

[RFC PATCH 06/15] softfloat: Use mulu64 for mul64To128

2020-10-20 Thread Richard Henderson
Via host-utils.h, we use a host widening multiply for 64-bit hosts, and a common subroutine for 32-bit hosts. Reviewed-by: Alex Bennée Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- include/fpu/softfloat-macros.h | 24 1 file changed, 4

[RFC PATCH 02/15] qemu/int128: Add int128_clz, int128_ctz

2020-10-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- include/qemu/int128.h | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/include/qemu/int128.h b/include/qemu/int128.h index 52fc238421..055f202d08 100644 --- a/include/qemu/int128.h +++ b/include/qemu/int128.h @@ -1,9 +1,9

[RFC PATCH 04/15] qemu/int128: Add int128_shr

2020-10-20 Thread Richard Henderson
Add unsigned right shift as an operation. Signed-off-by: Richard Henderson --- include/qemu/int128.h | 16 1 file changed, 16 insertions(+) diff --git a/include/qemu/int128.h b/include/qemu/int128.h index 167f13ae10..c53002039a 100644 --- a/include/qemu/int128.h +++

[RFC PATCH 01/15] qemu/int128: Add int128_or

2020-10-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- include/qemu/int128.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/qemu/int128.h b/include/qemu/int128.h index 76ea405922..52fc238421 100644 --- a/include/qemu/int128.h +++ b/include/qemu/int128.h @@ -58,6 +58,11 @@ static inline

[RFC PATCH 03/15] qemu/int128: Rename int128_rshift, int128_lshift

2020-10-20 Thread Richard Henderson
Change these to sar/shl to emphasize the signed shift. Signed-off-by: Richard Henderson --- include/qemu/int128.h | 8 softmmu/physmem.c | 4 ++-- target/ppc/int_helper.c | 4 ++-- tests/test-int128.c | 44 - 4 files changed, 30

[RFC PATCH 05/15] qemu/int128: Add int128_geu

2020-10-20 Thread Richard Henderson
Add an unsigned inequality operation. Do not fill in all of the variations until we have a call for them. Signed-off-by: Richard Henderson --- include/qemu/int128.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/qemu/int128.h b/include/qemu/int128.h index

[RFC PATCH 00/15] softfloat: alternate conversion of float128_addsub

2020-10-20 Thread Richard Henderson
Hi Alex, Here's my first adjustment to your conversion for 128-bit floats. The Idea is to use a set of macros and an include file so that we can re-use the same large chunk of code that performs the basic operations on various fraction lengths. It's ugly, but without proper language support it

Re: [PATCH v4 4/7] nbd: Update qapi to support exporting multiple bitmaps

2020-10-20 Thread Markus Armbruster
Eric Blake writes: > On 10/20/20 3:51 AM, Markus Armbruster wrote: > >>> #define QAPI_LIST_ADD(list, element) do { \ >>> typeof(list) _tmp = g_new(typeof(*(list)), 1); \ >>> _tmp->value = (element); \ >>> _tmp->next = (list); \ >>> (list) = _tmp; \ >>> } while (0) >>> >>> >>>

[PULL 5/5] qapi: Restrict Xen migration commands to migration.json

2020-10-20 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Restricting xen-set-global-dirty-log and xen-load-devices-state commands migration.json pulls slightly less QAPI-generated code into user-mode and tools. Acked-by: Dr. David Alan Gilbert Signed-off-by: Philippe Mathieu-Daudé Message-Id:

[PULL 2/5] qapi: Restrict 'system wakeup/reset/powerdown' commands to machine.json

2020-10-20 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Restricting system_wakeup/system_reset/system_powerdown to machine.json pulls slightly less QAPI-generated code into user-mode and tools. Acked-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201012121536.3381997-3-phi...@redhat.com>

[PULL 0/5] QAPI patches patches for 2020-10-21

2020-10-20 Thread Markus Armbruster
The following changes since commit 4c41341af76cfc85b5a6c0f87de4838672ab9f89: Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20201020' into staging (2020-10-20 11:20:36 +0100) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-qapi-2020-10-21

[PULL 4/5] qapi: Restrict 'query-kvm' command to machine code

2020-10-20 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Restricting query-kvm to machine.json pulls slightly less QAPI-generated code into user-mode and tools. Acked-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201012121536.3381997-5-phi...@redhat.com> Reviewed-by: Eduardo Habkost

[PULL 3/5] qapi: Restrict '(p)memsave' command to machine code

2020-10-20 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Restricting memsave/pmemsave to machine.json pulls slightly less QAPI-generated code into user-mode and tools. Acked-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201012121536.3381997-4-phi...@redhat.com> Reviewed-by: Eduardo Habkost

[PULL 1/5] qapi: Restrict 'inject-nmi' command to machine code

2020-10-20 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Restricting 'inject-nmi' to machine.json pulls slightly less QAPI-generated code into user-mode and tools. Acked-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201012121536.3381997-2-phi...@redhat.com> Reviewed-by: Eduardo Habkost

Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set

2020-10-20 Thread Markus Armbruster
BALATON Zoltan via writes: > On Tue, 20 Oct 2020, Markus Armbruster wrote: >> Mark Cave-Ayland writes: >> >>> One thing I have thought about is being able to mark a link property >>> as mandatory so if a value hasn't been set before realize then you >> >> A non-null value, I presume. > > Do you

Re: [PATCH v2] hw/rtc/twl92230: Silence warnings about missing fallthrough statements

2020-10-20 Thread Markus Armbruster
Thomas Huth writes: > When compiling with -Werror=implicit-fallthrough, gcc complains about > missing fallthrough annotations in this file. Looking at the code, > the fallthrough is indeed wanted here, but instead of adding the > annotations, it can be done more efficiently by simply calculating

[Bug 1900779] Re: xp /16i on arm mixes DWords

2020-10-20 Thread Chaoscode
I compiled Qemu 5.1.0 Same Problem. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1900779 Title: xp /16i on arm mixes DWords Status in QEMU: New Bug description: I was working with qemuand

RE: [PATCH v7 03/11] hw/block/nvme: Add support for Namespace Types

2020-10-20 Thread Dmitry Fomichev
> -Original Message- > From: Klaus Jensen > Sent: Monday, October 19, 2020 4:54 PM > To: Dmitry Fomichev > Cc: Keith Busch ; Klaus Jensen > ; Kevin Wolf ; Philippe > Mathieu-Daudé ; Maxim Levitsky > ; Fam Zheng ; Niklas Cassel > ; Damien Le Moal ; > qemu-bl...@nongnu.org;

[Bug 1900779] [NEW] xp /16i on arm mixes DWords

2020-10-20 Thread Chaoscode
Public bug reported: I was working with qemuand wanted to understag ATAG structure. In Monitor mode I used xp /16i 0x100 and I got really confused. with xp /16i 0x100: At address 0x120 the DWords are 0x, 0x0004, 0x54410009, 0x74736574 with xp /16x 0x100: At address 0x120 the DWords

[PATCH v5 00/16] Add a Generic Virtual Device Fuzzer

2020-10-20 Thread Alexander Bulekov
v5: - Replace GArray-based predefined fuzzer configs with a static struct array - "General" -> "Generic" - Fix bugs with wrong timeout denominator and skipping DMA memwrites without QTEST_LOG v4: - Replace yaml + c template-based oss-fuzz configs, with C code to

[PATCH v5 15/16] fuzz: register predefined general-fuzz configs

2020-10-20 Thread Alexander Bulekov
We call get_general_fuzz_configs, which fills an array with predefined {name, args, objects} triples. For each of these, we add a new FuzzTarget, that uses a small wrapper to set QEMU_FUZZ_{ARGS,OBJECTS} to the corresponding predefined values. Signed-off-by: Alexander Bulekov ---

[PATCH v5 16/16] scripts/oss-fuzz: remove the general-fuzz target

2020-10-20 Thread Alexander Bulekov
general-fuzz is not a standalone fuzzer - it requires some env variables to be set. On oss-fuzz, we set these with some predefined general-fuzz-{...} targets, that are thin wrappers around general-fuzz. Remove general-fuzz from the oss-fuzz build, so oss-fuzz does not treat it as a standalone

[PATCH v5 14/16] fuzz: add general-fuzz configs for oss-fuzz

2020-10-20 Thread Alexander Bulekov
Predefine some general-fuzz configs. For each of these, we will create a separate FuzzTarget that can be selected through argv0 and, therefore, fuzzed on oss-fuzz. Signed-off-by: Alexander Bulekov --- tests/qtest/fuzz/generic_fuzz_configs.h | 121 1 file changed, 121

[PATCH v5 11/16] scripts/oss-fuzz: Add crash trace minimization script

2020-10-20 Thread Alexander Bulekov
Once we find a crash, we can convert it into a QTest trace. Usually this trace will contain many operations that are unneeded to reproduce the crash. This script tries to minimize the crashing trace, by removing operations and trimming QTest bufwrite(write addr len data...) commands.

[PATCH v5 12/16] fuzz: Add instructions for using general-fuzz

2020-10-20 Thread Alexander Bulekov
Reviewed-by: Darren Kenny Signed-off-by: Alexander Bulekov --- docs/devel/fuzzing.txt | 39 +++ 1 file changed, 39 insertions(+) diff --git a/docs/devel/fuzzing.txt b/docs/devel/fuzzing.txt index 96d71c94d7..c40278fe0a 100644 --- a/docs/devel/fuzzing.txt +++

[PATCH v5 13/16] fuzz: add an "opaque" to the FuzzTarget struct

2020-10-20 Thread Alexander Bulekov
It can be useful to register FuzzTargets that have nearly-identical initialization handlers (e.g. for using the same fuzzing code, with different configuration options). Add an opaque pointer to the FuzzTarget struct, so that FuzzTargets can hold some data, useful for storing target-specific

[PATCH v5 09/16] fuzz: add a crossover function to generic-fuzzer

2020-10-20 Thread Alexander Bulekov
Reviewed-by: Darren Kenny Signed-off-by: Alexander Bulekov --- tests/qtest/fuzz/generic_fuzz.c | 93 +++-- 1 file changed, 90 insertions(+), 3 deletions(-) diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c index b1254f4e63..356d171c65

[PATCH v5 08/16] fuzz: add a DISABLE_PCI op to general-fuzzer

2020-10-20 Thread Alexander Bulekov
This new operation is used in the next commit, which concatenates two fuzzer-generated inputs. With this operation, we can prevent the second input from clobbering the PCI configuration performed by the first. Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny ---

[PATCH v5 06/16] fuzz: Add fuzzer callbacks to DMA-read functions

2020-10-20 Thread Alexander Bulekov
We should be careful to not call any functions besides fuzz_dma_read_cb. Without --enable-fuzzing, fuzz_dma_read_cb is an empty inlined function. Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny --- include/exec/memory.h | 1 + include/exec/memory_ldst_cached.h.inc |

[PATCH v5 07/16] fuzz: Add support for custom crossover functions

2020-10-20 Thread Alexander Bulekov
libfuzzer supports a "custom crossover function". Libfuzzer often tries to blend two inputs to create a new interesting input. Sometimes, we have a better idea about how to blend inputs together. This change allows fuzzers to specify a custom function for blending two inputs together.

[PATCH v5 10/16] scripts/oss-fuzz: Add script to reorder a general-fuzzer trace

2020-10-20 Thread Alexander Bulekov
The general-fuzzer uses hooks to fulfill DMA requests just-in-time. This means that if we try to use QTEST_LOG=1 to build a reproducer, the DMA writes will be logged _after_ the in/out/read/write that triggered the DMA read. To work work around this, the general-fuzzer annotates these just-in time

[PATCH v5 04/16] fuzz: Add DMA support to the generic-fuzzer

2020-10-20 Thread Alexander Bulekov
When a virtual-device tries to access some buffer in memory over DMA, we add call-backs into the fuzzer(next commit). The fuzzer checks verifies that the DMA request maps to a physical RAM address and fills the memory with fuzzer-provided data. The patterns that we use to fill this memory are

[PATCH v5 05/16] fuzz: Declare DMA Read callback function

2020-10-20 Thread Alexander Bulekov
This patch declares the fuzz_dma_read_cb function and uses the preprocessor and linker(weak symbols) to handle these cases: When we build softmmu/all with --enable-fuzzing, there should be no strong symbol defined for fuzz_dma_read_cb, and we link against a weak stub function. When we build

[PATCH v5 03/16] fuzz: Add PCI features to the general fuzzer

2020-10-20 Thread Alexander Bulekov
This patch compares TYPE_PCI_DEVICE objects against the user-provided matching pattern. If there is a match, we use some hacks and leverage QOS to map each possible BAR for that device. Now fuzzed inputs might be converted to pci_read/write commands which target specific. This means that we can

[PATCH v5 02/16] fuzz: Add general virtual-device fuzzer

2020-10-20 Thread Alexander Bulekov
This is a generic fuzzer designed to fuzz a virtual device's MemoryRegions, as long as they exist within the Memory or Port IO (if it exists) AddressSpaces. The fuzzer's input is interpreted into a sequence of qtest commands (outb, readw, etc). The interpreted commands are separated by a magic

[PATCH v5 01/16] memory: Add FlatView foreach function

2020-10-20 Thread Alexander Bulekov
Acked-by: Paolo Bonzini Signed-off-by: Alexander Bulekov --- include/exec/memory.h | 5 + softmmu/memory.c | 9 + 2 files changed, 14 insertions(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index 622207bde1..233655b29a 100644 --- a/include/exec/memory.h +++

Re: [PATCH 4/6] hw/misc: Add npcm7xx random number generator

2020-10-20 Thread Havard Skinnemoen
On Tue, Oct 20, 2020 at 6:02 AM Peter Maydell wrote: > > On Fri, 9 Oct 2020 at 00:22, Havard Skinnemoen wrote: > > > > The RNG module returns a byte of randomness when the Data Valid bit is > > set. > > > > This implementation ignores the prescaler setting, and loads a new value > > into RNGD

RE: [PATCH v7 04/11] hw/block/nvme: Support allocated CNS command variants

2020-10-20 Thread Dmitry Fomichev
> -Original Message- > From: Klaus Jensen > Sent: Tuesday, October 20, 2020 4:21 AM > To: Dmitry Fomichev > Cc: Keith Busch ; Klaus Jensen > ; Kevin Wolf ; Philippe > Mathieu-Daudé ; Maxim Levitsky > ; Fam Zheng ; Niklas Cassel > ; Damien Le Moal ; > qemu-bl...@nongnu.org;

RE: [PATCH v7 10/11] hw/block/nvme: Separate read and write handlers

2020-10-20 Thread Dmitry Fomichev
> -Original Message- > From: Keith Busch > Sent: Tuesday, October 20, 2020 8:36 AM > To: Klaus Jensen > Cc: Dmitry Fomichev ; Klaus Jensen > ; Kevin Wolf ; Philippe > Mathieu-Daudé ; Maxim Levitsky > ; Fam Zheng ; Niklas Cassel > ; Damien Le Moal ; > qemu-bl...@nongnu.org;

RE: [PATCH v7 01/11] hw/block/nvme: Add Commands Supported and Effects log

2020-10-20 Thread Dmitry Fomichev
> -Original Message- > From: Klaus Jensen > Sent: Monday, October 19, 2020 4:16 PM > To: Dmitry Fomichev > Cc: Keith Busch ; Klaus Jensen > ; Kevin Wolf ; Philippe > Mathieu-Daudé ; Maxim Levitsky > ; Fam Zheng ; Niklas Cassel > ; Damien Le Moal ; > qemu-bl...@nongnu.org;

RE: [PATCH v7 08/11] hw/block/nvme: Add injection of Offline/Read-Only zones

2020-10-20 Thread Dmitry Fomichev
> -Original Message- > From: Klaus Jensen > Sent: Monday, October 19, 2020 7:43 AM > To: Dmitry Fomichev > Cc: Keith Busch ; Klaus Jensen > ; Kevin Wolf ; Philippe > Mathieu-Daudé ; Maxim Levitsky > ; Fam Zheng ; Niklas Cassel > ; Damien Le Moal ; > qemu-bl...@nongnu.org;

Re: [PATCH 1/1] Skip flatview_simplify() for cpu vendor zhaoxin

2020-10-20 Thread Alex Williamson
On Tue, 20 Oct 2020 11:24:58 +0200 Paolo Bonzini wrote: > On 19/10/20 21:02, Alex Williamson wrote: > >> For KVM we were thinking of changing the whole > >> memory map with a single ioctl, but that's much easier because KVM > >> builds its page tables lazily. It would be possible for the IOMMU

Re: [PATCH v11 1/4] hw/net/can: Introduce Xilinx ZynqMP CAN controller

2020-10-20 Thread Vikram Garhwal
On Tue, Oct 20, 2020 at 11:53:25AM +0100, Peter Maydell wrote: > On Wed, 14 Oct 2020 at 07:04, Vikram Garhwal wrote: > > > > The Xilinx ZynqMP CAN controller is developed based on SocketCAN, QEMU CAN > > bus > > implementation. Bus connection and socketCAN connection for each CAN module > > can

[PATCH] pc: Implement -no-hpet as sugar for -machine hpet=off

2020-10-20 Thread Eduardo Habkost
Get rid of yet another global variable. Signed-off-by: Eduardo Habkost --- include/hw/i386/pc.h | 1 + include/hw/i386/x86.h | 3 --- hw/i386/pc.c | 21 - hw/i386/pc_piix.c | 2 +- softmmu/vl.c | 4 ++-- 5 files changed, 24 insertions(+), 7

Re: [PATCH v5] sev: add sev-inject-launch-secret

2020-10-20 Thread Tobin Feldman-Fitzthum
On 2020-10-20 11:56, Paolo Bonzini wrote: On 20/10/20 15:54, Eduardo Habkost wrote: On Tue, Oct 20, 2020 at 11:03:51AM +0200, Paolo Bonzini wrote: On 15/10/20 16:37, to...@linux.ibm.com wrote: -static void *gpa2hva(MemoryRegion **p_mr, hwaddr addr, Error **errp) +void *gpa2hva(MemoryRegion

Re: [PATCH PROTOTYPE 4/6] memory: Extend ram_block_discard_(require|disable) by two discard types

2020-10-20 Thread Peter Xu
On Tue, Oct 20, 2020 at 04:49:29PM -0400, Peter Xu wrote: > On Tue, Oct 20, 2020 at 09:58:34PM +0200, David Hildenbrand wrote: > > I remember there were some !BQL users (but I might be confusing it with > > postcopy code that once used to inhibit the balloon without BQL). Will > > double-check.

[Bug 1869006] Re: PCIe cards passthrough to TCG guest works on 2GB of guest memory but fails on 4GB (vfio_dma_map invalid arg)

2020-10-20 Thread Greg Zdanowski
@alex-l-williamson: is there any safe(ish) way to ignore RMRR coming from BIOS? I don't know how IOMMU actually works in the kernel but theoretically if kernel had a flag forcing it to ignore certain RMRRs? If I understand this correctly ignoring an RMRR entry may cause two things: 1) DMA

Re: [RFC PATCH] contrib/gitdm: Add more individual contributors

2020-10-20 Thread Artyom Tarasenko
On Sun, Oct 4, 2020 at 8:25 PM Philippe Mathieu-Daudé wrote: > > These individual contributors have a number of contributions, > add them to the 'individual' group map. > ... > +atar4q...@gmail.com Acked-by: Artyom Tarasenko

Re: [PATCH PROTOTYPE 4/6] memory: Extend ram_block_discard_(require|disable) by two discard types

2020-10-20 Thread Peter Xu
On Tue, Oct 20, 2020 at 09:58:34PM +0200, David Hildenbrand wrote: > I remember there were some !BQL users (but I might be confusing it with > postcopy code that once used to inhibit the balloon without BQL). Will > double-check. Simplifying it is certainly a good idea. > > (we want to be able to

Re: [RFC PATCH] contrib/gitdm: Add more individual contributors

2020-10-20 Thread James Hogan
On Sun, Oct 04, 2020 at 08:25:06PM +0200, Philippe Mathieu-Daudé wrote: > diff --git a/contrib/gitdm/group-map-individuals > b/contrib/gitdm/group-map-individuals > index cf8a2ce367..b478fd4576 100644 > --- a/contrib/gitdm/group-map-individuals > +++ b/contrib/gitdm/group-map-individuals > @@

Re: [PATCH PROTOTYPE 3/6] vfio: Implement support for sparse RAM memory regions

2020-10-20 Thread Peter Xu
On Tue, Oct 20, 2020 at 10:01:12PM +0200, David Hildenbrand wrote: > Thanks ... but I have an AMD system. Will try to find out how to get > that running with AMD :) May still start with trying intel-iommu first. :) I think it should work for amd hosts too. Just another FYI - Wei is working on

Re: [PATCH 1/4] qdev-monitor: Display frequencies scaled to SI unit

2020-10-20 Thread Peter Maydell
On Tue, 20 Oct 2020 at 19:20, Philippe Mathieu-Daudé wrote: > > Since commit 9f2ff99c7f2 ("qdev-monitor: print the device's clock > with info qtree") we can display the clock frequencies in the > monitor. Use the recently introduced freq_to_str() to display > the frequencies using the closest SI

Re: [RFC PATCH 4/4] hw/clock: Inline and remove CLOCK_PERIOD_TO_NS()

2020-10-20 Thread Peter Maydell
On Tue, 20 Oct 2020 at 19:20, Philippe Mathieu-Daudé wrote: > > This macro is only used once. Inline caring about 64-bit > multiplication, and remove it. > > Suggested-by: Peter Maydell > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/clock.h | 11 --- > 1 file changed, 8

Re: [PATCH PROTOTYPE 1/6] memory: Introduce sparse RAM handler for memory regions

2020-10-20 Thread David Hildenbrand
On 20.10.20 21:24, Peter Xu wrote: > On Thu, Sep 24, 2020 at 06:04:18PM +0200, David Hildenbrand wrote: >> +static inline void memory_region_set_sparse_ram_handler(MemoryRegion *mr, >> +SparseRAMHandler >> *srh) >> +{ >> +

[PULL v2 00/29] target-arm queue

2020-10-20 Thread Peter Maydell
v2: dropped linux-user bti series. The following changes since commit 4c41341af76cfc85b5a6c0f87de4838672ab9f89: Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20201020' into staging (2020-10-20 11:20:36 +0100) are available in the Git repository at: https://git.linaro.org

Re: [PATCH v11 00/12] linux-user: User support for AArch64 BTI

2020-10-20 Thread Peter Maydell
On Fri, 16 Oct 2020 at 19:42, Richard Henderson wrote: > > The kernel abi for this was merged in v5.8, just as the qemu 5.1 > merge window was closing, so this slipped to the next dev cycle. > > Changes from v10: > * Include Phil's plug of interp_name memory leak. > * Convert error reporting

[PATCH 1/3] ide: run diagnostic after SRST

2020-10-20 Thread John Snow
Software reset (SRST) should cause the diagnostic command to be run. Make an explicit call to that routine. Reported-by: Mark Cave-Ayland Fixes: 55adb3c45620c31f29978f209e2a44a08d34e2da Fixes: https://bugs.launchpad.net/bugs/1900155 Tested-by: Mark Cave-Ayland Signed-off-by: John Snow ---

[PATCH 2/3] ide: perform SRST as early as possible

2020-10-20 Thread John Snow
We don't need to wait for the falling edge. We can set BSY as soon as possible and begin immediately resetting the drive. Devices don't appear to need to take any specific action on the falling edge. Signed-off-by: John Snow --- hw/ide/core.c | 4 +--- 1 file changed, 1 insertion(+), 3

[PATCH 3/3] ide: clear SRST after SRST finishes

2020-10-20 Thread John Snow
The SRST protocol states that after diagnostics are complete and the status is posted, we should clear the SRST bit if it should so happen to be set. The reset method itself should handle this, but just in case -- make our intention explicit here. Signed-off-by: John Snow --- hw/ide/core.c | 2

[PATCH 0/3] ide: fix SRST (again)

2020-10-20 Thread John Snow
My last fix for SRST wasn't entirely correct and caused a regression; namely we need to mime execution of the diagnostic command. If we don't, Linux bins the IDE device as 'horked'. For detailed reading on the SRST protocol, I recommend checking out the ATA8-APT specification. John Snow (3):

Re: [PATCH PROTOTYPE 3/6] vfio: Implement support for sparse RAM memory regions

2020-10-20 Thread David Hildenbrand
On 20.10.20 21:44, Peter Xu wrote: > On Thu, Sep 24, 2020 at 06:04:20PM +0200, David Hildenbrand wrote: >> Implement support for sparse RAM, to be used by virtio-mem. Handling >> is somewhat-similar to memory_region_is_iommu() handling, which also >> notifies on changes. >> >> Instead of mapping

Re: [PATCH PROTOTYPE 4/6] memory: Extend ram_block_discard_(require|disable) by two discard types

2020-10-20 Thread David Hildenbrand
On 20.10.20 21:17, Peter Xu wrote: > On Thu, Sep 24, 2020 at 06:04:21PM +0200, David Hildenbrand wrote: >> We want to separate the two cases whereby >> - balloning drivers do random discards on random guest memory (e.g., >> virtio-balloon) - uncoordinated discards >> - paravirtualized memory

Re: [PATCH v11 13/13] block: apply COR-filter to block-stream jobs

2020-10-20 Thread Andrey Shinkevich
On 16.10.2020 18:45, Vladimir Sementsov-Ogievskiy wrote: 15.10.2020 20:16, Andrey Shinkevich wrote: On 14.10.2020 19:24, Max Reitz wrote: On 12.10.20 19:43, Andrey Shinkevich wrote: [...] ---   block/stream.c | 93 +-  

[PATCH v3 13/15] python: move .isort.cfg into setup.cfg

2020-10-20 Thread John Snow
Signed-off-by: John Snow --- python/.isort.cfg | 7 --- python/setup.cfg | 8 2 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 python/.isort.cfg diff --git a/python/.isort.cfg b/python/.isort.cfg deleted file mode 100644 index 6d0fd6cc0d..00 ---

[PATCH v3 12/15] python: add mypy to pipenv

2020-10-20 Thread John Snow
0.730 appears to be about the oldest version that works with the features we want, including nice human readable output (to make sure iotest 297 passes), and type-parameterized Popen generics. 0.770, however, supports adding 'strict' to the config file, so require at least 0.770. Now that we are

Re: [PATCH PROTOTYPE 3/6] vfio: Implement support for sparse RAM memory regions

2020-10-20 Thread Peter Xu
On Thu, Sep 24, 2020 at 06:04:20PM +0200, David Hildenbrand wrote: > Implement support for sparse RAM, to be used by virtio-mem. Handling > is somewhat-similar to memory_region_is_iommu() handling, which also > notifies on changes. > > Instead of mapping the whole region, we only map selected

[PATCH v3 09/15] python: move flake8 config to setup.cfg

2020-10-20 Thread John Snow
Update the comment concerning the flake8 exception to match commit 42c0dd12, whose commit message stated: A note on the flake8 exception: flake8 will warn on *any* bare except, but pylint's is context-aware and will suppress the warning if you re-raise the exception. Signed-off-by: John Snow

[PATCH v3 05/15] python: Add pipenv support

2020-10-20 Thread John Snow
pipenv is a tool used for managing virtual environments with pinned, explicit dependencies. It is used for precisely recreating python virtual environments. pipenv uses two files to do this: (1) Pipfile, which is similar in purpose and scope to what setup.py lists. It specifies the requisite

[PATCH v3 15/15] python/qemu: add qemu package itself to pipenv

2020-10-20 Thread John Snow
This adds the python qemu packages themselves to the pipenv manifest. 'pipenv sync' will create a virtual environment sufficient to use the SDK. 'pipenv sync --dev' will create a virtual environment sufficient to use and test the SDK (with pylint, mypy, isort, flake8, etc.) The qemu packages are

[PATCH v3 07/15] python: move pylintrc into setup.cfg

2020-10-20 Thread John Snow
Delete the empty settings now that it's sharing a home with settings for other tools. pylint can now be run from this folder as "pylint qemu". Signed-off-by: John Snow --- python/qemu/machine/pylintrc | 58 python/setup.cfg | 29

[PATCH v3 04/15] python: add directory structure README.rst files

2020-10-20 Thread John Snow
Add short readmes to python/, python/qemu/, python/qemu/machine, and python/qemu/machine that explain the directory hierarchy. These readmes are visible when browsing the source on e.g. gitlab/github and are designed to help new developers/users quickly make sense of the source tree. They are not

[PATCH v3 14/15] python/qemu: add isort to pipenv

2020-10-20 Thread John Snow
isort 5.0.0 through 5.0.4 has a bug that causes it to misinterpret certain "from ..." clauses that are not related to imports. Require 5.0.5 or greater. isort can be run with 'isort -c qemu' from the python root. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé --- python/Pipfile

[PATCH v3 08/15] python: add pylint to pipenv

2020-10-20 Thread John Snow
We are specifying >= pylint 2.6.x for two reasons: 1. For setup.cfg support, added in pylint 2.5.x 2. To clarify that we are using a version that has incompatibly dropped bad-whitespace checks. Signed-off-by: John Snow --- python/Pipfile | 1 + python/Pipfile.lock | 127

[PATCH v3 03/15] python: add VERSION file

2020-10-20 Thread John Snow
Python infrastructure as it exists today is not capable reliably of single-sourcing a package version from a parent directory. The authors of pip are working to correct this, but as of today this is not possible to my knowledge. The problem is that when using pip to build and install a python

[PATCH v3 10/15] python: Add flake8 to pipenv

2020-10-20 Thread John Snow
flake8 3.5.x does not support the --extend-ignore syntax used in the .flake8 file to gracefully extend default ignores, so 3.6.x is our minimum requirement. There is no known upper bound. flake8 can be run from the python/ directory with no arguments. Signed-off-by: John Snow ---

[PATCH v3 01/15] python: create qemu packages

2020-10-20 Thread John Snow
move python/qemu/*.py to python/qemu/[machine, qmp]/*.py and update import directives across the tree. This is done to create a PEP420 namespace package, in which we may create subpackages. To do this, the namespace directory ("qemu") should not have any modules in it. Those files will go into

[PATCH v3 06/15] python: add pylint import exceptions

2020-10-20 Thread John Snow
Pylint 2.5.x and 2.6.x have regressions that make import checking inconsistent, see: https: //github.com/PyCQA/pylint/issues/3609 https: //github.com/PyCQA/pylint/issues/3624 https: //github.com/PyCQA/pylint/issues/3651 Pinning to 2.4.4 is worse, because it mandates versions of shared

[PATCH v3 11/15] python: move mypy.ini into setup.cfg

2020-10-20 Thread John Snow
mypy supports reading its configuration values from a central project configuration file; do so. Signed-off-by: John Snow --- python/mypy.ini | 4 python/setup.cfg | 5 + 2 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 python/mypy.ini diff --git a/python/mypy.ini

[PATCH v3 02/15] python: add qemu package installer

2020-10-20 Thread John Snow
Add setup.cfg and setup.py, necessary for installing a package via pip. Add a rst document explaining the basics of what this package is for and who to contact for more information. This document will be used as the landing page for the package on PyPI. I am not yet using a pyproject.toml style

[PATCH v3 00/15] python: create installable package

2020-10-20 Thread John Snow
Based-on: https://gitlab.com/jsnow/qemu/-/tree/python This series factors the python/qemu directory as an installable package. It does not yet actually change the mechanics of how any other python source in the tree actually consumes it (yet), beyond the import path. The point of this series is

Re: [PATCH] trace/simple: Enable tracing on startup only if the user specifies a trace option

2020-10-20 Thread Josh DuBois
Thanks for keeping on following-up, Markus. I know it's a small one, but it's still nice to have a small patch feel loved ;) > On Oct 20, 2020, at 4:19 AM, Markus Armbruster wrote: > > Markus Armbruster writes: > >> Stefan Hajnoczi writes: >> >>> On Sun, Aug 16, 2020 at 12:46:10PM -0500,

Re: [PATCH PROTOTYPE 1/6] memory: Introduce sparse RAM handler for memory regions

2020-10-20 Thread Peter Xu
On Thu, Sep 24, 2020 at 06:04:18PM +0200, David Hildenbrand wrote: > +static inline void memory_region_set_sparse_ram_handler(MemoryRegion *mr, > +SparseRAMHandler > *srh) > +{ > +g_assert(memory_region_is_ram(mr)); Nit: Maybe assert

Re: [PATCH PROTOTYPE 4/6] memory: Extend ram_block_discard_(require|disable) by two discard types

2020-10-20 Thread Peter Xu
On Thu, Sep 24, 2020 at 06:04:21PM +0200, David Hildenbrand wrote: > We want to separate the two cases whereby > - balloning drivers do random discards on random guest memory (e.g., > virtio-balloon) - uncoordinated discards > - paravirtualized memory devices do discards in well-known

[PULL v2 00/21] Python patches

2020-10-20 Thread John Snow
The following changes since commit 4c41341af76cfc85b5a6c0f87de4838672ab9f89: Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20201020' into staging (2020-10-20 11:20:36 +0100) are available in the Git repository at: https://gitlab.com/jsnow/qemu.git tags/python-pull-request

Re: [PULL 20/21] python/qemu/qmp.py: re-raise OSError when encountered

2020-10-20 Thread John Snow
On 10/20/20 2:15 PM, Nir Soffer wrote: On Tue, Oct 20, 2020 at 8:52 PM John Snow wrote: Nested if conditions don't change when the exception block fires; we need to explicitly re-raise the error if we didn't intend to capture and suppress it. Signed-off-by: John Snow Reviewed-by: Philippe

Re: [PATCH v3 4/5] tools/virtiofsd: xattr name mapping examples

2020-10-20 Thread Dr. David Alan Gilbert
* Vivek Goyal (vgo...@redhat.com) wrote: > On Tue, Oct 20, 2020 at 04:34:43PM +0100, Dr. David Alan Gilbert wrote: > > * Vivek Goyal (vgo...@redhat.com) wrote: > > > On Wed, Oct 14, 2020 at 07:02:08PM +0100, Dr. David Alan Gilbert (git) > > > wrote: > > > > From: "Dr. David Alan Gilbert" > > > >

[PATCH v2 4/4] target/s390x: Improve SUB LOGICAL WITH BORROW

2020-10-20 Thread Richard Henderson
Now that SUB LOGICAL outputs borrow, we can use that as input directly. It also means we can re-use CC_OP_SUBU and produce an output borrow directly from SUB LOGICAL WITH BORROW. Signed-off-by: Richard Henderson --- target/s390x/internal.h| 2 - target/s390x/cc_helper.c | 32

  1   2   3   4   5   >