Re: [PATCH v14 08/11] qapi/s390/cpu topology: change-topology monitor command

2023-01-12 Thread Thomas Huth
On 11/01/2023 11.09, Thomas Huth wrote: On 05/01/2023 15.53, Pierre Morel wrote: The modification of the CPU attributes are done through a monitor commands. s/commands/command/ It allows to move the core inside the topology tree to optimise the cache usage in the case the host's hypervizor p

Re: [RFC v4 2/3] memory: add depth assert in address_space_to_flatview

2023-01-12 Thread Chuang Xu
Hi, Peter, Paolo, On 2023/1/10 下午10:45, Peter Xu wrote: On Tue, Jan 10, 2023 at 12:09:41AM -0800, Chuang Xu wrote: Hi, Peter and Paolo, Hi, Chuang, Paolo, I'm sorry I didn't reply to your email in time. I was infected with COVID-19 two weeks ago, so I couldn't think about the problems discus

Re: [RFC] Notify IRQ sources of level interrupt ack/EOI

2023-01-12 Thread David Woodhouse
On Wed, 2023-01-11 at 12:43 -0700, Alex Williamson wrote: > On Wed, 11 Jan 2023 19:08:44 + > David Woodhouse wrote: > > > On Wed, 2023-01-11 at 11:29 -0700, Alex Williamson wrote: > > > > > > Nice.  IIRC, we ended up with the hack solution we have today in vfio > > > because there was too mu

[PATCH] hw/misc/sifive_u_otp: Remove the deprecated OTP config with '-drive if=none'

2023-01-12 Thread Thomas Huth
'-drive if=none' is meant for configuring back-end devices only, so this got marked as deprecated in QEMU 6.2. Users should now only use the new way with '-drive if=pflash' instead. Signed-off-by: Thomas Huth --- docs/about/deprecated.rst | 6 -- docs/about/removed-features.rst | 7 +++

Re: [PATCH] hw/misc/sifive_u_otp: Remove the deprecated OTP config with '-drive if=none'

2023-01-12 Thread Thomas Huth
On 12/01/2023 09.29, Thomas Huth wrote: '-drive if=none' is meant for configuring back-end devices only, so this got marked as deprecated in QEMU 6.2. Users should now only use the new way with '-drive if=pflash' instead. Signed-off-by: Thomas Huth --- docs/about/deprecated.rst | 6

[PATCH v2] hw/misc/sifive_u_otp: Remove the deprecated OTP config with '-drive if=none'

2023-01-12 Thread Thomas Huth
'-drive if=none' is meant for configuring back-end devices only, so this got marked as deprecated in QEMU 6.2. Users should now only use the new way with '-drive if=pflash' instead. Signed-off-by: Thomas Huth --- docs/about/deprecated.rst | 6 -- docs/about/removed-features.rst | 7 +++

[PATCH v6 00/13] vfio/migration: Implement VFIO migration protocol v2

2023-01-12 Thread Avihai Horon
Hello, Here is v6 of the series. Thanks for reviewing! Following VFIO migration protocol v2 acceptance in kernel, this series implements VFIO migration according to the new v2 protocol and replaces the now deprecated v1 implementation. The main differences between v1 and v2 migration protocols a

[PATCH v6 01/13] linux-headers: Update to v6.2-rc1

2023-01-12 Thread Avihai Horon
Update to commit 1b929c02afd3 ("Linux 6.2-rc1"). Signed-off-by: Avihai Horon --- include/standard-headers/drm/drm_fourcc.h | 63 +++- include/standard-headers/linux/ethtool.h | 81 - include/standard-headers/linux/fuse.h | 20 +- .../linux/input-event-codes.h

[PATCH v6 06/13] vfio/common: Change vfio_devices_all_running_and_saving() logic to equivalent one

2023-01-12 Thread Avihai Horon
vfio_devices_all_running_and_saving() is used to check if migration is in pre-copy phase. This is done by checking if migration is in setup or active states and if all VFIO devices are in pre-copy state, i.e. _SAVING | _RUNNING. In VFIO migration protocol v2 pre-copy support is made optional. Henc

[PATCH v6 04/13] vfio/migration: Allow migration without VFIO IOMMU dirty tracking support

2023-01-12 Thread Avihai Horon
Currently, if IOMMU of a VFIO container doesn't support dirty page tracking, migration is blocked. This is because a DMA-able VFIO device can dirty RAM pages without updating QEMU about it, thus breaking the migration. However, this doesn't mean that migration can't be done at all. In such case, a

[PATCH v6 11/13] vfio/migration: Remove VFIO migration protocol v1

2023-01-12 Thread Avihai Horon
Now that v2 protocol implementation has been added, remove the deprecated v1 implementation. Signed-off-by: Avihai Horon --- include/hw/vfio/vfio-common.h | 5 - hw/vfio/common.c | 19 +- hw/vfio/migration.c | 703 +- hw/vfio/trace-events

[PATCH v6 02/13] migration: No save_live_pending() method uses the QEMUFile parameter

2023-01-12 Thread Avihai Horon
From: Juan Quintela So remove it everywhere. Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Dr. David Alan Gilbert --- include/migration/register.h | 3 +-- migration/savevm.h | 3 +-- hw/s390x/s390-stattrib.c | 2 +- hw/vfio/migration

[PATCH v6 13/13] docs/devel: Align VFIO migration docs to v2 protocol

2023-01-12 Thread Avihai Horon
Now that VFIO migration protocol v2 has been implemented and v1 protocol has been removed, update the documentation according to v2 protocol. Signed-off-by: Avihai Horon --- docs/devel/vfio-migration.rst | 68 --- 1 file changed, 30 insertions(+), 38 deletions(-)

[PATCH v6 05/13] migration/qemu-file: Add qemu_file_get_to_fd()

2023-01-12 Thread Avihai Horon
Add new function qemu_file_get_to_fd() that allows reading data from QEMUFile and writing it straight into a given fd. This will be used later in VFIO migration code. Signed-off-by: Avihai Horon Reviewed-by: Vladimir Sementsov-Ogievskiy --- migration/qemu-file.h | 1 + migration/qemu-file.c |

[PATCH v6 07/13] vfio/migration: Move migration v1 logic to vfio_migration_init()

2023-01-12 Thread Avihai Horon
Move vfio_dev_get_region_info() logic from vfio_migration_probe() to vfio_migration_init(). This logic is specific to v1 protocol and moving it will make it easier to add the v2 protocol implementation later. No functional changes intended. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goate

[PATCH v6 03/13] vfio/migration: Fix NULL pointer dereference bug

2023-01-12 Thread Avihai Horon
As part of its error flow, vfio_vmstate_change() accesses MigrationState->to_dst_file without any checks. This can cause a NULL pointer dereference if the error flow is taken and MigrationState->to_dst_file is not set. For example, this can happen if VM is started or stopped not during migration a

[PATCH v6 10/13] vfio/migration: Optimize vfio_save_pending()

2023-01-12 Thread Avihai Horon
During pre-copy phase of migration vfio_save_pending() is called repeatedly and queries the VFIO device for its pending data size. As long as pending RAM size is over the threshold, migration can't converge and be completed. Therefore, during this time there is no point in querying the VFIO device

[PATCH v6 12/13] vfio: Alphabetize migration section of VFIO trace-events file

2023-01-12 Thread Avihai Horon
Sort the migration section of VFIO trace events file alphabetically and move two misplaced traces to common.c section. Signed-off-by: Avihai Horon --- hw/vfio/trace-events | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/vfio/trace-events b/hw/vfio/

[PATCH v6 08/13] vfio/migration: Rename functions/structs related to v1 protocol

2023-01-12 Thread Avihai Horon
To avoid name collisions, rename functions and structs related to VFIO migration protocol v1. This will allow the two protocols to co-exist when v2 protocol is added, until v1 is removed. No functional changes intended. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater --- include/hw/vf

Re: [PATCH] tests/qtest: Poll on waitpid() for a while before sending SIGKILL

2023-01-12 Thread Daniel P . Berrangé
On Wed, Jan 11, 2023 at 05:30:18PM -0500, Stefan Berger wrote: > To prevent getting stuck on waitpid() in case the target process does > not terminate on SIGTERM, poll on waitpid() for 10s and if the target > process has not changed state until then send a SIGKILL to it. > > Signed-off-by: Stefan

[PATCH v6 09/13] vfio/migration: Implement VFIO migration protocol v2

2023-01-12 Thread Avihai Horon
Implement the basic mandatory part of VFIO migration protocol v2. This includes all functionality that is necessary to support VFIO_MIGRATION_STOP_COPY part of the v2 protocol. The two protocols, v1 and v2, will co-exist and in the following patches v1 protocol code will be removed. There are sev

Re: [PATCH] hw/misc/sifive_u_otp: Remove the deprecated OTP config with '-drive if=none'

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 09:29, Thomas Huth wrote: '-drive if=none' is meant for configuring back-end devices only, so this got marked as deprecated in QEMU 6.2. Users should now only use the new way with '-drive if=pflash' instead. Signed-off-by: Thomas Huth --- docs/about/deprecated.rst | 6 --

Re: [PATCH v2] hw/misc/sifive_u_otp: Remove the deprecated OTP config with '-drive if=none'

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 09:39, Thomas Huth wrote: '-drive if=none' is meant for configuring back-end devices only, so this got marked as deprecated in QEMU 6.2. Users should now only use the new way with '-drive if=pflash' instead. Signed-off-by: Thomas Huth --- docs/about/deprecated.rst | 6 --

Re: [PATCH] hw/misc/sifive_u_otp: Remove the deprecated OTP config with '-drive if=none'

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 10:15, Philippe Mathieu-Daudé wrote: On 12/1/23 09:29, Thomas Huth wrote: '-drive if=none' is meant for configuring back-end devices only, so this got marked as deprecated in QEMU 6.2. Users should now only use the new way with '-drive if=pflash' instead. Signed-off-by: Thomas Huth

Re: [PATCH] tests/qtest: Poll on waitpid() for a while before sending SIGKILL

2023-01-12 Thread Philippe Mathieu-Daudé
On 11/1/23 23:30, Stefan Berger wrote: To prevent getting stuck on waitpid() in case the target process does not terminate on SIGTERM, poll on waitpid() for 10s and if the target process has not changed state until then send a SIGKILL to it. Signed-off-by: Stefan Berger --- tests/qtest/libqte

Re: [RESEND PATCH 2/2] migration: report multiFd related thread pid to libvirt

2023-01-12 Thread Jiang Jiacheng via
On 2023/1/12 3:04, Daniel P. Berrangé wrote: > On Wed, Jan 11, 2023 at 07:00:53PM +, Dr. David Alan Gilbert wrote: >> * Jiang Jiacheng via (qemu-devel@nongnu.org) wrote: >>> From: Zheng Chuan >>> >>> Report multiFd related thread pid to libvirt in order to >>> pin multiFd thread to differen

Re: [PULL v4 76/83] vhost-user: Support vhost_dev_start

2023-01-12 Thread Maxime Coquelin
Hi Laurent, On 1/11/23 10:50, Laurent Vivier wrote: On 1/9/23 11:55, Michael S. Tsirkin wrote: On Fri, Jan 06, 2023 at 03:21:43PM +0100, Laurent Vivier wrote: Hi, it seems this patch breaks vhost-user with DPDK. See https://bugzilla.redhat.com/show_bug.cgi?id=2155173 it seems QEMU doesn't r

Re: [PATCH v2] hw/misc/sifive_u_otp: Remove the deprecated OTP config with '-drive if=none'

2023-01-12 Thread Alistair Francis
On Thu, Jan 12, 2023 at 6:40 PM Thomas Huth wrote: > > '-drive if=none' is meant for configuring back-end devices only, so this > got marked as deprecated in QEMU 6.2. Users should now only use the new > way with '-drive if=pflash' instead. > > Signed-off-by: Thomas Huth Reviewed-by: Alistair Fr

qemu-system-i386 and general protection

2023-01-12 Thread He Zhe
Hi All, We are experiencing a general protection fault with qemu-system-i386 as follow. This can be reproduced with kernel v5.15 and latest v6.2-rc3 as we found so far. It would work well if we reverted the commit 2f8a21d8ff3af484a37edc8ea61d127ec1529ab5 ("target/i386: Enable AVX cpuid bits when

Re: [PATCH 25/26] tcg: exclude lookup_tb_ptr from helper instrumentation

2023-01-12 Thread Alex Bennée
Richard Henderson writes: > On 1/10/23 09:39, Alex Bennée wrote: >> From: Emilio Cota >> It is internal to TCG and therefore we know it does not >> access guest memory. >> Related: #1381 >> Signed-off-by: Emilio Cota >> Message-Id: <20230108164731.61469-4-c...@braap.org> >> Signed-off-by: Ale

Re: [PATCH] tests/qtest: Poll on waitpid() for a while before sending SIGKILL

2023-01-12 Thread Daniel P . Berrangé
On Thu, Jan 12, 2023 at 10:18:01AM +0100, Philippe Mathieu-Daudé wrote: > On 11/1/23 23:30, Stefan Berger wrote: > > To prevent getting stuck on waitpid() in case the target process does > > not terminate on SIGTERM, poll on waitpid() for 10s and if the target > > process has not changed state unti

[PATCH 01/31] e1000e: Fix the code style

2023-01-12 Thread Akihiko Odaki
igb implementation first starts off by copying e1000e code. Correct the code style before that. Signed-off-by: Akihiko Odaki --- hw/net/e1000.c | 41 hw/net/e1000e.c| 72 ++-- hw/net/e1000e_core.c | 103 ++--

[PATCH 05/31] e1000: Mask registers when writing

2023-01-12 Thread Akihiko Odaki
When a register has effective bits fewer than their width, the old code inconsistently masked when writing or reading. Make the code consistent by always masking when writing, and remove some code duplication. Signed-off-by: Akihiko Odaki --- hw/net/e1000.c | 84 +++--

[PATCH 04/31] e1000: Use hw/net/mii.h

2023-01-12 Thread Akihiko Odaki
hw/net/mii.h provides common definitions for MII. Signed-off-by: Akihiko Odaki --- hw/net/e1000.c | 86 ++-- hw/net/e1000_regs.h| 46 hw/net/e1000e.c| 1 + hw/net/e1000e_core.c | 99 +-

[PATCH 27/31] tests/qtest/libqos/e1000e: Export macreg functions

2023-01-12 Thread Akihiko Odaki
They will be useful for igb testing. Signed-off-by: Akihiko Odaki --- tests/qtest/libqos/e1000e.c | 12 tests/qtest/libqos/e1000e.h | 12 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/qtest/libqos/e1000e.c b/tests/qtest/libqos/e1000e.c index 28f

[PATCH 21/31] e1000: Split header files

2023-01-12 Thread Akihiko Odaki
Some definitions in the header files are invalid for igb so extract them to new header files to keep igb from referring to them. Signed-off-by: Gal Hammer Signed-off-by: Marcel Apfelbaum Signed-off-by: Akihiko Odaki --- hw/net/e1000.c | 2 +- hw/net/e1000_common.h | 104 + hw/ne

[PATCH 15/31] e1000e: Introduce e1000_rx_desc_union

2023-01-12 Thread Akihiko Odaki
Before this change, e1000e_write_packet_to_guest() allocated the receive descriptor buffer as an array of uint8_t. This does not ensure the buffer is sufficiently aligned. Introduce e1000_rx_desc_union type, a union type of all receive descriptor types to correct this. Signed-off-by: Akihiko Odak

[PATCH 09/31] e1000: Use memcpy to intialize registers

2023-01-12 Thread Akihiko Odaki
Use memcpy instead of memmove to initialize registers. The initial register templates and register table instances will never overlap. Signed-off-by: Akihiko Odaki --- hw/net/e1000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 841

[PATCH 02/31] hw/net: Add more MII definitions

2023-01-12 Thread Akihiko Odaki
The definitions will be used by igb. Signed-off-by: Akihiko Odaki --- include/hw/net/mii.h | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/hw/net/mii.h b/include/hw/net/mii.h index 4ae4dcce7e..c6a767a49a 100644 --- a/include/hw/net/mii.h +++ b/include/hw

[PATCH 03/31] fsl_etsec: Use hw/net/mii.h

2023-01-12 Thread Akihiko Odaki
hw/net/mii.h provides common definitions for MII. Signed-off-by: Akihiko Odaki --- hw/net/fsl_etsec/etsec.c | 11 ++- hw/net/fsl_etsec/etsec.h | 17 - hw/net/fsl_etsec/miim.c | 5 +++-- include/hw/net/mii.h | 1 + 4 files changed, 10 insertions(+), 24 deletions(-)

[PATCH 14/31] e1000e: Configure ResettableClass

2023-01-12 Thread Akihiko Odaki
This is part of recent efforts of refactoring e1000 and e1000e. DeviceClass's reset member is deprecated so migrate to ResettableClass. Thre is no behavioral difference. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- hw/net/e1000e.c | 8 +--

[PATCH 11/31] e1000e: Remove pending interrupt flags

2023-01-12 Thread Akihiko Odaki
They are duplicate of running throttling timer flags and incomplete as the flags are not cleared when the interrupts are fired or the device is reset. Signed-off-by: Akihiko Odaki --- hw/net/e1000e.c | 5 ++--- hw/net/e1000e_core.c | 19 +++ hw/net/e1000e_core.h | 2 -- hw

[PATCH 26/31] tests/qtest/e1000e-test: Fabricate ethernet header

2023-01-12 Thread Akihiko Odaki
e1000e understands ethernet header so fabricate something convincing. Signed-off-by: Akihiko Odaki --- tests/qtest/e1000e-test.c | 17 +++-- tests/qtest/libqos/e1000e.h | 2 ++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/qtest/e1000e-test.c b/tests/qtest/

[PATCH 16/31] e1000e: Set MII_ANER_NWAY

2023-01-12 Thread Akihiko Odaki
This keeps Windows driver 12.18.9.23 from generating an event with ID 30. The description of the event is as follows: > Intel(R) 82574L Gigabit Network Connection > PROBLEM: The network adapter is configured for auto-negotiation but > the link partner is not. This may result in a duplex mismatch.

[PATCH 17/31] tests/qtest/e1000e-test: Fix the code style

2023-01-12 Thread Akihiko Odaki
igb implementation first starts off by copying e1000e code. Correct the code style before that. Signed-off-by: Akihiko Odaki --- tests/qtest/e1000e-test.c | 2 +- tests/qtest/libqos/e1000e.c | 6 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/qtest/e1000e-test.c b/

[PATCH 23/31] igb: Rename identifiers

2023-01-12 Thread Akihiko Odaki
Rename identifiers of definitions which will be modified later for igb. This will also allow to build igb along with e1000e. Signed-off-by: Gal Hammer Signed-off-by: Marcel Apfelbaum Signed-off-by: Akihiko Odaki --- hw/net/igb.c| 368 +- hw/net/igb_common.h |6 +- hw/net/i

[PATCH 24/31] igb: Build igb

2023-01-12 Thread Akihiko Odaki
Currently igb functions identically with e1000e. Signed-off-by: Gal Hammer Signed-off-by: Marcel Apfelbaum Signed-off-by: Akihiko Odaki --- hw/net/Kconfig | 5 + hw/net/meson.build | 2 ++ 2 files changed, 7 insertions(+) diff --git a/hw/net/Kconfig b/hw/net/Kconfig index 1cc1c5775e..

[PATCH 30/31] tests/avocado: Add igb test

2023-01-12 Thread Akihiko Odaki
This automates ethtool tests for igb registers, interrupts, etc. Signed-off-by: Akihiko Odaki --- MAINTAINERS | 1 + .../org.centos/stream/8/x86_64/test-avocado | 1 + tests/avocado/igb.py | 38 +++ 3 files changed, 4

[PATCH 08/31] e1000e: Use more constant definitions

2023-01-12 Thread Akihiko Odaki
The definitions of SW Semaphore Register were copied from: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/ethernet/intel/e1000e/defines.h?h=v6.0.9#n374 Signed-off-by: Akihiko Odaki --- hw/net/e1000_regs.h | 7 +++ hw/net/e1000e_core.c | 49 +++

[PATCH 18/31] tests/qtest/libqos/e1000e: Remove duplicate register definitions

2023-01-12 Thread Akihiko Odaki
The register definitions in tests/qtest/libqos/e1000e.h had names different from hw/net/e1000_regs.h, which made it hard to understand what test codes corresponds to the implementation. Use hw/net/e1000_regs.h from tests/qtest/libqos/e1000e.c to remove these duplications. Signed-off-by: Akihiko Od

[PATCH 06/31] e1000e: Mask registers when writing

2023-01-12 Thread Akihiko Odaki
When a register has effective bits fewer than their width, the old code inconsistently masked when writing or reading. Make the code consistent by always masking when writing, and remove some code duplication. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.c | 94 +++

[PATCH 12/31] e1000e: Improve software reset

2023-01-12 Thread Akihiko Odaki
This change makes e1000e reset more things when software reset was triggered. Some registers are exempted from software reset in the datasheet and this change also implements the behavior accordingly. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.c | 24 +++- 1 file cha

[PATCH 00/31] Introduce igb

2023-01-12 Thread Akihiko Odaki
igb is a family of Intel's gigabit ethernet controllers. This series implements 82576 emulation in particular. You can see the last patch for the documentation. Note that there is another effort to bring 82576 emulation. This series was developed independently by Sriram Yagnaraman. https://lists.g

[PATCH 20/31] pcie: Introduce pcie_sriov_num_vfs

2023-01-12 Thread Akihiko Odaki
igb can use this function to change its behavior depending on the number of virtual functions currently enabled. Signed-off-by: Gal Hammer Signed-off-by: Marcel Apfelbaum Signed-off-by: Akihiko Odaki --- hw/pci/pcie_sriov.c | 5 + include/hw/pci/pcie_sriov.h | 3 +++ 2 files change

[PATCH 28/31] tests/qtest/libqos/igb: Copy e1000e code

2023-01-12 Thread Akihiko Odaki
Start off igb test implementation by copying e1000e code first as igb resembles e1000e. Signed-off-by: Akihiko Odaki --- MAINTAINERS | 2 + tests/qtest/igb-test.c | 242 +++ tests/qtest/libqos/igb.c | 226

[PATCH 10/31] e1000e: Use memcpy to intialize registers

2023-01-12 Thread Akihiko Odaki
Use memcpy instead of memmove to initialize registers. The initial register templates and register table instances will never overlap. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000

[PATCH v2 2/7] target/arm/sme: Rebuild hflags in set_pstate() helpers

2023-01-12 Thread Philippe Mathieu-Daudé
From: Richard Henderson Signed-off-by: Richard Henderson Message-Id: <20230112004322.161330-1-richard.hender...@linaro.org> [PMD: Split patch in multiple tiny steps] Signed-off-by: Philippe Mathieu-Daudé --- target/arm/sme_helper.c| 2 ++ target/arm/translate-a64.c | 1 - 2 files changed,

[PATCH 13/31] e1000: Configure ResettableClass

2023-01-12 Thread Akihiko Odaki
This is part of recent efforts of refactoring e1000 and e1000e. DeviceClass's reset member is deprecated so migrate to ResettableClass. Thre is no behavioral difference. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- hw/net/e1000.c | 7 ---

[PATCH v2 7/7] target/arm/sme: Unify set_pstate() SM/ZA helpers as set_svcr()

2023-01-12 Thread Philippe Mathieu-Daudé
From: Richard Henderson Unify the two helper_set_pstate_{sm,za} in this function. Do not call helper_* functions from svcr_write. Signed-off-by: Richard Henderson Message-Id: <20230112004322.161330-1-richard.hender...@linaro.org> [PMD: Split patch in multiple tiny steps] Signed-off-by: Philippe

Re: [PATCH v4 4/4] scripts: add script to compare compatible properties

2023-01-12 Thread Maksim Davydov
On 12/12/22 13:53, Dr. David Alan Gilbert wrote: * Maksim Davydov (davydov-...@yandex-team.ru) wrote: This script run QEMU to obtain compat_props of machines and default values of different types and produce appropriate table. This table can be used to compare machine types to choose the most

[PATCH 29/31] tests/qtest/libqos/igb: Transform to igb tests

2023-01-12 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- tests/qtest/fuzz/generic_fuzz_configs.h | 5 + tests/qtest/igb-test.c | 67 ++-- tests/qtest/libqos/igb.c| 139 +--- tests/qtest/libqos/meson.build | 1 + tests/qtest/meson.build

[PATCH v2 0/7] target/arm: Introduce aarch64_set_svcr

2023-01-12 Thread Philippe Mathieu-Daudé
This is a respin of Richard's patch https://lore.kernel.org/qemu-devel/20230112004322.161330-1-richard.hender...@linaro.org/ but split in multiple trivial changes, as I was having hard time to understand all changes at once while reviewing it. Richard Henderson (7): target/arm/sme: Reorg SME acc

[PATCH v2 7/8] qemu/uuid: Add UUID static initializer

2023-01-12 Thread Jonathan Cameron via
From: Ira Weiny UUID's are defined as network byte order fields. No static initializer was available for UUID's in their standard big endian format. Define a big endian initializer for UUIDs. Signed-off-by: Ira Weiny Signed-off-by: Jonathan Cameron --- include/qemu/uuid.h | 12

[PATCH v2 5/7] target/arm/sme: Reset ZA state in aarch64_set_svcr()

2023-01-12 Thread Philippe Mathieu-Daudé
From: Richard Henderson Signed-off-by: Richard Henderson Message-Id: <20230112004322.161330-1-richard.hender...@linaro.org> [PMD: Split patch in multiple tiny steps] Signed-off-by: Philippe Mathieu-Daudé --- target/arm/helper.c | 12 target/arm/sme_helper.c | 12

Re: [PATCH 04/31] e1000: Use hw/net/mii.h

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 10:57, Akihiko Odaki wrote: hw/net/mii.h provides common definitions for MII. Signed-off-by: Akihiko Odaki --- hw/net/e1000.c | 86 ++-- hw/net/e1000_regs.h| 46 hw/net/e1000e.c| 1 + hw/net/e1000e_core.c

Re: [PATCH] tests/qtest: Poll on waitpid() for a while before sending SIGKILL

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 10:54, Daniel P. Berrangé wrote: On Thu, Jan 12, 2023 at 10:18:01AM +0100, Philippe Mathieu-Daudé wrote: On 11/1/23 23:30, Stefan Berger wrote: To prevent getting stuck on waitpid() in case the target process does not terminate on SIGTERM, poll on waitpid() for 10s and if the target

[PATCH v2 3/7] target/arm/sme: Introduce aarch64_set_svcr()

2023-01-12 Thread Philippe Mathieu-Daudé
From: Richard Henderson Signed-off-by: Richard Henderson Message-Id: <20230112004322.161330-1-richard.hender...@linaro.org> [PMD: Split patch in multiple tiny steps] Signed-off-by: Philippe Mathieu-Daudé --- linux-user/aarch64/cpu_loop.c | 2 +- linux-user/aarch64/signal.c | 2 +- target/arm

[PATCH v2 0/8] hw/cxl: CXL emulation cleanups and minor fixes for upstream

2023-01-12 Thread Jonathan Cameron via
V2: - Various minor issues found by Philippe, see individual patches. Note that the const_le64() patch matches changes in a set of Philippe's that was never applied. Philippe may send an update of that series before this merges. If that occurs, drop "qemu/bswap: Add const_le64()" - Picked up

[PATCH 31/31] docs/system/devices/igb: Add igb documentation

2023-01-12 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- MAINTAINERS | 1 + docs/system/device-emulation.rst | 1 + docs/system/devices/igb.rst | 70 3 files changed, 72 insertions(+) create mode 100644 docs/system/devices/igb.rst diff --git a/MAINTAINERS b/

Re: [PATCH] target/arm: Introduce aarch64_set_svcr

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 01:43, Richard Henderson wrote: Unify the two helper_set_pstate_{sm,za} in this function. Do not call helper_* functions from svcr_write. Cleans up linux-user usage by consolodating logic. Cc: Fabiano Rosas Signed-off-by: Richard Henderson --- Fabiano, I expect this to replace much

[PATCH v2 5/8] hw/i386/acpi: Drop duplicate _UID entry for CXL root bridge

2023-01-12 Thread Jonathan Cameron via
Noticed as this prevents iASL disasembling the DSDT table. Reviewed-by: Ira Weiny Signed-off-by: Jonathan Cameron --- hw/i386/acpi-build.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 127c4e2d50..a584b62ae2 100644 --- a/hw/i386/acpi-build.

[PATCH 19/31] hw/net/net_tx_pkt: Introduce net_tx_pkt_get_eth_hdr

2023-01-12 Thread Akihiko Odaki
Expose the ethernet header so that igb can utilize it to perform the internal routing among its SR-IOV functions. Signed-off-by: Gal Hammer Signed-off-by: Marcel Apfelbaum Signed-off-by: Akihiko Odaki --- hw/net/net_tx_pkt.c | 6 ++ hw/net/net_tx_pkt.h | 8 2 files changed, 14 ins

[PATCH v2 3/8] hw/cxl: set cxl-type3 device type to PCI_CLASS_MEMORY_CXL

2023-01-12 Thread Jonathan Cameron via
From: Gregory Price Current code sets to STORAGE_EXPRESS and then overrides it. Reviewed-by: Davidlohr Bueso Reviewed-by: Ira Weiny Signed-off-by: Gregory Price Signed-off-by: Jonathan Cameron --- hw/mem/cxl_type3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/me

[PATCH v2 4/7] target/arm/sme: Reset SVE state in aarch64_set_svcr()

2023-01-12 Thread Philippe Mathieu-Daudé
From: Richard Henderson Move arm_reset_sve_state() calls to aarch64_set_svcr(). Signed-off-by: Richard Henderson Message-Id: <20230112004322.161330-1-richard.hender...@linaro.org> [PMD: Split patch in multiple tiny steps] Signed-off-by: Philippe Mathieu-Daudé --- linux-user/aarch64/cpu_loop.c

Re: [PATCH 07/31] e1000: Use more constant definitions

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 10:57, Akihiko Odaki wrote: The definitions for E1000_VFTA_ENTRY_SHIFT, E1000_VFTA_ENTRY_MASK, and E1000_VFTA_ENTRY_BIT_SHIFT_MASK were copied from: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/ethernet/intel/e1000/e1000_hw.h?h=v6.0.9#n306 The defi

Re: [PATCH 03/31] fsl_etsec: Use hw/net/mii.h

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 10:57, Akihiko Odaki wrote: hw/net/mii.h provides common definitions for MII. Signed-off-by: Akihiko Odaki --- hw/net/fsl_etsec/etsec.c | 11 ++- hw/net/fsl_etsec/etsec.h | 17 - hw/net/fsl_etsec/miim.c | 5 +++-- include/hw/net/mii.h | 1 + 4 fil

Re: [PATCH 18/31] tests/qtest/libqos/e1000e: Remove duplicate register definitions

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 10:57, Akihiko Odaki wrote: The register definitions in tests/qtest/libqos/e1000e.h had names different from hw/net/e1000_regs.h, which made it hard to understand what test codes corresponds to the implementation. Use hw/net/e1000_regs.h from tests/qtest/libqos/e1000e.c to remove these

[PATCH v2 6/8] qemu/bswap: Add const_le64()

2023-01-12 Thread Jonathan Cameron via
From: Ira Weiny Gcc requires constant versions of cpu_to_le* calls. Add a 64 bit version. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Ira Weiny Signed-off-by: Jonathan Cameron --- v2: Update comment (Philippe) include/qemu/bswap.h | 12 +++- 1 fi

[PATCH 07/31] e1000: Use more constant definitions

2023-01-12 Thread Akihiko Odaki
The definitions for E1000_VFTA_ENTRY_SHIFT, E1000_VFTA_ENTRY_MASK, and E1000_VFTA_ENTRY_BIT_SHIFT_MASK were copied from: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/ethernet/intel/e1000/e1000_hw.h?h=v6.0.9#n306 The definitions for E1000_NUM_UNICAST, E1000_MC_T

Re: [PATCH 00/31] Introduce igb

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 10:57, Akihiko Odaki wrote: igb is a family of Intel's gigabit ethernet controllers. This series implements 82576 emulation in particular. You can see the last patch for the documentation. Note that there is another effort to bring 82576 emulation. This series was developed independen

[PATCH v2 4/8] hw/cxl: Add CXL_CAPACITY_MULTIPLIER definition

2023-01-12 Thread Jonathan Cameron via
From: Gregory Price Remove usage of magic numbers when accessing capacity fields and replace with CXL_CAPACITY_MULTIPLIER, matching the kernel definition. Signed-off-by: Gregory Price Reviewed-by: Davidlohr Bueso Signed-off-by: Jonathan Cameron --- v2: Change to 256 * MiB and include qemu/un

Re: [PATCH 21/31] e1000: Split header files

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 10:57, Akihiko Odaki wrote: Some definitions in the header files are invalid for igb so extract them to new header files to keep igb from referring to them. Signed-off-by: Gal Hammer Signed-off-by: Marcel Apfelbaum Signed-off-by: Akihiko Odaki --- hw/net/e1000.c | 2 +-

[PATCH v2 1/8] hw/mem/cxl_type3: Improve error handling in realize()

2023-01-12 Thread Jonathan Cameron via
msix_init_exclusive_bar() can fail, so if it does cleanup the address space. Reviewed-by: Ira Weiny Signed-off-by: Jonathan Cameron --- hw/mem/cxl_type3.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index dae4fd89ca..

Re: [PATCH 20/31] pcie: Introduce pcie_sriov_num_vfs

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 10:57, Akihiko Odaki wrote: igb can use this function to change its behavior depending on the number of virtual functions currently enabled. Signed-off-by: Gal Hammer Signed-off-by: Marcel Apfelbaum Signed-off-by: Akihiko Odaki --- hw/pci/pcie_sriov.c | 5 + include/

Re: [PATCH 16/31] e1000e: Set MII_ANER_NWAY

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 10:57, Akihiko Odaki wrote: This keeps Windows driver 12.18.9.23 from generating an event with ID 30. The description of the event is as follows: Intel(R) 82574L Gigabit Network Connection PROBLEM: The network adapter is configured for auto-negotiation but the link partner is not.

[PATCH v2 2/8] hw/pci-bridge/cxl_downstream: Fix type naming mismatch

2023-01-12 Thread Jonathan Cameron via
Fix capitalization difference between struct name and typedef. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ira Weiny Signed-off-by: Jonathan Cameron --- hw/pci-bridge/cxl_downstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw

[PATCH v2 8/8] hw/cxl/mailbox: Use new UUID network order define for cel_uuid

2023-01-12 Thread Jonathan Cameron via
From: Ira Weiny The cel_uuid was programatically generated previously because there was no static initializer for network order UUIDs. Use the new network order initializer for cel_uuid. Adjust cxl_initialize_mailbox() because it can't fail now. Update specification reference. Reviewed-by: Ph

Re: [PATCH v2 4/8] hw/cxl: Add CXL_CAPACITY_MULTIPLIER definition

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 11:26, Jonathan Cameron wrote: From: Gregory Price Remove usage of magic numbers when accessing capacity fields and replace with CXL_CAPACITY_MULTIPLIER, matching the kernel definition. Signed-off-by: Gregory Price Reviewed-by: Davidlohr Bueso Signed-off-by: Jonathan Cameron ---

Re: [PATCH 14/31] e1000e: Configure ResettableClass

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 10:57, Akihiko Odaki wrote: This is part of recent efforts of refactoring e1000 and e1000e. DeviceClass's reset member is deprecated so migrate to ResettableClass. Thre is no behavioral difference. Typo 'There'. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Reviewed-b

Re: [PATCH 17/31] tests/qtest/e1000e-test: Fix the code style

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 10:57, Akihiko Odaki wrote: igb implementation first starts off by copying e1000e code. Correct the code style before that. Signed-off-by: Akihiko Odaki --- tests/qtest/e1000e-test.c | 2 +- tests/qtest/libqos/e1000e.c | 6 -- 2 files changed, 5 insertions(+), 3 deletions(-

Re: [PATCH 01/31] e1000e: Fix the code style

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 10:57, Akihiko Odaki wrote: igb implementation first starts off by copying e1000e code. Correct the code style before that. Signed-off-by: Akihiko Odaki --- hw/net/e1000.c | 41 hw/net/e1000e.c| 72 ++-- hw/net/e1000e_cor

Re: [PATCH 13/31] e1000: Configure ResettableClass

2023-01-12 Thread Philippe Mathieu-Daudé
On 12/1/23 10:57, Akihiko Odaki wrote: This is part of recent efforts of refactoring e1000 and e1000e. DeviceClass's reset member is deprecated so migrate to ResettableClass. Thre is no behavioral difference. Typo 'There'. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Reviewed-b

[PATCH v2 6/7] target/arm/sme: Rebuild hflags in aarch64_set_svcr()

2023-01-12 Thread Philippe Mathieu-Daudé
From: Richard Henderson Signed-off-by: Richard Henderson Message-Id: <20230112004322.161330-1-richard.hender...@linaro.org> [PMD: Split patch in multiple tiny steps] Signed-off-by: Philippe Mathieu-Daudé --- linux-user/aarch64/cpu_loop.c | 8 +--- linux-user/aarch64/signal.c | 3 --- tar

Re: [PATCH] bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx

2023-01-12 Thread Peter Maydell
On Tue, 10 Jan 2023 at 22:04, BALATON Zoltan wrote: > > On Tue, 10 Jan 2023, Philippe Mathieu-Daudé wrote: > > The 'hwaddr' type is defined in "exec/hwaddr.h" as: > > > >hwaddr is the type of a physical address > > (its size can be different from 'target_ulong'). > > > > All definitions use

[PATCH 22/31] igb: Copy e1000e code

2023-01-12 Thread Akihiko Odaki
Start off igb implementation by copying e1000e code first as igb resembles e1000e. Signed-off-by: Gal Hammer Signed-off-by: Marcel Apfelbaum Signed-off-by: Akihiko Odaki --- MAINTAINERS |5 + hw/net/igb.c| 726 + hw/net/igb_common.h | 104 ++ hw/net/igb_core.c |

[PATCH v2 1/7] target/arm/sme: Reorg SME access handling in handle_msr_i()

2023-01-12 Thread Philippe Mathieu-Daudé
From: Richard Henderson Signed-off-by: Richard Henderson Message-Id: <20230112004322.161330-1-richard.hender...@linaro.org> [PMD: Split patch in multiple tiny steps] Signed-off-by: Philippe Mathieu-Daudé --- target/arm/translate-a64.c | 24 +--- 1 file changed, 13 insertion

Re: [PATCH] remove unnecessary extern "C" blocks

2023-01-12 Thread Peter Maydell
On Wed, 11 Jan 2023 at 09:14, Paolo Bonzini wrote: > > On 1/10/23 11:53, Peter Maydell wrote: > > On Tue, 10 Jan 2023 at 09:33, Paolo Bonzini wrote: > >> > >> A handful of header files in QEMU are wrapped with extern "C" blocks. > >> These are not necessary: there are C++ source files anymore in

Re: Questions about how block devices use snapshots

2023-01-12 Thread Kevin Wolf
Am 11.01.2023 um 17:21 hat Zhiyong Ye geschrieben: > Hi Kevin, > > Can I ask again how base.img + diff.qcow2 can be re-merged into one image > via qemu-img or hmp command when modified.img is discarded? You can either use 'qemu-img commit' to copy all of the data from diff.qcow2 back into base.im

Re: [PATCH v14 11/11] docs/s390x/cpu topology: document s390x cpu topology

2023-01-12 Thread Thomas Huth
On 05/01/2023 15.53, Pierre Morel wrote: Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel --- docs/system/s390x/cpu-topology.rst | 292 + docs/system/target-s390x.rst | 1 + 2 files changed, 293 insertions(+

Re: [PATCH v14 09/11] qapi/s390/cpu topology: monitor query topology information

2023-01-12 Thread Thomas Huth
On 05/01/2023 15.53, Pierre Morel wrote: Reporting the current topology informations to the admin through the QEMU monitor. Signed-off-by: Pierre Morel --- ... diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index 754b1e8408..5730a47f71 100644 --- a/hmp-commands-info.hx +++ b/hmp-com

  1   2   3   4   >