Re: downstream extensions

2022-02-10 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Hi all! > > We declare a kind of __com.redhat_drive-mirror syntax for downstream > extensions of QAPI. > > That's inconvenient: > > Assume I want to merge now my keep-dirty option for Qcow2 driver "[PATCH v2 > 0/2] qcow2: add keep-dirty open option" to our

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Michael S. Tsirkin
On Thu, Feb 10, 2022 at 12:08:27AM +, Jag Raman wrote: > > > > On Feb 2, 2022, at 12:34 AM, Alex Williamson > > wrote: > > > > On Wed, 2 Feb 2022 01:13:22 + > > Jag Raman wrote: > > > >>> On Feb 1, 2022, at 5:47 PM, Alex Williamson > >>> wrote: > >>> > >>> On Tue, 1 Feb 2022 21:24

qemu iotest 161 and make check

2022-02-10 Thread Christian Borntraeger
Hello, I do see spurious failures of 161 in our CI, but only when I use make check with parallelism (-j). I have not yet figured out which other testcase could interfere @@ -34,6 +34,8 @@ *** Commit and then change an option on the backing file Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT

[PATCH] hw/net: e1000e: Clear ICR on read when using non MSI-X interrupts

2022-02-10 Thread Nick Hudson
In section 7.4.3 of the 82574 datasheet it states that "In systems that do not support MSI-X, reading the ICR register clears it's bits..." Some OSes rely on this. Signed-off-by: Nick Hudson --- hw/net/e1000e_core.c | 5 + hw/net/trace-events | 1 + 2 files changed, 6 insertions(

Re: [PATCH v9 00/23] QEMU RISC-V AIA support

2022-02-10 Thread Atish Patra
On Mon, Feb 7, 2022 at 10:51 PM Alistair Francis wrote: > > On Tue, Feb 8, 2022 at 2:16 PM Alistair Francis wrote: > > > > On Sat, Feb 5, 2022 at 3:47 AM Anup Patel wrote: > > > > > > From: Anup Patel > > > > > > The advanced interrupt architecture (AIA) extends the per-HART local > > > interru

Re: [PATCH 03/15] hw/tricore: Remove unused and incorrect header

2022-02-10 Thread Thomas Huth
On 09/02/2022 22.54, Philippe Mathieu-Daudé wrote: TriCore boards certainly don't need the ARM loader API :) Signed-off-by: Philippe Mathieu-Daudé --- include/hw/tricore/triboard.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/tricore/triboard.h b/include/hw/tricore/triboard.

Re: [PATCH] hw/vhost-user-i2c: Add support for VIRTIO_I2C_F_ZERO_LENGTH_REQUEST

2022-02-10 Thread Alex Bennée
Viresh Kumar writes: > VIRTIO_I2C_F_ZERO_LENGTH_REQUEST is a mandatory feature, that must be > implemented by everyone. Add its support. > > Signed-off-by: Viresh Kumar Reviewed-by: Alex Bennée but... > BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(vdev))); > @@ -113,8 +117,10 @@ s

Re: [PATCH 02/15] hw/m68k/mcf: Add missing 'exec/hwaddr.h' header

2022-02-10 Thread Thomas Huth
On 09/02/2022 22.54, Philippe Mathieu-Daudé wrote: hwaddr type is defined in "exec/hwaddr.h". Signed-off-by: Philippe Mathieu-Daudé --- include/hw/m68k/mcf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/m68k/mcf.h b/include/hw/m68k/mcf.h index decf17ce42..8cbd587bbf 100644

Re: [PATCH] Deprecate C virtiofsd

2022-02-10 Thread Daniel P . Berrangé
On Wed, Feb 09, 2022 at 04:50:40PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > There's a nice new Rust implementation out there; recommend people > do new work on that. > > Signed-off-by: Dr. David Alan Gilbert > --- > docs/about/deprecated.rst | 14

[PATCH 1/2] intel-iommu: remove VTD_FR_RESERVED_ERR

2022-02-10 Thread Jason Wang
This fault reason is not used and is duplicated with SPT.2 condition code. So let's remove it. Signed-off-by: Jason Wang --- hw/i386/intel_iommu.c | 6 -- hw/i386/intel_iommu_internal.h | 5 - 2 files changed, 11 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_i

[PATCH 2/2] intel-iommu: block output address in interrupt address range

2022-02-10 Thread Jason Wang
According to vtd spec v3.3 3.14: """ Software must not program paging-structure entries to remap any address to the interrupt address range. Untranslated requests and translation requests that result in an address in the interrupt range will be blocked with condition code LGN.4 or SGN.8. """ This

Re: [PATCH v3 2/3] qapi/ui: display-reload: add possibility to change listen address

2022-02-10 Thread Vladimir Sementsov-Ogievskiy
09.02.2022 21:33, Daniel P. Berrangé wrote: On Tue, Jan 18, 2022 at 05:09:08PM +0100, Vladimir Sementsov-Ogievskiy wrote: Add possibility to change addresses where VNC server listens for new connections. Prior to 6.0 this functionality was available through 'change' qmp command which was deleted

Re: [PATCH 1/2] intel-iommu: remove VTD_FR_RESERVED_ERR

2022-02-10 Thread Peter Xu
On Thu, Feb 10, 2022 at 05:28:14PM +0800, Jason Wang wrote: > This fault reason is not used and is duplicated with SPT.2 condition > code. So let's remove it. > > Signed-off-by: Jason Wang Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH 2/2] intel-iommu: block output address in interrupt address range

2022-02-10 Thread Peter Xu
On Thu, Feb 10, 2022 at 05:28:15PM +0800, Jason Wang wrote: > According to vtd spec v3.3 3.14: > > """ > Software must not program paging-structure entries to remap any > address to the interrupt address range. Untranslated requests and > translation requests that result in an address in the inter

Re: [PATCH 1/1] virtio: fix feature negotiation for ACCESS_PLATFORM

2022-02-10 Thread Cornelia Huck
On Wed, Feb 09 2022, Halil Pasic wrote: > On Wed, 09 Feb 2022 18:24:56 +0100 > Cornelia Huck wrote: > >> On Wed, Feb 09 2022, Halil Pasic wrote: >> > @@ -78,16 +78,19 @@ void virtio_bus_device_plugged(VirtIODevice *vdev, >> > Error **errp) >> > return; >> > } >> > >> > -vde

[PATCH v12 1/8] virtio: drop name parameter for virtio_init()

2022-02-10 Thread Jonah Palmer
This patch drops the name parameter for the virtio_init function. The pair between the numeric device ID and the string device ID (name) of a virtio device already exists, but not in a way that lets us map between them. This patch lets us do this and removes the need for the name parameter in the

[PATCH v12 2/8] virtio: add vhost support for virtio devices

2022-02-10 Thread Jonah Palmer
This patch adds a get_vhost() callback function for VirtIODevices that returns the device's corresponding vhost_dev structure, if the vhost device is running. This patch also adds a vhost_started flag for VirtIODevices. Previously, a VirtIODevice wouldn't be able to tell if its corresponding vhost

[PATCH v12 3/8] qmp: add QMP command x-query-virtio

2022-02-10 Thread Jonah Palmer
From: Laurent Vivier This new command lists all the instances of VirtIODevices with their canonical QOM path and name. [Jonah: @virtio_list duplicates information that already exists in the QOM composition tree. However, extracting necessary information from this tree seems to be a bit convolu

[PATCH v12 0/8] hmp,qmp: Add commands to introspect virtio devices

2022-02-10 Thread Jonah Palmer
This series introduces new QMP/HMP commands to dump the status of a virtio device at different levels. [Jonah: Rebasing from previous patchset from Jan. 20 (v11). Original patches are by Laurent Vivier from May 2020. Rebase from v11 to v12 is just fixing some virtio hmp commands to use PRI whe

[PATCH v12 6/8] qmp: add QMP commands for virtio/vhost queue-status

2022-02-10 Thread Jonah Palmer
From: Laurent Vivier These new commands show the internal status of a VirtIODevice's VirtQueue and a vhost device's vhost_virtqueue (if active). Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 14 +++ hw/virtio/virtio.c | 103 qapi/virtio.json| 252

[PATCH v12 5/8] qmp: decode feature & status bits in virtio-status

2022-02-10 Thread Jonah Palmer
From: Laurent Vivier Display feature names instead of bitmaps for host, guest, and backend for VirtIODevices. Display status names instead of bitmaps for VirtIODevices. Display feature names instead of bitmaps for backend, protocol, acked, and features (hdev->features) for vhost devices. Decod

[PATCH v12 8/8] hmp: add virtio commands

2022-02-10 Thread Jonah Palmer
From: Laurent Vivier This patch implements the HMP versions of the virtio QMP commands. [Jonah: Fixed virtio hmp command output format (e.g. use PRI types).] Signed-off-by: Jonah Palmer --- hmp-commands-info.hx | 70 include/monitor/hmp.h | 5 + monitor/hmp-cmds.c| 311 ++

[PATCH v12 4/8] qmp: add QMP command x-query-virtio-status

2022-02-10 Thread Jonah Palmer
From: Laurent Vivier This new command shows the status of a VirtIODevice, including its corresponding vhost device's status (if active). Next patch will improve output by decoding feature bits, including vhost device's feature bits (backend, protocol, acked, and features). Also will decode statu

[PATCH v12 7/8] qmp: add QMP command x-query-virtio-queue-element

2022-02-10 Thread Jonah Palmer
From: Laurent Vivier This new command shows the information of a VirtQueue element. [Note: Up until v10 of this patch series, virtio.json had many (15+) enums defined (e.g. decoded device features, statuses, etc.). In v10 most of these enums were removed and replaced with string literals. By

Re: [PATCH] hw/vhost-user-i2c: Add support for VIRTIO_I2C_F_ZERO_LENGTH_REQUEST

2022-02-10 Thread Viresh Kumar
On 10-02-22, 08:29, Alex Bennée wrote: > > Viresh Kumar writes: > > @@ -113,8 +117,10 @@ static void vu_i2c_set_status(VirtIODevice *vdev, > > uint8_t status) > > static uint64_t vu_i2c_get_features(VirtIODevice *vdev, > > uint64_t requested_features, Error

Re: [PATCH v9 00/23] QEMU RISC-V AIA support

2022-02-10 Thread Anup Patel
On Thu, Feb 10, 2022 at 1:58 PM Atish Patra wrote: > > On Mon, Feb 7, 2022 at 10:51 PM Alistair Francis wrote: > > > > On Tue, Feb 8, 2022 at 2:16 PM Alistair Francis > > wrote: > > > > > > On Sat, Feb 5, 2022 at 3:47 AM Anup Patel wrote: > > > > > > > > From: Anup Patel > > > > > > > > The a

Re: [PATCH 1/1] virtio: fix feature negotiation for ACCESS_PLATFORM

2022-02-10 Thread Halil Pasic
On Thu, 10 Feb 2022 10:55:13 +0100 Cornelia Huck wrote: > On Wed, Feb 09 2022, Halil Pasic wrote: > > > On Wed, 09 Feb 2022 18:24:56 +0100 > > Cornelia Huck wrote: > > > >> On Wed, Feb 09 2022, Halil Pasic wrote: > >> > @@ -78,16 +78,19 @@ void virtio_bus_device_plugged(VirtIODevice *vdev

[PATCH V2] hw/vhost-user-i2c: Add support for VIRTIO_I2C_F_ZERO_LENGTH_REQUEST

2022-02-10 Thread Viresh Kumar
VIRTIO_I2C_F_ZERO_LENGTH_REQUEST is a mandatory feature, that must be implemented by everyone. Add its support. Reviewed-by: Alex Bennée Signed-off-by: Viresh Kumar --- V2: - Add missing VHOST_INVALID_FEATURE_BIT. - Add reviewed-by tag. hw/virtio/vhost-user-i2c.c | 11 +-- incl

Re: [PATCH 1/4] hw/openrisc/openrisc_sim: Create machine state for or1ksim

2022-02-10 Thread Philippe Mathieu-Daudé via
On 10/2/22 07:30, Stafford Horne wrote: This will allow us to attach machine state attributes like the device tree fdt. Signed-off-by: Stafford Horne --- hw/openrisc/openrisc_sim.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) @@ -141,6 +153,7 @@ s

Re: [PATCH 2/4] hw/openrisc/openrisc_sim: Paramatarize initialization

2022-02-10 Thread Philippe Mathieu-Daudé via
On 10/2/22 07:30, Stafford Horne wrote: Move magic numbers to variables and enums. These will be reused for upcoming fdt initialization. Signed-off-by: Stafford Horne --- hw/openrisc/openrisc_sim.c | 42 ++ 1 file changed, 34 insertions(+), 8 deletions(-)

Re: [PATCH 3/4] hw/openrisc/openrisc_sim; Add support for loading a decice tree

2022-02-10 Thread Philippe Mathieu-Daudé via
Typo "device" in subject. On 10/2/22 07:30, Stafford Horne wrote: Using the device tree means that qemu can now directly tell the kernel what hardware is configured rather than use having to maintain and update a separate device tree file. This patch adds device tree support for the OpenRISC si

Re: [PATCH v2 01/15] hw/registerfields: Add FIELD_SEX and FIELD_SDP

2022-02-10 Thread Philippe Mathieu-Daudé via
On 10/2/22 05:04, Richard Henderson wrote: Add new macros to manipulate signed fields within the register. Suggested-by: Peter Maydell Signed-off-by: Richard Henderson --- include/hw/registerfields.h | 48 - 1 file changed, 47 insertions(+), 1 deletion(-)

Re: [PATCH v2 06/15] target/arm: Use MAKE_64BIT_MASK to compute indexmask

2022-02-10 Thread Philippe Mathieu-Daudé via
On 10/2/22 05:04, Richard Henderson wrote: The macro is a bit more readable than the inlined computation. Signed-off-by: Richard Henderson --- target/arm/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 0/2] Kconfig: Add an I2C_DEVICES device group

2022-02-10 Thread Philippe Mathieu-Daudé via
On 8/2/22 16:59, Peter Maydell wrote: Peter Maydell (2): Kconfig: Add I2C_DEVICES device group Kconfig: Add 'imply I2C_DEVICES' on boards with available i2c bus docs/devel/kconfig.rst | 8 ++-- hw/arm/Kconfig | 10 ++ hw/i2c/Kconfig | 5 + hw/rtc/Kco

Re: [PATCH 1/1] virtio: fix feature negotiation for ACCESS_PLATFORM

2022-02-10 Thread Cornelia Huck
On Thu, Feb 10 2022, Halil Pasic wrote: > On Thu, 10 Feb 2022 10:55:13 +0100 > Cornelia Huck wrote: > >> On Wed, Feb 09 2022, Halil Pasic wrote: >> >> > On Wed, 09 Feb 2022 18:24:56 +0100 >> > Cornelia Huck wrote: >> > >> >> On Wed, Feb 09 2022, Halil Pasic wrote: >> >> > @@ -78,16 +78,1

[PATCH v5 0/2] semihosting/next (SYS_HEAPINFO)

2022-02-10 Thread Alex Bennée
Hi, I'm working through the backlog of stalled patches in my queue so here is the latest version of the semihosting info fixes with Peter's comments addressed. Both patches are still missing their elusive r-b tags ;-) Alex Bennée (2): semihosting/arm-compat: replace heuristic for softmmu SYS_HE

Re: [PATCH v4] hw/sensor: Add lsm303dlhc magnetometer device

2022-02-10 Thread Philippe Mathieu-Daudé via
Hi Kevin, On 30/1/22 10:50, Kevin Townsend wrote: This commit adds emulation of the magnetometer on the LSM303DLHC. It allows the magnetometer's X, Y and Z outputs to be set via the mag-x, mag-y and mag-z properties, as well as the 12-bit temperature output via the temperature property. Sensor c

[PATCH v5 1/2] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO

2022-02-10 Thread Alex Bennée
The previous numbers were a guess at best and rather arbitrary without taking into account anything that might be loaded. Instead of using guesses based on the state of registers implement a new function that: a) scans the MemoryRegions for the largest RAM block b) iterates through all "ROM" blo

[PULL 2/5] tests/9pfs: fix mkdir() being called twice

2022-02-10 Thread Christian Schoenebeck
The 9p test cases use mkdtemp() to create a temporary directory for running the 'local' 9p tests with real files/dirs. Unlike mktemp() which only generates a unique file name, mkdtemp() also creates the directory, therefore the subsequent mkdir() was wrong and caused errors on some systems. Signed

[PATCH v5 2/2] tests/tcg: port SYS_HEAPINFO to a system test

2022-02-10 Thread Alex Bennée
This allows us to check our new SYS_HEAPINFO implementation generates sane values. Signed-off-by: Alex Bennée --- v5 - static init of heapinfo structure - clean-up comment on why we can test stack position - add memory clobber for semicall - test we can read/write to a portion of the hea

[PULL 5/5] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-10 Thread Christian Schoenebeck
From: Vitaly Chikunov `struct dirent' returned from readdir(3) could be shorter (or longer) than `sizeof(struct dirent)', thus memcpy of sizeof length will overread into unallocated page causing SIGSEGV. Example stack trace: #0 0x559ebeed v9fs_co_readdir_many (/usr/bin/qemu-system-x86_

[PULL 3/5] tests/9pfs: Fix leak of local_test_path

2022-02-10 Thread Christian Schoenebeck
From: Greg Kurz local_test_path is allocated in virtio_9p_create_local_test_dir() to hold the path of the temporary directory. It should be freed in virtio_9p_remove_local_test_dir() when the temporary directory is removed. Clarify the lifecycle of local_test_path while here. Based-on: Sign

[PATCH] meson: put custom CFLAGS after default CFLAGS

2022-02-10 Thread Konstantin Khlebnikov
Flags passed to configure must be at the end to override defaults. Signed-off-by: Konstantin Khlebnikov --- meson.build | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 5f43355071..d94f3ee3e3 100644 --- a/meson.build +++ b/meson.b

[PATCH 1/2] vhost-user-blk: handle errors in vhost_user_blk_connect

2022-02-10 Thread Konstantin Khlebnikov
Cleanup vhost device and update connection state when initialization fails. Signed-off-by: Konstantin Khlebnikov --- hw/block/vhost-user-blk.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 1a42ae9187..

[PULL 4/5] tests/9pfs: Use g_autofree and g_autoptr where possible

2022-02-10 Thread Christian Schoenebeck
From: Greg Kurz It is recommended to use g_autofree or g_autoptr as it reduces the odds of introducing memory leaks in future changes. Signed-off-by: Greg Kurz Message-Id: <20220201151508.190035-3-gr...@kaod.org> Reviewed-by: Christian Schoenebeck Signed-off-by: Christian Schoenebeck --- tes

[PATCH] virtio: update memory region cache when queue size changes

2022-02-10 Thread Konstantin Khlebnikov
Fuzzing found that queue size could be changed after writing queue address. Resulting cached regions might be shorter than that and cause assert later. Let's update cached memory regions after changing queue size. This is no-op if queue address isn't set yet. Buglink: https://gitlab.com/qemu-proj

[PATCH] virtio-net: break gracefully on packet without valid header

2022-02-10 Thread Konstantin Khlebnikov
Right now too short packet from guest triggers assert in iov_copy(). (because requested offset does not fit into io vector) For legacy virtio without feature VIRTIO_F_ANY_LAYOUT virtio-net header must fit exactly in the first descriptor. With features VIRTIO_F_ANY_LAYOUT or VIRTIO_F_VERSION_1 head

[PATCH] vhost: fix repeated memory unmap in error paths

2022-02-10 Thread Konstantin Khlebnikov
Fuzzing found that on some error paths vhost_memory_unmap() is called twice or for NULL address. Let's reset pointers after unmap and ingnore unmap for NULL. Signed-off-by: Konstantin Khlebnikov --- hw/virtio/vhost.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/vi

[PATCH 2/2] vhost-user-blk: check connection state in vhost_user_blk_set_config

2022-02-10 Thread Konstantin Khlebnikov
Fuzzing found that ->set_config() could be called without connection. Signed-off-by: Konstantin Khlebnikov --- hw/block/vhost-user-blk.c |4 1 file changed, 4 insertions(+) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 35ac188ca4..9ac50443bc 100644 --- a/hw/b

Re: [PATCH v5 1/2] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO

2022-02-10 Thread Philippe Mathieu-Daudé via
Hi Alex, On 10/2/22 12:30, Alex Bennée wrote: The previous numbers were a guess at best and rather arbitrary without taking into account anything that might be loaded. Instead of using guesses based on the state of registers implement a new function that: a) scans the MemoryRegions for the la

Re: [PATCH] meson: put custom CFLAGS after default CFLAGS

2022-02-10 Thread Konstantin Khlebnikov
  10.02.2022, 14:52, "Philippe Mathieu-Daudé" :Hi Konstantin,On 10/2/22 12:44, Konstantin Khlebnikov wrote: Flags passed to configure must be at the end to override defaults.  Signed-off-by: Konstantin Khlebnikov  ---   meson.build | 12 ++--   1 file changed, 6 in

Re: [PATCH] meson: put custom CFLAGS after default CFLAGS

2022-02-10 Thread Philippe Mathieu-Daudé via
Hi Konstantin, On 10/2/22 12:44, Konstantin Khlebnikov wrote: Flags passed to configure must be at the end to override defaults. Signed-off-by: Konstantin Khlebnikov --- meson.build | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build

Re: [PATCH] vhost: fix repeated memory unmap in error paths

2022-02-10 Thread Philippe Mathieu-Daudé via
On 10/2/22 12:46, Konstantin Khlebnikov wrote: Fuzzing found that on some error paths vhost_memory_unmap() is called twice or for NULL address. Let's reset pointers after unmap and ingnore unmap for NULL. Signed-off-by: Konstantin Khlebnikov --- hw/virtio/vhost.c |4 +++- 1 file changed,

Re: [PATCH 1/2] vhost-user-blk: handle errors in vhost_user_blk_connect

2022-02-10 Thread Philippe Mathieu-Daudé via
On 10/2/22 12:46, Konstantin Khlebnikov wrote: Cleanup vhost device and update connection state when initialization fails. Signed-off-by: Konstantin Khlebnikov --- hw/block/vhost-user-blk.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/block/vhost-user-b

Re: [PATCH 1/2] vhost-user-blk: handle errors in vhost_user_blk_connect

2022-02-10 Thread Konstantin Khlebnikov
  10.02.2022, 14:56, "Philippe Mathieu-Daudé" :On 10/2/22 12:46, Konstantin Khlebnikov wrote: Cleanup vhost device and update connection state when initialization fails.  Signed-off-by: Konstantin Khlebnikov  ---   hw/block/vhost-user-blk.c | 10 --   1 file change

Re: [PATCH 1/4] hw/openrisc/openrisc_sim: Create machine state for or1ksim

2022-02-10 Thread Stafford Horne
On Thu, Feb 10, 2022 at 12:05:22PM +0100, Philippe Mathieu-Daudé wrote: > On 10/2/22 07:30, Stafford Horne wrote: > > This will allow us to attach machine state attributes like > > the device tree fdt. > > > > Signed-off-by: Stafford Horne > > --- > > hw/openrisc/openrisc_sim.c | 31 +++

Re: [PATCH 2/4] hw/openrisc/openrisc_sim: Paramatarize initialization

2022-02-10 Thread Stafford Horne
On Thu, Feb 10, 2022 at 12:07:02PM +0100, Philippe Mathieu-Daudé wrote: > On 10/2/22 07:30, Stafford Horne wrote: > > Move magic numbers to variables and enums. These will be > > reused for upcoming fdt initialization. > > > > Signed-off-by: Stafford Horne > > --- > > hw/openrisc/openrisc_sim.c

Re: [PATCH v2] hw/smbios: fix memory corruption for large guests due to handle overlap

2022-02-10 Thread Ani Sinha
On Fri, 4 Feb 2022, Ani Sinha wrote: > On Fri, Feb 4, 2022 at 17:48 Igor Mammedov wrote: > > > On Fri, 4 Feb 2022 12:05:58 +0100 > > Gerd Hoffmann wrote: > > > > > Hi, > > > > > > > Another question is why we split memory on 16Gb chunks, to begin with. > > > > Maybe instead of doing so, we

[PULL 0/5] 9p queue 2022-02-10

2022-02-10 Thread Christian Schoenebeck
gs/pull-9p-20220210 for you to fetch changes up to de19c79dad6a2cad54ae04ce754d47c07bf9bc93: 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread (2022-02-10 11:56:01 +0100) 9pfs: fixes and cleanup * Fifth pat

[PATCH v2 2/4] hw/openrisc/openrisc_sim: Parameterize initialization

2022-02-10 Thread Stafford Horne
Move magic numbers to variables and enums. These will be reused for upcoming fdt initialization. Signed-off-by: Stafford Horne Reviewed-by: Philippe Mathieu-Daudé --- hw/openrisc/openrisc_sim.c | 42 ++ 1 file changed, 34 insertions(+), 8 deletions(-) diff -

[PATCH v2 4/4] hw/openrisc/openrisc_sim: Add support for initrd loading

2022-02-10 Thread Stafford Horne
The initrd passed via the command line is loaded into memory. It's location and size is then added to the device tree so the kernel knows where to find it. Signed-off-by: Stafford Horne --- hw/openrisc/openrisc_sim.c | 32 +++- 1 file changed, 31 insertions(+), 1 del

Re: [PATCH] vhost: fix repeated memory unmap in error paths

2022-02-10 Thread Konstantin Khlebnikov
10.02.2022, 15:06, "Philippe Mathieu-Daudé" :On 10/2/22 12:46, Konstantin Khlebnikov wrote: Fuzzing found that on some error paths vhost_memory_unmap() is called twice or for NULL address. Let's reset pointers after unmap and ingnore unmap for NULL.  Signed-off-by: Konstantin Khlebnikov

[PULL 1/5] tests/9pfs: use g_autofree where possible

2022-02-10 Thread Christian Schoenebeck
Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz Message-Id: --- tests/qtest/virtio-9p-test.c | 90 +++- 1 file changed, 27 insertions(+), 63 deletions(-) diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c index 41fed41de1..502e5

[PATCH v2 3/4] hw/openrisc/openrisc_sim; Add support for loading a device tree

2022-02-10 Thread Stafford Horne
Using the device tree means that qemu can now directly tell the kernel what hardware is configured rather than use having to maintain and update a separate device tree file. This patch adds device tree support for the OpenRISC simulator. A device tree is built up based on the state of the configur

Re: [PATCH 3/4] hw/openrisc/openrisc_sim; Add support for loading a decice tree

2022-02-10 Thread Stafford Horne
On Thu, Feb 10, 2022 at 12:10:54PM +0100, Philippe Mathieu-Daudé wrote: > Typo "device" in subject. OK. > On 10/2/22 07:30, Stafford Horne wrote: > > Using the device tree means that qemu can now directly tell > > the kernel what hardware is configured rather than use having > > to maintain and u

[PATCH v3 05/37] target/ppc: Implement vmsumcud instruction

2022-02-10 Thread matheus . ferst
From: Víctor Colombo Based on [1] by Lijun Pan , which was never merged into master. [1]: https://lists.gnu.org/archive/html/qemu-ppc/2020-07/msg00419.html Signed-off-by: Víctor Colombo Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode| 4 +++ target/ppc/translate/vmx-im

[PATCH v3 00/37] target/ppc: PowerISA Vector/VSX instruction batch

2022-02-10 Thread matheus . ferst
From: Matheus Ferst This patch series implements 5 missing instructions from PowerISA v3.0 and 40 new instructions from PowerISA v3.1, moving 62 other instructions to decodetree along the way. v3: - Dropped patch 33, which caused a regression in xxperm[r] v2: - New patch (30) to remove xscmpn

[PATCH v3 03/37] target/ppc: Moved vector multiply high and low to decodetree

2022-02-10 Thread matheus . ferst
From: "Lucas Mateus Castro (alqotel)" Moved instructions vmulld, vmulhuw, vmulhsw, vmulhud and vmulhsd to decodetree Signed-off-by: Lucas Mateus Castro (alqotel) Signed-off-by: Matheus Ferst --- target/ppc/helper.h | 8 target/ppc/insn32.decode| 6 ++

[PATCH v2 0/4] OpenRISC Device Tree Support

2022-02-10 Thread Stafford Horne
Changes since v1: - Fixed typos pointed out by Philippe - Moved usage of machine state to patch 3/4 - added config dependency on FDT This series adds device tree support for the OpenRISC SIM hardware. The simulator will generate an FDT and pass it to the kernel. For example: qemu-system-or1

[PATCH v3 02/37] target/ppc: moved vector even and odd multiplication to decodetree

2022-02-10 Thread matheus . ferst
From: "Lucas Mateus Castro (alqotel)" Moved the instructions vmulesb, vmulosb, vmuleub, vmuloub, vmulesh, vmulosh, vmuleuh, vmulouh, vmulesw, vmulosw, muleuw and vmulouw from legacy to decodetree. Implemented the instructions vmulesd, vmulosd, vmuleud, vmuloud. Signed-off-by: Lucas Mateus Castro

[PATCH v2 1/4] hw/openrisc/openrisc_sim: Create machine state for or1ksim

2022-02-10 Thread Stafford Horne
This will allow us to attach machine state attributes like the device tree fdt. Signed-off-by: Stafford Horne Reviewed-by: Philippe Mathieu-Daudé --- hw/openrisc/openrisc_sim.c | 30 -- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/hw/openrisc/openri

[PATCH v3 09/37] target/ppc: Move Vector Compare Equal/Not Equal/Greater Than to decodetree

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/helper.h | 30 -- target/ppc/insn32.decode| 24 target/ppc/int_helper.c | 54 - target/ppc/translate/vmx-impl.c.inc | 91 - target

[PATCH v3 14/37] target/ppc: implement vstri[bh][lr]

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/helper.h | 4 target/ppc/insn32.decode| 10 + target/ppc/int_helper.c | 32 + target/ppc/translate/vmx-impl.c.inc | 24 ++ 4 file

[PATCH v3 08/37] target/ppc: Implement vextsd2q

2022-02-10 Thread matheus . ferst
From: Lucas Coutinho Signed-off-by: Lucas Coutinho Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode| 1 + target/ppc/translate/vmx-impl.c.inc | 18 ++ 2 files changed, 19 insertions(+) diff --git a/target/ppc/insn32.decode b/target/ppc/insn32.decode index

[PATCH v3 04/37] target/ppc: vmulh* instructions use gvec

2022-02-10 Thread matheus . ferst
From: "Lucas Mateus Castro (alqotel)" Changed vmulhuw, vmulhud, vmulhsw, vmulhsd to use gvec instructions Signed-off-by: Lucas Mateus Castro (alqotel) Signed-off-by: Matheus Ferst --- target/ppc/helper.h | 8 +- target/ppc/int_helper.c | 8 +- target/ppc/transl

[PATCH v3 19/37] target/ppc: Move vsel and vperm/vpermr to decodetree

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/helper.h | 5 +-- target/ppc/insn32.decode| 5 +++ target/ppc/int_helper.c | 13 +- target/ppc/translate/vmx-impl.c.inc | 69 ++--- target/ppc/translate/vmx-ops.

[PATCH v3 01/37] target/ppc: Introduce TRANS*FLAGS macros

2022-02-10 Thread matheus . ferst
From: Luis Pires New macros that add FLAGS and FLAGS2 checking were added for both TRANS and TRANS64. Signed-off-by: Luis Pires [ferst: - TRANS_FLAGS2 instead of TRANS_FLAGS_E - Use the new macros in load/store vector insns ] Signed-off-by: Matheus Ferst Reviewed-by: Richard Henderson

[PATCH v3 07/37] target/ppc: Move vexts[bhw]2[wd] to decodetree

2022-02-10 Thread matheus . ferst
From: Lucas Coutinho Move the following instructions to decodetree: vextsb2w: Vector Extend Sign Byte To Word vextsh2w: Vector Extend Sign Halfword To Word vextsb2d: Vector Extend Sign Byte To Doubleword vextsh2d: Vector Extend Sign Halfword To Doubleword vextsw2d: Vector Extend Sign Word To Doub

[PATCH v3 15/37] target/ppc: implement vclrlb

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode| 2 ++ target/ppc/translate/vmx-impl.c.inc | 56 + 2 files changed, 58 insertions(+) diff --git a/target/ppc/insn32.decode b/target/ppc/insn32.decode index ea497ecd80..483651c

[PATCH v3 24/37] tcg/tcg-op-gvec.c: Introduce tcg_gen_gvec_4i

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Following the implementation of tcg_gen_gvec_3i, add a four-vector and immediate operand expansion method. Signed-off-by: Matheus Ferst --- include/tcg/tcg-op-gvec.h | 22 ++ tcg/tcg-op-gvec.c | 146 ++ 2 files changed, 168 i

[PATCH v3 10/37] target/ppc: Move Vector Compare Not Equal or Zero to decodetree

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/helper.h | 9 ++-- target/ppc/insn32.decode| 4 ++ target/ppc/int_helper.c | 50 + target/ppc/translate/vmx-impl.c.inc | 69 +++-- target/ppc/tra

[PATCH v3 06/37] target/ppc: Implement vmsumudm instruction

2022-02-10 Thread matheus . ferst
From: Víctor Colombo Based on [1] by Lijun Pan , which was never merged into master. [1]: https://lists.gnu.org/archive/html/qemu-ppc/2020-07/msg00419.html Signed-off-by: Víctor Colombo Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode| 1 + target/ppc/translate/vmx-impl

[PATCH v3 16/37] target/ppc: implement vclrrb

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode| 1 + target/ppc/translate/vmx-impl.c.inc | 43 +++-- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/target/ppc/insn32.decode b/target/ppc/insn32.decode index 4836

[PATCH v3 17/37] target/ppc: implement vcntmb[bhwd]

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode| 8 target/ppc/translate/vmx-impl.c.inc | 32 + 2 files changed, 40 insertions(+) diff --git a/target/ppc/insn32.decode b/target/ppc/insn32.decode index bf2f3b1e0b..0

[PATCH v3 26/37] target/ppc: Implement xxgenpcv[bhwd]m instruction

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/helper.h | 4 ++ target/ppc/insn32.decode| 10 target/ppc/int_helper.c | 84 + target/ppc/translate/vsx-impl.c.inc | 29 ++ 4 files changed, 127 inse

[PATCH v3 13/37] target/ppc: Implement Vector Compare Quadword

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Implement the following PowerISA v3.1 instructions: vcmpsq: Vector Compare Signed Quadword vcmpuq: Vector Compare Unsigned Quadword Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode| 6 target/ppc/translate/vmx-impl.c.inc | 45 +

[PATCH v3 18/37] target/ppc: implement vgnb

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode| 5 target/ppc/translate/vmx-impl.c.inc | 44 + 2 files changed, 49 insertions(+) diff --git a/target/ppc/insn32.decode b/target/ppc/insn32.decode index 0a3e39f3e9..7b629

[PATCH v3 30/37] target/ppc: Remove xscmpnedp instruction

2022-02-10 Thread matheus . ferst
From: Víctor Colombo xscmpnedp was added in ISA v3.0 but removed in v3.0B. This patch removes this instruction as it was not in the final version of v3.0. Signed-off-by: Víctor Colombo Acked-by: Greg Kurz Reviewed-by: Cédric Le Goater Reviewed-by: Richard Henderson Signed-off-by: Matheus Fer

[PATCH v3 29/37] target/ppc: Implement xvtlsbb instruction

2022-02-10 Thread matheus . ferst
From: Víctor Colombo Signed-off-by: Víctor Colombo Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode| 7 ++ target/ppc/translate/vsx-impl.c.inc | 37 + 2 files changed, 44 insertions(+) diff --git a/target/ppc/insn32.decode b/target/ppc/ins

[PATCH v3 34/37] target/ppc: Move xs{max, min}[cj]dp to use do_helper_XX3

2022-02-10 Thread matheus . ferst
From: Víctor Colombo Also, fixes these instructions not being capitalized. Signed-off-by: Víctor Colombo Signed-off-by: Matheus Ferst --- target/ppc/fpu_helper.c | 8 target/ppc/helper.h | 8 target/ppc/translate/vsx-impl.c.inc | 30

[PATCH v3 20/37] target/ppc: Move xxsel to decodetree

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode| 6 target/ppc/insn64.decode| 24 target/ppc/translate/vsx-impl.c.inc | 20 ++ target/ppc/translate/vsx-ops.c.inc | 43 - 4 files

[PATCH v3 21/37] target/ppc: move xxperm/xxpermr to decodetree

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/fpu_helper.c | 21 --- target/ppc/helper.h | 2 -- target/ppc/insn32.decode| 5 target/ppc/translate/vsx-impl.c.inc | 42 +++-- target/ppc/translate

[PATCH v3 32/37] target/ppc: Implement xscmp{eq,ge,gt}qp

2022-02-10 Thread matheus . ferst
From: Víctor Colombo Signed-off-by: Víctor Colombo Signed-off-by: Matheus Ferst --- target/ppc/fpu_helper.c | 4 target/ppc/helper.h | 3 +++ target/ppc/insn32.decode| 3 +++ target/ppc/translate/vsx-impl.c.inc | 31 +

[PATCH v3 37/37] target/ppc: Implement xvcvbf16spn and xvcvspbf16 instructions

2022-02-10 Thread matheus . ferst
From: Víctor Colombo Signed-off-by: Víctor Colombo Signed-off-by: Matheus Ferst --- target/ppc/fpu_helper.c | 21 +++ target/ppc/helper.h | 1 + target/ppc/insn32.decode| 11 +++--- target/ppc/translate/vsx-impl.c.inc | 31 ++

[PATCH v3 22/37] target/ppc: Move xxpermdi to decodetree

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode| 4 ++ target/ppc/translate/vsx-impl.c.inc | 71 + target/ppc/translate/vsx-ops.c.inc | 2 - 3 files changed, 36 insertions(+), 41 deletions(-) diff --git a/target/ppc/insn3

[PATCH v3 23/37] target/ppc: Implement xxpermx instruction

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/helper.h | 1 + target/ppc/insn64.decode| 8 target/ppc/int_helper.c | 20 target/ppc/translate/vsx-impl.c.inc | 22 ++ 4 files changed, 51

[PATCH v3 33/37] target/ppc: Move xscmp{eq,ge,gt}dp to decodetree

2022-02-10 Thread matheus . ferst
From: Víctor Colombo Signed-off-by: Víctor Colombo Signed-off-by: Matheus Ferst --- target/ppc/fpu_helper.c | 7 +++ target/ppc/helper.h | 6 +++--- target/ppc/insn32.decode| 3 +++ target/ppc/translate/vsx-impl.c.inc | 28

[PATCH v3 25/37] target/ppc: Implement xxeval

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/helper.h | 1 + target/ppc/insn64.decode| 8 ++ target/ppc/int_helper.c | 42 ++ target/ppc/translate/vsx-impl.c.inc | 121 4 files changed, 172 inse

[PATCH v3 27/37] target/ppc: move xs[n]madd[am][ds]p/xs[n]msub[am][ds]p to decodetree

2022-02-10 Thread matheus . ferst
From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/fpu_helper.c | 23 ++-- target/ppc/helper.h | 16 - target/ppc/insn32.decode| 22 target/ppc/translate/vsx-impl.c.inc | 56 - target/p

[PULL 06/42] target/ppc: booke: Data Storage exception cleanup

2022-02-10 Thread Cédric Le Goater
From: Fabiano Rosas There is no DSISR or DAR in BookE. Change to ESR and DEAR. Signed-off-by: Fabiano Rosas Message-Id: <20220128224018.1228062-6-faro...@linux.ibm.com> Signed-off-by: Cédric Le Goater --- target/ppc/excp_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

  1   2   3   4   >