[RFC PATCH 2/7] x86: Add AMX XTILECFG and XTILEDATA components

2022-01-07 Thread Yang Zhong
From: Jing Liu AMX XTILECFG and XTILEDATA are managed by XSAVE feature set. State component 17 is used for 64-byte TILECFG register (XTILECFG state) and component 18 is used for 8192 bytes of tile data (XTILEDATA state). Add AMX feature bits to x86_ext_save_areas array to set up AMX components.

[RFC PATCH 6/7] x86: Use new XSAVE ioctls handling

2022-01-07 Thread Yang Zhong
From: Jing Liu Extended feature has large state while current kvm_xsave only allows 4KB. Use new XSAVE ioctls if the xstate size is large than kvm_xsave. Signed-off-by: Jing Liu Signed-off-by: Zeng Guang Signed-off-by: Wei Wang Signed-off-by: Yang Zhong --- linux-headers/asm-x86/kvm.h | 14

Re: [PATCH] target/arm: Add missing FEAT_TLBIOS instructions

2022-01-07 Thread Peter Maydell
On Fri, 7 Jan 2022 at 01:25, Richard Henderson wrote: > > On 12/31/21 2:39 AM, Idan Horowitz wrote: > > Some of the instructions added by the FEAT_TLBIOS extension were forgotten > > when the extension was originally added to QEMU. > > > > Fixes: 7113d618505b ("target/arm: Add support for

[PATCH v9 7/7] net/vmnet: update MAINTAINERS list

2022-01-07 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f871d759fd..7184e41b8b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2633,6 +2633,11 @@ W: http://info.iet.unipi.it/~luigi/netmap/ S: Maintained F:

[PATCH v3 0/3] block: Minor vhost-user-blk fixes

2022-01-07 Thread Philippe Mathieu-Daudé
- Add vhost-user-blk help to qemu-storage-daemon, - Do not list vhost-user-blk in BlockExportType when CONFIG_VHOST_USER_BLK_SERVER is disabled. Since v2: - Fix typo (Eric) Since v1: - Reword patch 2 description (Markus) - Fix BlockExportOptions enum build failure (Markus) Philippe

[PULL v2 00/55] virtio,pci,pc: features,fixes,cleanups

2022-01-07 Thread Michael S. Tsirkin
Changes from v1: - mingw build fixes - added TPM patches which got acks meanwhile Big changes that were tagged originally but did not make the cut: - SRIOV/nvme (not sure they are my tree material anyway) - ACPI ERST (some coding style violations) The following changes since commit

[PULL v2 09/55] vhost: add support for configure interrupt

2022-01-07 Thread Michael S. Tsirkin
From: Cindy Lu Add functions to support configure interrupt. The configure interrupt process will start in vhost_dev_start and stop in vhost_dev_stop. Also add the functions to support vhost_config_pending and vhost_config_mask, for masked_config_notifier, we only use the notifier saved in vq

[PULL v2 18/55] vhost-backend: stick to -errno error return convention

2022-01-07 Thread Michael S. Tsirkin
From: Roman Kagan Almost all VhostOps methods in kernel_ops follow the convention of returning negated errno on error. Adjust the only one that doesn't. Signed-off-by: Roman Kagan Message-Id: <2021153354.18807-7-rvka...@yandex-team.ru> Reviewed-by: Michael S. Tsirkin Signed-off-by:

[PULL v2 29/55] util/oslib-posix: Let touch_all_pages() return an error

2022-01-07 Thread Michael S. Tsirkin
From: David Hildenbrand Let's prepare touch_all_pages() for returning differing errors. Return an error from the thread and report the last processed error. Translate SIGBUS to -EFAULT, as a SIGBUS can mean all different kind of things (memory error, read error, out of memory). When allocating

[PULL v2 28/55] hw/vhost-user-blk: turn on VIRTIO_BLK_F_SIZE_MAX feature for virtio blk device

2022-01-07 Thread Michael S. Tsirkin
From: Andy Pei Turn on pre-defined feature VIRTIO_BLK_F_SIZE_MAX for virtio blk device to avoid guest DMA request sizes which are too large for hardware spec. Signed-off-by: Andy Pei Message-Id: <1641202092-149677-1-git-send-email-andy@intel.com> Reviewed-by: Michael S. Tsirkin

[PULL v2 42/55] intel-iommu: correctly check passthrough during translation

2022-01-07 Thread Michael S. Tsirkin
From: Jason Wang When scalable mode is enabled, the passthrough more is not determined by the context entry but PASID entry, so switch to use the logic of vtd_dev_pt_enabled() to determine the passthrough mode in vtd_do_iommu_translate(). Signed-off-by: Jason Wang Message-Id:

Re: [PATCH 01/15] audio: replace open-coded buffer arithmetic

2022-01-07 Thread Volker Rümelin
Am Thu, 6 Jan 2022 10:23:18 +0100 schrieb Volker Rümelin : From: Volker Rümelin Replace open-coded buffer arithmetic with the available function audio_ring_dist(). Because the name audio_ring_dist implies it calculates the distance between two points, define the alias function name

[PULL v2 49/55] docs: reSTify virtio-balloon-stats documentation and move to docs/interop

2022-01-07 Thread Michael S. Tsirkin
From: Thomas Huth The virtio-balloon-stats documentation might be useful for people that are implementing software that talks to QEMU via QMP, so this should reside in the docs/interop/ directory. While we're at it, also convert the file to restructured text and mention it in the MAINTAINERS

[PATCH v3 0/6] support subsets of Float-Point in Integer Registers extensions

2022-01-07 Thread Weiwei Li
This patchset implements RISC-V Float-Point in Integer Registers extensions(Version 1.0.0-rc), which includes Zfinx, Zdinx, Zhinx and Zhinxmin extension. Specification: https://github.com/riscv/riscv-zfinx/blob/main/zfinx-1.0.0-rc.pdf The port is available here:

Re: [RFC PATCH 0/2] QEMU/openbios: PPC Software TLB support in the G4 family

2022-01-07 Thread Fabiano Rosas
Cédric Le Goater writes: > On 11/29/21 16:28, Fabiano Rosas wrote: >> Cédric Le Goater writes: >> > Right. If we're doing this to say "I can boot a kernel with a 7450 cpu in > QEMU" but > the implementation is different from real hardware, then I'm not sure > what the real

Re: [PATCH 2/5] hw/i2c: Added linear mode translation for pmbus devices

2022-01-07 Thread Philippe Mathieu-Daudé
On 7/1/22 00:09, Titus Rwantare wrote: From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Titus Rwantare --- hw/i2c/pmbus_device.c | 18 ++ include/hw/i2c/pmbus_device.h | 20 +++- 2 files changed, 37 insertions(+), 1 deletion(-)

[PATCH v3] hw/arm/virt: KVM: Enable PAuth when supported by the host

2022-01-07 Thread Marc Zyngier
Add basic support for Pointer Authentication when running a KVM guest and that the host supports it, loosely based on the SVE support. Although the feature is enabled by default when the host advertises it, it is possible to disable it by setting the 'pauth=off' CPU property. The 'pauth' comment

[PATCH] simplebench: Fix Python syntax error (reported by LGTM)

2022-01-07 Thread Stefan Weil
Signed-off-by: Stefan Weil --- scripts/simplebench/bench-example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/simplebench/bench-example.py b/scripts/simplebench/bench-example.py index 4864435f39..fc370691e0 100644 --- a/scripts/simplebench/bench-example.py +++

[PATCH] target/arm/cpu64: Use 32-bit GDBstub when running in 32-bit KVM mode

2022-01-07 Thread Ard Biesheuvel
When running under KVM, we may decide to run the CPU in 32-bit mode, by setting the 'aarch64=off' CPU option. In this case, we need to switch to the 32-bit version of the GDB stub too, so that GDB has the correct view of the CPU state. Without this, GDB debugging does not work at all, and errors

[PATCH v4 4/6] hw/arm/virt: Use the PA range to compute the memory map

2022-01-07 Thread Marc Zyngier
The highmem attribute is nothing but another way to express the PA range of a VM. To support HW that has a smaller PA range then what QEMU assumes, pass this PA range to the virt_set_memmap() function, allowing it to correctly exclude highmem devices if they are outside of the PA range.

[PATCH v4 3/6] hw/arm/virt: Honor highmem setting when computing the memory map

2022-01-07 Thread Marc Zyngier
Even when the VM is configured with highmem=off, the highest_gpa field includes devices that are above the 4GiB limit. Similarily, nothing seem to check that the memory is within the limit set by the highmem=off option. This leads to failures in virt_kvm_type() on systems that have a crippled IPA

[PATCH v4 5/6] hw/arm/virt: Disable highmem devices that don't fit in the PA range

2022-01-07 Thread Marc Zyngier
In order to only keep the highmem devices that actually fit in the PA range, check their location against the range and update highest_gpa if they fit. If they don't, mark them them as disabled. Signed-off-by: Marc Zyngier --- hw/arm/virt.c | 34 -- 1 file

Re: [PATCH v3 3/5] hw/arm/virt: Honor highmem setting when computing the memory map

2022-01-07 Thread Eric Auger
Hi Marc, On 1/6/22 10:26 PM, Marc Zyngier wrote: > On Wed, 05 Jan 2022 09:22:39 +, > Eric Auger wrote: >> Hi Marc, >> >> On 12/27/21 10:16 PM, Marc Zyngier wrote: >>> Even when the VM is configured with highmem=off, the highest_gpa >>> field includes devices that are above the 4GiB limit.

[PULL 01/19] Add dummy Aspeed AST2600 Display Port MCU (DPMCU)

2022-01-07 Thread Peter Maydell
From: Troy Lee AST2600 Display Port MCU introduces 0x1800~0x1803 as it's memory and io address. If guest machine try to access DPMCU memory, it will cause a fatal error. Signed-off-by: Troy Lee Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Message-id:

[PULL 02/19] target/arm: Add missing FEAT_TLBIOS instructions

2022-01-07 Thread Peter Maydell
From: Idan Horowitz Some of the instructions added by the FEAT_TLBIOS extension were forgotten when the extension was originally added to QEMU. Fixes: 7113d618505b ("target/arm: Add support for FEAT_TLBIOS") Signed-off-by: Idan Horowitz Reviewed-by: Richard Henderson Message-id:

[PULL 04/19] hw/intc/arm_gicv3_its: Remove redundant ITS_CTLR_ENABLED define

2022-01-07 Thread Peter Maydell
We currently define a bitmask for the GITS_CTLR ENABLED bit in two ways: as ITS_CTLR_ENABLED, and via the FIELD() macro as R_GITS_CTLR_ENABLED_MASK. Consistently use the FIELD macro version everywhere and remove the redundant ITS_CTLR_ENABLED define. Signed-off-by: Peter Maydell Reviewed-by:

[PULL 18/19] hw/arm: add i2c muxes to kudo-bmc

2022-01-07 Thread Peter Maydell
From: Patrick Venture Signed-off-by: Patrick Venture Reviewed-by: Hao Wu Reviewed-by: Philippe Mathieu-Daudé Message-id: 20220102215844.233-4-vent...@google.com Signed-off-by: Peter Maydell --- hw/arm/npcm7xx_boards.c | 9 + 1 file changed, 9 insertions(+) diff --git

[PULL 06/19] hw/intc/arm_gicv3_its: Don't return early in extract_table_params() loop

2022-01-07 Thread Peter Maydell
In extract_table_params() we process each GITS_BASER register. If the register's Valid bit is not set, this means there is no in-guest-memory table and so we should not try to interpret the other fields in the register. This was incorrectly coded as a 'return' rather than a 'break', so instead

Re: [PATCH] simplebench: Fix Python syntax error (reported by LGTM)

2022-01-07 Thread Philippe Mathieu-Daudé
On 1/7/22 16:30, Stefan Weil wrote: > Signed-off-by: Stefan Weil > --- > scripts/simplebench/bench-example.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/simplebench/bench-example.py > b/scripts/simplebench/bench-example.py > index 4864435f39..fc370691e0

[PATCH] libvhost-user: Fix wrong type of argument to formatting function (reported by LGTM)

2022-01-07 Thread Stefan Weil
Signed-off-by: Stefan Weil --- LGTM has some more alerts which need attention: https://lgtm.com/projects/g/qemu/qemu/ Regards, Stefan subprojects/libvhost-user/libvhost-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/libvhost-user/libvhost-user.c

Re: [PATCH v5 01/12] hw/misc: Add a model of Versal's PMC SLCR

2022-01-07 Thread Peter Maydell
On Tue, 14 Dec 2021 at 11:04, Francisco Iglesias wrote: > > Add a model of Versal's PMC SLCR (system-level control registers). > > Signed-off-by: Francisco Iglesias > Signed-off-by: Edgar E. Iglesias > --- > hw/misc/meson.build|5 +- >

test_isa_retry_flush() in ide-test.c

2022-01-07 Thread Thomas Huth
Hi John! I just notice that test_isa_retry_flush() is not doing anything useful anymore: It likely was supposed to run the test_retry_flush() function with the "isapc" machine type, but actually test_retry_flush() ignores the machine option parameter completely and always uses PCI accessor

[PATCH] hw/i386: Add the possibility to disable the 'isapc' machine

2022-01-07 Thread Thomas Huth
We already have a CONFIG_ISAPC switch - but we're not using it yet. Add some "#ifdefs" to make it possible to disable this machine now. Signed-off-by: Thomas Huth --- hw/i386/pc_piix.c| 5 - tests/qtest/cdrom-test.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff

Re: [PATCH v5 12/12] docs/devel: Add documentation for the DMA control interface

2022-01-07 Thread Peter Maydell
On Tue, 14 Dec 2021 at 11:04, Francisco Iglesias wrote: > > Also, since being the author, list myself as maintainer for the file. > > Signed-off-by: Francisco Iglesias > +DmaCtrlIfClass > +-- > + > +The ``DmaCtrlIfClass`` contains the interface methods that can be > +implemented by

[PULL 00/19] target-arm queue

2022-01-07 Thread Peter Maydell
-arm.git tags/pull-target-arm-20220107 for you to fetch changes up to b8905cc2dde95ca6be5e56d77053b1ca0b8fc182: hw/arm: kudo add lm75s on bus 13 (2022-01-07 17:08:01 +) target-arm queue: * Add dummy Aspeed AST2600 Display

[PULL 09/19] hw/intc/arm_gicv3_its: Don't misuse GITS_TYPE_PHYSICAL define

2022-01-07 Thread Peter Maydell
The GITS_TYPE_PHYSICAL define is the value we set the GITS_TYPER.Physical field to -- this is 1 to indicate that we support physical LPIs. (Support for virtual LPIs is the GITS_TYPER.Virtual field.) We also use this define as the *value* that we write into an interrupt translation table entry's

[PULL 07/19] hw/intc/arm_gicv3_its: Reduce code duplication in extract_table_params()

2022-01-07 Thread Peter Maydell
The extract_table_params() decodes the fields in the GITS_BASER registers into TableDesc structs. Since the fields are the same for all the GITS_BASER registers, there is currently a lot of code duplication within the switch (type) statement. Refactor so that the cases include only what is

[PULL 13/19] hw/intc/arm_gicv3_its: Use FIELD macros for CTEs

2022-01-07 Thread Peter Maydell
Use FIELD macros to handle CTEs, rather than ad-hoc mask-and-shift. Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- hw/intc/gicv3_internal.h | 3 ++- hw/intc/arm_gicv3_its.c | 7 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git

[PULL 17/19] hw/arm: attach MMC to kudo-bmc

2022-01-07 Thread Peter Maydell
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Message-id: 20220102215844.233-3-vent...@google.com Signed-off-by: Peter Maydell --- hw/arm/npcm7xx_boards.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/npcm7xx_boards.c

Re: [PATCH v3 0/3] hw/net: Move MV88W8618 network device out of hw/arm/ directory

2022-01-07 Thread Philippe Mathieu-Daudé
On 1/6/22 15:48, Peter Maydell wrote: > On Fri, 17 Dec 2021 at 23:30, Philippe Mathieu-Daudé wrote: >> >> This series simply extract the MV88W8618 device from the ARM >> machine in hw/arm/ and move it to hw/net/. >> >> Since v2: >> - declare MARVELL_88W8618 in hw/arm/Kconfig >> - use

[RFC PATCH 5/7] x86: Add AMX CPUIDs enumeration

2022-01-07 Thread Yang Zhong
From: Jing Liu Add AMX primary feature bits XFD and AMX_TILE to enumerate the CPU's AMX capability. Meanwhile, add AMX TILE and TMUL CPUID leaf and subleaves which exist when AMX TILE is present to provide the maximum capability of TILE and TMUL. Signed-off-by: Jing Liu Signed-off-by: Yang

Re: [PATCH] q800: fix segfault with invalid MacROM

2022-01-07 Thread Laurent Vivier
Le 07/01/2022 à 10:47, BALATON Zoltan a écrit : On Fri, 7 Jan 2022, Laurent Vivier wrote: Le 07/01/2022 à 09:15, Mark Cave-Ayland a écrit : On 06/01/2022 12:22, Laurent Vivier wrote: "qemu-system-m68k -M q800 -bios /dev/null" crahses with a segfault in q800_init(). This happens because the

[PATCH v9 2/7] net/vmnet: add vmnet backends to qapi/net

2022-01-07 Thread Vladislav Yaroshchuk
Create separate netdevs for each vmnet operating mode: - vmnet-host - vmnet-shared - vmnet-bridged Signed-off-by: Vladislav Yaroshchuk --- net/clients.h | 11 net/meson.build | 7 +++ net/net.c | 10 net/vmnet-bridged.m | 25 + net/vmnet-common.m |

Re: [PATCH v2 1/2] qemu-storage-daemon: Add vhost-user-blk help

2022-01-07 Thread Philippe Mathieu-Daudé
On 1/6/22 23:15, Eric Blake wrote: > On Thu, Dec 23, 2021 at 11:14:25AM +0100, Philippe Mathieu-Daudé wrote: >> Add missing vhost-user-blk help: >> >> $ qemu-storage-daemon -h >> ... >> --export [type=]vhost-user-blk,id=,node-name=, >>

Re: [PATCH] tests/tcg/loongson64: Add float reference files

2022-01-07 Thread Alex Bennée
gaosong writes: > Hi Philippe, > > On 2022/1/4 下午9:20, Philippe Mathieu-Daudé wrote: > > Generated on Loongson-3A5000 (CPU revision 0x0014c011). > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/tcg/loongson64/float_convs.ref | 748 ++ >

[PULL v2 04/55] virtio-pci: decouple notifier from interrupt process

2022-01-07 Thread Michael S. Tsirkin
From: Cindy Lu To reuse the notifier process in configure interrupt. Use the virtio_pci_get_notifier function to get the notifier. the INPUT of this function is the IDX, the OUTPUT is notifier and the vector Signed-off-by: Cindy Lu Message-Id: <20211104164827.21911-3-l...@redhat.com>

[PULL v2 19/55] vhost-vdpa: stick to -errno error return convention

2022-01-07 Thread Michael S. Tsirkin
From: Roman Kagan Almost all VhostOps methods in vdpa_ops follow the convention of returning negated errno on error. Adjust the few that don't. To that end, rework vhost_vdpa_add_status to check if setting of the requested status bits has succeeded and return the respective error code it

[PULL v2 30/55] util/oslib-posix: Support MADV_POPULATE_WRITE for os_mem_prealloc()

2022-01-07 Thread Michael S. Tsirkin
From: David Hildenbrand Let's sense support and use it for preallocation. MADV_POPULATE_WRITE does not require a SIGBUS handler, doesn't actually touch page content, and avoids context switches; it is, therefore, faster and easier to handle than our current approach. While MADV_POPULATE_WRITE

[PULL v2 27/55] hw/i386: expose a "smbios-entry-point-type" PC machine property

2022-01-07 Thread Michael S. Tsirkin
From: Eduardo Habkost The i440fx and Q35 machine types are both hardcoded to use the legacy SMBIOS 2.1 (32-bit) entry point. This is a sensible conservative choice because SeaBIOS only supports SMBIOS 2.1 EDK2, however, can also support SMBIOS 3.0 (64-bit) entry points, and QEMU already uses

[PULL v2 50/55] hw/scsi/vhost-scsi: don't leak vqs on error

2022-01-07 Thread Michael S. Tsirkin
From: Daniil Tatianin vhost_dev_init calls vhost_dev_cleanup in case of an error during initialization, which zeroes out the entire vsc->dev as well as the vsc->dev.vqs pointer. This prevents us from properly freeing it in free_vqs. Keep a local copy of the pointer so we can free it later.

[PULL v2 54/55] acpi: tpm: Add missing device identification objects

2022-01-07 Thread Michael S. Tsirkin
From: Stefan Berger Add missing TPM device identification objects _STR and _UID. They will appear as files 'description' and 'uid' under Linux sysfs. Following inspection of sysfs entries for hardware TPMs we chose uid '1'. Cc: Shannon Zhao Cc: Michael S. Tsirkin Cc: Igor Mammedov Cc: Ani

Re: [PATCH] meson.build: Print gtk version in the summary info

2022-01-07 Thread Thomas Huth
On 05/01/2022 20.08, Thomas Huth wrote: The "gtk" variable is re-declared as "dependencies: [gtk, gtkx11]", so there is just a "YES" in the summary info if gtk has been found. Let's use the info from the library detection instead so that the library version is printed in the summary instead.

[PULL v2 40/55] virtio-mem: Support VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE

2022-01-07 Thread Michael S. Tsirkin
From: David Hildenbrand With VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE, we signal the VM that reading unplugged memory is not supported. We have to fail feature negotiation in case the guest does not support VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE. First, VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE is required

[PATCH] meson: build all modules by default

2022-01-07 Thread Paolo Bonzini
With more recent versions of Meson, the build.ninja file is more selective as to what is built by default, and not building the modules results in test failures. Mark the modules as built-by-default and, to make the dependencies more precise, also require them to be up-to-date before running

[PATCH] softmmu/device_tree: Silence compiler warning with --enable-sanitizers

2022-01-07 Thread Thomas Huth
If I configure my build with --enable-sanitizers, my GCC (v8.5.0) complains: .../softmmu/device_tree.c: In function ‘qemu_fdt_add_path’: .../softmmu/device_tree.c:560:18: error: ‘retval’ may be used uninitialized in this function [-Werror=maybe-uninitialized] int namelen, retval;

Re: [PATCH v5 02/12] hw/arm/xlnx-versal: 'Or' the interrupts from the BBRAM and RTC models

2022-01-07 Thread Peter Maydell
On Tue, 14 Dec 2021 at 11:04, Francisco Iglesias wrote: > > Add an orgate and 'or' the interrupts from the BBRAM and RTC models. > > Signed-off-by: Francisco Iglesias > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v5 07/12] hw/ssi: Add a model of Xilinx Versal's OSPI flash memory controller

2022-01-07 Thread Peter Maydell
On Tue, 14 Dec 2021 at 11:04, Francisco Iglesias wrote: > > Add a model of Xilinx Versal's OSPI flash memory controller. > > Signed-off-by: Francisco Iglesias > --- Reviewed-by: Peter Maydell thanks -- PMM

[PATCH v4 0/6] target/arm: Reduced-IPA space and highmem fixes

2022-01-07 Thread Marc Zyngier
Here's another stab at enabling QEMU on systems with pathologically reduced IPA ranges such as the Apple M1 (previous version at [1]). Eventually, we're able to run a KVM guest with more than just 3GB of RAM on a system with a 36bit IPA space, and at most 123 vCPUs. This also addresses some

[PATCH v4 2/6] hw/arm/virt: Add a control for the the highmem redistributors

2022-01-07 Thread Marc Zyngier
Just like we can control the enablement of the highmem PCIe region using highmem_ecam, let's add a control for the highmem GICv3 redistributor region. Similarily to highmem_ecam, these redistributors are disabled when highmem is off. Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier ---

Re: [PATCH v3 2/2] hw/arm/virt: Support for virtio-mem-pci

2022-01-07 Thread Peter Maydell
On Fri, 3 Dec 2021 at 23:34, Gavin Shan wrote: > > This supports virtio-mem-pci device on "virt" platform, by simply > following the implementation on x86. > >* This implements the hotplug handlers to support virtio-mem-pci > device hot-add, while the hot-remove isn't supported as we

[PATCH v4 6/6] hw/arm/virt: Drop superfluous checks against highmem

2022-01-07 Thread Marc Zyngier
Now that the devices present in the extended memory map are checked against the available PA space and disabled when they don't fit, there is no need to keep the same checks against highmem, as highmem really is a shortcut for the PA space being 32bit. Signed-off-by: Marc Zyngier ---

Re: [PATCH] meson: build all modules by default

2022-01-07 Thread Li Zhang
On 1/7/22 1:01 PM, Paolo Bonzini wrote: With more recent versions of Meson, the build.ninja file is more selective as to what is built by default, and not building the modules results in test failures. Mark the modules as built-by-default and, to make the dependencies more precise, also require

Wiki: Update package name in build instructions

2022-01-07 Thread Lucas Hecht
Hi there, could someone please give me a wiki account or make this minor change themself: In the wiki article "Host/Linux" under "Recommended additional packages" libvte-2.90-dev should be changed to libvte-2.91-dev since the former is not available anymore. Thanks Lucas

[PULL 08/19] hw/intc/arm_gicv3_its: Correct setting of TableDesc entry_sz

2022-01-07 Thread Peter Maydell
We set the TableDesc entry_sz field from the appropriate GITS_BASER.ENTRYSIZE field. That ID register field specifies the number of bytes per table entry minus one. However when we use td->entry_sz we assume it to be the number of bytes per table entry (for instance we calculate the number of

[PULL 14/19] hw/intc/arm_gicv3_its: Fix various off-by-one errors

2022-01-07 Thread Peter Maydell
The ITS code has to check whether various parameters passed in commands are in-bounds, where the limit is defined in terms of the number of bits that are available for the parameter. (For example, the GITS_TYPER.Devbits ID register field specifies the number of DeviceID bits minus 1, and device

[PULL 19/19] hw/arm: kudo add lm75s on bus 13

2022-01-07 Thread Peter Maydell
From: Patrick Venture Add the four lm75s behind the mux on bus 13. Tested by booting the firmware: lm75 42-0048: hwmon0: sensor 'lm75' lm75 43-0049: supply vs not found, using dummy regulator lm75 43-0049: hwmon1: sensor 'lm75' lm75 44-0048: supply vs not found, using dummy regulator lm75

Re: [PATCH v3 3/5] hw/arm/virt: Honor highmem setting when computing the memory map

2022-01-07 Thread Marc Zyngier
Hi Eric, On Fri, 07 Jan 2022 17:15:19 +, Eric Auger wrote: > > Hi Marc, > > On 1/6/22 10:26 PM, Marc Zyngier wrote: > > On Wed, 05 Jan 2022 09:22:39 +, > > Eric Auger wrote: > >> Hi Marc, > >> > >> On 12/27/21 10:16 PM, Marc Zyngier wrote: > >>> Even when the VM is configured with

[PATCH v2 1/6] hw/usb: Add CanoKey Implementation

2022-01-07 Thread Hongren (Zenithal) Zheng
This commit added a new emulated device called CanoKey to QEMU. CanoKey implements platform independent features in canokey-core https://github.com/canokeys/canokey-core, and leaves the USB implementation to the platform. In this commit the USB part was implemented in QEMU using QEMU's USB APIs,

[PATCH v2 6/6] MAINTAINERS: add myself as CanoKey maintainer

2022-01-07 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f871d759fd..51dae611fa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2296,6 +2296,14 @@ F: hw/timer/mips_gictimer.c F: include/hw/intc/mips_gic.h

[PATCH v2 0/6] Introduce CanoKey QEMU

2022-01-07 Thread Hongren (Zenithal) Zheng
- One sentense With this patch series, QEMU would fully emulate an open-source secure key, CanoKey, with supports of various features listed below: * U2F / FIDO2 with Ed25519 and HMAC-secret * OpenPGP Card V3.4 with RSA4096, Ed25519 and more * PIV (NIST SP 800-73-4) * HOTP / TOTP - What's

Re: [PATCH v5 08/12] hw/arm/xlnx-versal: Connect the OSPI flash memory controller model

2022-01-07 Thread Peter Maydell
On Tue, 14 Dec 2021 at 11:04, Francisco Iglesias wrote: > > Connect the OSPI flash memory controller model (including the source and > destination DMA). > > Signed-off-by: Francisco Iglesias Reviewed-by: Peter Maydell thanks -- PMM

[PATCH v4 1/6] hw/arm/virt: Add a control for the the highmem PCIe MMIO

2022-01-07 Thread Marc Zyngier
Just like we can control the enablement of the highmem PCIe ECAM region using highmem_ecam, let's add a control for the highmem PCIe MMIO region. Similarily to highmem_ecam, this region is disabled when highmem is off. Signed-off-by: Marc Zyngier --- hw/arm/virt-acpi-build.c | 10 --

[PULL 12/19] hw/intc/arm_gicv3_its: Correct comment about CTE RDBase field size

2022-01-07 Thread Peter Maydell
The comment says that in our CTE format the RDBase field is 36 bits; in fact for us it is only 16 bits, because we use the RDBase format where it specifies a 16-bit CPU number. The code already uses RDBASE_PROCNUM_LENGTH (16) as the field width, so fix the comment to match it. Signed-off-by:

[PULL 16/19] hw/arm: Add kudo i2c eeproms.

2022-01-07 Thread Peter Maydell
From: Chris Rauer Signed-off-by: Chris Rauer Reviewed-by: Hao Wu Reviewed-by: Patrick Venture Reviewed-by: Philippe Mathieu-Daudé Message-id: 20220102215844.233-2-vent...@google.com Signed-off-by: Peter Maydell --- hw/arm/npcm7xx_boards.c | 8 1 file changed, 8 insertions(+)

[PULL 11/19] hw/intc/arm_gicv3_its: Use FIELD macros for DTEs

2022-01-07 Thread Peter Maydell
Currently the ITS code that reads and writes DTEs uses open-coded shift-and-mask to assemble the various fields into the 64-bit DTE word. The names of the macros used for mask and shift values are also somewhat inconsistent, and don't follow our usual convention that a MASK macro should specify

[PULL 05/19] hw/intc/arm_gicv3_its: Remove maxids union from TableDesc

2022-01-07 Thread Peter Maydell
The TableDesc struct defines properties of the in-guest-memory tables which the guest tells us about by writing to the GITS_BASER registers. This struct currently has a union 'maxids', but all the fields of the union have the same type (uint32_t) and do the same thing (record one-greater-than the

[PULL 03/19] hw/intc/arm_gicv3_its: Correct off-by-one bounds check on rdbase

2022-01-07 Thread Peter Maydell
The checks in the ITS on the rdbase values in guest commands are off-by-one: they permit the guest to pass us a value equal to s->gicv3->num_cpu, but the valid values are 0...num_cpu-1. This meant the guest could cause us to index off the end of the s->gicv3->cpu[] array when calling

Re: [PATCH] configure: Silence warnings about missing roms/seabios directory

2022-01-07 Thread Paolo Bonzini
On 1/7/22 13:15, Thomas Huth wrote: The configure script tries to always create a config.mak file in the roms/seabios/ subdirectory. However, since commit 5dce7b8d8ce6 ("configure: remove DIRS"), this subdirectory is not created anymore if the git submodule hasn't been checked out. Thus let's

Re: [PATCH] hw/sensor: enable setting adm1272 temperature with qmp

2022-01-07 Thread Patrick Venture
On Fri, Jan 7, 2022 at 5:24 AM Thomas Huth wrote: > On 06/01/2022 18.38, Patrick Venture wrote: > > From: Titus Rwantare > > > > Reviewed-by: Patrick Venture > > Reviewed-by: Chris Rauer > > Reviewed-by: Hao Wu > > Signed-off-by: Titus Rwantare > > --- > > hw/sensor/adm1272.c| 27

[PATCH v2 4/6] docs: Add CanoKey documentation

2022-01-07 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- docs/canokey.txt | 140 +++ 1 file changed, 140 insertions(+) create mode 100644 docs/canokey.txt diff --git a/docs/canokey.txt b/docs/canokey.txt new file mode 100644 index 00..6d6ba19740 ---

[PATCH v2 5/6] docs/system/devices/usb: Add CanoKey to USB devices examples

2022-01-07 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- docs/system/devices/usb.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/system/devices/usb.rst b/docs/system/devices/usb.rst index afb7d6c226..341694403a 100644 --- a/docs/system/devices/usb.rst +++ b/docs/system/devices/usb.rst @@

Re: [PATCH v8 07/18] target/riscv: setup everything for rv64 to support rv128 execution

2022-01-07 Thread Frédéric Pétrot
On 07/01/2022 07:47, Alistair Francis wrote: On Fri, Jan 7, 2022 at 4:23 PM Frédéric Pétrot wrote: On 06/01/2022 22:24, Alistair Francis wrote: On Fri, Jan 7, 2022 at 7:04 AM Frédéric Pétrot wrote: This patch adds the support of the '-cpu rv128' option to qemu-system-riscv64 so that we

Re: [PATCH] hw/intc/arm_gic: Allow reset of the running priority

2022-01-07 Thread Peter Maydell
On Tue, 14 Dec 2021 at 17:28, Petr Pavlu wrote: > When running Linux on a machine with GICv2, the kernel can crash while > processing an interrupt and can subsequently start a kdump kernel from > the active interrupt handler. In such a case, the crashed kernel might > not gracefully signal the

Re: [PATCH 0/4] hw/arm: Add more devices to kudo-bmc

2022-01-07 Thread Peter Maydell
On Sun, 2 Jan 2022 at 21:58, Patrick Venture wrote: > > This series of patches adds various devices that are defined in the > device-tree for this board. > > Chris Rauer (1): > hw/arm: Add kudo i2c eeproms. > > Patrick Venture (2): > hw/arm: add i2c muxes to kudo-bmc > hw/arm: kudo add

[PULL 10/19] hw/intc/arm_gicv3_its: Correct handling of MAPI

2022-01-07 Thread Peter Maydell
The MAPI command takes arguments DeviceID, EventID, ICID, and is defined to be equivalent to MAPTI DeviceID, EventID, EventID, ICID. (That is, where MAPTI takes an explicit pINTID, MAPI uses the EventID as the pINTID.) We didn't quite get this right. In particular the error checks for MAPI

[PULL 15/19] hw/intc/arm_gicv3_its: Rename max_l2_entries to num_l2_entries

2022-01-07 Thread Peter Maydell
In several places we have a local variable max_l2_entries which is the number of entries which will fit in a level 2 table. The calculations done on this value are correct; rename it to num_l2_entries to fit the convention we're using in this code. Signed-off-by: Peter Maydell Reviewed-by: Alex

Re: test_isa_retry_flush() in ide-test.c

2022-01-07 Thread Paolo Bonzini
On 1/7/22 17:01, Thomas Huth wrote:  Hi John! I just notice that test_isa_retry_flush() is not doing anything useful anymore: It likely was supposed to run the test_retry_flush() function with the "isapc" machine type, but actually test_retry_flush() ignores the machine option parameter

[PATCH v2 2/6] hw/usb/canokey: Add trace events

2022-01-07 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- hw/usb/canokey.c| 17 + hw/usb/trace-events | 17 + 2 files changed, 34 insertions(+) diff --git a/hw/usb/canokey.c b/hw/usb/canokey.c index 6bd4dedfd2..c8cc31ba9e 100644 --- a/hw/usb/canokey.c +++

[PATCH v2 3/6] meson: Add CanoKey

2022-01-07 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- hw/usb/Kconfig| 5 + hw/usb/meson.build| 3 +++ meson.build | 6 ++ meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 5 files changed, 19 insertions(+) diff --git

Re: [PATCH v5 03/12] hw/arm/xlnx-versal: Connect Versal's PMC SLCR

2022-01-07 Thread Peter Maydell
On Tue, 14 Dec 2021 at 11:04, Francisco Iglesias wrote: > > Connect Versal's PMC SLCR (system-level control registers) model. > > Signed-off-by: Francisco Iglesias > --- > hw/arm/xlnx-versal.c | 71 > +++- > include/hw/arm/xlnx-versal.h | 5

Re: [PATCH v2 1/5] hw/arm/virt: Key enablement of highmem PCIe on highmem_ecam

2022-01-07 Thread Eric Auger
Hi Marc, On 1/6/22 8:34 PM, Marc Zyngier wrote: > Hi Eric, > > On Wed, 05 Jan 2022 09:41:19 +, > Eric Auger wrote: >> couldn't you simply introduce highmem_redist which is truly missing. You >> could set it in virt_set_memmap() in case you skip extended_map overlay >> and use it in

Re: [PATCH] hw/i386: Add the possibility to disable the 'isapc' machine

2022-01-07 Thread Paolo Bonzini
On 1/7/22 17:07, Thomas Huth wrote: We already have a CONFIG_ISAPC switch - but we're not using it yet. Add some "#ifdefs" to make it possible to disable this machine now. Signed-off-by: Thomas Huth --- hw/i386/pc_piix.c| 5 - tests/qtest/cdrom-test.c | 2 +- 2 files changed, 5

[RFC PATCH 1/7] x86: Fix the 64-byte boundary enumeration for extended state

2022-01-07 Thread Yang Zhong
From: Jing Liu The extended state subleaves (EAX=0Dh, ECX=n, n>1).ECX[1] are all zero, while spec actually introduces that bit 01 should indicate if the extended state component locates on the next 64-byte boundary following the preceding state component when the compacted format of an XSAVE

[PATCH v3 2/3] qemu-storage-daemon: Add vhost-user-blk help

2022-01-07 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Add missing vhost-user-blk help: $ qemu-storage-daemon -h ... --export [type=]vhost-user-blk,id=,node-name=, addr.type=unix,addr.path=[,writable=on|off] [,logical-block-size=][,num-queues=] export the

[PULL v2 07/55] vhost-vdpa: add support for config interrupt

2022-01-07 Thread Michael S. Tsirkin
From: Cindy Lu Add new call back function in vhost-vdpa, this function will set the event fd to kernel. This function will be called in the vhost_dev_start and vhost_dev_stop Signed-off-by: Cindy Lu Message-Id: <20211104164827.21911-6-l...@redhat.com> Reviewed-by: Michael S. Tsirkin

[PULL v2 06/55] vhost: introduce new VhostOps vhost_set_config_call

2022-01-07 Thread Michael S. Tsirkin
From: Cindy Lu This patch introduces new VhostOps vhost_set_config_call. This function allows the vhost to set the event fd to kernel Signed-off-by: Cindy Lu Message-Id: <20211104164827.21911-5-l...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[PULL v2 14/55] vhost-user-blk: reconnect on any error during realize

2022-01-07 Thread Michael S. Tsirkin
From: Roman Kagan vhost-user-blk realize only attempts to reconnect if the previous connection attempt failed on "a problem with the connection and not an error related to the content (which would fail again the same way in the next attempt)". However this distinction is very subtle, and may be

[PULL v2 45/55] tests: acpi: add SLIC table test

2022-01-07 Thread Michael S. Tsirkin
From: Igor Mammedov When user uses '-acpitable' to add SLIC table, some ACPI tables (FADT) will change its 'Oem ID'/'Oem Table ID' fields to match that of SLIC. Test makes sure thati QEMU handles those fields correctly when SLIC table is added with '-acpitable' option. Signed-off-by: Igor

[PULL v2 25/55] smbios: Rename SMBIOS_ENTRY_POINT_* enums

2022-01-07 Thread Michael S. Tsirkin
From: Eduardo Habkost Rename the enums to match the naming style used by QAPI, and to use "32" and "64" instead of "20" and "31". This will allow us to more easily move the enum to the QAPI schema later. About the naming choice: "SMBIOS 2.1 entry point"/"SMBIOS 3.0 entry point" and "32-bit

[PULL v2 24/55] pcie_aer: Don't trigger a LSI if none are defined

2022-01-07 Thread Michael S. Tsirkin
From: Frederic Barrat Skip triggering an LSI when the AER root error status is updated if no LSI is defined for the device. We can have a root bridge with no LSI, MSI and MSI-X defined, for example on POWER systems. Signed-off-by: Frederic Barrat Message-Id:

  1   2   3   4   5   >