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

2020-09-20 Thread Philippe Mathieu-Daudé
On 9/21/20 4:24 AM, Alexander Bulekov wrote: > 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

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

2020-09-20 Thread Philippe Mathieu-Daudé
Hi Alexander, On 9/21/20 4:24 AM, Alexander Bulekov wrote: > 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

Re: [PATCH] hw/arm/virt: use pflash image real size when mapping

2020-09-20 Thread 张海斌
Resend the mail using plain text format > On Sep 18, 2020, at 9:41 PM, Philippe Mathieu-Daudé wrote: > > Cc'ing firmware experts. > > On 9/18/20 2:26 PM, haibinzhang(寮犳捣鏂? wrote: >> Default size of arm-virt pflash image is 64MB which >> will cost extra 128MB(64MBx2) memory per qemu process >>

Re: [PATCH v3 00/16] Add a General Virtual Device Fuzzer

2020-09-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200921022506.873303-1-alx...@bu.edu/ Hi, This series failed the docker-mingw@fedora 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 === #!

Re: [PATCH v3 00/16] Add a General Virtual Device Fuzzer

2020-09-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200921022506.873303-1-alx...@bu.edu/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200921022506.873303-1-alx...@bu.edu Subject: [PATCH v3 00/16] Add a General Virtual Device

Re: [PATCH] migration/multifd: Remove superfluous semicolons

2020-09-20 Thread Li Qiang
Philippe Mathieu-Daudé 于2020年9月21日周一 下午12:03写道: > > checkpatch.pl report superfluous semicolons since commit > ee0f3c09e01, but this one was missed: > > scripts/checkpatch.pl d32ca5ad798~..d32ca5ad798 > ERROR: superfluous trailing semicolon > #498: FILE: migration/multifd.c:308: > +

Re: [RFC 0/4] Add a 'in_mmio' device flag to avoid the DMA to MMIO

2020-09-20 Thread Li Qiang
Paolo Bonzini 于2020年9月20日周日 下午3:56写道: > > On 08/09/20 18:41, Li Qiang wrote: > > Currently the qemu device fuzzer find some DMA to MMIO issue. If the > > device handling MMIO currently trigger a DMA which the address is MMIO, > > this will reenter the device MMIO handler. As some of the device

Re: [PATCH v3 00/16] Add a General Virtual Device Fuzzer

2020-09-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200921022506.873303-1-alx...@bu.edu/ Hi, This series failed the docker-mingw@fedora 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 === #!

Re: [PATCH v3 00/16] Add a General Virtual Device Fuzzer

2020-09-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200921022506.873303-1-alx...@bu.edu/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200921022506.873303-1-alx...@bu.edu Subject: [PATCH v3 00/16] Add a General Virtual Device

[PATCH] migration/multifd: Remove superfluous semicolons

2020-09-20 Thread Philippe Mathieu-Daudé
checkpatch.pl report superfluous semicolons since commit ee0f3c09e01, but this one was missed: scripts/checkpatch.pl d32ca5ad798~..d32ca5ad798 ERROR: superfluous trailing semicolon #498: FILE: migration/multifd.c:308: +ram_counters.transferred += transferred;; total: 1 errors, 1

[PATCH v2 3/5] hw/timer/bcm2835: Rename variable holding CTRL_STATUS register

2020-09-20 Thread Philippe Mathieu-Daudé
The variable holding the CTRL_STATUS register is misnamed 'status'. Rename it 'ctrl_status' to make it more obvious this register is also used to control the peripheral. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/bcm2835_systmr.h | 2 +- hw/timer/bcm2835_systmr.c | 8

[PATCH v2 2/5] hw/timer/bcm2835: Introduce BCM2835_SYSTIMER_COUNT definition

2020-09-20 Thread Philippe Mathieu-Daudé
Use the BCM2835_SYSTIMER_COUNT definition instead of the magic '4' value. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/bcm2835_systmr.h | 4 +++- hw/timer/bcm2835_systmr.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCH v2 5/5] hw/arm/bcm2835_peripherals: Correctly wire the SYS_timer IRQs

2020-09-20 Thread Philippe Mathieu-Daudé
The SYS_timer is not directly wired to the ARM core, but to the SoC (peripheral) interrupt controller. Fixes: 0e5bbd74064 ("hw/arm/bcm2835_peripherals: Use the SYS_timer") Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/bcm2835_peripherals.c | 13 +++-- 1 file changed, 11

[PATCH v2 1/5] hw/intc/bcm2835_ic: Trace GPU/CPU IRQ handlers

2020-09-20 Thread Philippe Mathieu-Daudé
Add trace events for GPU and CPU IRQs. Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/bcm2835_ic.c | 4 +++- hw/intc/trace-events | 4 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/intc/bcm2835_ic.c b/hw/intc/bcm2835_ic.c index 53ab8f58810..9000d995e81 100644 ---

[PATCH v2 4/5] hw/timer/bcm2835: Support the timer COMPARE registers

2020-09-20 Thread Philippe Mathieu-Daudé
This peripheral has 1 free-running timer and 4 compare registers. Only the free-running timer is implemented. Add support the COMPARE registers (each register is wired to an IRQ). Reference: "BCM2835 ARM Peripherals" datasheet [*] chapter 12 "System Timer": The System Timer

[PATCH v2 0/5] hw/arm/raspi: Fix SYS_timer to unbrick Linux kernels v3.7+

2020-09-20 Thread Philippe Mathieu-Daudé
In this series we implement the COMPARE registers of the SYS_timer, since they are used by Linux. This fixes the hang reported by Niek here: https://www.mail-archive.com/qemu-devel@nongnu.org/msg682090.html Since v1: - Extracted unrelated patches to previous series (which happened to be

[PATCH 1/3] hw/arm/raspi: Define various blocks base addresses

2020-09-20 Thread Philippe Mathieu-Daudé
The Raspberry firmware is closed-source. While running it, it accesses various I/O registers. Logging these accesses as UNIMP (unimplemented) help to understand what the firmware is doing (ideally we want it able to boot a Linux kernel). Document various blocks we might use later. Reviewed-by:

[PATCH 2/3] hw/arm/bcm2835: Add more unimplemented peripherals

2020-09-20 Thread Philippe Mathieu-Daudé
The bcm2835-v3d is used since Linux 4.7, see commit 49ac67e0c39c ("ARM: bcm2835: Add VC4 to the device tree"), and the bcm2835-txp since Linux 4.19, see commit b7dd29b401f5 ("ARM: dts: bcm283x: Add Transposer block"). Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH 3/3] hw/arm/raspi: Remove ignore_memory_transaction_failures on the raspi2

2020-09-20 Thread Philippe Mathieu-Daudé
Commit 1c3db49d39 added the raspi3, which uses the same peripherals than the raspi2 (but with different ARM cores). The raspi3 was introduced without the ignore_memory_transaction_failures flag. Almost 2 years later, the machine is usable running U-Boot and Linux. In commit 00cbd5bd74 we mapped a

[PATCH 0/3] hw/arm/raspi: Remove ignore_memory_transaction_failures on the raspi2

2020-09-20 Thread Philippe Mathieu-Daudé
Patch 1 and 3 are review, patch 2 is new and trivial. Philippe Mathieu-Daudé (3): hw/arm/raspi: Define various blocks base addresses hw/arm/bcm2835: Add more unimplemented peripherals hw/arm/raspi: Remove ignore_memory_transaction_failures on the raspi2

Re: [PATCH v3 00/16] Add a General Virtual Device Fuzzer

2020-09-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200921022506.873303-1-alx...@bu.edu/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200921022506.873303-1-alx...@bu.edu Subject: [PATCH v3 00/16] Add a General Virtual Device

Re: [PATCH v3 00/16] Add a General Virtual Device Fuzzer

2020-09-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200921022506.873303-1-alx...@bu.edu/ Hi, This series failed the docker-mingw@fedora 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 === #!

Re: [PATCH v3 00/16] Add a General Virtual Device Fuzzer

2020-09-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200921022506.873303-1-alx...@bu.edu/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200921022506.873303-1-alx...@bu.edu Subject: [PATCH v3 00/16] Add a General Virtual Device

Re: [PATCH v3 00/16] Add a General Virtual Device Fuzzer

2020-09-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200921022506.873303-1-alx...@bu.edu/ Hi, This series failed the docker-mingw@fedora 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 === #!

Re: [PATCH v3 00/16] Add a General Virtual Device Fuzzer

2020-09-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200921022506.873303-1-alx...@bu.edu/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200921022506.873303-1-alx...@bu.edu Subject: [PATCH v3 00/16] Add a General Virtual Device

[PATCH v3 00/16] Add a General Virtual Device Fuzzer

2020-09-20 Thread Alexander Bulekov
v3: - Use flatviews to help select regions for fuzzing - Meson-related changes - Add some documentation - Improve minimalization script to trim write{bwlq} commands v2: - Remove QOS dependency. - Add a custom crossover function - Fix broken

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

2020-09-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 v3 12/16] scripts/oss-fuzz: Add general-fuzzer configs for oss-fuzz

2020-09-20 Thread Alexander Bulekov
Each of these entries is built into a wrapper binary that sets the needed environment variables and executes the general virtual-device fuzzer. In the future, we will need additional fields, such as arch=arm, timeout_per_testcase=0, reset=reboot, etc... Signed-off-by: Alexander Bulekov

Re: [PATCH 00/12] Add a General Virtual Device Fuzzer

2020-09-20 Thread Alexander Bulekov
On 200826 1410, Dima Stepanov wrote: > Hi Alex, > > Thanks for the nice general fuzzer implementation, looks pretty > exciting. Are there any future plans discussion which i can read > or maybe join? I have some ideas about it so it could be great to > syncronize. > > Regards, Dima. Hi Dima,

[PATCH v3 11/16] scripts/oss-fuzz: Add general-fuzzer build script

2020-09-20 Thread Alexander Bulekov
This parses a yaml file containing general-fuzzer configs and builds a separate oss-fuzz wrapper binary for each one, changing some preprocessor macros for each configuration. To avoid dealing with escaping and stringifying, convert each string into a byte-array representation Signed-off-by:

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

2020-09-20 Thread Alexander Bulekov
Signed-off-by: Alexander Bulekov --- docs/devel/fuzzing.txt | 38 ++ 1 file changed, 38 insertions(+) diff --git a/docs/devel/fuzzing.txt b/docs/devel/fuzzing.txt index 96d71c94d7..208b0c8360 100644 --- a/docs/devel/fuzzing.txt +++ b/docs/devel/fuzzing.txt @@

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

2020-09-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 v3 15/16] scripts/oss-fuzz: Add crash trace minimization script

2020-09-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 v3 10/16] scripts/oss-fuzz: Add wrapper program for generic fuzzer

2020-09-20 Thread Alexander Bulekov
On oss-fuzz we need some sort of wrapper to specify command-line arguments or environment variables. When we had a similar problem with other targets that I fixed with 05509c8e6d ("fuzz: select fuzz target using executable name") by selecting the fuzz target based on the executable's name. In the

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

2020-09-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 v3 13/16] scripts/oss-fuzz: build the general-fuzzer configs

2020-09-20 Thread Alexander Bulekov
Build general-fuzzer wrappers for each configuration defined in general_fuzzer_configs.yml and move the actual general-fuzzer to a subdirectory, so oss-fuzz doesn't treat it as a standalone fuzzer. Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny --- scripts/oss-fuzz/build.sh | 7

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

2020-09-20 Thread Alexander Bulekov
Signed-off-by: Alexander Bulekov --- tests/qtest/fuzz/general_fuzz.c | 90 - 1 file changed, 89 insertions(+), 1 deletion(-) diff --git a/tests/qtest/fuzz/general_fuzz.c b/tests/qtest/fuzz/general_fuzz.c index 656ec7fd55..3833b505c8 100644 ---

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

2020-09-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 v3 03/16] fuzz: Add PCI features to the general fuzzer

2020-09-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 v3 06/16] fuzz: Add fuzzer callbacks to DMA-read functions

2020-09-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 --- exec.c| 2 ++ include/exec/memory.h |

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

2020-09-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 v3 04/16] fuzz: Add DMA support to the generic-fuzzer

2020-09-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 v3 01/16] memory: Add FlatView foreach function

2020-09-20 Thread Alexander Bulekov
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 f1bb2a7df5..975a90c871 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@

Re: [PATCH V9 0/6] mips: Add Loongson-3 machine support

2020-09-20 Thread chen huacai
Hi, Philippe, On Thu, Sep 17, 2020 at 3:56 PM Philippe Mathieu-Daudé wrote: > > Hi Huacai, > > On 9/16/20 4:12 AM, Huacai Chen wrote: > > Loongson-3 CPU family include Loongson-3A R1/R2/R3/R4 and Loongson-3B > > R1/R2. Loongson-3A R1 is the oldest and its ISA is the smallest, while > >

ping: [PATCH 0/3] add MEMORY_FAILURE event

2020-09-20 Thread zhenwei pi
Hi, A patchset about handling 'MCE' might have been ignored, can anyone tell me whether the purpose is reasonable? https://patchwork.kernel.org/cover/11773795/ On 9/14/20 9:43 PM, zhenwei pi wrote: Although QEMU could catch signal BUS to handle hardware memory corrupted event, sadly, QEMU

Re: [PATCH V9 0/6] mips: Add Loongson-3 machine support

2020-09-20 Thread chen huacai
Hi, Aleksandar, On Thu, Sep 17, 2020 at 4:22 PM Aleksandar Markovic wrote: > > > > On Wednesday, September 16, 2020, Huacai Chen wrote: >> >> Loongson-3 CPU family include Loongson-3A R1/R2/R3/R4 and Loongson-3B >> R1/R2. Loongson-3A R1 is the oldest and its ISA is the smallest, while >>

Re: [PATCH v2 00/10] fix some error memleaks

2020-09-20 Thread Pan Nengyuan
ping! and cc: qemu-triv...@nongnu.org On 2020/9/17 20:49, Pan Nengyuan wrote: > ping! > > Anyone queued the rest(patch 01/02/03/07/08/09)? > > On 2020/8/31 21:43, Pan Nengyuan wrote: >> This series fix some Error/GError memleaks. >> >> V2: >> 1. remove two patches.(One has aleardy applied.

Re: [PATCH V9 6/6] hw/mips: Add Loongson-3 machine support

2020-09-20 Thread chen huacai
Hi, Philippe, On Sat, Sep 19, 2020 at 9:59 PM Philippe Mathieu-Daudé wrote: > > On 9/19/20 3:00 AM, Huacai Chen wrote: > > Hi, Philippe, > > > > On Thu, Sep 17, 2020 at 3:53 PM Philippe Mathieu-Daudé > > wrote: > >> > >> On 9/16/20 12:47 PM, Philippe Mathieu-Daudé wrote: > >>> On 9/16/20 11:49

Re: [PATCH] configure: fix performance regression due to PIC objects

2020-09-20 Thread Richard Henderson
On 9/19/20 8:56 AM, Paolo Bonzini wrote: > Because most files in QEMU are grouped into static libraries, Meson > conservatively > compiles them with -fPIC. This is overkill and produces slowdowns up to 20% > on > some TCG tests. > > As a stopgap measure, use the b_staticpic option to limit the

Re: [PATCH 9/9] default-configs: remove default-configs/devices for user-mode targets

2020-09-20 Thread Richard Henderson
On 9/20/20 6:07 AM, Paolo Bonzini wrote: > We no longer need dummy files to detect targets, since > default-configs/targets/ exists. > > Signed-off-by: Paolo Bonzini > --- Reviewed-by: Richard Henderson r~

Re: [PATCH 8/9] default-configs/targets: remove useless lines

2020-09-20 Thread Richard Henderson
On 9/20/20 6:07 AM, Paolo Bonzini wrote: > Some lines are only meaningful for user-mode targets, remove them. > > Signed-off-by: Paolo Bonzini > --- This seems like it could be folded with the previous. r~

Re: [PATCH 6/9] configure: move CONFIG_* symbols to meson

2020-09-20 Thread Richard Henderson
On 9/20/20 6:07 AM, Paolo Bonzini wrote: > These symbols are easily computed from just the target name, > so remove them from config-target.mak. > > Signed-off-by: Paolo Bonzini > --- > configure | 11 +-- > meson.build | 27 --- > 2 files changed, 25

Re: [PATCH 5/9] configure: remove dead variable

2020-09-20 Thread Richard Henderson
On 9/20/20 6:07 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > configure | 11 --- > 1 file changed, 11 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 4/9] configure: move accelerator logic to meson

2020-09-20 Thread Richard Henderson
On 9/20/20 6:07 AM, Paolo Bonzini wrote: > Move to meson the code to detect the presence of accelerators, and > to define accelerator-specific config-target.h symbols. > > The logic for now is duplicated in configure because it is still > in use to build the list of targets (which is in turn used

Re: [PATCH 3/9] configure: rewrite accelerator defaults as tests

2020-09-20 Thread Richard Henderson
On 9/20/20 6:07 AM, Paolo Bonzini wrote: > +if test "$kvm" = "auto" ; then > + if test "$linux" = yes ; then > +kvm=enabled > + else > +if test "$kvm" = "enabled" ; then > + feature_not_found "kvm" "KVM is only available on Linux" Can't get here, as enabled != auto. r~

Re: [PATCH 2/9] configure: convert accelerator variables to meson options

2020-09-20 Thread Richard Henderson
On 9/20/20 6:07 AM, Paolo Bonzini wrote: > Prepare for moving the tests to meson. For now they only have > enabled/disabled as the possible values when meson is invoked, > but "auto" will be a possibility later, when configure will only > parse the command line options. > > Signed-off-by: Paolo

Re: [PATCH 1/9] default-configs: move files to default-configs/devices/

2020-09-20 Thread Richard Henderson
On 9/20/20 6:07 AM, Paolo Bonzini wrote: > Make room for target files in default-configs/targets/ > > Signed-off-by: Paolo Bonzini > --- Reviewed-by: Richard Henderson r~

Re: [PATCH 4/4] configure: consistently pass CFLAGS/CXXFLAGS/LDFLAGS to meson

2020-09-20 Thread Richard Henderson
On 9/20/20 2:30 AM, Paolo Bonzini wrote: > Environment variables like CFLAGS are easy to accidentally change. Meson > warns if that happens, but in a project with a lot of configuration that > is easy to lose. It is also surprising behavior since meson caches -D > options and remembers those on

Re: [PATCH 3/4] configure: do not clobber environment CFLAGS/CXXFLAGS/LDFLAGS

2020-09-20 Thread Richard Henderson
On 9/20/20 2:30 AM, Paolo Bonzini wrote: > If the CFLAGS, CXXFLAGS or LDFLAGS variables are present in the environment, > any modification made within the configure script is passed down to Meson. > This is particularly undesirable for the "-pie" option, since it overrides > "-shared" and thus

Re: [PATCH 2/4] configure: cleanup CFLAGS and LDFLAGS for submodules

2020-09-20 Thread Richard Henderson
On 9/20/20 2:30 AM, Paolo Bonzini wrote: > The -g and -O2 flags that configure adds to CFLAGS are only used by > submodules, > so do not put anymore the confusing CFLAGS variable in config-host.mak and > replace it with more explicit SUBMODULE_CFLAGS variable. > > There was also no equivalent

Re: [PATCH 1/4] configure: cleanup invocation of submodule Make

2020-09-20 Thread Richard Henderson
On 9/20/20 2:30 AM, Paolo Bonzini wrote: > Move common command line options to SUBDIR_MAKEFLAGS, thus simplifying > the rules themselves. > > Signed-off-by: Paolo Bonzini > --- > Makefile | 24 +++- > 1 file changed, 15 insertions(+), 9 deletions(-) Reviewed-by: Richard

Re: [PATCH] timer: Fix timer_mod_anticipate() documentation

2020-09-20 Thread Richard Henderson
On 9/20/20 8:50 AM, Philippe Mathieu-Daudé wrote: > timer_mod_anticipate() will be scaled to the timer unit, > which is not always nanosecond. Fix the documentation. > > Fixes: add40e9777d ("timer: add timer_mod_anticipate*") > Signed-off-by: Philippe Mathieu-Daudé > --- > include/qemu/timer.h

Re: [PATCH 0/2] qdev: Let BusRealize() return a boolean value to indicate error

2020-09-20 Thread Richard Henderson
On 9/20/20 4:44 AM, Philippe Mathieu-Daudé wrote: > Philippe Mathieu-Daudé (2): > qdev: Document qbus_realize() and qbus_unrealize() > qdev: Let BusRealize() return a boolean value to indicate error Reviewed-by: Richard Henderson r~

Re: [RFC 0/4] Add a 'in_mmio' device flag to avoid the DMA to MMIO

2020-09-20 Thread Peter Maydell
On Sun, 20 Sep 2020 at 08:56, Paolo Bonzini wrote: > > On 08/09/20 18:41, Li Qiang wrote: > > Currently the qemu device fuzzer find some DMA to MMIO issue. If the > > device handling MMIO currently trigger a DMA which the address is MMIO, > > this will reenter the device MMIO handler. As some of

Limiting per vCPU Usage

2020-09-20 Thread Peter Lieven
Hi Qemu folks, is there a BCP to limit just the maximum usage of a virtual (KVM) cpu? I know that there are many approaches, but as far as I know they all limit the complete qemu process which is far more than just the virtual CPUs. Is it possible to limit just the vCPU threads and leave

Re: [PATCH 0/6] Convert pc-bios Makefiles to meson

2020-09-20 Thread Peter Maydell
On Sat, 19 Sep 2020 at 15:59, Paolo Bonzini wrote: > > I don't know, the way pc-bios/ works seems just wrong to me. pc-bios > should IMO be its own build system with support for docker-based cross > compilers similar to tests/tcg. Yes, I've always thought this :-) It borrows the host x86

Re: [PATCH 0/7] hw/arm/raspi: Fix SYS_timer on Linux + misc changes

2020-09-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200920175825.417680-1-f4...@amsat.org/ Hi, This series failed the docker-quick@centos7 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 ===

Re: [PATCH 0/7] hw/arm/raspi: Fix SYS_timer on Linux + misc changes

2020-09-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200920175825.417680-1-f4...@amsat.org/ Hi, This series failed the docker-mingw@fedora 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 === #!

Re: [PATCH v10 25/26] block: Fixes nfs compiling error on msys2/mingw

2020-09-20 Thread Peter Lieven
Am 15.09.20 um 19:12 schrieb Yonggang Luo: > These compiling errors are fixed: > ../block/nfs.c:27:10: fatal error: poll.h: No such file or directory >27 | #include > | ^~~~ > compilation terminated. > > ../block/nfs.c:63:5: error: unknown type name 'blkcnt_t' >63 |

[Bug 1823790] Re: QEMU mishandling of SO_PEERSEC forces systemd into tight loop

2020-09-20 Thread Charlie Sharpsteen
In my case the issue with using Ubuntu 20.04 as a container host appears to have come down to the use of the F, or "fix binary", flag by binfmnt_misc: # cat /proc/sys/fs/binfmt_misc/qemu-aarch64 enabled interpreter /usr/bin/qemu-aarch64-static flags: OCF offset 0 magic

Re: [PATCH 0/2] vhost-vdpa: add trace functions in vhost-vdpa.c

2020-09-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200920162434.868041-1-lviv...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200920162434.868041-1-lviv...@redhat.com Subject: [PATCH 0/2] vhost-vdpa: add trace

[PATCH 5/7] hw/timer/bcm2835: Rename variable holding CTRL_STATUS register

2020-09-20 Thread Philippe Mathieu-Daudé
The variable holding the CTRL_STATUS register is misnamed 'status'. Rename it 'ctrl_status' to make it more obvious this register is also used to control the peripheral. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/bcm2835_systmr.h | 2 +- hw/timer/bcm2835_systmr.c | 8

[PATCH 7/7] hw/arm/bcm2835_peripherals: Correctly wire the SYS_timer IRQs

2020-09-20 Thread Philippe Mathieu-Daudé
The SYS_timer is not directly wired to the ARM core, but to the SoC interrupt controller. Fixes: 0e5bbd74064 ("hw/arm/bcm2835_peripherals: Use the SYS_timer") Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/bcm2835_peripherals.c | 13 +++-- 1 file changed, 11 insertions(+), 2

[PATCH 4/7] hw/timer/bcm2835: Introduce BCM2835_SYSTIMER_COUNT definition

2020-09-20 Thread Philippe Mathieu-Daudé
Use the BCM2835_SYSTIMER_COUNT definition instead of the magic '4' value. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/bcm2835_systmr.h | 4 +++- hw/timer/bcm2835_systmr.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCH 6/7] hw/timer/bcm2835: Support the timer COMPARE registers

2020-09-20 Thread Philippe Mathieu-Daudé
This peripheral has 1 free-running timer and 4 compare registers. Only the free-running timer is implemented. Add support the COMPARE registers (each register is wired to an IRQ). Reference: "BCM2835 ARM Peripherals" datasheet [*] chapter 12 "System Timer": The System Timer

[PATCH 2/7] hw/arm/bcm2835: Add more unimplemented peripherals

2020-09-20 Thread Philippe Mathieu-Daudé
The bcm2835-v3d is used since Linux 4.7, see commit 49ac67e0c39c ("ARM: bcm2835: Add VC4 to the device tree"), and the bcm2835-txp since Linux 4.19, see commit b7dd29b401f5 ("ARM: dts: bcm283x: Add Transposer block"). Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH 3/7] hw/intc/bcm2835_ic: Trace GPU/CPU IRQ handlers

2020-09-20 Thread Philippe Mathieu-Daudé
Add trace events for GPU and CPU IRQs. Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/bcm2835_ic.c | 4 +++- hw/intc/trace-events | 4 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/intc/bcm2835_ic.c b/hw/intc/bcm2835_ic.c index 53ab8f58810..9000d995e81 100644 ---

[PATCH 1/7] hw/arm/raspi: Define various blocks base addresses

2020-09-20 Thread Philippe Mathieu-Daudé
The Raspberry firmware is closed-source. While running it, it accesses various I/O registers. Logging these accesses as UNIMP (unimplemented) help to understand what the firmware is doing (ideally we want it able to boot a Linux kernel). Document various blocks we might use later. Reviewed-by:

Re: [PATCH 5/6] macio: don't reference serial_hd() directly within the device

2020-09-20 Thread Mark Cave-Ayland
On 20/09/2020 11:52, BALATON Zoltan via wrote: > On Sun, 20 Sep 2020, Mark Cave-Ayland wrote: >> Instead use qdev_prop_set_chr() to configure the ESCC serial chardevs at the >> Mac Old World and New World machine level. >> >> Also remove the now obsolete comment referring to the use of

[PATCH 0/7] hw/arm/raspi: Fix SYS_timer on Linux + misc changes

2020-09-20 Thread Philippe Mathieu-Daudé
In this series we implement the COMPARE registers of the SYS_timer, since they are used by Linux. This fixes the hang reported by Niek here: https://www.mail-archive.com/qemu-devel@nongnu.org/msg682090.html Few trivial patches used while working on this added. Philippe Mathieu-Daudé (7):

[PATCH 8/9] audio: restore mixing-engine playback buffer size

2020-09-20 Thread Volker Rümelin
Commit ff095e5231 "audio: api for mixeng code free backends" introduced another FIFO for the audio subsystem with exactly the same size as the mixing-engine FIFO. Most audio backends use this generic FIFO. The generic FIFO used together with the mixing-engine FIFO doubles the audio FIFO size,

[PATCH 7/9] audio: run downstream playback queue unconditionally

2020-09-20 Thread Volker Rümelin
Run the downstream playback queue even if there are no samples in the mixing engine buffer. The downstream queue may still have queued samples. Signed-off-by: Volker Rümelin --- audio/audio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/audio/audio.c b/audio/audio.c index

[PATCH 4/9] audio: align audio_generic_read with audio_pcm_hw_run_in

2020-09-20 Thread Volker Rümelin
The function audio_generic_read should work exactly like audio_pcm_hw_run_in. It's a very similar function working on a different buffer. Signed-off-by: Volker Rümelin --- audio/audio.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/audio/audio.c

[PATCH 2/9] audio/audio: fix video playback slowdown with spiceaudio

2020-09-20 Thread Volker Rümelin
This patch allows the audio backends get_buffer_out() functions to drop audio data and mitigates a bug reported on the qemu-devel mailing list. https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03832.html The new rules for the variables buf and size returned by get_buffer_out() are:

[PATCH 9/9] audio: revert tests for pcm_ops table

2020-09-20 Thread Volker Rümelin
With previous commit every audio backend has a pcm_ops function table. It's no longer necessary to test if the table is available. This reverts commit cbaf25d1f5: "audio: fix wavcapture segfault" Signed-off-by: Volker Rümelin --- audio/audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 5/9] audio: remove unnecessary calls to put_buffer_in

2020-09-20 Thread Volker Rümelin
This patch removes unnecessary calls to the pcm_ops function put_buffer_in(). No audio backend needs this call if the returned length of pcm_ops function get_buffer_in() is zero. For the DirectSound backend this prevents a call to dsound_unlock_in() without a preceding call to dsound_lock_in().

[PATCH 3/9] audio/spiceaudio: always rate limit playback stream

2020-09-20 Thread Volker Rümelin
The playback rate with the spiceaudio backend is currently too fast if there's no spice client connected or the spice client can't play audio. Rate limit the audio playback stream in all cases. To calculate the rate correctly the limiter has to know the maximum buffer size. Fixes: 8c198ff065

[PATCH 6/9] audio: align audio_generic_write with audio_pcm_hw_run_out

2020-09-20 Thread Volker Rümelin
The function audio_generic_write should work exactly like audio_pcm_hw_run_out. It's a very similar function working on a different buffer. This patch significantly reduces the number of drop-outs with the DirectSound backend. To hear the difference start qemu with -audiodev

[PATCH 1/9] audio: handle buf == NULL in put_buffer_out()

2020-09-20 Thread Volker Rümelin
With the next patch all audio backends put_buffer_out() functions have to handle the buf == NULL case, provided the get_buffer_out() function may return buf = NULL and size > 0. It turns out that all audio backends get_buffer_out() functions either can't return buf = NULL or return buf = NULL and

[PATCH 0/9] Audio fixes and improvements

2020-09-20 Thread Volker Rümelin
A few fixes and improvements from my audio patch queue. It's currently still not possible to reach the function audio_generic_read(). I tested the patch   audio: align audio_generic_read with audio_pcm_hw_run_in with a modified audio/paaudio.c version. If someone wants to reproduce the test,

Re: [PATCH 7/9] configure: remove target configuration

2020-09-20 Thread Paolo Bonzini
On 20/09/20 15:13, 罗勇刚(Yonggang Luo) wrote: > Can these be generated from meson directly? > as makefile finally need to be removed The files aren't generated and are independent of the Makefile infrastructure. Don't think too much of the .mak extension. :) Paolo

Re: Hi Bonzini, I've seen your 3.1 branch have conflict with qemu.org/master

2020-09-20 Thread Paolo Bonzini
On 20/09/20 16:53, 罗勇刚(Yonggang Luo) wrote: > I rebased 3.1 branch on  qemu.org/master and > placed at > https://github.com/lygstate/qemu/tree/for-3.1 > > And removed two conflcit revision > > * iotests: Work around failing readlink -f > * Simplify the .gitignore file >

[PATCH 1/2] util/hexdump: introduce qemu_hexdump_line()

2020-09-20 Thread Laurent Vivier
Dumping one line of hexadecimal/ASCII from a buffer is often needed. Move this part from qemu_hexdump() and use it Signed-off-by: Laurent Vivier --- include/qemu-common.h | 8 +++ util/hexdump.c| 54 +++ 2 files changed, 42 insertions(+), 20

[PATCH 2/2] vhost-vdpa: add trace-events

2020-09-20 Thread Laurent Vivier
Add trace functionis in vhost-vdpa.c. All traces from this file can be enabled with '-trace vhost_vdpa*'. Signed-off-by: Laurent Vivier --- hw/virtio/trace-events | 29 ++ hw/virtio/vhost-vdpa.c | 85 +++--- 2 files changed, 109 insertions(+), 5

[PATCH 0/2] vhost-vdpa: add trace functions in vhost-vdpa.c

2020-09-20 Thread Laurent Vivier
Add trace events functions in vdpa functions. Modify qemu_hexdump() to be able to dump the vdpa config in trace logs in hexadecimal form. Laurent Vivier (2): util/hexdump: introduce qemu_hexdump_line() vhost-vdpa: add trace-events hw/virtio/trace-events | 29 ++

Re: [PATCH] qom: Improve error message displayed with missing object properties

2020-09-20 Thread Li Qiang
Philippe Mathieu-Daudé 于2020年9月20日周日 下午11:54写道: > > Instead of only displaying the property missing, also display > the object name. This help developer to quickly figure out the > mistake without opening a debugger. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Li Qiang > --- >

Re: [PATCH] vhost-vdpa: remove useless variable

2020-09-20 Thread Li Qiang
Laurent Vivier 于2020年9月20日周日 下午11:21写道: > > in vhost_vdpa_listener_region_del(), try_unmap is always true and so, > vhost_vdpa_dma_unmap() is always called. We can remove the variable > > Signed-off-by: Laurent Vivier Reviewed-by: Li Qiang > --- > hw/virtio/vhost-vdpa.c | 9 +++-- > 1

Re: [PATCH] vhost-vdpa: remove useless variable

2020-09-20 Thread Philippe Mathieu-Daudé
Cc'ing qemu-trivial@ On 9/20/20 5:20 PM, Laurent Vivier wrote: > in vhost_vdpa_listener_region_del(), try_unmap is always true and so, > vhost_vdpa_dma_unmap() is always called. We can remove the variable > > Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé > --- >

[PATCH] qom: Improve error message displayed with missing object properties

2020-09-20 Thread Philippe Mathieu-Daudé
Instead of only displaying the property missing, also display the object name. This help developer to quickly figure out the mistake without opening a debugger. Signed-off-by: Philippe Mathieu-Daudé --- qom/object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH] timer: Fix timer_mod_anticipate() documentation

2020-09-20 Thread Philippe Mathieu-Daudé
timer_mod_anticipate() will be scaled to the timer unit, which is not always nanosecond. Fix the documentation. Fixes: add40e9777d ("timer: add timer_mod_anticipate*") Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/timer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

  1   2   >