[PATCH v2 3/4] hw/arm: Validate socket and NUMA node boundary

2023-02-23 Thread Gavin Shan
There are two ARM machines where NUMA is aware: 'virt' and 'sbsa-ref'. Both of them are required to follow socket-NUMA-node boundary. To enable the validation to reject incorrect configuration. Signed-off-by: Gavin Shan --- hw/arm/sbsa-ref.c | 2 ++ hw/arm/virt.c | 2 ++ 2 files changed, 4 i

[PATCH v2 1/4] qtest/numa-test: Follow socket-NUMA-node boundary for aarch64

2023-02-23 Thread Gavin Shan
After socket-to-NUMA-node boundary is applied to aarch64 in the subsequent patches, we need to explicitly specify 'smp.sockets=2' for 'test_mon_explicit' and 'test_query_cpus' test cases. Besides, 'test_mon_partial' isn't applied to aarch64 any more. Signed-off-by: Gavin Shan --- tests/qtest/num

[PATCH v2 4/4] hw/riscv: Validate socket and NUMA node boundary

2023-02-23 Thread Gavin Shan
There are two RISCV machines where NUMA is aware: 'virt' and 'spike'. Both of them are required to follow socket-NUMA-node boundary. To enable the validation to reject incorrect configuration. Signed-off-by: Gavin Shan --- hw/riscv/spike.c | 1 + hw/riscv/virt.c | 1 + 2 files changed, 2 insert

[PATCH v2 0/4] NUMA: Apply socket-NUMA-node boundary for aarch64 and RiscV machines

2023-02-23 Thread Gavin Shan
For arm64 and RiscV architecture, the driver (/base/arch_topology.c) is used to populate the CPU topology in the Linux guest. It's required that the CPUs in one socket can't span mutiple NUMA nodes. Otherwise, the Linux scheduling domain can't be sorted out, as the following warning message indicat

[PATCH v2 2/4] numa: Validate socket and NUMA node boundary if required

2023-02-23 Thread Gavin Shan
For some architectures like ARM64, multiple CPUs in one socket can't be associated with different NUMA nodes. Otherwise, the guest kernel is confused about the CPU topology. For example, the following warning message is observed from linux guest with the below command lines. -smp 6,maxcpus=6,soc

Re: [RFC PATCH 10/43] target/loongarch: Implement vaddw/vsubw

2023-02-23 Thread gaosong
Hi, Richard 在 2023/2/21 上午1:21, Richard Henderson 写道: On 2/19/23 21:47, gaosong wrote: I have some questions: 1 Should we need implement  GVecGen*  for simple gvec instructiosn? such as add, sub , or , xor.. No, these are done generically. 2 Should we need implement all fni8/fni4, fniv

Re: [PATCH] hw/smbios: fix field corruption in type 4 table

2023-02-23 Thread Igor Mammedov
On Wed, 22 Feb 2023 22:00:49 +0100 Julia Suvorova wrote: > Since table type 4 of SMBIOS version 2.6 is shorter than 3.0, the > strings which follow immediately after the struct fields have been > overwritten by unconditional filling of later fields such as core_count2. > Make these fields depende

Re: [PATCH] vdpa: stop all svq on device deletion

2023-02-23 Thread Laurent Vivier
Hi, this patch fixes a QEMU crash, could it be merged? Thanks, Laurent On 2/9/23 18:00, Eugenio Pérez wrote: Not stopping them leave the device in a bad state when virtio-net fronted device is unplugged with device_del monitor command. This is not triggable in regular poweroff or qemu forces

Re: [PATCH v3 5/6] meson: prefer 'sphinx-build' to 'sphinx-build-3'

2023-02-23 Thread Paolo Bonzini
On Thu, Feb 23, 2023 at 5:40 AM John Snow wrote:> > For what it's worth, python3-sphinx-5.0.2-2.fc37.noarch provides > > > > /usr/bin/sphinx-build > > /usr/bin/sphinx-build-3 > > /usr/bin/sphinx-build-3.11 > > > > where the latter two are symbolic links to the first. No need to check

Re: [PATCH v2 2/4] numa: Validate socket and NUMA node boundary if required

2023-02-23 Thread Philippe Mathieu-Daudé
On 23/2/23 09:13, Gavin Shan wrote: For some architectures like ARM64, multiple CPUs in one socket can't be associated with different NUMA nodes. Otherwise, the guest kernel is confused about the CPU topology. For example, the following warning message is observed from linux guest with the below

Re: [PATCH 0/5] Pegasos2 fixes and audio output support

2023-02-23 Thread Bernhard Beschow
Am 22. Februar 2023 23:00:02 UTC schrieb BALATON Zoltan : >On Wed, 22 Feb 2023, Bernhard Beschow wrote: >> Am 22. Februar 2023 21:12:01 UTC schrieb BALATON Zoltan : >>> On Wed, 22 Feb 2023, Bernhard Beschow wrote: Am 22. Februar 2023 19:25:16 UTC schrieb BALATON Zoltan : > On Wed,

Re: mttcg: warning to user about memory ordering

2023-02-23 Thread Pierrick Bouvier
On 2/22/23 20:14, Richard Henderson wrote: On 2/22/23 06:28, Pierrick Bouvier wrote: Hello, When using multi thread tcg, a warning is emitted to user if models for guest and host are not compatible (like qemu-system-x86_64 running on aarch64 host) accel/tcg/tcg-all.c: 161 if (!che

Re: [PATCH] target/riscv/vector_helper.c: create vext_set_tail_elems_1s()

2023-02-23 Thread Frank Chang
Reviewed-by: Frank Chang On Wed, Feb 22, 2023 at 2:46 AM Daniel Henrique Barboza < dbarb...@ventanamicro.com> wrote: > Commit 752614cab8e6 ("target/riscv: rvv: Add tail agnostic for vector > load / store instructions") added code to set the tail elements to 1 in > the end of vext_ldst_stride(),

Re: [PATCH v2 00/20] vfio: Add migration pre-copy support and device dirty tracking

2023-02-23 Thread Cédric Le Goater
On 2/22/23 21:55, Alex Williamson wrote: There are various errors running this through the CI on gitlab. This one seems bogus but needs to be resolved regardless: https://gitlab.com/alex.williamson/qemu/-/jobs/3817940731 FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o 2786s390x-linux-g

Re: [PATCH v3 1/5] dump: Include missing "cpu.h" header for tswap32/tswap64() declarations

2023-02-23 Thread Philippe Mathieu-Daudé
On 17/12/22 00:58, Richard Henderson wrote: On 12/16/22 13:55, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé ---   dump/dump.c | 1 +   1 file changed, 1 insertion(+) diff --git a/dump/dump.c b/dump/dump.c index 279b07f09b..c62dc94213 100644 --- a/dump/dump.c +++ b/dump/du

Re: [PATCH] target/riscv: Add support for Zicond extension

2023-02-23 Thread Frank Chang
Reviewed-by: Frank Chang On Tue, Feb 21, 2023 at 5:10 PM Weiwei Li wrote: > The spec can be found in https://github.com/riscv/riscv-zicond. > Two instructions are added: > - czero.eqz: Moves zero to a register rd, if the condition rs2 is >equal to zero, otherwise moves rs1 to rd. > - czer

[PATCH v6 06/34] e1000e: Introduce E1000E_LOW_BITS_SET_FUNC

2023-02-23 Thread Akihiko Odaki
e1000e_set_16bit and e1000e_set_12bit look so similar so define a generic macro. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index 181c1e0c2a..1cafc38f50

[PATCH v6 00/34] e1000x cleanups (preliminary for IGB)

2023-02-23 Thread Akihiko Odaki
We are adding a new device named igb, yet another Intel NIC. As the new implementation derives from e1000e, overhaul e1000e implementation first. e1000 has many commonalities with e1000e so we also apply the corresponding changes to the device if possible. This was spun off from: https://patchew.o

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

2023-02-23 Thread Akihiko Odaki
hw/net/mii.h provides common definitions for MII. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- 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 change

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

2023-02-23 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 v6 01/34] e1000e: Fix the code style

2023-02-23 Thread Akihiko Odaki
igb implementation first starts off by copying e1000e code. Correct the code style before that. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- hw/net/e1000.c | 41 hw/net/e1000e.c| 72 ++-- hw/net/e1000e_core.c |

[PATCH v6 15/34] e1000e: Configure ResettableClass

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

[PATCH v6 11/34] e1000e: Use memcpy to intialize registers

2023-02-23 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 v6 30/34] e1000e: Combine rx traces

2023-02-23 Thread Akihiko Odaki
Whether a packet will be written back to the guest depends on the remaining space of the queue. Therefore, e1000e_rx_written_to_guest and e1000e_rx_not_written_to_guest should log the index of the queue instead of generated interrupts. This also removes the need of e1000e_rx_rss_dispatched_to_queue

[PATCH v6 12/34] e1000e: Remove pending interrupt flags

2023-02-23 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 v6 32/34] e1000e: Count CRC in Tx statistics

2023-02-23 Thread Akihiko Odaki
The datasheet 8.19.29 "Good Packets Transmitted Count - GPTC (0x04080; RC)" says: > This register counts the number of good (no errors) packets > transmitted. A good transmit packet is considered one that is 64 or > more bytes in length (from through , > inclusively) in length. It also says simil

[PATCH v6 33/34] net/eth: Report if headers are actually present

2023-02-23 Thread Akihiko Odaki
The values returned by eth_get_protocols() are used to perform RSS, checksumming and segmentation. Even when a packet signals the use of the protocols which these operations can be applied to, the headers for them may not be present because of too short packet or fragmentation, for example. In such

[PATCH v6 18/34] e1000e: Remove extra pointer indirection

2023-02-23 Thread Akihiko Odaki
e1000e_write_packet_to_guest() passes the reference of variable ba as a pointer to an array, and that pointer indirection is just unnecessary; all functions which uses the passed reference performs no pointer operation on the pointer and they simply dereference the passed pointer. Remove the extra

[PATCH v6 21/34] net: Strip virtio-net header when dumping

2023-02-23 Thread Akihiko Odaki
filter-dump specifiees Ethernet as PCAP LinkType, which does not expect virtio-net header. Having virtio-net header in such PCAP file breaks PCAP unconsumable. Unfortunately currently there is no LinkType for virtio-net so for now strip virtio-net header to convert the output to Ethernet. Signed-o

[PATCH v6 26/34] hw/net/net_tx_pkt: Check the payload length

2023-02-23 Thread Akihiko Odaki
Check the payload length if checksumming to ensure the payload contains the space for the resulting value. This bug was found by Alexander Bulekov with the fuzzer: https://patchew.org/QEMU/20230129053316.1071513-1-alx...@bu.edu/ The fixed test case is: fuzz/crash_6aeaa33e7211ecd603726c53e834df4c6

[PATCH v6 16/34] e1000e: Introduce e1000_rx_desc_union

2023-02-23 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 v6 25/34] hw/net/net_tx_pkt: Implement TCP segmentation

2023-02-23 Thread Akihiko Odaki
There was no proper implementation of TCP segmentation before this change, and net_tx_pkt relied solely on IPv4 fragmentation. Not only this is not aligned with the specification, but it also resulted in corrupted IPv6 packets. This is particularly problematic for the igb, a new proposed device im

[PATCH v6 14/34] e1000: Configure ResettableClass

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

[PATCH v6 24/34] e1000e: Perform software segmentation for loopback

2023-02-23 Thread Akihiko Odaki
e1000e didn't perform software segmentation for loopback if virtio-net header is enabled, which is wrong. To fix the problem, introduce net_tx_pkt_send_custom(), which allows the caller to specify whether offloading should be assumed or not. net_tx_pkt_send_custom() also allows the caller to prov

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

2023-02-23 Thread Akihiko Odaki
hw/net/mii.h provides common definitions for MII. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- hw/net/e1000.c | 86 ++-- hw/net/e1000_regs.h| 46 hw/net/e1000e.c| 1 + hw/net/e1000e_core.c | 99 +

[PATCH v6 31/34] e1000: Count CRC in Tx statistics

2023-02-23 Thread Akihiko Odaki
The Software Developer's Manual 13.7.4.5 "Packets Transmitted (64 Bytes) Count" says: > This register counts the number of packets transmitted that are > exactly 64 bytes (from through , > inclusively) in length. It also says similar for the other Tx statistics registers. Add the number of bytes

[PATCH v6 17/34] e1000e: Set MII_ANER_NWAY

2023-02-23 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 v6 34/34] e1000e: Implement system clock

2023-02-23 Thread Akihiko Odaki
The system clock is necessary to implement PTP features. While we are not implementing PTP features for e1000e yet, we do have a plan to implement them for igb, a new network device derived from e1000e, so add system clock to the common base first. Signed-off-by: Akihiko Odaki --- hw/core/machin

[PATCH v6 28/34] MAINTAINERS: Add Akihiko Odaki as a e1000e reviewer

2023-02-23 Thread Akihiko Odaki
I want to know to be notified when there is a new change for e1000e as e1000e is similar to igb and such a change may also be applicable for igb. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/

[PATCH v6 29/34] MAINTAINERS: Add e1000e test files

2023-02-23 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki Acked-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 993ebc6e08..cc99e38db8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -,6 +,8 @@ R: Akihiko Odaki

[PATCH v6 19/34] net: Check L4 header size

2023-02-23 Thread Akihiko Odaki
net_tx_pkt_build_vheader() inspects TCP header but had no check for the header size, resulting in an undefined behavior. Check the header size and drop the packet if the header is too small. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.c | 19 ++- hw/net/net_tx_pkt.c | 13

[PATCH v6 08/34] e1000: Use more constant definitions

2023-02-23 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

[PATCH v6 22/34] hw/net/net_tx_pkt: Automatically determine if virtio-net header is used

2023-02-23 Thread Akihiko Odaki
The new function qemu_get_using_vnet_hdr() allows to automatically determine if virtio-net header is used. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.c | 3 +-- hw/net/net_tx_pkt.c | 19 ++- hw/net/net_tx_pkt.h | 3 +-- hw/net/vmxnet3.c | 6 ++ 4 files chang

[PATCH v6 20/34] e1000x: Alter the signature of e1000x_is_vlan_packet

2023-02-23 Thread Akihiko Odaki
e1000x_is_vlan_packet() had a pointer to uint8_t as a parameter, but it does not have to be uint8_t. Change the type to void *. Signed-off-by: Akihiko Odaki --- hw/net/e1000x_common.c | 2 +- hw/net/e1000x_common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/e10

[PATCH v6 09/34] e1000e: Use more constant definitions

2023-02-23 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 v6 07/34] e1000e: Mask registers when writing

2023-02-23 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 | 76 +++

[PATCH v6 23/34] hw/net/net_rx_pkt: Remove net_rx_pkt_has_virt_hdr

2023-02-23 Thread Akihiko Odaki
When virtio-net header is not set, net_rx_pkt_get_vhdr() returns zero-filled virtio_net_hdr, which is actually valid. In fact, tap device uses zero-filled virtio_net_hdr when virtio-net header is not provided by the peer. Therefore, we can just remove net_rx_pkt_has_virt_hdr() and always assume Net

[PATCH v6 10/34] e1000: Use memcpy to intialize registers

2023-02-23 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 d9d

[PATCH v6 13/34] e1000e: Improve software reset

2023-02-23 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 v6 27/34] e1000e: Do not assert when MSI-X is disabled later

2023-02-23 Thread Akihiko Odaki
Assertions will fail if MSI-X gets disabled while a timer for MSI-X interrupts is running so remove them to avoid abortions. Fortunately, nothing bad happens even if the assertions won't trigger as msix_notify(), called by timer handlers, does nothing when MSI-X is disabled. This bug was found by

[PATCH v6 05/34] e1000: Mask registers when writing

2023-02-23 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 +++--

Re: [PATCH v2 2/4] numa: Validate socket and NUMA node boundary if required

2023-02-23 Thread Gavin Shan
On 2/23/23 8:05 PM, Philippe Mathieu-Daudé wrote: On 23/2/23 09:13, Gavin Shan wrote: For some architectures like ARM64, multiple CPUs in one socket can't be associated with different NUMA nodes. Otherwise, the guest kernel is confused about the CPU topology. For example, the following warning m

Re: [PATCH v2 10/20] vfio/common: Record DMA mapped IOVA ranges

2023-02-23 Thread Joao Martins
On 22/02/2023 22:10, Alex Williamson wrote: > On Wed, 22 Feb 2023 19:49:05 +0200 > Avihai Horon wrote: >> From: Joao Martins >> @@ -612,6 +665,16 @@ static int vfio_dma_map(VFIOContainer *container, >> hwaddr iova, >> .iova = iova, >> .size = size, >> }; >> +int ret; >

Re: [PATCH v5 7/9] aspeed/soc : Add AST1030 support

2023-02-23 Thread Philippe Mathieu-Daudé
ping On 29/12/22 12:16, Philippe Mathieu-Daudé wrote: Hi, On 1/4/22 10:38, Jamin Lin wrote: From: Steven Lee The embedded core of AST1030 SoC is ARM Coretex M4. It is hard to be integrated in the common Aspeed Soc framework. We introduce a new ast1030 class with instance_init and realize han

Re: [PATCH v9 08/14] hw/nvram: NPCM7xx OTP device model

2023-02-23 Thread Philippe Mathieu-Daudé
Tyrone, Hao, ping? On 22/12/22 16:03, Philippe Mathieu-Daudé wrote: Hi, (old patch) On 11/9/20 07:20, Havard Skinnemoen wrote: This supports reading and writing OTP fuses and keys. Only fuse reading has been tested. Protection is not implemented. Reviewed-by: Avi Fishman Reviewed-by: Philip

[PATCH v9 5/9] tests/qtest/e1000e-test: Fabricate ethernet header

2023-02-23 Thread Akihiko Odaki
e1000e understands ethernet header so fabricate something convincing. Signed-off-by: Akihiko Odaki Reviewed-by: Thomas Huth --- tests/qtest/e1000e-test.c | 25 +++-- tests/qtest/libqos/e1000e.h | 2 ++ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/tests

[PATCH v9 1/9] net/eth: Introduce EthL4HdrProto

2023-02-23 Thread Akihiko Odaki
igb, a new network device emulation, will need SCTP checksum offloading. Currently eth_get_protocols() has a bool parameter for each protocol currently it supports, but there will be a bit too many parameters if we add yet another protocol. Introduce an enum type, EthL4HdrProto to represent all L4

[PATCH v9 0/9] Introduce igb

2023-02-23 Thread Akihiko Odaki
Based-on: <20230223102018.141748-1-akihiko.od...@daynix.com> ([PATCH v6 00/34] e1000x cleanups (preliminary for IGB)) 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

[PATCH v9 3/9] e1000: Split header files

2023-02-23 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 Reviewed-by: Philippe Mathieu-Daudé --- hw/net/e1000.c | 1 + hw/ne

[PATCH v9 2/9] pcie: Introduce pcie_sriov_num_vfs

2023-02-23 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 Reviewed-by: Philippe Mathieu-Daudé --- hw/pci/pcie_sriov.c | 5 + include/hw/pci

[PATCH v9 7/9] igb: Introduce qtest for igb device

2023-02-23 Thread Akihiko Odaki
This change is derived from qtest for e1000e device. Signed-off-by: Akihiko Odaki Acked-by: Thomas Huth --- MAINTAINERS | 2 + tests/qtest/fuzz/generic_fuzz_configs.h | 5 + tests/qtest/igb-test.c | 243 tests/qtest/libqo

[PATCH v9 8/9] tests/avocado: Add igb test

2023-02-23 Thread Akihiko Odaki
This automates ethtool tests for igb registers, interrupts, etc. Signed-off-by: Akihiko Odaki Reviewed-by: Cédric Le Goater --- MAINTAINERS | 1 + .../org.centos/stream/8/x86_64/test-avocado | 1 + tests/avocado/igb.py | 38

[PATCH v9 6/9] tests/qtest/libqos/e1000e: Export macreg functions

2023-02-23 Thread Akihiko Odaki
They will be useful for igb testing. Signed-off-by: Akihiko Odaki Reviewed-by: Thomas Huth --- 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

[PATCH v9 9/9] docs/system/devices/igb: Add igb documentation

2023-02-23 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki Reviewed-by: Cédric Le Goater --- MAINTAINERS | 1 + docs/system/device-emulation.rst | 1 + docs/system/devices/igb.rst | 71 3 files changed, 73 insertions(+) create mode 100644 docs/system/devices/igb.r

[RFC PATCH] hw: arm: Support direct boot for Linux/arm64 EFI zboot images

2023-02-23 Thread Ard Biesheuvel
Fedora 39 will ship its arm64 kernels in the new generic EFI zboot format, using gzip compression for the payload. For doing EFI boot in QEMU, this is completely transparent, as the firmware or bootloader will take care of this. However, for direct kernel boot without firmware, we will lose the ab

Re: [PATCH v2 11/13] vdpa: block migration if dev does not have _F_SUSPEND

2023-02-23 Thread Eugenio Perez Martin
On Thu, Feb 23, 2023 at 3:38 AM Jason Wang wrote: > > > 在 2023/2/22 22:25, Eugenio Perez Martin 写道: > > On Wed, Feb 22, 2023 at 5:05 AM Jason Wang wrote: > >> > >> 在 2023/2/8 17:42, Eugenio Pérez 写道: > >>> Next patches enable devices to be migrated even if vdpa netdev has not > >>> been started w

Re: Questions about how block devices use snapshots

2023-02-23 Thread Kevin Wolf
Am 23.02.2023 um 08:35 hat Zhiyong Ye geschrieben: > Hi Kevin, > > Thank you for your reply and this method works. > > May I ask if this 'image-end-offset' field can be shown in the qemu-img info > too? Because it is also a very useful information whether qcow2 is placed on > a file or a block de

Re: [PATCH] meson: Avoid duplicates in generated config-poison.h again

2023-02-23 Thread Markus Armbruster
Nominating for qemu-trivial. Thanks in advance!

Re: Questions about how block devices use snapshots

2023-02-23 Thread Zhiyong Ye
Hi Kevin, Thank you for your patience and explanations. Thanks again! Zhiyong On 2/23/23 7:39 PM, Kevin Wolf wrote: Am 23.02.2023 um 08:35 hat Zhiyong Ye geschrieben: Hi Kevin, Thank you for your reply and this method works. May I ask if this 'image-end-offset' field can be shown in the qe

Re: [PATCH 00/23] block: Lock the graph, part 2 (BlockDriver callbacks)

2023-02-23 Thread Kevin Wolf
Am 21.02.2023 um 23:13 hat Stefan Hajnoczi geschrieben: > On Fri, Feb 03, 2023 at 04:21:39PM +0100, Kevin Wolf wrote: > > After introducing the graph lock in a previous series, this series > > actually starts making widespread use of it. > > > > Most of the BlockDriver callbacks access the childre

Re: [PATCH v1 5/6] hw/arm/virt: Enable backup bitmap for dirty ring

2023-02-23 Thread Peter Maydell
On Thu, 23 Feb 2023 at 00:52, Gavin Shan wrote: > > On 2/23/23 2:54 AM, Peter Maydell wrote: > > But we might have to for other boards we add later. We shouldn't > > put code in per-board if it's not really board specific. > > > > Moreover, I think "we need the backup bitmap if the kernel is > > u

[PULL 7/8] qapi: remove _JSONObject

2023-02-23 Thread Markus Armbruster
From: John Snow We can remove this alias as it only has two usages now, and no longer pays for the confusion of "yet another type". Signed-off-by: John Snow Message-Id: <2023021511.1725012-6-js...@redhat.com> Reviewed-by: Markus Armbruster --- scripts/qapi/expr.py | 13 +++-- sc

[PULL 1/8] docs/devel/qapi-code-gen: Belatedly update features documentation

2023-02-23 Thread Markus Armbruster
Commit 013b4efc9be "qapi: Add feature flags to remaining definitions" (v5.0.0), commit 84ab0086879 "qapi: Add feature flags to struct members" (v5.0.0), and commit b6c18755e41 "qapi: Add feature flags to enum members" (v6.2.0) neglected to update section "Features". Make up for that. Signed-off-b

[PULL 0/8] QAPI patches patches for 2023-02-23

2023-02-23 Thread Markus Armbruster
The following changes since commit 79b677d658d3d35e1e776826ac4abb28cdce69b8: Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging (2023-02-21 11:28:31 +) are available in the Git repository at: https://repo.or.cz/qemu/armbru.git tags/pull-qapi-2023-02-23 for yo

[PULL 8/8] qapi: remove JSON value FIXME

2023-02-23 Thread Markus Armbruster
From: John Snow With the two major JSON-ish type hierarchies clarified for distinct purposes; QAPIExpression for parsed expressions and JSONValue for introspection data, remove this FIXME as no longer an action item. A third JSON-y data type, _ExprValue, is not meant to represent JSON in the abs

[PULL 3/8] qapi: Update flake8 config

2023-02-23 Thread Markus Armbruster
From: John Snow New versions of flake8 don't like same-line comments. (It's a version newer than what fc37 ships, but it still makes my life easier to fix it now.) Signed-off-by: John Snow Reviewed-by: Markus Armbruster Message-Id: <2023021511.1725012-2-js...@redhat.com> --- scripts/qapi/

[PULL 4/8] qapi: update pylint configuration

2023-02-23 Thread Markus Armbruster
From: John Snow Newer versions of pylint disable the "no-self-use" message by default. Older versions don't, though. If we leave the suppressions in, pylint yelps about useless options. Just tell pylint to shush. Signed-off-by: John Snow Reviewed-by: Markus Armbruster Message-Id: <20230215

[PULL 2/8] docs/devel/qapi-code-gen: Fix a missing 'may', clarify SchemaInfo

2023-02-23 Thread Markus Armbruster
Documentation of enumeration value conditions lacks a 'may'. Fix that. Clarify SchemaInfo documentation for struct and union types. Signed-off-by: Markus Armbruster Message-Id: <20230213132009.918801-3-arm...@redhat.com> Reviewed-by: Eric Blake Reviewed-by: John Snow --- docs/devel/qapi-code

[PULL 5/8] qapi: Add minor typing workaround for 3.6

2023-02-23 Thread Markus Armbruster
From: John Snow Pylint under 3.6 does not believe that Collection is subscriptable at runtime. It is, making this a Pylint bug. https://github.com/PyCQA/pylint/issues/2377 They closed it as fixed, but that doesn't seem to be true as of Pylint 2.13.9, the latest version you can install under Pyth

[PULL 6/8] qapi/parser: add QAPIExpression type

2023-02-23 Thread Markus Armbruster
From: John Snow This patch creates a new type, QAPIExpression, which represents a parsed expression complete with QAPIDoc and QAPISourceInfo. This patch turns parser.exprs into a list of QAPIExpression instead, and adjusts expr.py to match. This allows the types we specify in parser.py to be "r

Re: [PATCH v2 0/4] NUMA: Apply socket-NUMA-node boundary for aarch64 and RiscV machines

2023-02-23 Thread Andrew Jones
On Thu, Feb 23, 2023 at 04:13:57PM +0800, Gavin Shan wrote: > For arm64 and RiscV architecture, the driver (/base/arch_topology.c) is > used to populate the CPU topology in the Linux guest. It's required that > the CPUs in one socket can't span mutiple NUMA nodes. Otherwise, the Linux > scheduling

Re: [PATCH 0/5] Pegasos2 fixes and audio output support

2023-02-23 Thread BALATON Zoltan
On Thu, 23 Feb 2023, Bernhard Beschow wrote: Am 22. Februar 2023 23:00:02 UTC schrieb BALATON Zoltan : On Wed, 22 Feb 2023, Bernhard Beschow wrote: Am 22. Februar 2023 21:12:01 UTC schrieb BALATON Zoltan : On Wed, 22 Feb 2023, Bernhard Beschow wrote: Am 22. Februar 2023 19:25:16 UTC schrieb B

[PATCH v3 4/4] target/ppc: Restrict 'qapi-commands-machine.h' to system emulation

2023-02-23 Thread Philippe Mathieu-Daudé
Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Move the QMP functions from cpu_init.c (which is always compiled) to monitor.c (which is only compiled when system-emulation

[PATCH v3 0/4] target: Restrict 'qapi-commands-machine.h' to system emulation

2023-02-23 Thread Philippe Mathieu-Daudé
All series reviewed, can patches be picked by corresponding maintainers, or should I include them in on of my PRs? The "qapi-commands-machine.h" header is not generated in user-only emulation. This series removes its use in user-emu code by moving the QMP code depending on this header into a separ

[PATCH v3 1/4] target/arm: Restrict 'qapi-commands-machine.h' to system emulation

2023-02-23 Thread Philippe Mathieu-Daudé
Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Move the QMP functions from helper.c (which is always compiled) to arm-qmp-cmds.c (which is only compiled when system-emulat

[PATCH v3 3/4] target/loongarch: Restrict 'qapi-commands-machine.h' to system emulation

2023-02-23 Thread Philippe Mathieu-Daudé
Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Extract the QMP functions from cpu.c (which is always compiled) to the new 'monitor.c' unit (which is only compiled when sys

[PATCH v3 2/4] target/i386: Restrict 'qapi-commands-machine.h' to system emulation

2023-02-23 Thread Philippe Mathieu-Daudé
Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Guard qmp_query_cpu_definitions() within CONFIG_USER_ONLY; move x86_cpu_class_check_missing_features() closer since it is on

[PATCH v13 05/60] i386/kvm: handle Xen HVM cpuid leaves

2023-02-23 Thread David Woodhouse
From: Joao Martins Introduce support for emulating CPUID for Xen HVM guests. It doesn't make sense to advertise the KVM leaves to a Xen guest, so do Xen unconditionally when the xen-version machine property is set. Signed-off-by: Joao Martins [dwmw2: Obtain xen_version from KVM property, make i

[PATCH v13 47/60] i386/xen: handle PV timer hypercalls

2023-02-23 Thread David Woodhouse
From: Joao Martins Introduce support for one shot and periodic mode of Xen PV timers, whereby timer interrupts come through a special virq event channel with deadlines being set through: 1) set_timer_op hypercall (only oneshot) 2) vcpu_op hypercall for {set,stop}_{singleshot,periodic}_timer hype

[PATCH v13 20/60] i386/xen: implement HYPERVISOR_vcpu_op

2023-02-23 Thread David Woodhouse
From: Joao Martins This is simply when guest tries to register a vcpu_info and since vcpu_info placement is optional in the minimum ABI therefore we can just fail with -ENOSYS Signed-off-by: Joao Martins Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- target/i386/kvm/xen-emu.c |

[PATCH v13 37/60] hw/xen: Implement EVTCHNOP_bind_vcpu

2023-02-23 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_evtchn.c | 40 +++ hw/i386/kvm/xen_evtchn.h | 2 ++ target/i386/kvm/xen-emu.c | 12 3 files changed, 54 insertions(+) diff --git a/hw/i386/kvm

[PATCH v13 25/60] i386/xen: implement HVMOP_set_evtchn_upcall_vector

2023-02-23 Thread David Woodhouse
From: Ankur Arora The HVMOP_set_evtchn_upcall_vector hypercall sets the per-vCPU upcall vector, to be delivered to the local APIC just like an MSI (with an EOI). This takes precedence over the system-wide delivery method set by the HVMOP_set_param hypercall with HVM_PARAM_CALLBACK_IRQ. It's used

[PATCH v13 09/60] i386/xen: handle guest hypercalls

2023-02-23 Thread David Woodhouse
From: Joao Martins This means handling the new exit reason for Xen but still crashing on purpose. As we implement each of the hypercalls we will then return the right return code. Signed-off-by: Joao Martins [dwmw2: Add CPL to hypercall tracing, disallow hypercalls from CPL > 0] Signed-off-by:

[PATCH v13 53/60] hw/xen: Automatically add xen-platform PCI device for emulated Xen guests

2023-02-23 Thread David Woodhouse
From: David Woodhouse It isn't strictly mandatory but Linux guests at least will only map their grant tables over the dummy BAR that it provides, and don't have sufficient wit to map them in any other unused part of their guest address space. So include it by default for minimal surprise factor.

[PATCH v13 42/60] kvm/i386: Add xen-gnttab-max-frames property

2023-02-23 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- accel/kvm/kvm-all.c | 1 + include/sysemu/kvm_int.h | 1 + include/sysemu/kvm_xen.h | 1 + target/i386/kvm/kvm.c | 34 ++ target/i386/kvm/xen-emu.c | 6 ++ 5 f

[PATCH v13 10/60] i386/xen: implement HYPERVISOR_xen_version

2023-02-23 Thread David Woodhouse
From: Joao Martins This is just meant to serve as an example on how we can implement hypercalls. xen_version specifically since Qemu does all kind of feature controllability. So handling that here seems appropriate. Signed-off-by: Joao Martins [dwmw2: Implement kvm_gva_rw() safely] Signed-off-b

[PATCH v13 31/60] hw/xen: Implement EVTCHNOP_unmask

2023-02-23 Thread David Woodhouse
From: David Woodhouse This finally comes with a mechanism for actually injecting events into the guest vCPU, with all the atomic-test-and-set that's involved in setting the bit in the shinfo, then the index in the vcpu_info, and injecting either the lapic vector as MSI, or letting KVM inject the

[PATCH v13 38/60] hw/xen: Implement EVTCHNOP_reset

2023-02-23 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_evtchn.c | 30 ++ hw/i386/kvm/xen_evtchn.h | 3 +++ target/i386/kvm/xen-emu.c | 17 + 3 files changed, 50 insertions(+) diff --git a/hw/i386/kvm/xe

[PATCH v13 13/60] hw/xen: Add xen_overlay device for emulating shared xenheap pages

2023-02-23 Thread David Woodhouse
From: David Woodhouse For the shared info page and for grant tables, Xen shares its own pages from the "Xen heap" to the guest. The guest requests that a given page from a certain address space (XENMAPSPACE_shared_info, etc.) be mapped to a given GPA using the XENMEM_add_to_physmap hypercall. To

[PATCH v13 24/60] i386/xen: implement HYPERVISOR_event_channel_op

2023-02-23 Thread David Woodhouse
From: Joao Martins Signed-off-by: Joao Martins [dwmw2: Ditch event_channel_op_compat which was never available to HVM guests] Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- target/i386/kvm/xen-emu.c | 25 + 1 file changed, 25 insertions(+) diff --git a/t

  1   2   3   4   5   6   >