[PATCH] hw/acpi: refactor acpi hp modules so that targets can just use what they need

2021-08-12 Thread Ani Sinha
Currently various acpi hotplug modules like cpu hotplug, memory hotplug, pci hotplug, nvdimm hotplug are all pulled in when CONFIG_ACPI_X86 is turned on. This brings in support for whole lot of subsystems that some targets like mips does not need. They are added just to satisfy symbol dependencies.

Re: [RFC PATCH 02/13] target/riscv: Support UXL32 for branch instructions

2021-08-12 Thread LIU Zhiwei
On 2021/8/12 下午2:12, Richard Henderson wrote: On 8/11/21 7:03 PM, LIU Zhiwei wrote: On 2021/8/12 下午12:42, Richard Henderson wrote: On 8/11/21 12:40 PM, LIU Zhiwei wrote: If the software doesn't use the high part, who cares the really value in high part? Do you know the benefit?  Thanks agai

Re: [PATCH v2] vhost-vdpa: Do not send empty IOTLB update batches

2021-08-12 Thread Eugenio Perez Martin
On Thu, Aug 12, 2021 at 8:45 AM Jason Wang wrote: > > On Thu, Aug 12, 2021 at 2:43 PM Eugenio Perez Martin > wrote: > > > > On Thu, Aug 12, 2021 at 8:16 AM Jason Wang wrote: > > > > > > On Thu, Aug 12, 2021 at 12:32 AM Eugenio Pérez > > > wrote: > > > > > > > > With the introduction of the bat

Re: [PATCH] tests/acceptance: Test powernv machines

2021-08-12 Thread Philippe Mathieu-Daudé
On 8/12/21 3:40 AM, David Gibson wrote: > On Wed, Aug 11, 2021 at 11:07:31AM +0200, Thomas Huth wrote: >> On 10/08/2021 11.09, Cédric Le Goater wrote: >>> On 8/10/21 10:36 AM, Joel Stanley wrote: On Tue, 10 Aug 2021 at 08:34, Cédric Le Goater wrote: > > Fetch the OpenPOWER images to b

Re: [PATCH] accel/tcg: remove redundant TCG_KICK_PERIOD define

2021-08-12 Thread Philippe Mathieu-Daudé
On 8/11/21 4:12 PM, Luc Michel wrote: > The TCG_KICK_PERIOD macro is already defined in tcg-accel-ops-rr.h. > Remove it from tcg-accel-ops-rr.c. > > Signed-off-by: Luc Michel > --- > accel/tcg/tcg-accel-ops-rr.c | 2 -- > 1 file changed, 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PULL 0/7] Maintainers 20210811 patches

2021-08-12 Thread Philippe Mathieu-Daudé
Hi Peter, On 8/11/21 2:58 PM, Peter Maydell wrote: > On Wed, 11 Aug 2021 at 07:44, Gerd Hoffmann wrote: >> >> The following changes since commit 703e8cd6189cf699c8d5c094bc68b5f3afa6ad71: >> >> Update version for v6.1.0-rc3 release (2021-08-10 19:08:09 +0100) >> >> are available in the Git repos

[PING] [PATCH v4] vhost: make SET_VRING_ADDR, SET_FEATURES send replies

2021-08-12 Thread Denis Plotnikov
On 09.08.2021 13:48, Denis Plotnikov wrote: On vhost-user-blk migration, qemu normally sends a number of commands to enable logging if VHOST_USER_PROTOCOL_F_LOG_SHMFD is negotiated. Qemu sends VHOST_USER_SET_FEATURES to enable buffers logging and VHOST_USER_SET_VRING_ADDR per each started ring

[PATCH v3 3/6] block: Clarify that @bytes is no limit on *pnum

2021-08-12 Thread Hanna Reitz
.bdrv_co_block_status() implementations are free to return a *pnum that exceeds @bytes, because bdrv_co_block_status() in block/io.c will clamp *pnum as necessary. On the other hand, if drivers' implementations return values for *pnum that are as large as possible, our recently introduced block-st

[PATCH v3 0/6] block-status cache for data regions

2021-08-12 Thread Hanna Reitz
Hi, See the cover letter from v1 for the general idea: https://lists.nongnu.org/archive/html/qemu-block/2021-06/msg00843.html Cover letter from v2, introducing RCU locking: https://lists.nongnu.org/archive/html/qemu-block/2021-06/msg01060.html v3: - Patch 2: - Add rcu_head object to BdrvBlock

[PATCH v3 2/6] block: block-status cache for data regions

2021-08-12 Thread Hanna Reitz
As we have attempted before (https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg06451.html, "file-posix: Cache lseek result for data regions"; https://lists.nongnu.org/archive/html/qemu-block/2021-02/msg00934.html, "file-posix: Cache next hole"), this patch seeks to reduce the number of SEEK_

[PATCH v3 1/6] block: Drop BDS comment regarding bdrv_append()

2021-08-12 Thread Hanna Reitz
There is a comment above the BDS definition stating care must be taken to consider handling newly added fields in bdrv_append(). Actually, this comment should have said "bdrv_swap()" as of 4ddc07cac (nine years ago), and in any case, bdrv_swap() was dropped in 8e419aefa (six years ago). So no suc

[PATCH v3 4/6] block/file-posix: Do not force-cap *pnum

2021-08-12 Thread Hanna Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Hanna Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Review

[PATCH v3 5/6] block/gluster: Do not force-cap *pnum

2021-08-12 Thread Hanna Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Hanna Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Review

[PATCH v3 6/6] block/iscsi: Do not force-cap *pnum

2021-08-12 Thread Hanna Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Hanna Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Review

Re: [PATCH 3/7] MAINTAINERS: update audio entry.

2021-08-12 Thread Gerd Hoffmann
Hi, > > On Tue, Aug 10, 2021 at 03:17:43PM +0300, cla...@hotmail.com wrote: > >> Gerd Hoffmann writes: > >> > >> Hell Gerd. > >> > >> > New maintainer wanted. Downgrade status to "Odd Fixes" for now. > >> > >> I can try to retake it. Given your track record is zero contributions to qemu in

Re: [PATCH v4 1/3] target-arm: Add support for Fujitsu A64FX

2021-08-12 Thread Andrew Jones
On Thu, Aug 12, 2021 at 03:04:38PM +0900, Shuuichirou Ishii wrote: > Add a definition for the Fujitsu A64FX processor. > > The A64FX processor does not implement the AArch32 Execution state, > so there are no associated AArch32 Identification registers. > > For SVE, the A64FX processor supports o

Re: [PATCH v2 16/22] target/loongarch: Add floating point move instruction translation

2021-08-12 Thread Song Gao
On 07/23/2021 02:29 PM, Richard Henderson wrote: > >> +void helper_movgr2fcsr(CPULoongArchState *env, target_ulong arg1, >> +   uint32_t fcsr) >> +{ >> +    switch (fcsr) { >> +    case 0: >> +    env->active_fpu.fcsr0 = arg1; >> +    break; >> +    case 1: >> + 

Re: [PATCH v4 1/3] target-arm: Add support for Fujitsu A64FX

2021-08-12 Thread Andrew Jones
On Thu, Aug 12, 2021 at 11:16:50AM +0200, Andrew Jones wrote: > On Thu, Aug 12, 2021 at 03:04:38PM +0900, Shuuichirou Ishii wrote: > > Add a definition for the Fujitsu A64FX processor. > > > > The A64FX processor does not implement the AArch32 Execution state, > > so there are no associated AArch3

[PATCH for-6.2 00/25] arm: Get rid of system_clock_scale global

2021-08-12 Thread Peter Maydell
This is mostly a (big) refactoring to use Clocks instead of a global. Review of the new multiplier/divider functionality I've added to the Clock API would also be interesting. If you're a maintainer for an M-profile board that isn't covered by 'make check-acceptance' then I'd appreciate it if you

[PATCH for-6.2 01/25] arm: Move M-profile RAS register block into its own device

2021-08-12 Thread Peter Maydell
Currently we implement the RAS register block within the NVIC device. It isn't really very tightly coupled with the NVIC proper, so instead move it out into a sysbus device of its own and have the top level ARMv7M container create it and map it into memory at the right address. Signed-off-by: Pete

[PATCH for-6.2 04/25] hw/timer/armv7m_systick: Add usual QEMU interface comment

2021-08-12 Thread Peter Maydell
Add the usual-style QEMU interface comment documenting what properties, etc, this device exposes. Signed-off-by: Peter Maydell --- include/hw/timer/armv7m_systick.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/hw/timer/armv7m_systick.h b/include/hw/timer/armv7m_systick.h i

[PATCH for-6.2 03/25] arm: Move system PPB container handling to armv7m

2021-08-12 Thread Peter Maydell
Instead of having the NVIC device provide a single sysbus memory region covering the whole of the "System PPB" space, which implements the default behaviour for unimplemented ranges and provides the NS alias window to the sysregs as well as the main sysreg MR, move this handling to the container ar

[PATCH for-6.2 02/25] arm: Move systick device creation from NVIC to ARMv7M object

2021-08-12 Thread Peter Maydell
There's no particular reason why the NVIC should be owning the SysTick device objects; move them into the ARMv7M container object instead, as part of consolidating the "create the devices which are built into an M-profile CPU and map them into their architected locations in the address space" work

[PATCH for-6.2 11/25] hw/arm/stm32f100: Wire up sysclk and refclk

2021-08-12 Thread Peter Maydell
Wire up the sysclk and refclk for the stm32f100 SoC. This SoC always runs the systick refclk at 1/8 the frequency of the main CPU clock, so the board code only needs to provide a single sysclk clock. Because there is only one board using this SoC, we convert the SoC and the board together, rather

[PATCH for-6.2 05/25] hw/timer/armv7m_systick: Add input clocks

2021-08-12 Thread Peter Maydell
The v7M systick timer can be programmed to run from either of two clocks: * an "external reference clock" (when SYST_CSR.CLKSOURCE == 0) * the main CPU clock (when SYST_CSR.CLKSOURCE == 1) Our implementation currently hardwires the external reference clock to be 1MHz, and allows boards to set th

[PATCH for-6.2 10/25] hw/arm: Don't allocate separate MemoryRegions in stm32 SoC realize

2021-08-12 Thread Peter Maydell
In the realize methods of the stm32f100 and stm32f205 SoC objects, we call g_new() to create new MemoryRegion objjects for the sram, flash, and flash_alias. This is unnecessary (and leaves open the possibility of leaking the allocations if we exit from realize with an error). Make these MemoryReg

[PATCH for-6.2 12/25] hw/arm/stm32f205: Wire up sysclk and refclk

2021-08-12 Thread Peter Maydell
Wire up the sysclk and refclk for the stm32f205 SoC. This SoC always runs the systick refclk at 1/8 the frequency of the main CPU clock, so the board code only needs to provide a single sysclk clock. Because there is only one board using this SoC, we convert the SoC and the board together, rather

[PATCH for-6.2 09/25] clock: Provide builtin multiplier/divider

2021-08-12 Thread Peter Maydell
It is quite common for a clock tree to involve possibly programmable clock multipliers or dividers, where the frequency of a clock is for instance divided by 8 to produce a slower clock to feed to a particular device. Currently we provide no convenient mechanism for modelling this. You can implem

[PATCH for-6.2 06/25] hw/arm/armv7m: Create input clocks

2021-08-12 Thread Peter Maydell
Create input clocks on the armv7m container object which pass through to the systick timers, so that users of the armv7m object can specify the clocks being used. Signed-off-by: Peter Maydell --- include/hw/arm/armv7m.h | 6 ++ hw/arm/armv7m.c | 23 +++ 2 files c

[PATCH for-6.2 16/25] hw/arm/stellaris: split stellaris_sys_init()

2021-08-12 Thread Peter Maydell
Currently the stellaris_sys_init() function creates the TYPE_STELLARIS_SYS object, sets its properties, realizes it, maps its MMIO region and connects its IRQ. In order to support wiring the sysclk up to the armv7m object, we need to split this function apart, because to connect the clock output o

[PATCH for-6.2 17/25] hw/arm/stellaris: Wire sysclk up to armv7m

2021-08-12 Thread Peter Maydell
Connect the sysclk to the armv7m object. This board's SoC does not connect up the systick reference clock, so we don't need to connect a refclk. Signed-off-by: Peter Maydell --- hw/arm/stellaris.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/arm/stellaris.c b/hw/ar

[PATCH for-6.2 13/25] hw/arm/stm32f405: Wire up sysclk and refclk

2021-08-12 Thread Peter Maydell
Wire up the sysclk and refclk for the stm32f405 SoC. This SoC always runs the systick refclk at 1/8 the frequency of the main CPU clock, so the board code only needs to provide a single sysclk clock. Because there is only one board using this SoC, we convert the SoC and the board together, rather

[PATCH for-6.2 08/25] hw/arm/mps2.c: Connect up armv7m clocks

2021-08-12 Thread Peter Maydell
Connect up the armv7m clocks on the mps2-an385/386/500/511. Connect up the armv7m object's clocks on the MPS boards defined in mps2.c. The documentation for these FPGA images doesn't specify what systick reference clock is used (if any), so for the moment we provide a 1MHz refclock, which will re

[PATCH for-6.2 20/25] hw/arm/msf2-soc: Wire up refclk

2021-08-12 Thread Peter Maydell
Wire up the refclk for the msf2 SoC. This SoC runs the refclk at a frequency which is programmably either /4, /8, /16 or /32 of the main CPU clock. We don't currently model the register which allows the guest to set the divisor, so implement the refclk as a fixed /32 of the CPU clock (which is th

[PATCH for-6.2 07/25] armsse: Wire up systick cpuclk clock

2021-08-12 Thread Peter Maydell
Wire up the cpuclk for the systick devices to the SSE object's existing mainclk clock. We do not wire up the refclk because the SSE subsystems do not provide a refclk. (This is documented in the IoTKit and SSE-200 TRMs; the SSE-300 TRM doesn't mention it but we assume it follows the same approach

[PATCH for-6.2 15/25] hw/arm/nrf51: Wire up sysclk

2021-08-12 Thread Peter Maydell
Wire up the sysclk input to the armv7m object. Strictly this SoC should not have a systick device at all, but our armv7m container object doesn't currently support disabling the systick device. For the moment, add a TODO comment, but note that this is why we aren't wiring up a refclk (no need for

[PATCH for-6.2 22/25] hw/arm/stellaris: Fix code style issues in GPTM code

2021-08-12 Thread Peter Maydell
Fix the code style issues in the Stellaris general purpose timer module code, so that when we move it to a different file in a following patch checkpatch doesn't complain. Signed-off-by: Peter Maydell --- hw/arm/stellaris.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) dif

Re: [PATCH for-6.2 07/53] target/arm: Fix MVE 48-bit SQRSHRL for small right shifts

2021-08-12 Thread Peter Maydell
On Fri, 30 Jul 2021 at 20:07, Richard Henderson wrote: > I'll note two things: > > (1) The val == extval check could be sunk to the end of the function and > shared with the > left shift, > > (2) sat will never be unset, as #48 is encoded as sat=1 in the insn. True; I'm kind of aiming for parity

[PATCH for-6.2 23/25] hw/arm/stellaris: Split stellaris-gptm into its own file

2021-08-12 Thread Peter Maydell
The implementation of the Stellaris general purpose timer module device stellaris-gptm is currently in the same source file as the board model. Split it out into its own source file in hw/timer. Apart from the new file comment headers and the Kconfig and meson.build changes, this is just code mov

[PATCH for-6.2 19/25] hw/arm/msf2: Use Clock input to MSF2_SOC instead of m3clk property

2021-08-12 Thread Peter Maydell
Instead of passing the MSF2 SoC an integer property specifying the CPU clock rate, pass it a Clock instead. This lets us wire that clock up to the armv7m object. Signed-off-by: Peter Maydell --- include/hw/arm/msf2-soc.h | 3 ++- hw/arm/msf2-soc.c | 28 +--- hw/

[PATCH for-6.2 14/25] hw/arm/stm32vldiscovery: Delete trailing blank line

2021-08-12 Thread Peter Maydell
Delete the trailing blank line at the end of the source file. Signed-off-by: Peter Maydell --- hw/arm/stm32vldiscovery.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/arm/stm32vldiscovery.c b/hw/arm/stm32vldiscovery.c index 07e401a818d..9b79004703b 100644 --- a/hw/arm/stm32vldiscovery.c

[PATCH for-6.2 18/25] hw/arm/msf2_soc: Don't allocate separate MemoryRegions

2021-08-12 Thread Peter Maydell
In the realize method of the msf2-soc SoC object, we call g_new() to create new MemoryRegion objects for the nvm, nvm_alias, and sram. This is unnecessary; make these MemoryRegions member fields of the device state struct instead. Signed-off-by: Peter Maydell --- include/hw/arm/msf2-soc.h | 4 +

[PATCH for-6.2 24/25] hw/timer/stellaris-gptm: Use Clock input instead of system_clock_scale

2021-08-12 Thread Peter Maydell
The stellaris-gptm timer currently uses system_clock_scale for one of its timer modes where the timer runs at the CPU clock rate. Make it use a Clock input instead. We don't try to make the timer handle changes in the clock frequency while the downcounter is running. This is not a change in beha

Re: [PATCH v4 1/3] target-arm: Add support for Fujitsu A64FX

2021-08-12 Thread Peter Maydell
On Thu, 12 Aug 2021 at 10:25, Andrew Jones wrote: > On second thought, do we want the QMP CPU model expansion query to show > that this CPU type has sve,sve128,sve256,sve512? If so, then our SVE work > isn't complete, because we need those properties, set true by default, but > forbidden from chan

[PATCH for-6.2 21/25] hw/timer/armv7m_systick: Use clock inputs instead of system_clock_scale

2021-08-12 Thread Peter Maydell
Now that all users of the systick devices wire up the clock inputs, use those instead of the system_clock_scale and the hardwired 1MHz value for the reference clock. This will fix various board models where we were incorrectly providing a 1MHz reference clock instead of some other value or instead

Re: [PATCH for 6.1] plugins: do not limit exported symbols if modules are active

2021-08-12 Thread Alex Bennée
Paolo Bonzini writes: > On Mac --enable-modules and --enable-plugins are currently incompatible, > because the > Apple -Wl,-exported_symbols_list command line options prevents the export of > any > symbols needed by the modules. On x86 -Wl,--dynamic-list does not have this > effect, > but o

[PATCH for-6.2 25/25] arm: Remove system_clock_scale global

2021-08-12 Thread Peter Maydell
All the devices that used to use system_clock_scale have now been converted to use Clock inputs instead, so the global is no longer needed; remove it and all the code that sets it. Signed-off-by: Peter Maydell --- include/hw/timer/armv7m_systick.h | 22 -- hw/arm/armsse.c

Re: [PATCH 12/19] target/ppc/pmu_book3s_helper.c: enable PMC1 counter negative EBB

2021-08-12 Thread Daniel Henrique Barboza
On 8/12/21 1:56 AM, Richard Henderson wrote: On 8/11/21 6:45 PM, Richard Henderson wrote: On 8/11/21 5:39 PM, David Gibson wrote: I mean, nothing is stopping us from calculating cycles using time, but in the end we would do the same thing we're already doing today. Oh.. ok.  I had assumed

[PATCH] q35: catch invalid cpu hotplug configuration

2021-08-12 Thread Gerd Hoffmann
Related: https://bugzilla.redhat.com//show_bug.cgi?id=1985924 Signed-off-by: Gerd Hoffmann --- hw/isa/lpc_ich9.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 5f9de0239cf9..5f143dca17aa 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lp

[PATCH v3] docs: make sphinx-build be quiet by default

2021-08-12 Thread Daniel P . Berrangé
The sphinx-build is fairly verbose spitting out pages of output to the console, which causes errors from other build commands to be scrolled off the top of the terminal. This can leave the mistaken impression that the build passed, when in fact there was a failure. Signed-off-by: Daniel P. Berrang

Re: [PATCH v3] docs: make sphinx-build be quiet by default

2021-08-12 Thread Philippe Mathieu-Daudé
On 8/12/21 12:24 PM, Daniel P. Berrangé wrote: > The sphinx-build is fairly verbose spitting out pages of output to the > console, which causes errors from other build commands to be scrolled > off the top of the terminal. This can leave the mistaken impression that > the build passed, when in fact

Re: [PATCH] q35: catch invalid cpu hotplug configuration

2021-08-12 Thread Daniel P . Berrangé
On Thu, Aug 12, 2021 at 12:23:41PM +0200, Gerd Hoffmann wrote: > Related: https://bugzilla.redhat.com//show_bug.cgi?id=1985924 > Signed-off-by: Gerd Hoffmann > --- > hw/isa/lpc_ich9.c | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c >

Re: [PATCH v2 19/22] target/loongarch: Add disassembler

2021-08-12 Thread Philippe Mathieu-Daudé
Hi Richard, On 7/21/21 11:53 AM, Song Gao wrote: > This patch add support for disassembling via option '-d in_asm'. > > Signed-off-by: Song Gao > --- > MAINTAINERS |1 + > disas/loongarch.c | 2511 > +++ > disas/meson.build

Re: [PATCH] hw/virtio: Fix leak of host-notifier memory-region

2021-08-12 Thread Stefano Garzarella
On Thu, Aug 12, 2021 at 04:37:26AM +0300, Yajun Wu via wrote: If call virtio_queue_set_host_notifier_mr fails, should free host-notifier memory-region. We can add: Fixes: 44866521bd ("vhost-user: support registering external host notifiers") Signed-off-by: Yajun Wu --- hw/virtio/vhost-user.c

Re: [PATCH v3] docs: make sphinx-build be quiet by default

2021-08-12 Thread Marc-André Lureau
On Thu, Aug 12, 2021 at 2:25 PM Daniel P. Berrangé wrote: > The sphinx-build is fairly verbose spitting out pages of output to the > console, which causes errors from other build commands to be scrolled > off the top of the terminal. This can leave the mistaken impression that > the build passed,

Re: [PATCH for 6.1] plugins: do not limit exported symbols if modules are active

2021-08-12 Thread Paolo Bonzini
Il gio 12 ago 2021, 11:40 Alex Bennée ha scritto: > ERROR: glib-2.56 gmodule-noexport-2.0 is required to compile QEMU > > Should it be gmodule-no-export? Hopefully the different distros aren't > packaging different .pc files. > My bad. :( It's correct with the dash. Does this mean --enable-mo

Re: [PATCH] storage-daemon: Add missing build dependency to the vhost-user-blk-test

2021-08-12 Thread Daniel P . Berrangé
On Wed, Aug 11, 2021 at 11:47:05AM +0200, Thomas Huth wrote: > vhost-user-blk-test needs the qemu-storage-deamon, otherwise it > currently hangs. So make sure that we build the daemon before running > the tests. > > Signed-off-by: Thomas Huth > --- > storage-daemon/meson.build | 8 > te

Re: [PATCH v3] blog: add a post for the new TCG cache modelling plugin

2021-08-12 Thread Alex Bennée
Mahmoud Mandour writes: > This post introduces the new TCG plugin `cache` that's used for cache > modelling. This plugin is a part of my GSoC 2021 participation. > > Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée -- Alex Bennée

ensuring a machine's buses have unique names

2021-08-12 Thread Peter Maydell
What's the right way to ensure that when a machine has multiple buses of the same type (eg multiple i2c controllers, multiple sd card controllers) they all get assigned unique names so that the user can use '-device ...,bus=some-name' to put a device on a specific bus? For instance in hw/arm/xlnx-

Re: [PATCH] q35: catch invalid cpu hotplug configuration

2021-08-12 Thread Gerd Hoffmann
Hi, > > +if ((lpc->smi_host_features & > > BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT)) && > > +!(lpc->smi_host_features & > > BIT_ULL(ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT))) { > > +/* > > + * smi_features_ok_callback() throws an error on this. > > + * > > +

Re: [PATCH for-6.2 01/25] arm: Move M-profile RAS register block into its own device

2021-08-12 Thread Alexandre IOOSS
On 8/12/21 11:33 AM, Peter Maydell wrote: Currently we implement the RAS register block within the NVIC device. It isn't really very tightly coupled with the NVIC proper, so instead move it out into a sysbus device of its own and have the top level ARMv7M container create it and map it into mem

[PATCH] configure: Remove spurious [] from tr

2021-08-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" ShellCheck points out that tr '[a-z]' actually replaces the []'s and only the a-z is needed. Remove the spurious [] - although in this use it will make no difference. Fixes: bb55b712e8dc4d4eb515144d5c26798fea178cba Signed-off-by: Dr. David Alan Gilbert --- confi

[PATCH] target/i386: Fixed size of constant for Windows

2021-08-12 Thread Lara Lazier
~0UL has 64 bits on Linux and 32 bits on Windows. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/512";. Reported-by: Volker Rümelin Signed-off-by: Lara Lazier --- target/i386/tcg/sysemu/misc_helper.c | 2 +- target/i386/tcg/sysemu/svm_helper.c | 2 +- 2 files changed, 2 insertions(+), 2

Re: [PATCH for-6.2 01/25] arm: Move M-profile RAS register block into its own device

2021-08-12 Thread Peter Maydell
On Thu, 12 Aug 2021 at 12:08, Alexandre IOOSS wrote: > > > > On 8/12/21 11:33 AM, Peter Maydell wrote: > > Currently we implement the RAS register block within the NVIC device. > > It isn't really very tightly coupled with the NVIC proper, so instead > > move it out into a sysbus device of its own

Re: [PATCH] storage-daemon: Add missing build dependency to the vhost-user-blk-test

2021-08-12 Thread Peter Maydell
On Thu, 12 Aug 2021 at 11:53, Daniel P. Berrangé wrote: > > On Wed, Aug 11, 2021 at 11:47:05AM +0200, Thomas Huth wrote: > > vhost-user-blk-test needs the qemu-storage-deamon, otherwise it > > currently hangs. So make sure that we build the daemon before running > > the tests. > > > > Signed-off-b

[PATCH] misc: edu: add MSI-X interrupt generation aswell

2021-08-12 Thread Neil Armstrong
Add MSI-X aswell since either MSI or MSI-X are optional and MSI can still be used without any issues. Signed-off-by: Neil Armstrong --- hw/misc/edu.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/hw/misc/edu.c b/hw/misc/edu.c index e935c418d4..5d0643e1bd 100

Re: [PATCH-for-6.1?] target/i386: Fixed size of constant for Windows

2021-08-12 Thread Philippe Mathieu-Daudé
On 8/12/21 1:10 PM, Lara Lazier wrote: > ~0UL has 64 bits on Linux and 32 bits on Windows. > Fixes: https://gitlab.com/qemu-project/qemu/-/issues/512";. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/512 Fixes: 3407259b20c ("target/i386: Added consistency checks for CR3") > Reported-by:

Re: [PATCH for-6.2 03/25] arm: Move system PPB container handling to armv7m

2021-08-12 Thread Alexandre IOOSS
On 8/12/21 11:33 AM, Peter Maydell wrote: Instead of having the NVIC device provide a single sysbus memory region covering the whole of the "System PPB" space, which implements the default behaviour for unimplemented ranges and provides the NS alias window to the sysregs as well as the main sys

Re: [PATCH] configure: Remove spurious [] from tr

2021-08-12 Thread Peter Maydell
On Thu, 12 Aug 2021 at 12:11, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > ShellCheck points out that tr '[a-z]' actually replaces the []'s > and only the a-z is needed. > > Remove the spurious [] - although in this use it will make no > difference. > > Fixes: bb55b7

Re: [PATCH for-6.2 09/25] clock: Provide builtin multiplier/divider

2021-08-12 Thread Alexandre IOOSS
On 8/12/21 11:33 AM, Peter Maydell wrote: It is quite common for a clock tree to involve possibly programmable clock multipliers or dividers, where the frequency of a clock is for instance divided by 8 to produce a slower clock to feed to a particular device. Currently we provide no convenient

Re: [PATCH for-6.2 10/25] hw/arm: Don't allocate separate MemoryRegions in stm32 SoC realize

2021-08-12 Thread Alexandre IOOSS
On 8/12/21 11:33 AM, Peter Maydell wrote: In the realize methods of the stm32f100 and stm32f205 SoC objects, we call g_new() to create new MemoryRegion objjects for the sram, flash, and flash_alias. This is unnecessary (and leaves open the possibility of leaking the allocations if we exit from r

Re: [PATCH for-6.2 09/25] clock: Provide builtin multiplier/divider

2021-08-12 Thread Peter Maydell
On Thu, 12 Aug 2021 at 13:08, Alexandre IOOSS wrote: > > > On 8/12/21 11:33 AM, Peter Maydell wrote: > > It is quite common for a clock tree to involve possibly programmable > > clock multipliers or dividers, where the frequency of a clock is for > > instance divided by 8 to produce a slower clock

Re: [PATCH 3/7] MAINTAINERS: update audio entry.

2021-08-12 Thread Christian Schoenebeck
On Donnerstag, 12. August 2021 10:42:10 CEST Gerd Hoffmann wrote: > Hi, > > > > On Tue, Aug 10, 2021 at 03:17:43PM +0300, cla...@hotmail.com wrote: > > >> Gerd Hoffmann writes: > > >> > > >> Hell Gerd. > > >> > > >> > New maintainer wanted. Downgrade status to "Odd Fixes" for now. > > >> > >

Re: [PATCH for-6.2 14/25] hw/arm/stm32vldiscovery: Delete trailing blank line

2021-08-12 Thread Alexandre IOOSS
On 8/12/21 11:33 AM, Peter Maydell wrote: Delete the trailing blank line at the end of the source file. Signed-off-by: Peter Maydell --- hw/arm/stm32vldiscovery.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/arm/stm32vldiscovery.c b/hw/arm/stm32vldiscovery.c index 07e401a818d..9b79

Re: [PATCH for-6.2 10/25] hw/arm: Don't allocate separate MemoryRegions in stm32 SoC realize

2021-08-12 Thread Peter Maydell
On Thu, 12 Aug 2021 at 13:13, Alexandre IOOSS wrote: > > On 8/12/21 11:33 AM, Peter Maydell wrote: > > In the realize methods of the stm32f100 and stm32f205 SoC objects, we > > call g_new() to create new MemoryRegion objjects for the sram, flash, > > and flash_alias. This is unnecessary (and leav

Re: [PATCH-for-6.1?] target/i386: Fixed size of constant for Windows

2021-08-12 Thread Peter Maydell
On Thu, 12 Aug 2021 at 12:38, Philippe Mathieu-Daudé wrote: > > On 8/12/21 1:10 PM, Lara Lazier wrote: > > ~0UL has 64 bits on Linux and 32 bits on Windows. > > > Fixes: https://gitlab.com/qemu-project/qemu/-/issues/512";. > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/512 > Fixes: 34

Re: [PATCH-for-6.1?] target/i386: Fixed size of constant for Windows

2021-08-12 Thread Philippe Mathieu-Daudé
On 8/12/21 2:54 PM, Peter Maydell wrote: > On Thu, 12 Aug 2021 at 12:38, Philippe Mathieu-Daudé wrote: >> >> On 8/12/21 1:10 PM, Lara Lazier wrote: >>> ~0UL has 64 bits on Linux and 32 bits on Windows. >> >>> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/512";. >> >> Resolves: https://gitla

Re: [PATCH] configure: Remove spurious [] from tr

2021-08-12 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Thu, 12 Aug 2021 at 12:11, Dr. David Alan Gilbert (git) > wrote: > > > > From: "Dr. David Alan Gilbert" > > > > ShellCheck points out that tr '[a-z]' actually replaces the []'s > > and only the a-z is needed. > > > > Remove the spurious [] -

[PATCH] Hexagon (disas/hexagon.c) fix memory leak for early exit cases

2021-08-12 Thread Taylor Simpson
Don't allocate the string until error conditions have been checked Fixes: a00cfed0e ("Hexagon (disas) disassembler") Eliminate Coverity CID 1460121 (Resource leak) Signed-off-by: Taylor Simpson --- disas/hexagon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/disas/hexag

Re: [PATCH] Hexagon (disas/hexagon.c) fix memory leak for early exit cases

2021-08-12 Thread Peter Maydell
On Thu, 12 Aug 2021 at 14:09, Taylor Simpson wrote: > > Don't allocate the string until error conditions have been checked > > Fixes: a00cfed0e ("Hexagon (disas) disassembler") > Eliminate Coverity CID 1460121 (Resource leak) > > Signed-off-by: Taylor Simpson > --- > disas/hexagon.c | 3 ++- > 1

Re: [PATCH 3/7] MAINTAINERS: update audio entry.

2021-08-12 Thread Philippe Mathieu-Daudé
Hi all, On 8/12/21 2:24 PM, Christian Schoenebeck wrote: > On Donnerstag, 12. August 2021 10:42:10 CEST Gerd Hoffmann wrote: >> Hi, >> On Tue, Aug 10, 2021 at 03:17:43PM +0300, cla...@hotmail.com wrote: > Gerd Hoffmann writes: > > Hell Gerd. > >> New maintainer wanted.

Re: [PATCH] Hexagon (disas/hexagon.c) fix memory leak for early exit cases

2021-08-12 Thread Philippe Mathieu-Daudé
On 8/12/21 3:09 PM, Taylor Simpson wrote: > Don't allocate the string until error conditions have been checked > > Fixes: a00cfed0e ("Hexagon (disas) disassembler") > Eliminate Coverity CID 1460121 (Resource leak) > > Signed-off-by: Taylor Simpson > --- > disas/hexagon.c | 3 ++- > 1 file chang

Re: [PATCH] hw/acpi: refactor acpi hp modules so that targets can just use what they need

2021-08-12 Thread Ani Sinha
On Thu, 12 Aug 2021, Ani Sinha wrote: > Currently various acpi hotplug modules like cpu hotplug, memory hotplug, pci > hotplug, nvdimm hotplug are all pulled in when CONFIG_ACPI_X86 is turned on. > This brings in support for whole lot of subsystems that some targets like > mips does not need. T

Re: [PATCH] hw/acpi: refactor acpi hp modules so that targets can just use what they need

2021-08-12 Thread Philippe Mathieu-Daudé
On 8/12/21 3:22 PM, Ani Sinha wrote: > On Thu, 12 Aug 2021, Ani Sinha wrote: > >> Currently various acpi hotplug modules like cpu hotplug, memory hotplug, pci >> hotplug, nvdimm hotplug are all pulled in when CONFIG_ACPI_X86 is turned on. >> This brings in support for whole lot of subsystems that

Re: [PATCH] configure: Remove spurious [] from tr

2021-08-12 Thread Eric Blake
On Thu, Aug 12, 2021 at 02:05:36PM +0100, Dr. David Alan Gilbert wrote: > Indeed it's not; there's LOTS of warnings; although most of them are > probably irrelevant; there are also two others at the error level: > > In configure line 4406: > if "$ld" -verbose 2>&1 | grep -q "^[[:space:]]*$

[PATCH v3] vhost-vdpa: Do not send empty IOTLB update batches

2021-08-12 Thread Eugenio Pérez
With the introduction of the batch hinting, meaningless batches can be created with no IOTLB updates if the memory region was skipped by vhost_vdpa_listener_skipped_section. This is the case of host notifiers memory regions, device un/realize, and others. This causes the vdpa device to receive dma

[PATCH] hw/core/loader: In gunzip(), check index is in range before use, not after

2021-08-12 Thread Peter Maydell
The gunzip() function reads various fields from a passed in source buffer in order to skip a header before passing the actual compressed data to the zlib inflate() function. It does check whether the passed in buffer is too small, but unfortunately it checks that only after reading bytes from the

Re: [PATCH] q35: catch invalid cpu hotplug configuration

2021-08-12 Thread Igor Mammedov
On Thu, 12 Aug 2021 12:23:41 +0200 Gerd Hoffmann wrote: > Related: https://bugzilla.redhat.com//show_bug.cgi?id=1985924 > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov > --- > hw/isa/lpc_ich9.c | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/hw/isa/lpc_ich9

[PATCH] hw/riscv/virt.c: Assemble plic_hart_config string with g_strjoinv()

2021-08-12 Thread Peter Maydell
In the riscv virt machine init function, We assemble a string plic_hart_config which is a comma-separated list of N copies of the VIRT_PLIC_HART_CONFIG string. The code that does this has a misunderstanding of the strncat() length argument. If the source string is too large strncat() will write a

Re: [PULL 05/18] hw/riscv: virt: Allow creating multiple NUMA sockets

2021-08-12 Thread Peter Maydell
On Mon, 9 Aug 2021 at 10:46, Peter Maydell wrote: > > On Tue, 25 Aug 2020 at 20:03, Alistair Francis > wrote: > > > > From: Anup Patel > > > > We extend RISC-V virt machine to allow creating a multi-socket > > machine. Each RISC-V virt machine socket is a NUMA node having > > a set of HARTs, a

[PATCH] softmmu/physmem.c: Remove unneeded NULL check in qemu_ram_alloc_from_fd()

2021-08-12 Thread Peter Maydell
In the alignment check added to qemu_ram_alloc_from_fd() in commit ce317be98db0dfdfa, the condition includes a check that 'mr' is not NULL. This check is unnecessary because we can assume that the caller always passes us a valid MemoryRegion, and indeed later in the function we assume mr is not NU

[PATCH] softmmu/physmem.c: Check return value from realpath()

2021-08-12 Thread Peter Maydell
The realpath() function can return NULL on error, so we need to check for it to avoid crashing when we try to strstr() into it. This can happen if we run out of memory, or if /sys/ is not mounted, among other situations. Fixes: Coverity 1459913, 1460474 Fixes: ce317be98db0 ("exec: fetch the alignm

Re: [PATCH 09/10] hw/misc: Add Infineon DPS310 sensor model

2021-08-12 Thread Cédric Le Goater
On 8/11/21 3:25 AM, Joel Stanley wrote: > On Tue, 10 Aug 2021 at 23:37, Corey Minyard wrote: >> >> On Mon, Aug 09, 2021 at 03:15:55PM +0200, Cédric Le Goater wrote: >>> From: Joel Stanley >>> >>> This contains some hardcoded register values that were obtained from the >>> hardware after reading t

Re: [PATCH for 6.1] plugins: do not limit exported symbols if modules are active

2021-08-12 Thread Alex Bennée
Paolo Bonzini writes: > Il gio 12 ago 2021, 11:40 Alex Bennée ha scritto: > >ERROR: glib-2.56 gmodule-noexport-2.0 is required to compile QEMU > > Should it be gmodule-no-export? Hopefully the different distros aren't > packaging different .pc files. > > My bad. :( It's correct with the

Re: [PATCH] hw/acpi: refactor acpi hp modules so that targets can just use what they need

2021-08-12 Thread Ani Sinha
On Thu, 12 Aug 2021, Philippe Mathieu-Daudé wrote: > On 8/12/21 3:22 PM, Ani Sinha wrote: > > On Thu, 12 Aug 2021, Ani Sinha wrote: > > > >> Currently various acpi hotplug modules like cpu hotplug, memory hotplug, > >> pci > >> hotplug, nvdimm hotplug are all pulled in when CONFIG_ACPI_X86 is t

[PATCH v3 3/6] qapi: Simplify full_name_nth() in qobject-input-visitor

2021-08-12 Thread Kevin Wolf
Instead of counting how many elements from the top of the stack we need to ignore until we find the thing we're interested in, we can just directly pass the StackObject pointer because all callers already know it. We only need a different way now to tell if we want to know the name of something co

[PATCH v3 1/6] qapi: Add interfaces for alias support to Visitor

2021-08-12 Thread Kevin Wolf
This adds functions to the Visitor interface that can be used to define aliases and alias scopes. Signed-off-by: Kevin Wolf --- include/qapi/visitor-impl.h | 12 include/qapi/visitor.h | 59 ++--- qapi/qapi-visit-core.c | 22 ++ 3 fi

[PATCH v3 2/6] qapi: Remember alias definitions in qobject-input-visitor

2021-08-12 Thread Kevin Wolf
This makes qobject-input-visitor remember the currently valid aliases in each StackObject. It doesn't actually allow using the aliases yet. Signed-off-by: Kevin Wolf --- qapi/qobject-input-visitor.c | 147 +++ 1 file changed, 147 insertions(+) diff --git a/qapi/q

[PATCH v3 4/6] qapi: Apply aliases in qobject-input-visitor

2021-08-12 Thread Kevin Wolf
When looking for an object in a struct in the external representation, check not only the currently visited struct, but also whether an alias in the current StackObject matches and try to fetch the value from the alias then. Providing two values for the same object through different aliases is an e

[PATCH v3 0/6] qapi: Add support for aliases

2021-08-12 Thread Kevin Wolf
This series introduces alias definitions for QAPI object types (structs and unions). This allows using the same QAPI type and visitor even when the syntax has some variations between different external interfaces such as QMP and the command line. It also provides a new tool for evolving the schem

  1   2   >