[PATCH v2] Docs/RCU: Correct sample code of qatomic_rcu_set

2021-01-05 Thread Keqian Zhu
Correct sample code to avoid confusing readers. Signed-off-by: Keqian Zhu Cc: qemu-triv...@nongnu.org Reviewed-by: Paolo Bonzini Reviewed-by: Peter Xu --- v2: - Add Cc and R-b. --- docs/devel/rcu.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/devel/rcu.txt b/do

Re: [PATCH v2 0/2] accel: kvm: Some bugfixes for kvm dirty log

2021-01-05 Thread Keqian Zhu
Friendly ping ... Hi, please queue this well reviewed series, Thanks :-) Keqian On 2020/12/17 9:49, Keqian Zhu wrote: > Hi all, > > This series fixes memory waste and adds alignment check for unmatched > qemu_real_host_page_size and TARGET_PAGE_SIZE. > > Thanks. > > Keqian Zhu (2): > accel:

[PATCH v3 4/4] docs/system: arm: Add sabrelite board description

2021-01-05 Thread Bin Meng
From: Bin Meng This adds the target guide for SABRE Lite board, and documents how to boot a Linux kernel and U-Boot bootloader. Signed-off-by: Bin Meng Reviewed-by: Alex Bennée --- Changes in v3: - correct 2 typos in sabrelite.rst Changes in v2: - new patch: add sabrelite target guide doc

[PATCH v3 2/4] hw/msic: imx6_ccm: Correct register value for silicon type

2021-01-05 Thread Bin Meng
From: Bin Meng Currently when U-Boot boots, it prints "??" for i.MX processor: CPU: Freescale i.MX?? rev1.0 at 792 MHz The register that was used to determine the silicon type is undocumented in the latest IMX6DQRM (Rev. 6, 05/2020), but we can refer to get_cpu_rev() in arch/arm/mach-imx/mx

[PATCH v3 1/4] hw/misc: imx6_ccm: Update PMU_MISC0 reset value

2021-01-05 Thread Bin Meng
From: Bin Meng U-Boot expects PMU_MISC0 register bit 7 is set (see init_bandgap() in arch/arm/mach-imx/mx6/soc.c) during boot. This bit indicates the bandgap has stabilized. With this change, the latest upstream U-Boot (v2021.01-rc3) for imx6 sabrelite board (mx6qsabrelite_defconfig), with a sli

[PATCH v3 3/4] hw/arm: sabrelite: Connect the Ethernet PHY at address 6

2021-01-05 Thread Bin Meng
From: Bin Meng At present, when booting U-Boot on QEMU sabrelite, we see: Net: Board Net Initialization Failed No ethernet found. U-Boot scans PHY at address 4/5/6/7 (see board_eth_init() in the U-Boot source: board/boundary/nitrogen6x/nitrogen6x.c). On the real board, the Ethernet PHY is

[PATCH v3 0/4] hw/arm: sabrelite: Improve emulation fidelity to allow booting upstream U-Boot

2021-01-05 Thread Bin Meng
From: Bin Meng At present the upstream U-Boot (as of today, v2021.01-rc3) does not boot on QEMU sabrelite machine. This fixes several issues to improve emulation fidelity of the i.MX6 sabrelite board. With this series, upstream U-Boot can boot to U-Boot command shell. While we are here, add a t

Re: [PULL 00/22] ppc-for-6.0 queue 20210106

2021-01-05 Thread BALATON Zoltan via
On Wed, 6 Jan 2021, David Gibson wrote: The following changes since commit 52d25464605dc20022ad94aa8bc8e8473e600833: Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210104' into staging (2021-01-05 16:18:20 +) are available in the Git repository at: https://gitlab.com/d

Re: [PATCH 1/2] hw/ssi: imx_spi: Correct the burst length > 32 bit transfer logic

2021-01-05 Thread Bin Meng
On Thu, Dec 31, 2020 at 6:31 PM Philippe Mathieu-Daudé wrote: > > On 12/17/20 6:28 AM, Bin Meng wrote: > > From: Bin Meng > > > > For the ECSPIx_CONREG register BURST_LENGTH field, the manual says: > > > > 0x020 A SPI burst contains the 1 LSB in first word and all 32 bits in > > second word. > >

Re: [PATCH v2 1/2] hw/ssi: imx_spi: Use a macro for number of chip selects supported

2021-01-05 Thread Bin Meng
On Wed, Jan 6, 2021 at 8:22 AM Bin Meng wrote: > > On Wed, Jan 6, 2021 at 5:11 AM Peter Maydell wrote: > > > > On Tue, 5 Jan 2021 at 21:09, Alistair Francis wrote: > > > > > > On Wed, Dec 16, 2020 at 2:25 AM Bin Meng wrote: > > > > > > > > Hi Alistair, Peter, > > > > > > > > On Wed, Dec 2, 2020

[PATCH v2 4/4] hw/ssi: imx_spi: Correct tx and rx fifo endianness

2021-01-05 Thread Bin Meng
From: Bin Meng The endianness of data exchange between tx and rx fifo is incorrect. Earlier bytes are supposed to show up on MSB and later bytes on LSB, ie: in big endian. The manual does not explicitly say this, but the U-Boot and Linux driver codes have a swap on the data transferred to tx fifo

[PATCH v2 3/4] hw/ssi: imx_spi: Correct the burst length > 32 bit transfer logic

2021-01-05 Thread Bin Meng
From: Bin Meng For the ECSPIx_CONREG register BURST_LENGTH field, the manual says: 0x020 A SPI burst contains the 1 LSB in first word and all 32 bits in second word. 0x021 A SPI burst contains the 2 LSB in first word and all 32 bits in second word. Current logic uses either s->burst_length or

[PATCH v2 1/4] hw/ssi: imx_spi: Use a macro for number of chip selects supported

2021-01-05 Thread Bin Meng
From: Bin Meng Avoid using a magic number (4) everywhere for the number of chip selects supported. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- (no changes since v1) include/hw/ssi/imx_spi.h | 5 - hw/ssi/imx_spi.c | 4 ++-- 2 files changed, 6 insertions(+), 3 delet

[PATCH v2 2/4] hw/ssi: imx_spi: Disable chip selects in imx_spi_reset()

2021-01-05 Thread Bin Meng
From: Xuzhou Cheng When a write to ECSPI_CONREG register to disable the SPI controller, imx_spi_reset() is called to reset the controller, during which CS lines should have been disabled, otherwise the state machine of any devices (e.g.: SPI flashes) connected to the SPI master is stuck to its la

[PATCH v2 0/4] hw/ssi: imx_spi: Fix various bugs in the imx_spi model

2021-01-05 Thread Bin Meng
From: Bin Meng This series fixes a bunch of bugs in current implementation of the imx spi controller, including the following issues: - chip select signal was not lower down when spi controller is reset - transfer incorrect data when the burst length is larger than 32 bit - spi controller tx and

RE: [PATCH v3 3/3] vmstate: Fix memory leak in vmstate_handle_alloc()

2021-01-05 Thread gaojinhao
Thank you for review! Jinhao Gao -Original Message- From: Dr. David Alan Gilbert [mailto:dgilb...@redhat.com] Sent: 2021年1月5日 19:18 To: gaojinhao Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org; Michael S . Tsirkin ; David Gibson ; Greg Kurz ; Marc-André Lureau ; Stefan Berger ; Jason

Re: [PATCH v3 04/15] target/mips/mips-defs: Introduce CPU_MIPS64 and cpu_type_is_64bit()

2021-01-05 Thread Philippe Mathieu-Daudé
On 1/6/21 5:23 AM, Jiaxun Yang wrote: > 在 2021/1/5 下午6:05, Philippe Mathieu-Daudé 写道: [...] >>> I based the decodetree logic on the R6 ISA manual, decoding the >>> bits from the more recent feature (a leaf) to the root, following >>> this tree: >>> https://images.anandtech.com/doci/8457/MIPS%20ISA%

[PATCH v2] qtest/libqtest: fix heap-buffer-overflow in qtest_cb_for_every_machine()

2021-01-05 Thread Gan Qixin
When the length of mname is less than 5, memcpy("xenfv", mname, 5) will cause heap buffer overflow. Therefore, use strncmp to avoid this problem. The asan showed stack: ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020f2f4 at pc 0x7f65d8cc2225 bp 0x7ffe93cc5a60 sp 0x7ffe93cc5208

Re: [PATCH v3 04/15] target/mips/mips-defs: Introduce CPU_MIPS64 and cpu_type_is_64bit()

2021-01-05 Thread Jiaxun Yang
在 2021/1/5 下午6:05, Philippe Mathieu-Daudé 写道: Hi Richard, On 1/5/21 9:34 AM, Philippe Mathieu-Daudé wrote: On 1/5/21 12:30 AM, Richard Henderson wrote: On 1/4/21 12:11 PM, Philippe Mathieu-Daudé wrote: MIPS 64-bit ISA is introduced with MIPS3. Introduce the CPU_MIPS64 definition aliased to t

[PULL 22/22] ppc440_pcix: Fix up pci config access

2021-01-05 Thread David Gibson
From: BALATON Zoltan via This fixes a long standing issue with MorphOS booting on sam460ex which turns out to be because of suspicious values written to PCI config address that apparently works on real machine but caused wrong access on this device model. This replaces a previous work around for

[PULL 20/22] ppc440_pcix: Improve comment for IRQ mapping

2021-01-05 Thread David Gibson
From: BALATON Zoltan via The code mapping all PCI interrupts to a single CPU IRQ works but is not trivial so document it in a comment. Signed-off-by: BALATON Zoltan Message-Id: Reviewed-by: Peter Maydell Signed-off-by: David Gibson --- hw/ppc/ppc440_pcix.c | 11 +-- 1 file changed,

[PULL 21/22] ppc440_pcix: Fix register write trace event

2021-01-05 Thread David Gibson
From: BALATON Zoltan via The trace event for pci_host_config_write() was also using the trace event for read. Add corresponding trace and correct this. Signed-off-by: BALATON Zoltan Message-Id: Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Gibson --- hw/ppc/ppc440_pcix.c | 2 +-

[PULL 16/22] ppc: Simplify reverse dependencies of POWERNV and PSERIES on XICS and XIVE

2021-01-05 Thread David Gibson
From: Greg Kurz Have PSERIES to select XICS and XIVE, and directly check PSERIES in hw/intc/meson.build to enable build of the XICS and XIVE sPAPR backends, like POWERNV already does. This allows to get rid of the intermediate XICS_SPAPR and XIVE_SPAPR. Signed-off-by: Greg Kurz Message-Id: <160

[PULL 18/22] ppc4xx: Move common dependency on serial to common option

2021-01-05 Thread David Gibson
From: BALATON Zoltan via All machines that select SERIAL also select PPC4XX so we can just add this common dependency there once. Signed-off-by: BALATON Zoltan Message-Id: <94f1eb7cfb7f315bd883d825f3ce7e0cfc2f2b69.1609636173.git.bala...@eik.bme.hu> Signed-off-by: David Gibson --- hw/ppc/Kcon

[PULL 13/22] spapr: Use spapr_drc_reset_all() at machine reset

2021-01-05 Thread David Gibson
From: Greg Kurz Documentation of object_child_foreach_recursive() clearly stipulates that "it is forbidden to add or remove children from @obj from the @fn callback". But this is exactly what we do during machine reset. The call to spapr_drc_reset() can finalize the hot-unplug sequence of a PHB o

[PULL 15/22] ppc: Fix build with --without-default-devices

2021-01-05 Thread David Gibson
From: Greg Kurz Linking of the qemu-system-ppc64 fails on a POWER9 host when --without-default-devices is passed to configure: $ ./configure --without-default-devices \ --target-list=ppc64-softmmu && make ... libqemu-ppc64-softmmu.fa.p/hw_ppc_e500.c.o: In function `ppce500_init_m

[PULL 11/22] spapr: Fix reset of transient DR connectors

2021-01-05 Thread David Gibson
From: Greg Kurz Documentation of object_property_iter_init() clearly stipulates that "it is forbidden to modify the property list while iterating". But this is exactly what we do when resetting transient DR connectors during CAS. The call to spapr_drc_reset() can finalize the hot-unplug sequence

[PULL 19/22] sam460ex: Remove FDT_PPC dependency from KConfig

2021-01-05 Thread David Gibson
From: BALATON Zoltan via Dependency on FDT_PPC was added in commit b0048f76095 ("hw/ppc/Kconfig: Only select FDT helper for machines using it") but it does not seem to be really necessary so remove it again. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Message-Id: <7461a2

[PULL 05/22] spapr: DRC lookup cannot fail

2021-01-05 Thread David Gibson
From: Greg Kurz All memory DRC objects are created during machine init. It is thus safe to assume spapr_drc_by_id() cannot return NULL when hot-plug/unplugging memory. Make this clear with an assertion, like the code already does a few lines above when looping over memory DRCs. This fixes Coveri

[PULL 17/22] pnv: Fix reverse dependency on PCI express root ports

2021-01-05 Thread David Gibson
From: Greg Kurz qemu-system-ppc64 built with --without-default-devices crashes: Type 'pnv-phb4-root-port' is missing its parent 'pcie-root-port-base' Aborted (core dumped) Have POWERNV to select PCIE_PORT. This is done through a new PCI_POWERNV config in hw/pci-host/Kconfig since POWERNV doesn'

[PULL 08/22] spapr: Allow memory unplug to always succeed

2021-01-05 Thread David Gibson
From: Greg Kurz It is currently impossible to hot-unplug a memory device between machine reset and CAS. (qemu) device_del dimm1 Error: Memory hot unplug not supported for this guest This limitation was introduced in order to provide an explicit error path for older guests that didn't support ho

[PULL 12/22] spapr: Introduce spapr_drc_reset_all()

2021-01-05 Thread David Gibson
From: Greg Kurz No need to expose the way DRCs are traversed outside of spapr_drc.c. Signed-off-by: Greg Kurz Message-Id: <20201218103400.689660-4-gr...@kaod.org> Reviewed-by: Daniel Henrique Barboza Tested-by: Daniel Henrique Barboza Signed-off-by: David Gibson --- hw/ppc/spapr_drc.c

[PULL 14/22] spapr: Add drc_ prefix to the DRC realize and unrealize functions

2021-01-05 Thread David Gibson
From: Greg Kurz Use a less generic name for an easier experience with tools such as cscope or grep. Signed-off-by: Greg Kurz Message-Id: <20201218103400.689660-6-gr...@kaod.org> Reviewed-by: Daniel Henrique Barboza Tested-by: Daniel Henrique Barboza Signed-off-by: David Gibson --- hw/ppc/sp

[PULL 10/22] spapr: Call spapr_drc_reset() for all DRCs at CAS

2021-01-05 Thread David Gibson
From: Greg Kurz Non-transient DRCs are either in the empty or the ready state, which means spapr_drc_reset() doesn't change their state. It is thus not needed to do any checking. Call spapr_drc_reset() unconditionally and squash spapr_drc_transient() into its only user, spapr_drc_needed(). Signe

[PULL 07/22] spapr: Fix DR properties of the root node

2021-01-05 Thread David Gibson
From: Greg Kurz Section 13.5.2 of LoPAPR mandates various DR related indentifiers for all hot-pluggable entities to be exposed in the "ibm,drc-indexes", "ibm,drc-power-domains", "ibm,drc-names" and "ibm,drc-types" properties of their parent node. These properties are created with spapr_dt_drc().

[PULL 06/22] spapr/xive: Make spapr_xive_pic_print_info() static

2021-01-05 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Message-Id: <20201215174025.2636824-1-...@kaod.org> Signed-off-by: David Gibson --- hw/intc/spapr_xive.c| 2 +- include/hw/ppc/spapr_xive.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/intc/spapr_xive.c

[PULL 09/22] spapr: Fix buffer overflow in spapr_numa_associativity_init()

2021-01-05 Thread David Gibson
From: Greg Kurz Running a guest with 128 NUMA nodes crashes QEMU: ../../util/error.c:59: error_setv: Assertion `*errp == NULL' failed. The crash happens when setting the FWNMI migration blocker: 2861if (spapr_get_cap(spapr, SPAPR_CAP_FWNMI) == SPAPR_CAP_ON) { 2862/* Create

[PULL 01/22] hw/ppc/ppc4xx_devs: Make code style fixes to UIC code

2021-01-05 Thread David Gibson
From: Peter Maydell In a following commit we will move the PPC UIC implementation to its own file in hw/intc. To prevent checkpatch complaining about that code-motion, fix up the minor style issues first. Signed-off-by: Peter Maydell Message-Id: <20201212001537.24520-2-peter.mayd...@linaro.org>

[PULL 02/22] ppc: Convert PPC UIC to a QOM device

2021-01-05 Thread David Gibson
From: Peter Maydell Currently the PPC UIC ("Universal Interrupt Controller") is implemented as a non-QOM device in ppc4xx_devs.c. Convert it to a proper QOM device in hw/intc. The ppcuic_init() function is retained for the moment with its current interface; in subsequent commits this will be tid

[PULL 03/22] hw/ppc/virtex_ml507: Drop use of ppcuic_init()

2021-01-05 Thread David Gibson
From: Peter Maydell Switch the virtex_ml507 board to directly creating and configuring the UIC, rather than doing it via the old ppcuic_init() helper function. This fixes a trivial Coverity-detected memory leak where we were leaking the array of IRQs returned by ppcuic_init(). Fixes: Coverity C

[PULL 04/22] hw/ppc/ppc440_bamboo: Drop use of ppcuic_init()

2021-01-05 Thread David Gibson
From: Peter Maydell Switch the bamboo board to directly creating and configuring the UIC, rather than doing it via the old ppcuic_init() helper function. Signed-off-by: Peter Maydell Message-Id: <20201212001537.24520-5-peter.mayd...@linaro.org> Signed-off-by: David Gibson --- hw/ppc/ppc440_ba

[PULL 00/22] ppc-for-6.0 queue 20210106

2021-01-05 Thread David Gibson
The following changes since commit 52d25464605dc20022ad94aa8bc8e8473e600833: Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210104' into staging (2021-01-05 16:18:20 +) are available in the Git repository at: https://gitlab.com/dgibson/qemu.git tags/ppc-for-6.0-2021010

Re: [PATCH] RISC-V: Place DTB at 3GB boundary instead of 4GB

2021-01-05 Thread Atish Patra
On Wed, 2021-01-06 at 08:04 +0800, Bin Meng wrote: > Hi Atish, > > On Wed, Jan 6, 2021 at 7:44 AM Atish Patra > wrote: > > > > On Tue, 2021-01-05 at 11:11 +0800, Bin Meng wrote: > > > On Fri, Dec 18, 2020 at 5:48 AM Atish Patra > > > wrote: > > > > > > > > Currently, we place the DTB at 2MB fr

[Bug 1908266] Re: spice unnecessary forces nographic

2021-01-05 Thread Tom Yan
Does the spice protocol / any spice client allow access to compatmonitor / serial /paralel? Spice can be (if not often / mainly) used for remote access like VNC, but that does not necessarily mean users would want to host "fully- headless". -- You received this bug notification because you are a

Re: [PATCH v2 1/2] hw/ssi: imx_spi: Use a macro for number of chip selects supported

2021-01-05 Thread Bin Meng
On Wed, Jan 6, 2021 at 5:11 AM Peter Maydell wrote: > > On Tue, 5 Jan 2021 at 21:09, Alistair Francis wrote: > > > > On Wed, Dec 16, 2020 at 2:25 AM Bin Meng wrote: > > > > > > Hi Alistair, Peter, > > > > > > On Wed, Dec 2, 2020 at 10:45 PM Bin Meng wrote: > > > > > > > > From: Bin Meng > > >

Re: [PATCH] RISC-V: Place DTB at 3GB boundary instead of 4GB

2021-01-05 Thread Bin Meng
Hi Atish, On Wed, Jan 6, 2021 at 7:44 AM Atish Patra wrote: > > On Tue, 2021-01-05 at 11:11 +0800, Bin Meng wrote: > > On Fri, Dec 18, 2020 at 5:48 AM Atish Patra > > wrote: > > > > > > Currently, we place the DTB at 2MB from 4GB or end of DRAM which > > > ever is > > > lesser. However, Linux ke

Re: [PATCH] RISC-V: Place DTB at 3GB boundary instead of 4GB

2021-01-05 Thread Atish Patra
On Tue, 2021-01-05 at 11:11 +0800, Bin Meng wrote: > On Fri, Dec 18, 2020 at 5:48 AM Atish Patra > wrote: > > > > Currently, we place the DTB at 2MB from 4GB or end of DRAM which > > ever is > > lesser. However, Linux kernel can address only 1GB of memory for > > RV32. > > Thus, it can not map an

Re: [PATCH v2] tcg: Fix execution on Apple Silicon

2021-01-05 Thread Alex Bennée
Roman Bolshakov writes: > On Mon, Jan 04, 2021 at 03:23:07PM +, Alex Bennée wrote: >> >> Roman Bolshakov writes: >> >> > Pages can't be both write and executable at the same time on Apple >> > Silicon. macOS provides public API to switch write protection [1] for >> > JIT applications, li

Re: [for-6.0 v5 10/13] spapr: Add PEF based securable guest memory

2021-01-05 Thread Ram Pai
On Fri, Dec 04, 2020 at 04:44:12PM +1100, David Gibson wrote: > Some upcoming POWER machines have a system called PEF (Protected > Execution Facility) which uses a small ultravisor to allow guests to > run in a way that they can't be eavesdropped by the hypervisor. The > effect is roughly similar

Re: [PATCH v4 0/6] Additional NPCM7xx devices

2021-01-05 Thread Hao Wu via
Ping? On Wed, Dec 16, 2020 at 4:45 PM Hao Wu wrote: > This patch series include a few more NPCM7XX devices including > > - Analog Digital Converter (ADC) > - Pulse Width Modulation (PWM) > > We also modified the CLK module to generate clock values using qdev_clock. > These clocks are used to det

Re: [PATCH v2] tcg: Fix execution on Apple Silicon

2021-01-05 Thread Roman Bolshakov
On Mon, Jan 04, 2021 at 06:02:50PM -0800, Joelle van Dyne wrote: > Tested-by: Joelle van Dyne > > It works for me. But one thing is that if you build it with the macOS > 11.x SDK it won't run on < 11.x. This is why apple recommends > something like: > > if (__builtin_available(macOS 11,

Re: [PATCH v2] tcg: Fix execution on Apple Silicon

2021-01-05 Thread Roman Bolshakov
On Mon, Jan 04, 2021 at 08:28:08PM +, Alex Bennée wrote: > > Alexander Graf writes: > > > On 04.01.21 16:23, Alex Bennée wrote: > >> Roman Bolshakov writes: > >> > >>> Pages can't be both write and executable at the same time on Apple > >>> Silicon. macOS provides public API to switch write

Re: [PATCH v2] tcg: Fix execution on Apple Silicon

2021-01-05 Thread Roman Bolshakov
On Mon, Jan 04, 2021 at 07:39:13PM +0100, Alexander Graf wrote: > > On 04.01.21 16:23, Alex Bennée wrote: > > Roman Bolshakov writes: > > > > > Pages can't be both write and executable at the same time on Apple > > > Silicon. macOS provides public API to switch write protection [1] for > > > JIT

Re: [PATCH 02/22] hw/block: m25p80: Add various ISSI flash information

2021-01-05 Thread Alistair Francis
On Thu, Dec 31, 2020 at 3:32 AM Bin Meng wrote: > > From: Bin Meng > > This updates the flash information table to include various ISSI > flashes that are supported by upstream U-Boot and Linux kernel. > > Signed-off-by: Bin Meng Acked-by: Alistair Francis Alistair > --- > > hw/block/m25p80

Re: [PATCH v5 1/2] hw/block: m25p80: Don't write to flash if write is disabled

2021-01-05 Thread Alistair Francis
On Mon, Jan 4, 2021 at 7:50 PM Bin Meng wrote: > > On Wed, Dec 23, 2020 at 10:00 AM Bin Meng wrote: > > > > From: Bin Meng > > > > When write is disabled, the write to flash should be avoided > > in flash_write8(). > > > > Fixes: 82a2499011a7 ("m25p80: Initial implementation of SPI flash device"

Re: [PATCH v2 1/2] hw/ssi: imx_spi: Use a macro for number of chip selects supported

2021-01-05 Thread Alistair Francis
On Tue, Jan 5, 2021 at 1:08 PM Alistair Francis wrote: > > On Wed, Dec 16, 2020 at 2:25 AM Bin Meng wrote: > > > > Hi Alistair, Peter, > > > > On Wed, Dec 2, 2020 at 10:45 PM Bin Meng wrote: > > > > > > From: Bin Meng > > > > > > Avoid using a magic number (4) everywhere for the number of chip

Re: [PATCH v2 1/2] hw/ssi: imx_spi: Use a macro for number of chip selects supported

2021-01-05 Thread Peter Maydell
On Tue, 5 Jan 2021 at 21:09, Alistair Francis wrote: > > On Wed, Dec 16, 2020 at 2:25 AM Bin Meng wrote: > > > > Hi Alistair, Peter, > > > > On Wed, Dec 2, 2020 at 10:45 PM Bin Meng wrote: > > > > > > From: Bin Meng > > > > > > Avoid using a magic number (4) everywhere for the number of chip >

Re: [PATCH v2 1/2] hw/ssi: imx_spi: Use a macro for number of chip selects supported

2021-01-05 Thread Alistair Francis
On Wed, Dec 16, 2020 at 2:25 AM Bin Meng wrote: > > Hi Alistair, Peter, > > On Wed, Dec 2, 2020 at 10:45 PM Bin Meng wrote: > > > > From: Bin Meng > > > > Avoid using a magic number (4) everywhere for the number of chip > > selects supported. > > > > Signed-off-by: Bin Meng > > Reviewed-by: Ali

Re: [PULL 0/3] tcg patch queue

2021-01-05 Thread Peter Maydell
On Mon, 4 Jan 2021 at 17:35, Richard Henderson wrote: > > The following changes since commit 41192db338588051f21501abc13743e62b0a5605: > > Merge remote-tracking branch > 'remotes/ehabkost-gl/tags/machine-next-pull-request' into staging (2021-01-01 > 22:57:15 +) > > are available in the Git

Re: [PATCH v2] gdb: riscv: Add target description

2021-01-05 Thread Alistair Francis
On Wed, Dec 30, 2020 at 12:26 AM Sylvain Pelissier wrote: > > Target description is not currently implemented in RISC-V architecture. Thus > GDB won't set it properly when attached. The patch implements the target > description response. > > Signed-off-by: Sylvain Pelissier Hello, This patch

Re: [PATCH] RISC-V: Place DTB at 3GB boundary instead of 4GB

2021-01-05 Thread Alistair Francis
On Mon, Jan 4, 2021 at 7:11 PM Bin Meng wrote: > > On Fri, Dec 18, 2020 at 5:48 AM Atish Patra wrote: > > > > Currently, we place the DTB at 2MB from 4GB or end of DRAM which ever is > > lesser. However, Linux kernel can address only 1GB of memory for RV32. > > Thus, it can not map anything beyon

RE: [for-6.0 v5 11/13] spapr: PEF: prevent migration

2021-01-05 Thread Ram Pai
On Tue, Jan 05, 2021 at 11:56:14AM +0100, Halil Pasic wrote: > On Mon, 4 Jan 2021 10:40:26 -0800 > Ram Pai wrote: > > > On Mon, Jan 04, 2021 at 01:46:29PM +0100, Halil Pasic wrote: > > > On Sun, 3 Jan 2021 23:15:50 -0800 > > > Ram Pai wrote: > > > > > > > On Fri, Dec 18, 2020 at 12:41:11PM +0

Re: [PATCH v2] tcg: Fix execution on Apple Silicon

2021-01-05 Thread Roman Bolshakov
On Mon, Jan 04, 2021 at 03:23:07PM +, Alex Bennée wrote: > > Roman Bolshakov writes: > > > Pages can't be both write and executable at the same time on Apple > > Silicon. macOS provides public API to switch write protection [1] for > > JIT applications, like TCG. > > > > 1. > > https://deve

Re: [PATCH v2] gdb: riscv: Add target description

2021-01-05 Thread Alistair Francis
On Wed, Dec 30, 2020 at 12:26 AM Sylvain Pelissier wrote: > > Target description is not currently implemented in RISC-V architecture. Thus > GDB won't set it properly when attached. The patch implements the target > description response. > > Signed-off-by: Sylvain Pelissier Reviewed-by: Alista

Re: [PATCH v5 17/43] tcg: Add --accel tcg,split-wx property

2021-01-05 Thread Joelle van Dyne
Reviewed-by: Joelle van Dyne On Tue, Jan 5, 2021 at 9:19 AM Richard Henderson wrote: > > Plumb the value through to alloc_code_gen_buffer. This is not > supported by any os or tcg backend, so for now enabling it will > result in an error. > > Signed-off-by: Richard Henderson > --- > include/s

Re: [PATCH] linux-user: Add ETHTOOL ioctl

2021-01-05 Thread Matevz Langus
Hi Laurent, I know it must be more complex, but it worked for our case so I wanted to share it anyway as we did not find support for this in latest git, but forgot to check mailing list. With this small patch + some others in Linux kernel we were able to execute Intel XL710 network adapter N

[Bug 1779634] Re: qemu-x86_64 on aarch64 reports "Synchronous External Abort"

2021-01-05 Thread Matevz Langus
Hi, if of interest to anyone... we were able to successfully upgrade firmware of Intel XL710 on aarch64 platform. Two major items were required: - small qemu change: https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg00553.html - hack in Linux kernel /dev/mem driver in mmap function to ca

Re: [PATCH 0/2] tracetool: fix log-stap format

2021-01-05 Thread Philippe Mathieu-Daudé
On 1/5/21 8:17 PM, Laurent Vivier wrote: > The first patch fixes a problem I have introduced in vhost-vdpa > traces by adding an unsupported format ("%llu"). > > The second patch fixes a problem I've seen while I was checking > the result of the first patch: %PRI formats are not decoded > correctl

Re: [PATCH 2/2] tracetool: fix "PRI" macro decoding

2021-01-05 Thread Philippe Mathieu-Daudé
On 1/5/21 8:17 PM, Laurent Vivier wrote: > macro is not reset after use, so the format decoded is always the > one of the first "PRI" in the format string. > > For instance: > > vhost_vdpa_set_config(void *dev, uint32_t offset, uint32_t size, \ > uint32_t flags) "dev: %p

Re: [PATCH] linux-user: Add ETHTOOL ioctl

2021-01-05 Thread Laurent Vivier
Hi Matevz, Le 05/01/2021 à 20:24, Matevz Langus a écrit : > Handling of ETHTOOL ioctl was not implemented. > > Signed-off-by: Matevz Langus > --- >  linux-user/ioctls.h   | 1 + >  linux-user/syscall_defs.h | 1 + >  2 files changed, 2 insertions(+) > > diff --git a/linux-user/ioctls.h b/linu

Re: [PATCH v10 0/5] UFFD write-tracking migration/snapshots

2021-01-05 Thread Peter Xu
On Thu, Dec 17, 2020 at 07:57:07PM +0300, Andrey Gruzdev wrote: > This patch series is a kind of 'rethinking' of Denis Plotnikov's ideas he's > implemented in his series '[PATCH v0 0/4] migration: add background snapshot'. > > Currently the only way to make (external) live VM snapshot is using exi

Re: [PATCH v3 3/8] acpi/gpex: Inform os to keep firmware resource map

2021-01-05 Thread Laszlo Ersek
On 01/05/21 01:35, Igor Mammedov wrote: > On Wed, 30 Dec 2020 16:22:08 -0500 > "Michael S. Tsirkin" wrote: > >> On Tue, Dec 29, 2020 at 02:41:42PM +0100, Igor Mammedov wrote: >>> On Wed, 23 Dec 2020 17:08:31 +0800 >>> Jiahui Cen wrote: >>> There may be some differences in pci resource as

[PATCH] linux-user: Add ETHTOOL ioctl

2021-01-05 Thread Matevz Langus
Handling of ETHTOOL ioctl was not implemented. Signed-off-by: Matevz Langus ---  linux-user/ioctls.h   | 1 +  linux-user/syscall_defs.h | 1 +  2 files changed, 2 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 661b5daa9f..3e5c220199 100644 --- a/linux-user/ioctls.

[PATCH 2/2] tracetool: fix "PRI" macro decoding

2021-01-05 Thread Laurent Vivier
macro is not reset after use, so the format decoded is always the one of the first "PRI" in the format string. For instance: vhost_vdpa_set_config(void *dev, uint32_t offset, uint32_t size, \ uint32_t flags) "dev: %p offset: %"PRIu32" \ size: %"PR

[PATCH 1/2] vhost-vdpa: fix "unsigned long long" error with stap

2021-01-05 Thread Laurent Vivier
The "%llu" format type is not understood by stap: $ sudo stap -e 'probe begin{printf ("BEGIN")}' -I . parse error: invalid or missing conversion specifier saw: operator ',' at ./qemu-system-x86_64-log.stp:15118:101 source: printf("%d@%d vhost_vdpa_set_log_base dev: %p base:

[PATCH 0/2] tracetool: fix log-stap format

2021-01-05 Thread Laurent Vivier
The first patch fixes a problem I have introduced in vhost-vdpa traces by adding an unsupported format ("%llu"). The second patch fixes a problem I've seen while I was checking the result of the first patch: %PRI formats are not decoded correctly and we can end with things like "0x%u" because the

Re: QEMU hosting

2021-01-05 Thread Fosshost
Hi Stefan Thank you for your email. 1. We do not offer MacOS hosting 2. We can provide virtual machines with full KVM virt on x86 architecture and soon arm64 v8 3. We do not provide dedicated servers. If you would like to apply, you can do so at https://fosshost.org/apply Feel free t

Re: [PATCH v2] target/i386/sev: add support to query the attestation report

2021-01-05 Thread James Bottomley
On Tue, 2021-01-05 at 10:39 -0600, Brijesh Singh wrote: > The SEV FW >= 0.23 added a new command that can be used to query the > attestation report containing the SHA-256 digest of the guest memory > and VMSA encrypted with the LAUNCH_UPDATE and sign it with the PEK. > > Note, we already have a co

Re: [PATCH v5 16/43] tcg: Use Error with alloc_code_gen_buffer

2021-01-05 Thread Philippe Mathieu-Daudé
On 1/5/21 6:19 PM, Richard Henderson wrote: > Report better error messages than just "could not allocate". > Let alloc_code_gen_buffer set ctx->code_gen_buffer_size > and ctx->code_gen_buffer, and simply return bool. > > Reviewed-by: Joelle van Dyne > Signed-off-by: Richard Henderson > --- > ac

Re: [PATCH v5 25/43] tcg/tci: Push const down through bytecode reading

2021-01-05 Thread Philippe Mathieu-Daudé
On 1/5/21 6:19 PM, Richard Henderson wrote: > Reviewed-by: Joelle van Dyne > Signed-off-by: Richard Henderson > --- > tcg/tci.c | 60 +++ > 1 file changed, 34 insertions(+), 26 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v5 43/43] tcg: Constify TCGLabelQemuLdst.raddr

2021-01-05 Thread Philippe Mathieu-Daudé
On 1/5/21 6:19 PM, Richard Henderson wrote: > Now that all native tcg hosts support splitwx, > make this pointer const. > > Reviewed-by: Joelle van Dyne > Signed-off-by: Richard Henderson > --- > tcg/aarch64/tcg-target.c.inc | 3 +-- > tcg/arm/tcg-target.c.inc | 3 +-- > tcg/i386/tcg-target

Re: [PATCH v5 42/43] tcg: Constify tcg_code_gen_epilogue

2021-01-05 Thread Philippe Mathieu-Daudé
On 1/5/21 6:19 PM, Richard Henderson wrote: > Now that all native tcg hosts support splitwx, > make this pointer const. > > Reviewed-by: Joelle van Dyne > Signed-off-by: Richard Henderson > --- > include/tcg/tcg.h| 2 +- > tcg/tcg.c| 2 +- > tcg/aarch64/tcg-targe

Re: [PATCH 5/5] i386: provide simple 'hyperv=on' option to x86 machine types

2021-01-05 Thread Eduardo Habkost
On Tue, Jan 05, 2021 at 05:31:41PM +0100, Igor Mammedov wrote: > On Tue, 5 Jan 2021 09:34:31 -0500 > Eduardo Habkost wrote: > > > On Tue, Jan 05, 2021 at 12:36:50AM +0100, Igor Mammedov wrote: > > > On Mon, 4 Jan 2021 13:29:06 -0500 > > > Eduardo Habkost wrote: > > > > > > > On Mon, Jan 04, 2

Re: [PATCH 1/1] vl.c: do not execute trace_init_backends() before daemonizing

2021-01-05 Thread Daniel Henrique Barboza
On 1/5/21 3:09 PM, Paolo Bonzini wrote: On 05/01/21 19:03, Daniel Henrique Barboza wrote: +    /* + * The trace backend must be initialized before daemonizing. after, not before. :) hahaha messed up in the comment block. Typical. With this fixed, Reviewed-by: Paolo Bonzini Th

[PATCH v2 1/1] vl.c: do not execute trace_init_backends() before daemonizing

2021-01-05 Thread Daniel Henrique Barboza
Commit v5.2.0-190-g0546c0609c ("vl: split various early command line options to a separate function") moved the trace backend init code to the qemu_process_early_options(). Which is now being called before os_daemonize() via qemu_maybe_daemonize(). Turns out that this change of order causes a prob

[PATCH v2 0/1] vl.c: fix trace backend init ordering

2021-01-05 Thread Daniel Henrique Barboza
changes from v2: - fixed a typo in the comment block - added Paolo's R-b Daniel Henrique Barboza (1): vl.c: do not execute trace_init_backends() before daemonizing softmmu/vl.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) -- 2.26.2

Re: [PATCH v5 00/43] Mirror map JIT memory for TCG

2021-01-05 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210105171950.415486-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: 20210105171950.415486-1-richard.hender...@linaro.org Subject: [PATCH v5 00/43]

[PATCH 1/1] vl.c: do not execute trace_init_backends() before daemonizing

2021-01-05 Thread Daniel Henrique Barboza
Commit v5.2.0-190-g0546c0609c ("vl: split various early command line options to a separate function") moved the trace backend init code to the qemu_process_early_options(). Which is now being called before os_daemonize() via qemu_maybe_daemonize(). Turns out that this change of order causes a prob

Re: [PATCH] meson: Propagate gnutls dependency

2021-01-05 Thread Paolo Bonzini
On 05/01/21 15:37, Roman Bolshakov wrote: Does it work if you do: crypto_ss.add(authz, qom) libcrypto = static_library('crypto', crypto_ss.sources() + genh, dependencies: crypto_ss.dependencies(), ...) crypto = declare_dependency(link_whole

Re: [PATCH] tests/iotests: drop test 312 from auto group

2021-01-05 Thread Max Reitz
On 05.01.21 11:04, Alex Bennée wrote: The "auto" documentation states: That means they should run with every QEMU binary (also non-x86) which is not the case as the check-system-fedora build which only includes a rag tag group of rare and deprecated targets doesn't support the virtio device

Re: [PATCH 1/1] vl.c: do not execute trace_init_backends() before daemonizing

2021-01-05 Thread Paolo Bonzini
On 05/01/21 19:03, Daniel Henrique Barboza wrote: +/* + * The trace backend must be initialized before daemonizing. after, not before. :) With this fixed, Reviewed-by: Paolo Bonzini + * trace_init_backends() will call st_init(), which will create the + * trace thread in the

[PATCH v5 41/43] tcg: Remove TCG_TARGET_SUPPORT_MIRROR

2021-01-05 Thread Richard Henderson
Now that all native tcg hosts support splitwx, remove the define. Replace the one use with a test for CONFIG_TCG_INTERPRETER. Reviewed-by: Joelle van Dyne Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 1 - tcg/arm/tcg-target.h | 1 - tcg/i386/tcg-target.h | 1 - t

[PATCH v5 35/43] tcg/riscv: Remove branch-over-branch fallback

2021-01-05 Thread Richard Henderson
Since 7ecd02a06f8, we are prepared to re-start code generation with a smaller TB if a relocation is out of range. We no longer need to leave a nop in the stream Just In Case. Reviewed-by: Alistair Francis Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.c.inc | 56

[PATCH v5 34/43] tcg/riscv: Fix branch range checks

2021-01-05 Thread Richard Henderson
The offset even checks were folded into the range check incorrectly. By offsetting by 1, and not decrementing the width, we silently allowed out of range branches. Assert that the offset is always even instead. Move tcg_out_goto down into the CONFIG_SOFTMMU block so that it is not unused. Review

[PATCH v5 28/43] tcg/ppc: Use tcg_out_mem_long to reset TCG_REG_TB

2021-01-05 Thread Richard Henderson
The maximum TB code gen size is UINT16_MAX, which the current code does not support. Use our utility function to optimally add an arbitrary constant. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tcg/ppc/tc

[PATCH v5 22/43] tcg/aarch64: Use B not BL for tcg_out_goto_long

2021-01-05 Thread Richard Henderson
A typo generated a branch-and-link insn instead of plain branch. Reviewed-by: Joelle van Dyne Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index f

[PATCH v5 13/43] tcg: Adjust tb_target_set_jmp_target for split-wx

2021-01-05 Thread Richard Henderson
Pass both rx and rw addresses to tb_target_set_jmp_target. Reviewed-by: Joelle van Dyne Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 2 +- tcg/arm/tcg-target.h | 2 +- tcg/i386/tcg-target.h| 6 +++--- tcg/mips/tcg-target.h| 2 +- tcg/ppc/tcg-ta

Re: [PATCH RFC v4 13/15] target/riscv: Introduce dynamic time frequency for virt machine

2021-01-05 Thread Alistair Francis
On Mon, Dec 14, 2020 at 11:31 PM Jiangyifei wrote: > > > > -Original Message- > > From: Alistair Francis [mailto:alistai...@gmail.com] > > Sent: Wednesday, December 9, 2020 6:26 AM > > To: Jiangyifei > > Cc: qemu-devel@nongnu.org Developers ; open > > list:RISC-V ; Zhangxiaofeng (F) > > ;

[PATCH v5 16/43] tcg: Use Error with alloc_code_gen_buffer

2021-01-05 Thread Richard Henderson
Report better error messages than just "could not allocate". Let alloc_code_gen_buffer set ctx->code_gen_buffer_size and ctx->code_gen_buffer, and simply return bool. Reviewed-by: Joelle van Dyne Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 60 ++-

Re: [PULL for-5.2 2/2] scripts/tracetool: silence SystemTap dtrace(1) long long warnings

2021-01-05 Thread Daniel P . Berrangé
On Mon, Jan 04, 2021 at 09:31:19PM +0100, Laurent Vivier wrote: > On 11/11/2020 16:56, Stefan Hajnoczi wrote: > > SystemTap's dtrace(1) prints the following warning when it encounters > > long long arguments: > > > > Warning: /usr/bin/dtrace:trace/trace-dtrace-hw_virtio.dtrace:76: syntax > > er

  1   2   3   >