Re: [PATCH v2] util/qemu-option: Document the get_opt_value() function

2020-07-06 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Coverity noticed commit 950c4e6c94 introduced a dereference before > null check in get_opt_value (CID1391003): > > In get_opt_value: All paths that lead to this null pointer > comparison already dereference the pointer earlier (CWE-476) > > We fixed this in

Re: [PATCH v2] util/qemu-option: Document the get_opt_value() function

2020-07-06 Thread Thomas Huth
On 07/07/2020 07.35, Markus Armbruster wrote: > Richard Henderson writes: > >> On 6/29/20 12:08 AM, Philippe Mathieu-Daudé wrote: >>> Coverity noticed commit 950c4e6c94 introduced a dereference before >>> null check in get_opt_value (CID1391003): >>> >>> In get_opt_value: All paths that lead

Re: [PATCH v2] util/qemu-option: Document the get_opt_value() function

2020-07-06 Thread Markus Armbruster
Richard Henderson writes: > On 6/29/20 12:08 AM, Philippe Mathieu-Daudé wrote: >> Coverity noticed commit 950c4e6c94 introduced a dereference before >> null check in get_opt_value (CID1391003): >> >> In get_opt_value: All paths that lead to this null pointer >> comparison already

Re: Slow down with: 'Make "info qom-tree" show children sorted'

2020-07-06 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 7/7/20 6:45 AM, Thomas Huth wrote: >> On 27/05/2020 10.47, Markus Armbruster wrote: >>> "info qom-tree" prints children in unstable order. This is a pain >>> when diffing output for different versions to find change. Print it >>> sorted. >>> >>>

Re: Test failure with Smartfusion2 emac block (msf2-emac)

2020-07-06 Thread Thomas Huth
On 07/07/2020 07.18, Thomas Huth wrote: > > Hi Subbaraya, > > today, I noticed that there is a test failure with msf2-emac when > running the device-introspect-test in slow mode. Either run: > > make check-qtest-aarch64 SPEED=slow > > or as a shortcut: > > make

Test failure with Smartfusion2 emac block (msf2-emac)

2020-07-06 Thread Thomas Huth
Hi Subbaraya, today, I noticed that there is a test failure with msf2-emac when running the device-introspect-test in slow mode. Either run: make check-qtest-aarch64 SPEED=slow or as a shortcut: make tests/qtest/device-introspect-test

[Bug 1886362] Re: Heap use-after-free in lduw_he_p through e1000e_write_to_rx_buffers

2020-07-06 Thread Philippe Mathieu-Daudé
Running with '-trace e1000\*': e1000e_cb_pci_realize E1000E PCI realize entry e1000e_mac_set_permanent Set permanent MAC: 52:54:00:12:34:56 e1000e_cfg_support_virtio Virtio header supported: 0 e1000e_rx_set_cso RX CSO state set to 0 e1000e_cb_qdev_reset E1000E qdev reset entry e1000x_mac_indicate

Re: [PATCH 00/13] Reverse debugging

2020-07-06 Thread Pavel Dovgalyuk
On 06.07.2020 22:55, Alex Bennée wrote: Pavel Dovgalyuk writes: Ping. I started going through this and then ran into some merge conflicts. Are all the pre-requisite patches now merged via Paolo's tree? Yes, everything is merged. I pulled the latest master minute ago and got no conflicts

Re: Slow down with: 'Make "info qom-tree" show children sorted'

2020-07-06 Thread Philippe Mathieu-Daudé
On 7/7/20 6:45 AM, Thomas Huth wrote: > On 27/05/2020 10.47, Markus Armbruster wrote: >> "info qom-tree" prints children in unstable order. This is a pain >> when diffing output for different versions to find change. Print it >> sorted. >> >> Signed-off-by: Markus Armbruster >> --- >>

Slow down with: 'Make "info qom-tree" show children sorted'

2020-07-06 Thread Thomas Huth
On 27/05/2020 10.47, Markus Armbruster wrote: > "info qom-tree" prints children in unstable order. This is a pain > when diffing output for different versions to find change. Print it > sorted. > > Signed-off-by: Markus Armbruster > --- > qom/qom-hmp-cmds.c | 24 > 1

Re: [PATCH 4/4] docs/fuzz: add instructions for generating a coverage report

2020-07-06 Thread Alexander Bulekov
On 200706 1555, Alexander Bulekov wrote: > Signed-off-by: Alexander Bulekov > --- > docs/devel/fuzzing.txt | 19 +++ > 1 file changed, 19 insertions(+) > > diff --git a/docs/devel/fuzzing.txt b/docs/devel/fuzzing.txt > index 284d57f8fd..a9816ffce9 100644 > ---

Re: [PATCH 2/4] docs/fuzz: describe building fuzzers with enable-sanitizers

2020-07-06 Thread Philippe Mathieu-Daudé
On 7/6/20 9:55 PM, Alexander Bulekov wrote: > Signed-off-by: Alexander Bulekov Reviewed-by: Philippe Mathieu-Daudé > --- > docs/devel/fuzzing.txt | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/docs/devel/fuzzing.txt b/docs/devel/fuzzing.txt > index

Re: [PATCH 1/4] fuzz: build without AddressSanitizer, by default

2020-07-06 Thread Philippe Mathieu-Daudé
On 7/6/20 9:55 PM, Alexander Bulekov wrote: > We already have a nice --enable-sanitizers option to enable > AddressSanitizer. There is no reason to duplicate and force this > functionality in --enable-fuzzing. In the future, if more sanitizers are > added to --enable-sanitizers, it might be

Re: [PULL 07/15] hw/timer: RX62N 8-Bit timer (TMR)

2020-07-06 Thread Philippe Mathieu-Daudé
ping...? On 6/29/20 11:58 AM, Philippe Mathieu-Daudé wrote: > Hi Yoshinori, > > On 6/25/20 11:25 AM, Peter Maydell wrote: >> On Sun, 21 Jun 2020 at 13:54, Philippe Mathieu-Daudé wrote: >>> >>> From: Yoshinori Sato >>> >>> renesas_tmr: 8bit timer modules. >> >> Hi; the recent Coverity run

Re: [PATCH v2 1/2] tpm: tpm_spapr: Exit on TPM backend failures

2020-07-06 Thread Philippe Mathieu-Daudé
Hi Stefan, On 7/7/20 6:05 AM, Stefan Berger wrote: > Exit on TPM backend failures in the same way as the TPM CRB and TIS device > models do. Maybe the other models are not the best examples ;) > > Signed-off-by: Stefan Berger > --- > hw/tpm/tpm_spapr.c | 5 - > 1 file changed, 4

[PATCH v2 0/2] tpm: Some fixes

2020-07-06 Thread Stefan Berger
This series of patches fixes the TPM SPAPR device model so that it reacts in the same way as the other device models do when the backend device did not start up properly. It now calls exit(1). Due to a change in the TPM 2 code, the pcrUpdateCounter (14th byte) in the TPM2_Pcrread response now

[PATCH v2 2/2] tests: Skip over pcrUpdateCounter byte in result comparison

2020-07-06 Thread Stefan Berger
Due to a change in the TPM 2 code the pcrUpdate counter in the PCRRead response is now different, so we skip comparison of the 14th byte. Signed-off-by: Stefan Berger --- tests/qtest/tpm-util.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/qtest/tpm-util.c

[PATCH v2 1/2] tpm: tpm_spapr: Exit on TPM backend failures

2020-07-06 Thread Stefan Berger
Exit on TPM backend failures in the same way as the TPM CRB and TIS device models do. Signed-off-by: Stefan Berger --- hw/tpm/tpm_spapr.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/tpm/tpm_spapr.c b/hw/tpm/tpm_spapr.c index cb4dfd1e6a..8288ab0a15 100644 ---

Re: [PATCH v3] hw/core/qdev: Increase qdev_realize() kindness

2020-07-06 Thread Philippe Mathieu-Daudé
On 7/7/20 5:33 AM, Philippe Mathieu-Daudé wrote: > Since commit 510ef98dca5, qdev_realize() aborts if bus-less device > is realized on a bus. While commits 514db7710b..007d1dbf72 took > care of converting all mainstream uses, QEMU forks weren't. These I guess I missed "weren't [converted]". >

[PATCH v3] hw/core/qdev: Increase qdev_realize() kindness

2020-07-06 Thread Philippe Mathieu-Daudé
Since commit 510ef98dca5, qdev_realize() aborts if bus-less device is realized on a bus. While commits 514db7710b..007d1dbf72 took care of converting all mainstream uses, QEMU forks weren't. These forks are usually maintained by hobbyist with interest in following mainstream development, but with

[PATCH] tests/qtest/libqtest: Do not overwrite child coredump

2020-07-06 Thread Philippe Mathieu-Daudé
We are interested by the coredump of the child, not the qtest parent. If the child generated a coredump, simply call exit(EXIT_FAILURE) in the parent to avoid overwriting the child coredump. Fixes: 71a268a5fd ("tests/libqtest: Improve kill_qemu()") Signed-off-by: Philippe Mathieu-Daudé ---

[Bug 1886602] Re: Windows 10 very slow with OVMF

2020-07-06 Thread Alex Austin
# dmidecode 3.2 Getting SMBIOS data from sysfs. SMBIOS 3.0.0 present. Table at 0x9A694000. ... Handle 0x000A, DMI type 4, 48 bytes Processor Information Socket Designation: U3E1 Type: Central Processor Family: Core i7 ... Core Count: 2 Core Enabled: 2

RE: [PATCH 3/3] target/nios2: Use gen_io_start around wrctl instruction

2020-07-06 Thread Wu, Wentong
Hi, I think we can get this patch series merged first in order to get qemu_nios2 working with icount, actually we are blocked by it for some time. BTW if maintainers(Chris Wulff and Marek Vasut) don't have time for the re-work, I'd like to take it. Thanks > -Original Message- > From:

[Bug 1886602] [NEW] Windows 10 very slow with OVMF

2020-07-06 Thread Alex Austin
Public bug reported: Debian Buster Kernel 4.19.0-9-amd64 qemu-kvm 1:3.1+dfsg-8+deb10u5 ovmf 0~20181115.85588389-3+deb10u1 Machine: Thinkpad T470, i7-7500u, 20GB RAM VM: 4 CPUs, 8GB RAM, Broadwell-noTSX CPU Model Windows 10, under this VM, seems to be exceedingly slow with all operations. This

Re: [PULL v2 12/64] target/riscv: add vector amo operations

2020-07-06 Thread LIU Zhiwei
On 2020/7/7 7:36, Alistair Francis wrote: On Sun, Jul 5, 2020 at 11:20 AM Peter Maydell wrote: On Thu, 2 Jul 2020 at 17:33, Alistair Francis wrote: From: LIU Zhiwei Vector AMOs operate as if aq and rl bits were zero on each element with regard to ordering relative to other instructions

[PATCH v2] .mailmap: Update Paul Burton email address

2020-07-06 Thread Philippe Mathieu-Daudé
Following the Linux kernel equivalent patch posted on linux-m...@vger.kernel.org [*], update Paul Burton email address to avoid emails bouncing. [*] 'MAINTAINERS: Use @kernel.org address for Paul Burton' https://lore.kernel.org/patchwork/patch/1140341/ Cc: Paul Burton Suggested-by: Paolo

RE: [PATCH] intel_iommu: Use correct shift for 256 bits qi descriptor

2020-07-06 Thread Liu, Yi L
> From: Peter Xu > Sent: Tuesday, July 7, 2020 4:58 AM > > On Sat, Jul 04, 2020 at 01:07:15AM -0700, Liu Yi L wrote: > > In chapter 10.4.23 of VT-d spec 3.0, Descriptor Width bit was > > introduced in VTD_IQA_REG. Sfotware could set this bit to tell VT-d > > the QI descriptor from software would

Re: [PATCH v2] util/qemu-option: Document the get_opt_value() function

2020-07-06 Thread Philippe Mathieu-Daudé
On 7/7/20 3:14 AM, Richard Henderson wrote: > On 6/29/20 12:08 AM, Philippe Mathieu-Daudé wrote: >> Coverity noticed commit 950c4e6c94 introduced a dereference before >> null check in get_opt_value (CID1391003): >> >> In get_opt_value: All paths that lead to this null pointer >> comparison

[PATCH] riscv: Add OpenTitan Big Number (OTBN) device address

2020-07-06 Thread Julio Faracco
This commit adds basics skecthes to implemente a OTBN unit. OTBN has address 0x5000 and size 0x40. For further reference, see OTBN docummentation: https://docs.opentitan.org/hw/ip/otbn/doc/ Signed-off-by: Julio Faracco --- hw/riscv/opentitan.c | 5 -

Re: [PATCH] target/arm: Fix mtedesc for do_mem_zpz

2020-07-06 Thread Philippe Mathieu-Daudé
On 7/6/20 10:23 PM, Richard Henderson wrote: > The mtedesc that was contructed was not actually passed in. Typo "constructed". Reviewed-by: Philippe Mathieu-Daudé > Found by Coverity (CID 1429996). > > Fixes: d28d12f008e > Signed-off-by: Richard Henderson > --- > target/arm/translate-sve.c

Re: [PATCH 2/4] hw/lm32/milkymist: Comment to remember some IRQs lines are left unwired

2020-07-06 Thread Philippe Mathieu-Daudé
On 7/6/20 8:32 PM, Alistair Francis wrote: > On Mon, Jul 6, 2020 at 11:04 AM Philippe Mathieu-Daudé > wrote: >> >> On 7/6/20 6:19 PM, Alistair Francis wrote: >>> On Sun, Jul 5, 2020 at 2:10 PM Philippe Mathieu-Daudé >>> wrote: The 'card is readonly' and 'card inserted' IRQs are not

Re: [PATCH v2] util/qemu-option: Document the get_opt_value() function

2020-07-06 Thread Richard Henderson
On 6/29/20 12:08 AM, Philippe Mathieu-Daudé wrote: > Coverity noticed commit 950c4e6c94 introduced a dereference before > null check in get_opt_value (CID1391003): > > In get_opt_value: All paths that lead to this null pointer > comparison already dereference the pointer earlier (CWE-476) >

Re: [PATCH qemu v9] spapr: Implement Open Firmware client interface

2020-07-06 Thread Alexey Kardashevskiy
Ping? On 24/06/2020 10:28, Alexey Kardashevskiy wrote: > Ping? > > On 02/06/2020 21:40, Alexey Kardashevskiy wrote: >> Ping? >> >> On 13/05/2020 13:58, Alexey Kardashevskiy wrote: >>> The PAPR platform which describes an OS environment that's presented by >>> a combination of a hypervisor and

Re: [PATCH 18/26] hw/usb/bus: Add usb_get_port_path()

2020-07-06 Thread Alistair Francis
On Sat, Jul 4, 2020 at 8:00 AM Philippe Mathieu-Daudé wrote: > > Refactor usb_get_full_dev_path() to take a 'want_full_path' > argument, and add usb_get_port_path() which returns a short > path. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- >

Re: [PATCH 19/26] hw/ppc/spapr: Use usb_get_port_path()

2020-07-06 Thread Alistair Francis
On Sat, Jul 4, 2020 at 7:59 AM Philippe Mathieu-Daudé wrote: > > To avoid to access the USBDevice internals, and use the > recently added usb_get_port_path() helper instead. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > hw/ppc/spapr.c | 6 -- >

[PATCH] linux-user: Use EPROTONOSUPPORT for unimplemented netlink protocols

2020-07-06 Thread Josh Kunz
Linux uses the EPROTONOSUPPORT error code[1] if the users requests a netlink socket with an unsupported netlink protocol. This change switches linux-user to use the same code as Linux, instead of EPFNOSUPPORT (which AFAIK is just an anachronistic version of EAFNOSUPPORT). Tested by compiling all

[PATCH 19/21] tests/tcg/xtensa: add DFP0 arith tests

2020-07-06 Thread Max Filippov
Add test for basic double precision opcode properties. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_dfp0_arith.S | 153 + 1 file changed, 153 insertions(+) create mode 100644 tests/tcg/xtensa/test_dfp0_arith.S diff --git

[PATCH 18/21] tests/tcg/xtensa: test double precision load/store

2020-07-06 Thread Max Filippov
Add ldi[p]/sdi[p]/ldx[p]/sdx[p] opcode tests to test_lsc. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_lsc.S | 123 1 file changed, 123 insertions(+) diff --git a/tests/tcg/xtensa/test_lsc.S b/tests/tcg/xtensa/test_lsc.S index

[PATCH 15/21] tests/tcg/xtensa: update test_fp1 for DFPU

2020-07-06 Thread Max Filippov
DFPU sets Invalid flag in FSR when at least one argument of FP comparison opcodes is NaN, SNaN for most opcodes, any NaN for olt/ole. Add checks for FSR and expected FSR values. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_fp1.S | 62 - 1 file

[PATCH 17/21] tests/tcg/xtensa: add fp0 div and sqrt tests

2020-07-06 Thread Max Filippov
Test exact division/sqrt DFPU sequences. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_fp0_div.S | 82 tests/tcg/xtensa/test_fp0_sqrt.S | 76 + 2 files changed, 158 insertions(+) create mode 100644

[PATCH 11/21] tests/tcg/xtensa: fix test execution on ISS

2020-07-06 Thread Max Filippov
Space for test results may be allocated in IRAM which is only word-accessible. Use full 32-bit words to access test results. Signed-off-by: Max Filippov --- tests/tcg/xtensa/macros.inc | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/tcg/xtensa/macros.inc

[PATCH 16/21] tests/tcg/xtensa: update test_lsc for DFPU

2020-07-06 Thread Max Filippov
DFPU doesn't have pre-increment FP load/store opcodes, it has post-increment opcodes instead. Test increment opcodes present in the current config. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_lsc.S | 47 +++-- 1 file changed, 34 insertions(+), 13

[PATCH 14/21] tests/tcg/xtensa: update test_fp0_conv for DFPU

2020-07-06 Thread Max Filippov
DFPU conversion opcodes update FSR flags. Add FSR parameters and expected FSR register values for the conversion tests. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_fp0_conv.S | 299 --- 1 file changed, 155 insertions(+), 144 deletions(-) diff --git

[PATCH 08/21] target/xtensa: don't access BR regfile directly

2020-07-06 Thread Max Filippov
BR registers used in FPU comparison opcodes are available as opcode arguments for translators. Use them. This simplifies comparison helpers interface and makes them usable in FLIX bundles. Signed-off-by: Max Filippov --- target/xtensa/fpu_helper.c | 42 +-

[PATCH 06/21] target/xtensa: rename FPU2000 translators and helpers

2020-07-06 Thread Max Filippov
Add _s suffix to all FPU2000 opcode translators and helpers that also have double-precision variant to unify naming and allow adding DFPU implementations. Add _fpu2k_ to the name of wur_fcr helper to make space for the DFPU wur_fcr helper. Signed-off-by: Max Filippov ---

[PATCH 13/21] tests/tcg/xtensa: expand madd tests

2020-07-06 Thread Max Filippov
Test that madd doesn't do rounding after multiplication. Test NaN propagation rules for FPU2000 and DFPU madd opcode. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_fp0_arith.S | 88 +++ 1 file changed, 88 insertions(+) diff --git

[PATCH 10/21] target/xtensa: implement FPU division and square root

2020-07-06 Thread Max Filippov
This does not implement all opcodes related to div/sqrt as specified in the xtensa ISA, partly because the official specification is not complete and partly because precise implementation is unnecessarily complex. Instead instructions specific to the div/sqrt sequences are implemented differently,

[PATCH 12/21] tests/tcg/xtensa: update test_fp0_arith for DFPU

2020-07-06 Thread Max Filippov
DFPU arithmetic opcodes update FSR flags. Add FSR parameters and expected FSR register values for the arithmetic tests. Signed-off-by: Max Filippov --- tests/tcg/xtensa/fpu.h| 142 tests/tcg/xtensa/test_fp0_arith.S | 178 ++ 2

[PATCH 05/21] target/xtensa: support copying registers up to 64 bits wide

2020-07-06 Thread Max Filippov
FLIX dependency breaking code assumes that all registers are 32 bit wide. This may not always be correct. Extract actual register width from the associated register file and use it to create temporaries of correct width and generate correct data movement instructions. Signed-off-by: Max Filippov

[PATCH 09/21] target/xtensa: add DFP option, registers and opcodes

2020-07-06 Thread Max Filippov
DFPU may be configured with 32-bit or with 64-bit registers. Xtensa ISA does not specify how single-precision values are stored in 64-bit registers. Existing implementations store them in the low half of the registers. Add value extraction and write back to single-precision opcodes. Add new double

[PATCH 01/21] softfloat: make NO_SIGNALING_NANS runtime property

2020-07-06 Thread Max Filippov
target/xtensa, the only user of NO_SIGNALING_NANS macro has FPU implementations with and without the corresponding property. With NO_SIGNALING_NANS being a macro they cannot be a part of the same QEMU executable. Replace macro with new property in float_status to allow cores with different FPU

[PATCH 07/21] target/xtensa: move FSR/FCR register accessors

2020-07-06 Thread Max Filippov
Move FSR/FCR register accessors from core opcodes to FPU2000 opcodes as they are FPU2000-specific. Signed-off-by: Max Filippov --- target/xtensa/translate.c | 64 +++ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/target/xtensa/translate.c

[PATCH 04/21] target/xtensa: add geometry to xtensa_get_regfile_by_name

2020-07-06 Thread Max Filippov
Register file name may not uniquely identify a register file in the set of configurations. E.g. floating point registers may have different size in different configurations. Use register file geometry as additional identifier. Signed-off-by: Max Filippov --- target/xtensa/cpu.h | 2 +-

[PATCH 00/21] target/xtensa: implement double precision FPU

2020-07-06 Thread Max Filippov
Hello, this series implements double precision floating point unit option for target/xtensa, updates FPU tests and adds two new CPU cores, one with FPU2000 option and one with DFPU option. Max Filippov (21): softfloat: make NO_SIGNALING_NANS runtime property softfloat: pass float_status

[PATCH 03/21] softfloat: add xtensa specialization for pickNaNMulAdd

2020-07-06 Thread Max Filippov
pickNaNMulAdd logic on Xtensa is the same as pickNaN when applied to the expression (a * b) + c. So with two pickNaN variants there must be two pickNaNMulAdd variants. Cc: Peter Maydell Cc: "Alex Bennée" Signed-off-by: Max Filippov --- fpu/softfloat-specialize.inc.c | 18 ++ 1

[PATCH 02/21] softfloat: pass float_status pointer to pickNaN

2020-07-06 Thread Max Filippov
Pass float_status structure pointer to the pickNaN so that machine-specific settings are available to NaN selection code. Add use_first_nan property to float_status and use it in Xtensa-specific pickNaN. Cc: Peter Maydell Cc: "Alex Bennée" Signed-off-by: Max Filippov ---

Re: [PULL v2 12/64] target/riscv: add vector amo operations

2020-07-06 Thread Alistair Francis
On Sun, Jul 5, 2020 at 11:20 AM Peter Maydell wrote: > > On Thu, 2 Jul 2020 at 17:33, Alistair Francis > wrote: > > > > From: LIU Zhiwei > > > > Vector AMOs operate as if aq and rl bits were zero on each element > > with regard to ordering relative to other instructions in the same hart. > >

Re: [PATCH 08/26] hw/usb/hcd-dwc2: Restrict 'dwc2-regs.h' scope

2020-07-06 Thread Paul Zimmerman
On Sat, Jul 4, 2020 at 7:50 AM Philippe Mathieu-Daudé wrote: > We only use these register definitions in files under the > hw/usb/ directory. Keep that header local by moving it there. > > Signed-off-by: Philippe Mathieu-Daudé > --- > {include/hw => hw}/usb/dwc2-regs.h | 0 > hw/usb/hcd-dwc2.c

Re: [PATCH 06/26] hw/usb/hcd-dwc2: Remove unnecessary includes

2020-07-06 Thread Paul Zimmerman
On Sat, Jul 4, 2020 at 7:50 AM Philippe Mathieu-Daudé wrote: > "qemu/error-report.h" and "qemu/main-loop.h" are not used. > Remove them. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/usb/hcd-dwc2.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/hw/usb/hcd-dwc2.c

Re: [PATCH 07/26] hw/usb/hcd-dwc2: Restrict some headers to source

2020-07-06 Thread Paul Zimmerman
On Sat, Jul 4, 2020 at 7:50 AM Philippe Mathieu-Daudé wrote: > The header "usb/hcd-dwc2.h" doesn't need to include "qemu/timer.h", > "sysemu/dma.h", "hw/irq.h" (the types required are forward declared). > Include them in the source file which is the only one requiring the > function

Re: Failure prints during format or mounting a usb storage device

2020-07-06 Thread Paul Zimmerman
On 7/6/20 3:21 PM, Paul Zimmerman wrote: On Sat, Jul 4, 2020 at 11:24 AM Paul Zimmerman mailto:pauld...@gmail.com>> wrote: On Sat, Jul 4, 2020 at 11:21 AM Sai Pavan Boddu mailto:saip...@xilinx.com>> wrote: Hi, __ __ We are seeing some errors when a

Re: Failure prints during format or mounting a usb storage device

2020-07-06 Thread Paul Zimmerman
On Sat, Jul 4, 2020 at 11:24 AM Paul Zimmerman wrote: > > > On Sat, Jul 4, 2020 at 11:21 AM Sai Pavan Boddu > wrote: > >> Hi, >> >> >> >> We are seeing some errors when a usb-storage device is formatted or >> mounted on the guest. Below is commit I have bisected it. >> >> >> >> **

[PATCH 1/2] tpm: tpm_spapr: Exit on TPM backend failures

2020-07-06 Thread Stefan Berger
Exit on TPM backend failures in the same way as the TPM CRB and TIS device models do. Signed-off-by: Stefan Berger --- hw/tpm/tpm_spapr.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/tpm/tpm_spapr.c b/hw/tpm/tpm_spapr.c index cb4dfd1e6a..8288ab0a15 100644 ---

[PATCH 0/2] tpm: Some fixes

2020-07-06 Thread Stefan Berger
This series of patches fixes the TPM SPAPR device model so that it reacts in the same way as the other device models do when the backend device did not start up properly. It now calls exit(1). Also, due to a change in the TPM 2 code, the pcrUpdate counter now returns a different value than

[PATCH 2/2] tests: Skip over first 14 bytes when comparing TPM PCRRead result

2020-07-06 Thread Stefan Berger
Due to a change in the TPM 2 code the pcrUpdate counter in the PCRRead response is now different. The easiest way is to skip over the first 14 bytes and only compare the tail of the response. Signed-off-by: Stefan Berger --- tests/qtest/tpm-tests.c | 6 +++--- tests/qtest/tpm-util.c | 6 --

Re: [PATCH v3] SEV: QMP support for Inject-Launch-Secret

2020-07-06 Thread tobin
On 2020-07-06 17:54, Tobin Feldman-Fitzthum wrote: Not sure if v3 is necessary, but here it is. Fixed the 32-bit issues and removed the checks on header and secret length. I agree with Brijesh that those are best left to the PSP, which returns somewhat helpful errors if either are incorrect.

[PATCH v3] SEV: QMP support for Inject-Launch-Secret

2020-07-06 Thread Tobin Feldman-Fitzthum
AMD SEV allows a guest owner to inject a secret blob into the memory of a virtual machine. The secret is encrypted with the SEV Transport Encryption Key and integrity is guaranteed with the Transport Integrity Key. Although QEMU faciliates the injection of the launch secret, it cannot access the

[PATCH v2 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-07-06 Thread Alexander Duyck
From: Alexander Duyck Recently a feature named Free Page Reporting was added to the virtio balloon. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of 'report' with

[PATCH v2 2/3] virtio-balloon: Add locking to prevent possible race when starting hinting

2020-07-06 Thread Alexander Duyck
From: Alexander Duyck There is already locking in place when we are stopping free page hinting but there is not similar protections in place when we start. I can only assume this was overlooked as in most cases the page hinting should not be occurring when we are starting the hinting, however

[PATCH v2 0/3] virtio-balloon: Free page hinting clean-ups

2020-07-06 Thread Alexander Duyck
This series contains a couple minor cleanups related to free page hinting. The first patch addresses what I believe is a possible issue in which the driver could potentially force the device out of the stop state and back into the running state if it were to replay an earlier virtqueue element

[PATCH v2 1/3] virtio-balloon: Prevent guest from starting a report when we didn't request one

2020-07-06 Thread Alexander Duyck
From: Alexander Duyck Based on code review it appears possible for the driver to force the device out of a stopped state when hinting by repeating the last ID it was provided. Prevent this by only allowing a transition to the start state when we are in the requested state. This way the driver

Re: [PATCH] intel_iommu: Use correct shift for 256 bits qi descriptor

2020-07-06 Thread Peter Xu
On Sat, Jul 04, 2020 at 01:07:15AM -0700, Liu Yi L wrote: > In chapter 10.4.23 of VT-d spec 3.0, Descriptor Width bit was introduced > in VTD_IQA_REG. Sfotware could set this bit to tell VT-d the QI descriptor > from software would be 256 bits. Accordingly, the VTD_IQH_QH_SHIFT should > be 5 when

Re: [PULL v2 12/64] target/riscv: add vector amo operations

2020-07-06 Thread Richard Henderson
On 7/5/20 11:20 AM, Peter Maydell wrote: > On Thu, 2 Jul 2020 at 17:33, Alistair Francis > wrote: >> >> From: LIU Zhiwei >> >> Vector AMOs operate as if aq and rl bits were zero on each element >> with regard to ordering relative to other instructions in the same hart. >> Vector AMOs provide no

[PATCH v6 09/10] block: Add support to warn on backing file change without format

2020-07-06 Thread Eric Blake
For now, this is a mechanical addition; all callers pass false. But the next patch will use it to improve 'qemu-img rebase -u' when selecting a backing file with no format. Signed-off-by: Eric Blake Reviewed-by: Peter Krempa Reviewed-by: Ján Tomko --- include/block/block.h | 4 ++-- block.c

[PATCH v6 10/10] qemu-img: Deprecate use of -b without -F

2020-07-06 Thread Eric Blake
Creating an image that requires format probing of the backing image is potentially unsafe (we've had several CVEs over the years based on probes leaking information to the guest on a subsequent boot, although these days tools like libvirt are aware of the issue enough to prevent the worst

[PATCH v6 06/10] block: Error if backing file fails during creation without -u

2020-07-06 Thread Eric Blake
Back in commit 6e6e55f5 (Jul 2017, v2.10), we tweaked the code to warn if the backing file could not be opened but the user gave a size, unless the user also passes the -u option to bypass the open of the backing file. As one common reason for failure to open the backing file is when there is

[PATCH v6 05/10] qcow: Tolerate backing_fmt=

2020-07-06 Thread Eric Blake
qcow has no space in the metadata to store a backing format, and there are existing qcow images backed both by raw or by other formats (usually qcow) images, reliant on probing to tell the difference. On the bright side, because we probe every time, raw files are marked as probed and we thus

[PATCH v6 07/10] qcow2: Deprecate use of qemu-img amend to change backing file

2020-07-06 Thread Eric Blake
The use of 'qemu-img amend' to change qcow2 backing files is not tested very well. In particular, our implementation has a bug where if a new backing file is provided without a format, then the prior format is blindly reused, even if this results in data corruption, but this is not caught by

[PATCH v6 01/10] qemu-img: Flush stdout before before potential stderr messages

2020-07-06 Thread Eric Blake
During 'qemu-img create ... 2>&1', if --quiet is not in force, we can end up with buffered I/O in stdout that was produced before failure, but which appears in output after failure. This is confusing; the fix is to flush stdout prior to attempting anything that might produce an error message.

[PATCH v6 04/10] vmdk: Add trivial backing_fmt support

2020-07-06 Thread Eric Blake
vmdk already requires that if backing_file is present, that it be another vmdk image (see vmdk_co_do_create). Meanwhile, we want to move towards always being explicit about the backing format for other drivers where it matters. So for convenience, make qemu-img create -F vmdk work, while

[PATCH v6 03/10] sheepdog: Add trivial backing_fmt support

2020-07-06 Thread Eric Blake
Sheepdog already requires that if backing_file is present, that it be another sheepdog image (see sd_co_create). Meanwhile, we want to move towards always being explicit about the backing format for other drivers where it matters. So for convenience, make qemu-img create -F sheepdog work, while

[PATCH v6 00/10] Tighten qemu-img rules on missing backing format

2020-07-06 Thread Eric Blake
v5 was here: https://lists.gnu.org/archive/html/qemu-devel/2020-04/msg00679.html In v6: - add a few more patches - change qcow semantics based on several iterations of mailing list debates on what behavior is easiest to support - add iotesting that a probed raw file cannot be committed into -

[PATCH v6 02/10] block: Finish deprecation of 'qemu-img convert -n -o'

2020-07-06 Thread Eric Blake
It's been two releases since we started warning; time to make the combination an error as promised. There was no iotest coverage, so add some. While touching the documentation, tweak another section heading for consistent style. Signed-off-by: Eric Blake --- docs/system/deprecated.rst | 18

Re: [PATCH v3 00/19] mailmap: Add more entries to sanitize 'git log' output

2020-07-06 Thread Ed Maste
On Thu, 2 Jul 2020 at 14:12, wrote: > > Patchew URL: https://patchew.org/QEMU/20200702173818.14651-1-f4...@amsat.org/ > > Hi, > > This series failed build test on FreeBSD host. Please find the details below. I had a look at this (because it's a FreeBSD report); it appears to have been a

Re: [PATCH v7 1/8] mac_oldworld: Allow loading binary ROM image

2020-07-06 Thread Mark Cave-Ayland
On 05/07/2020 08:31, David Gibson wrote: > On Tue, Jun 30, 2020 at 11:45:42PM +0200, BALATON Zoltan wrote: >> On Tue, 30 Jun 2020, Mark Cave-Ayland wrote: >>> On 29/06/2020 19:55, BALATON Zoltan wrote: The beige G3 Power Macintosh has a 4MB firmware ROM. Fix the size of the rom region

[PATCH] target/arm: Fix mtedesc for do_mem_zpz

2020-07-06 Thread Richard Henderson
The mtedesc that was contructed was not actually passed in. Found by Coverity (CID 1429996). Fixes: d28d12f008e Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/translate-sve.c

Re: [PATCH 02/13] qcow2: introduce icount field for snapshots

2020-07-06 Thread Eric Blake
On 6/26/20 5:19 AM, Pavel Dovgalyuk wrote: From: Pavel Dovgalyuk This patch introduces the icount field for saving within the snapshot. It is required for navigation between the snapshots in record/replay mode. Signed-off-by: Pavel Dovgalyuk Acked-by: Kevin Wolf --- 0 files changed

[PATCH 0/4] fuzz: misc patches

2020-07-06 Thread Alexander Bulekov
Hi, This removes ASan from the default build of the device fuzzer (it can be enabled using --enable-sanitizers) and adds some content to the documentation. This set also contains a respin of this patch: https://patchew.org/QEMU/20200524143738.23218-1-alx...@bu.edu/ Thanks -Alex Alexander

Re: [PATCH v3 29/44] qom: Make functions taking Error ** return bool, not 0/-1

2020-07-06 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 06.07.2020 11:09, Markus Armbruster wrote: >> Just for consistency. Also fix the example in object_set_props()'s >> documentation. >> >> Signed-off-by: Markus Armbruster >> Reviewed-by: Eric Blake > > Reviewed-by: Vladimir Sementsov-Ogievskiy > >

[PULL 0/3] M68k next patches

2020-07-06 Thread Laurent Vivier
-request for you to fetch changes up to d159dd058c7dc48a9291fde92eaae52a9f26a4d1: softfloat,m68k: disable floatx80_invalid_encoding() for m68k (2020-07-06 21:41:52 +0200) m68k pull-request 20200706 disable

[PULL 3/3] softfloat, m68k: disable floatx80_invalid_encoding() for m68k

2020-07-06 Thread Laurent Vivier
According to the comment, this definition of invalid encoding is given by intel developer's manual, and doesn't comply with 680x0 FPU. With m68k, the explicit integer bit can be zero in the case of: - zeros(exp == 0, mantissa == 0) - denormalized numbers (exp == 0, mantissa !=

[PULL 2/3] target/m68k: consolidate physical translation offset into get_physical_address()

2020-07-06 Thread Laurent Vivier
From: Mark Cave-Ayland Since all callers to get_physical_address() now apply the same page offset to the translation result, move the logic into get_physical_address() itself to avoid duplication. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier

[PULL 1/3] target/m68k: fix physical address translation in m68k_cpu_get_phys_page_debug()

2020-07-06 Thread Laurent Vivier
From: Mark Cave-Ayland The result of the get_physical_address() function should be combined with the offset of the original page access before being returned. Otherwise the m68k_cpu_get_phys_page_debug() function can round to the wrong page causing incorrect lookups in gdbstub and various

Re: [PATCH v3 06/44] qemu-option: Check return value instead of @err where convenient

2020-07-06 Thread Markus Armbruster
Greg Kurz writes: > On Mon, 6 Jul 2020 10:09:12 +0200 > Markus Armbruster wrote: > >> Convert uses like >> >> opts = qemu_opts_create(..., ); >> if (err) { >> ... >> } >> >> to >> >> opts = qemu_opts_create(..., ); > > The patch doesn't strictly do that since it also

[PATCH 2/4] docs/fuzz: describe building fuzzers with enable-sanitizers

2020-07-06 Thread Alexander Bulekov
Signed-off-by: Alexander Bulekov --- docs/devel/fuzzing.txt | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/devel/fuzzing.txt b/docs/devel/fuzzing.txt index 324d2cd92b..382ade974e 100644 --- a/docs/devel/fuzzing.txt +++ b/docs/devel/fuzzing.txt @@ -23,9 +23,12 @@

[PATCH 3/4] docs/fuzz: add information about useful libFuzzer flags

2020-07-06 Thread Alexander Bulekov
Signed-off-by: Alexander Bulekov --- docs/devel/fuzzing.txt | 37 + 1 file changed, 37 insertions(+) diff --git a/docs/devel/fuzzing.txt b/docs/devel/fuzzing.txt index 382ade974e..284d57f8fd 100644 --- a/docs/devel/fuzzing.txt +++ b/docs/devel/fuzzing.txt @@

[PATCH 1/4] fuzz: build without AddressSanitizer, by default

2020-07-06 Thread Alexander Bulekov
We already have a nice --enable-sanitizers option to enable AddressSanitizer. There is no reason to duplicate and force this functionality in --enable-fuzzing. In the future, if more sanitizers are added to --enable-sanitizers, it might be impossible to build with both --enable-sanitizers and

[PATCH 4/4] docs/fuzz: add instructions for generating a coverage report

2020-07-06 Thread Alexander Bulekov
Signed-off-by: Alexander Bulekov --- docs/devel/fuzzing.txt | 19 +++ 1 file changed, 19 insertions(+) diff --git a/docs/devel/fuzzing.txt b/docs/devel/fuzzing.txt index 284d57f8fd..a9816ffce9 100644 --- a/docs/devel/fuzzing.txt +++ b/docs/devel/fuzzing.txt @@ -85,6 +85,25 @@

Re: [PATCH 00/13] Reverse debugging

2020-07-06 Thread Alex Bennée
Pavel Dovgalyuk writes: > Ping. I started going through this and then ran into some merge conflicts. Are all the pre-requisite patches now merged via Paolo's tree? -- Alex Bennée

Re: [PATCH v4 1/2] target/m68k: fix physical address translation in m68k_cpu_get_phys_page_debug()

2020-07-06 Thread Laurent Vivier
Le 01/07/2020 à 22:15, Mark Cave-Ayland a écrit : > The result of the get_physical_address() function should be combined with the > offset of the original page access before being returned. Otherwise the > m68k_cpu_get_phys_page_debug() function can round to the wrong page causing > incorrect

  1   2   3   4   5   >