[PATCH 4/4] target/arm: Cache ARMVAParameters

2023-02-01 Thread Richard Henderson
Cache the processed ARMVAParameters, as the building is quite expensive, particularly when PAUTH is enabled. Signed-off-by: Richard Henderson --- target/arm/cpu.h| 11 + target/arm/helper.c | 102 2 files changed, 96 insertions(+), 17

[PATCH 1/4] target/arm: Flush only required tlbs for TCR_EL[12]

2023-02-01 Thread Richard Henderson
The ASID only affects stage1 of the relevant regime. Signed-off-by: Richard Henderson --- target/arm/helper.c | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 72b37b7cf1..8ad9a667f1 100644 ---

[PATCH 2/4] target/arm: Store tbi for both insns and data in ARMVAParameters

2023-02-01 Thread Richard Henderson
This is slightly more work on the consumer side, but means we will be able to compute this once for multiple uses. Signed-off-by: Richard Henderson --- target/arm/internals.h| 5 +++-- target/arm/helper.c | 18 +- target/arm/pauth_helper.c | 29

[PATCH 3/4] target/arm: Use FIELD for ARMVAParameters

2023-02-01 Thread Richard Henderson
Use hw/registerfields.h instead of bitfields for ARMVAParameters. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 19 ++ target/arm/internals.h| 20 --- target/arm/helper.c | 36 +- target/arm/pauth_helper.c | 20

[PATCH 0/4] target/arm: Cache ARMVAParameters

2023-02-01 Thread Richard Henderson
Hi Anders, I'm not well versed on tuxrun, and how to make that work with a qemu binary outside of the container, so I'm not sure if I'm comparing apples to bananas. Can you look and see if this fixes the kselftest slowdown you reported? Anyway, for a boot and shutdown of your rootfs, I see:

[PATCH v5 4/8] igb: implement VFRE and VFTE registers

2023-02-01 Thread Sriram Yagnaraman
Also introduce: - Checks for RXDCTL/TXDCTL queue enable bits - IGB_NUM_VM_POOLS enum (Sec 1.5: Table 1-7) Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 39 +++ hw/net/igb_core.h | 1 + hw/net/igb_regs.h | 3 +++ 3 files changed, 35 insertions(+),

[PATCH v5 6/8] igb: respect E1000_VMOLR_RSSE

2023-02-01 Thread Sriram Yagnaraman
RSS for VFs is only enabled if VMOLR[n].RSSE is set. Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index eab140070b..9bedaa1e5f 100644 --- a/hw/net/igb_core.c +++

[PATCH v5 0/8] igb: merge changes from <20221229190817.25500-1-sriram.yagnara...@est.tech>

2023-02-01 Thread Sriram Yagnaraman
Based-on: <20230201042615.34706-1-akihiko.od...@daynix.com> ([PATCH v7 0/9] Introduce igb) Rebased on latest changes from Akihiko, and merged changes from my original patchset: https://lists.gnu.org/archive/html/qemu-devel/2022-12/msg04670.html Changes since v4: - Removed the change implementing

[PATCH v5 2/8] igb: handle PF/VF reset properly

2023-02-01 Thread Sriram Yagnaraman
Use PFRSTD to reset RSTI bit for VFs, and raise VFLRE interrupt when VF is reset. Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 33 + hw/net/igb_regs.h | 3 +++ hw/net/trace-events | 2 ++ 3 files changed, 26 insertions(+), 12 deletions(-) diff

[PATCH v5 3/8] igb: add ICR_RXDW

2023-02-01 Thread Sriram Yagnaraman
IGB uses RXDW ICR bit to indicate that rx descriptor has been written back. This is the same as RXT0 bit in older HW. Signed-off-by: Sriram Yagnaraman --- hw/net/e1000x_regs.h | 4 hw/net/igb_core.c| 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git

[PATCH v5 1/8] MAINTAINERS: Add Sriram Yagnaraman as a igb reviewer

2023-02-01 Thread Sriram Yagnaraman
I would like to review and be informed on changes to igb device Signed-off-by: Sriram Yagnaraman --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index ece23b2b15..7d0e84ce37 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2224,6 +2224,7 @@ F:

[PATCH v5 7/8] igb: implement VF Tx and Rx stats

2023-02-01 Thread Sriram Yagnaraman
Please note that loopback counters for VM to VM traffic is not implemented yet: VFGOTLBC, VFGPTLBC, VFGORLBC and VFGPRLBC. Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/hw/net/igb_core.c

[PATCH v5 8/8] igb: respect VMVIR and VMOLR for VLAN

2023-02-01 Thread Sriram Yagnaraman
Add support for stripping/inserting VLAN for VFs. Had to move CSUM calculation back into the for loop, since packet data is pulled inside the loop based on strip VLAN decision for every VF. net_rx_pkt_fix_l4_csum should be extended to accept a buffer instead for igb. Work for a future patch.

[PATCH v5 5/8] igb: check oversized packets for VMDq

2023-02-01 Thread Sriram Yagnaraman
Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 41 - 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 8437cd6829..eab140070b 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@

RE: [PATCH v3 8/9] igb: respect VT_CTL ignore MAC field

2023-02-01 Thread Sriram Yagnaraman
> -Original Message- > From: Akihiko Odaki > Sent: Wednesday, 1 February 2023 14:03 > To: Sriram Yagnaraman > Cc: qemu-devel@nongnu.org; Jason Wang ; Dmitry > Fleytman ; Michael S . Tsirkin > ; Marcel Apfelbaum > Subject: Re: [PATCH v3 8/9] igb: respect VT_CTL ignore MAC field > > On

Re: [PATCH v4 00/16] hw/9pfs: Add 9pfs support for Windows

2023-02-01 Thread Marc-André Lureau
Hi On Wed, Feb 1, 2023 at 5:05 PM Shi, Guohuai wrote: > > > > > From: Marc-André Lureau > > Sent: Tuesday, January 31, 2023 23:07 > > To: Daniel P. Berrangé > > Cc: Meng, Bin ; Greg Kurz ; > > Christian Schoenebeck ; qemu-devel@nongnu.org; Shi, > > Guohuai ; Laurent > Vivier ; > > Paolo

Re: [PATCH 1/9] Updated the FSF address in file hw/sh4/sh7750_regs.h

2023-02-01 Thread Markus Armbruster
I guess this is your attempt to implement my suggestion to squash your series into one patch. It came out as a concatenation of patches in a single e-mail. That's not what we mean by "squashing patches" :) The common tool for squashing patches is git-rebase. Say your series is on branch

[PULL 03/11] net: Replace "Supported NIC models" with "Available NIC models"

2023-02-01 Thread Jason Wang
From: Thomas Huth Just because a NIC model is compiled into the QEMU binary does not necessary mean that it can be used with each and every machine. So let's rather talk about "available" models instead of "supported" models, just to avoid confusion. Reviewed-by: Claudio Fontana Signed-off-by:

[PULL 07/11] vmnet: stop recieving events when VM is stopped

2023-02-01 Thread Jason Wang
From: Joelle van Dyne When the VM is stopped using the HMP command "stop", soon the handler will stop reading from the vmnet interface. This causes a flood of `VMNET_INTERFACE_PACKETS_AVAILABLE` events to arrive and puts the host CPU at 100%. We fix this by removing the event handler from vmnet

[PULL 01/11] net: Move the code to collect available NIC models to a separate function

2023-02-01 Thread Jason Wang
From: Thomas Huth The code that collects the available NIC models is not really specific to PCI anymore and will be required in the next patch, too, so let's move this into a new separate function in net.c instead. Signed-off-by: Thomas Huth Signed-off-by: Jason Wang --- hw/pci/pci.c |

[PULL 08/11] hw/net/can/xlnx-zynqmp-can: fix assertion failures in transfer_fifo()

2023-02-01 Thread Jason Wang
From: Qiang Liu Check fifos before poping data from and pushing data into it. Fixes: 98e5d7a2b726 ("hw/net/can: Introduce Xilinx ZynqMP CAN controller") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1425 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1427 Reported-by: Qiang

[PULL 05/11] hw/net/vmxnet3: allow VMXNET3_MAX_MTU itself as a value

2023-02-01 Thread Jason Wang
From: Fiona Ebner Currently, VMXNET3_MAX_MTU itself (being 9000) is not considered a valid value for the MTU, but a guest running ESXi 7.0 might try to set it and fail the assert [0]. In the Linux kernel, dev->max_mtu itself is a valid value for the MTU and for the vmxnet3 driver it's 9000, so

[PULL 06/11] net: Increase L2TPv3 buffer to fit jumboframes

2023-02-01 Thread Jason Wang
From: Christian Svensson Increase the allocated buffer size to fit larger packets. Given that jumboframes can commonly be up to 9000 bytes the closest suitable value seems to be 16 KiB. Tested by running qemu towards a Linux L2TPv3 endpoint and pushing jumboframe traffic through the interfaces.

[PULL 10/11] net: stream: add a new option to automatically reconnect

2023-02-01 Thread Jason Wang
From: Laurent Vivier In stream mode, if the server shuts down there is currently no way to reconnect the client to a new server without removing the NIC device and the netdev backend (or to reboot). This patch introduces a reconnect option that specifies a delay to try to reconnect with the

[PULL 11/11] vdpa: fix VHOST_BACKEND_F_IOTLB_ASID flag check

2023-02-01 Thread Jason Wang
From: Eugenio Pérez VHOST_BACKEND_F_IOTLB_ASID is the feature bit, not the bitmask. Since the device under test also provided VHOST_BACKEND_F_IOTLB_MSG_V2 and VHOST_BACKEND_F_IOTLB_BATCH, this went unnoticed. Fixes: c1a1008685 ("vdpa: always start CVQ in SVQ mode if possible") Signed-off-by:

[PULL 09/11] tests/qtest: netdev: test stream and dgram backends

2023-02-01 Thread Jason Wang
From: Laurent Vivier Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin Acked-by: Thomas Huth Signed-off-by: Jason Wang --- tests/qtest/meson.build | 2 + tests/qtest/netdev-socket.c | 448 2 files changed, 450 insertions(+) create

[PULL 04/11] hw/net/lan9118: log [read|write]b when mode_16bit is enabled rather than abort

2023-02-01 Thread Jason Wang
From: Qiang Liu This patch replaces hw_error to guest error log for [read|write]b accesses when mode_16bit is enabled. This avoids aborting qemu. Fixes: 1248f8d4cbc3 ("hw/lan9118: Add basic 16-bit mode support.") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1433 Reported-by: Qiang

[PULL 02/11] net: Restore printing of the help text with "-nic help"

2023-02-01 Thread Jason Wang
From: Thomas Huth Running QEMU with "-nic help" used to work in QEMU 5.2 and earlier versions (it showed the available netdev backends), but this feature got broken during some refactoring in version 6.0. Let's restore the old behavior, and while we're at it, let's also print the available NIC

[PULL 00/11] Net patches

2023-02-01 Thread Jason Wang
The following changes since commit 13356edb87506c148b163b8c7eb0695647d00c2a: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-01-24 09:45:33 +) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for

Re: [PATCH 1/1] target/loongarch: LL.{W/D} need writes val to dest register after sign extension

2023-02-01 Thread Richard Henderson
On 2/1/23 17:16, Song Gao wrote: The Manual 2.2.7.2: 'The LL.{W/D} instruction retrieves a word/double-word data from the specified address of the memory and writes it to the general register rd after sign extension.' Signed-off-by: Song Gao ---

[PATCH v2 17/23] vfio-user: dma map/unmap operations

2023-02-01 Thread John Johnson
Add ability to do async operations during memory transactions Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson --- hw/vfio/user-protocol.h | 32 ++ include/hw/vfio/vfio-common.h | 4 +- hw/vfio/common.c | 64 +---

[PATCH v2 14/23] vfio-user: get and set IRQs

2023-02-01 Thread John Johnson
Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/user-protocol.h | 25 + hw/vfio/pci.c | 3 +- hw/vfio/user.c | 140 hw/vfio/trace-events| 2 + 4 files

[PATCH v2 20/23] vfio-user: dma read/write operations

2023-02-01 Thread John Johnson
Messages from server to client that peform device DMA. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/user-protocol.h | 11 + hw/vfio/user.h | 3 ++ hw/vfio/user-pci.c | 110

[PATCH v2 15/23] vfio-user: forward msix BAR accesses to server

2023-02-01 Thread John Johnson
Server holds device current device pending state Use irq masking commands in socket case Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/pci.h | 1 + include/hw/vfio/vfio-common.h | 3 ++ hw/vfio/ccw.c

[PATCH v2 08/23] vfio-user: define socket receive functions

2023-02-01 Thread John Johnson
Add infrastructure needed to receive incoming messages Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/user-protocol.h | 54 +++ hw/vfio/user.h | 8 + hw/vfio/user-pci.c | 11 ++ hw/vfio/user.c | 408

[PATCH v2 05/23] vfio-user: add device IO ops vector

2023-02-01 Thread John Johnson
Used for communication with VFIO driver (prep work for vfio-user, which will communicate over a socket) Signed-off-by: John G Johnson --- include/hw/vfio/vfio-common.h | 14 + hw/vfio/ap.c | 1 + hw/vfio/ccw.c | 1 + hw/vfio/common.c | 85

[PATCH v2 06/23] vfio-user: Define type vfio_user_pci_dev_info

2023-02-01 Thread John Johnson
New class for vfio-user with its class and instance constructors and destructors, and its pci ops. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/pci.h | 7 +++ hw/vfio/pci.c | 12 +++--- hw/vfio/user-pci.c | 121

[PATCH v2 12/23] vfio-user: region read/write

2023-02-01 Thread John Johnson
Add support for posted writes on remote devices Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/user-protocol.h | 12 + hw/vfio/user.h| 1 + include/hw/vfio/vfio-common.h | 3 +- hw/vfio/common.c

[PATCH v2 11/23] vfio-user: get region info

2023-02-01 Thread John Johnson
Add per-region FD to support mmap() of remote device regions Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/user-protocol.h | 14 + hw/vfio/user.h| 2 ++ include/hw/vfio/vfio-common.h | 5 +++-

[PATCH v2 03/23] vfio-user: add container IO ops vector

2023-02-01 Thread John Johnson
Used for communication with VFIO driver (prep work for vfio-user, which will communicate over a socket) Signed-off-by: John G Johnson --- include/hw/vfio/vfio-common.h | 24 hw/vfio/common.c | 128 -- 2 files changed, 110

[PATCH v2 19/23] vfio-user: no-mmap DMA support

2023-02-01 Thread John Johnson
Force remote process to use DMA r/w messages instead of directly mapping guest memory. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/user.h | 1 + hw/vfio/user-pci.c | 5 + hw/vfio/user.c | 2 +- 3 files changed, 7

[PATCH v2 22/23] vfio-user: add 'x-msg-timeout' option that specifies msg wait times

2023-02-01 Thread John Johnson
Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/user.h | 1 + hw/vfio/user-pci.c | 4 hw/vfio/user.c | 7 --- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/vfio/user.h b/hw/vfio/user.h index

[PATCH v2 10/23] vfio-user: get device info

2023-02-01 Thread John Johnson
Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/user-protocol.h | 12 ++ hw/vfio/user.h| 1 + include/hw/vfio/vfio-common.h | 3 +++ hw/vfio/common.c | 23 +++---

[PATCH v2 00/23] vfio-user client

2023-02-01 Thread John Johnson
Hello, This is the 2nd patch revision of the vfio-user client implementation. First of all, thank you for your time reviewing the previous versions. The vfio-user framework consists of 3 parts: 1) The VFIO user protocol specification. 2) A client - the VFIO device in QEMU that encapsulates

[PATCH v2 13/23] vfio-user: pci_user_realize PCI setup

2023-02-01 Thread John Johnson
PCI BARs read from remote device PCI config reads/writes sent to remote server Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/pci.h | 9 ++ hw/vfio/pci.c | 257 ++---

[PATCH v2 18/23] vfio-user: add dma_unmap_all

2023-02-01 Thread John Johnson
Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- include/hw/vfio/vfio-common.h | 1 + hw/vfio/common.c | 45 ++- hw/vfio/user.c| 24 +++ 3 files changed,

[PATCH v2 23/23] vfio-user: add coalesced posted writes

2023-02-01 Thread John Johnson
Add new message to send multiple writes to server. Prevents the outgoing queue from overflowing when a long latency operation is followed by a series of posted writes. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/user-protocol.h |

[PATCH v2 16/23] vfio-user: proxy container connect/disconnect

2023-02-01 Thread John Johnson
Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/user.h| 6 +- include/hw/vfio/vfio-common.h | 10 +++ hw/vfio/common.c | 100 --- hw/vfio/user-pci.c| 12 +++-

[PATCH v2 09/23] vfio-user: define socket send functions

2023-02-01 Thread John Johnson
Also negotiate protocol version with remote server Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson --- hw/vfio/user-protocol.h | 62 ++ hw/vfio/user.h | 9 + hw/vfio/user-pci.c | 16 ++ hw/vfio/user.c | 512

[PATCH v2 21/23] vfio-user: pci reset

2023-02-01 Thread John Johnson
Message to tell the server to reset the device. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/pci.h | 2 ++ hw/vfio/user.h | 1 + hw/vfio/pci.c | 4 ++-- hw/vfio/user-pci.c | 15 +++ hw/vfio/user.c |

[PATCH v2 04/23] vfio-user: add region cache

2023-02-01 Thread John Johnson
cache VFIO_DEVICE_GET_REGION_INFO results to reduce memory alloc/free cycles and as prep work for vfio-user Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- include/hw/vfio/vfio-common.h | 2 ++ hw/vfio/ccw.c | 5 -

[PATCH v2 07/23] vfio-user: connect vfio proxy to remote server

2023-02-01 Thread John Johnson
add user.c & user.h files for vfio-user code add proxy struct to handle comms with remote server Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/user.h| 78 +++ include/hw/vfio/vfio-common.h | 2 +

[PATCH v2 01/23] vfio-user: introduce vfio-user protocol specification

2023-02-01 Thread John Johnson
From: Thanos Makatos This patch introduces the vfio-user protocol specification (formerly known as VFIO-over-socket), which is designed to allow devices to be emulated outside QEMU, in a separate process. vfio-user reuses the existing VFIO defines, structs and concepts. It has been earlier

[PATCH v2 02/23] vfio-user: add VFIO base abstract class

2023-02-01 Thread John Johnson
Add an abstract base class both the kernel driver and user socket implementations can use to share code. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/pci.h | 16 +++-- hw/vfio/pci.c | 106

Re: [PATCH v1 04/24] vfio-user: add region cache

2023-02-01 Thread John Johnson
> On Dec 12, 2022, at 3:42 AM, Philippe Mathieu-Daudé wrote: > > On 9/11/22 00:13, John Johnson wrote: >> cache VFIO_DEVICE_GET_REGION_INFO results to reduce >> memory alloc/free cycles and as prep work for vfio-user >> Signed-off-by: John G Johnson >> Signed-off-by: Elena Ufimtseva >>

Re: [PATCH v1 00/24] vfio-user client

2023-02-01 Thread John Johnson
> On Dec 16, 2022, at 3:31 AM, Cédric Le Goater wrote: > > On 11/9/22 00:13, John Johnson wrote: >> Hello, >> This is the 6th revision of the vfio-user client implementation. >> It is the first patch series (the previous revisions were RFCs) >> First of all, thank you for your time reviewing

Re: [PATCH v1 14/24] vfio-user: get and set IRQs

2023-02-01 Thread John Johnson
> On Dec 13, 2022, at 8:39 AM, Cédric Le Goater wrote: > > On 11/9/22 00:13, John Johnson wrote: >> >> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c >> index 7abe44e..be39a4e 100644 >> --- a/hw/vfio/pci.c >> +++ b/hw/vfio/pci.c >> @@ -713,7 +713,8 @@ retry: >> ret =

Re: [PATCH v1 09/24] vfio-user: define socket send functions

2023-02-01 Thread John Johnson
> On Dec 13, 2022, at 5:48 AM, Cédric Le Goater wrote: > > On 11/9/22 00:13, John Johnson wrote: >> >> + >> +static struct cap_entry ver_0_0[] = { >> +{ VFIO_USER_CAP, check_cap }, >> +{ NULL } >> +}; >> + >> +static int caps_check(VFIOProxy *proxy, int minor, const char *caps, > >

[PATCH 01/10] hw/riscv/virt: Add OEM_ID and OEM_TABLE_ID fields

2023-02-01 Thread Sunil V L
ACPI needs OEM_ID and OEM_TABLE_ID for the machine. Add these fields in the RISCVVirtState structure and initialize with default values. Signed-off-by: Sunil V L --- hw/riscv/virt.c | 4 include/hw/riscv/virt.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/hw/riscv/virt.c

[PATCH 00/10] Add basic ACPI support for risc-v virt

2023-02-01 Thread Sunil V L
This series adds the basic ACPI support for the RISC-V virt machine. Currently only INTC interrupt controller specification is approved by the UEFI forum. External interrupt controller support in ACPI is in progress. The basic infrstructure changes are mostly leveraged from ARM. This adds

[PATCH 04/10] hw/riscv/virt: virt-acpi-build.c: Add basic ACPI tables

2023-02-01 Thread Sunil V L
Add few basic ACPI tables and DSDT with few devices in a new file virt-acpi-build.c. These are mostly leveraged from arm64. Signed-off-by: Sunil V L --- hw/riscv/virt-acpi-build.c | 292 + include/hw/riscv/virt.h| 1 + 2 files changed, 293

[PATCH 05/10] hw/riscv/virt: virt-acpi-build.c: Add RINTC in MADT

2023-02-01 Thread Sunil V L
Add Multiple APIC Description Table (MADT) with the INTC structure for each cpu. Signed-off-by: Sunil V L --- hw/riscv/virt-acpi-build.c | 37 + 1 file changed, 37 insertions(+) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c index

[PATCH 03/10] hw/riscv/virt: Add memmap pointer to RiscVVirtState

2023-02-01 Thread Sunil V L
memmap needs to be exported outside of virt.c so that modules like acpi can use it. Hence, add a pointer field in RiscVVirtState structure and initialize it with the memorymap. Signed-off-by: Sunil V L --- hw/riscv/virt.c | 2 ++ include/hw/riscv/virt.h | 1 + 2 files changed, 3

[PATCH 08/10] hw/riscv/Kconfig: virt: Enable ACPI config options

2023-02-01 Thread Sunil V L
Enable ACPI related config options to build ACPI subsystem for virt machine. Signed-off-by: Sunil V L --- hw/riscv/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/riscv/Kconfig b/hw/riscv/Kconfig index 4550b3b938..92b1a9eb64 100644 --- a/hw/riscv/Kconfig +++ b/hw/riscv/Kconfig

[PATCH 07/10] hw/riscv: meson.build: Build virt-acpi-build.c

2023-02-01 Thread Sunil V L
ACPI functions are defined in new file virt-acpi-build.c. Enable it to be built as part of virt machine if CONFIG_ACPI is set. Signed-off-by: Sunil V L --- hw/riscv/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/riscv/meson.build b/hw/riscv/meson.build index

[PATCH 09/10] hw/riscv/virt.c: Initialize the ACPI tables

2023-02-01 Thread Sunil V L
When the "acpi=on", ACPI tables need to be added. Detect the option and initialize the ACPI tables. Signed-off-by: Sunil V L --- hw/riscv/virt.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 26caea59ff..f1f5612c69 100644 --- a/hw/riscv/virt.c

[PATCH 06/10] hw/riscv/virt: virt-acpi-build.c: Add RHCT Table

2023-02-01 Thread Sunil V L
RISC-V ACPI platforms need to provide RISC-V Hart Capabilities Table (RHCT). Add this to the ACPI tables. Signed-off-by: Sunil V L --- hw/riscv/virt-acpi-build.c | 62 ++ 1 file changed, 62 insertions(+) diff --git a/hw/riscv/virt-acpi-build.c

[PATCH 02/10] hw/riscv/virt: Add a switch to enable/disable ACPI

2023-02-01 Thread Sunil V L
ACPI is optional. So, add a switch to toggle. Signed-off-by: Sunil V L --- hw/riscv/virt.c | 38 ++ include/hw/riscv/virt.h | 2 ++ 2 files changed, 40 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 7ad9fda20c..84962962ff 100644

[PATCH 10/10] MAINTAINERS: Add entry for RISC-V ACPI

2023-02-01 Thread Sunil V L
RISC-V ACPI related functionality for virt machine is added in virt-acpi-build.c. Add the maintainer entry. Signed-off-by: Sunil V L --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index c581c11a64..23fcaaf54a 100644 --- a/MAINTAINERS +++

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-02-01 Thread Jason Wang
在 2023/2/1 19:48, Eugenio Perez Martin 写道: On Wed, Feb 1, 2023 at 12:20 PM Michael S. Tsirkin wrote: On Wed, Feb 01, 2023 at 12:14:18PM +0100, Maxime Coquelin wrote: Thanks Eugenio for working on this. On 1/31/23 20:10, Eugenio Perez Martin wrote: Hi, The current approach of offering an

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-02-01 Thread Jason Wang
在 2023/2/1 15:49, Eugenio Perez Martin 写道: On Wed, Feb 1, 2023 at 4:29 AM Jason Wang wrote: On Wed, Feb 1, 2023 at 3:11 AM Eugenio Perez Martin wrote: On Tue, Jan 31, 2023 at 8:10 PM Eugenio Perez Martin wrote: Hi, The current approach of offering an emulated CVQ to the guest and map

[PATCH 1/1] target/loongarch: LL.{W/D} need writes val to dest register after sign extension

2023-02-01 Thread Song Gao
The Manual 2.2.7.2: 'The LL.{W/D} instruction retrieves a word/double-word data from the specified address of the memory and writes it to the general register rd after sign extension.' Signed-off-by: Song Gao --- target/loongarch/insn_trans/trans_atomic.c.inc | 2 +- 1 file changed,

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-02-01 Thread Jason Wang
On Wed, Feb 1, 2023 at 2:56 PM Eugenio Perez Martin wrote: > > On Wed, Feb 1, 2023 at 4:27 AM Jason Wang wrote: > > > > On Wed, Feb 1, 2023 at 3:10 AM Eugenio Perez Martin > > wrote: > > > > > > Hi, > > > > > > The current approach of offering an emulated CVQ to the guest and map > > > the

Re: [SeaBIOS] [SeaBIOS PATCH] xen: require Xen info structure at 0x1000 to detect Xen

2023-02-01 Thread Kevin O'Connor
On Fri, Jan 20, 2023 at 11:33:19AM +, David Woodhouse wrote: > From: David Woodhouse > > When running under Xen, hvmloader places a table at 0x1000 with the e820 > information and BIOS tables. If this isn't present, SeaBIOS will > currently panic. > > We now have support for running Xen

Re: [PATCH v5 0/3] riscv_load_fdt() semantics change

2023-02-01 Thread Alistair Francis
On Thu, Feb 2, 2023 at 3:12 AM Daniel Henrique Barboza wrote: > > Hi, > > This version contains changed proposed by Bin in the v4 review. > > Patches are based on riscv-to-apply.next. > > Changes from v4: > - patch 1: > - remove the fdt_pack() related lines instead of letting patch 2 do it > -

Re: [RFC v2 11/13] vdpa: add vdpa net migration state notifier

2023-02-01 Thread Si-Wei Liu
On 1/12/2023 9:24 AM, Eugenio Pérez wrote: This allows net to restart the device backend to configure SVQ on it. Ideally, these changes should not be net specific. However, the vdpa net backend is the one with enough knowledge to configure everything because of some reasons: * Queues might

Re: [PATCH 02/14] linux-user/sparc: Tidy syscall trap

2023-02-01 Thread Richard Henderson
On 2/1/23 14:51, Richard Henderson wrote: Use TT_TRAP. For sparc32, 0x88 is the "Slowaris" system call, currently BAD_TRAP in the kernel's ttable_32.S. For sparc64, 0x110 is tl0_linux32, the sparc32 trap, as also seen in the adjacent code. We do not implement multiple abis, so treat this as

Re: [PATCH v5 3/3] hw/riscv: change riscv_compute_fdt_addr() semantics

2023-02-01 Thread Alistair Francis
On Thu, Feb 2, 2023 at 3:13 AM Daniel Henrique Barboza wrote: > > As it is now, riscv_compute_fdt_addr() is receiving a dram_base, a > mem_size (which is defaulted to MachineState::ram_size in all boards) > and the FDT pointer. And it makes a very important assumption: the DRAM > interval

Re: [RFC v2 00/13] Dinamycally switch to vhost shadow virtqueues at vdpa net migration

2023-02-01 Thread Si-Wei Liu
On 1/12/2023 9:24 AM, Eugenio Pérez wrote: It's possible to migrate vdpa net devices if they are shadowed from the start. But to always shadow the dataplane is effectively break its host passthrough, so its not convenient in vDPA scenarios. This series enables dynamically switching to

Re: [RFC v2 12/13] vdpa: preemptive kick at enable

2023-02-01 Thread Si-Wei Liu
On 1/13/2023 1:06 AM, Eugenio Perez Martin wrote: On Fri, Jan 13, 2023 at 4:39 AM Jason Wang wrote: On Fri, Jan 13, 2023 at 11:25 AM Zhu, Lingshan wrote: On 1/13/2023 10:31 AM, Jason Wang wrote: On Fri, Jan 13, 2023 at 1:27 AM Eugenio Pérez wrote: Spuriously kick the destination

Re: [PATCH] vhost-user-fs: add capability to allow migration

2023-02-01 Thread Anton Kuchin
On 01/02/2023 16:26, Juan Quintela wrote: Anton Kuchin wrote: On 19/01/2023 18:02, Stefan Hajnoczi wrote: On Thu, 19 Jan 2023 at 10:29, Anton Kuchin wrote: On 19/01/2023 16:30, Stefan Hajnoczi wrote: On Thu, 19 Jan 2023 at 07:43, Anton Kuchin wrote: On 18/01/2023 17:52, Stefan Hajnoczi

[PATCH 01/14] linux-user/sparc: Raise SIGILL for all unhandled software traps

2023-02-01 Thread Richard Henderson
The linux kernel's trap tables vector all unassigned trap numbers to BAD_TRAP, which then raises SIGILL. Reported-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 8 1 file changed, 8 insertions(+) diff --git a/linux-user/sparc/cpu_loop.c

[PATCH 13/14] linux-user/sparc: Handle floating-point exceptions

2023-02-01 Thread Richard Henderson
Raise SIGFPE for ieee exceptions. The other types, such as FSR_FTT_UNIMPFPOP, should not appear, because we enable normal emulation of missing insns at the start of sparc_cpu_realizefn(). Signed-off-by: Richard Henderson --- target/sparc/cpu.h | 3 +-- linux-user/sparc/cpu_loop.c |

[PATCH 03/14] linux-user/sparc: Use TT_TRAP for flush windows

2023-02-01 Thread Richard Henderson
The v9 and pre-v9 code can be unified with this macro. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c index 18d5c24af1..a94bffc583 100644 ---

[PATCH 14/14] linux-user/sparc: Handle tag overflow traps

2023-02-01 Thread Richard Henderson
This trap is raised by taddcctv and tsubcctv insns. Signed-off-by: Richard Henderson --- linux-user/sparc/target_signal.h | 2 +- linux-user/syscall_defs.h| 5 + linux-user/sparc/cpu_loop.c | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git

[PATCH 04/14] linux-user/sparc: Tidy window spill/fill traps

2023-02-01 Thread Richard Henderson
Add some macros to localize the hw difference between v9 and pre-v9. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c index

[PATCH 10/14] linux-user/sparc: Handle privilidged action trap

2023-02-01 Thread Richard Henderson
This is raised by using an %asi < 0x80 in user-mode. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c index 3af791455f..42e92ef859 100644 ---

[PATCH 08/14] linux-user/sparc: Handle getcc, setcc, getpsr traps

2023-02-01 Thread Richard Henderson
These are really only meaningful for sparc32, but they're still present for backward compatibility for sparc64. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 62 +++-- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git

[PATCH 11/14] linux-user/sparc: Handle coprocessor disabled trap

2023-02-01 Thread Richard Henderson
Since qemu does not implement a sparc coprocessor, all such instructions raise this trap. Because of that, we never raise the coprocessor exception trap, which would be vector 0x28. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 4 1 file changed, 4 insertions(+) diff

[PATCH 05/14] linux-user/sparc: Fix sparc64_{get,set}_context traps

2023-02-01 Thread Richard Henderson
These traps are present for sparc64 with ilp32, aka sparc32plus. Enabling them means adjusting the defines over in signal.c, and fixing an incorrect usage of abi_ulong when we really meant the full register, target_ulong. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 23

[PATCH 06/14] linux-user/sparc: Handle software breakpoint trap

2023-02-01 Thread Richard Henderson
This is 'ta 1' for both v9 and pre-v9. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c index 493845fe76..573d97c60b 100644 ---

[PATCH 07/14] linux-user/sparc: Handle division by zero traps

2023-02-01 Thread Richard Henderson
In addition to the hw trap vector, there is a software trap assigned for older sparc without hw division instructions. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 5 + 1 file changed, 5 insertions(+) diff --git a/linux-user/sparc/cpu_loop.c

[PATCH 12/14] linux-user/sparc: Handle unimplemented flush trap

2023-02-01 Thread Richard Henderson
For sparc64, TT_UNIMP_FLUSH == TT_ILL_INSN, so this is already handled. For sparc32, the kernel uses SKIP_TRAP. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c

[PATCH 00/14] linux-user/sparc: Handle missing traps

2023-02-01 Thread Richard Henderson
Lots of missing trap code for cpu_loop(). r~ Richard Henderson (14): linux-user/sparc: Raise SIGILL for all unhandled software traps linux-user/sparc: Tidy syscall trap linux-user/sparc: Use TT_TRAP for flush windows linux-user/sparc: Tidy window spill/fill traps linux-user/sparc: Fix

[PATCH 09/14] linux-user/sparc: Handle priviledged opcode trap

2023-02-01 Thread Richard Henderson
For the most part priviledged opcodes are ifdefed out of the user-only sparc translator, which will then incorrectly produce illegal opcode traps. But there are some code paths that properly raise TT_PRIV_INSN, so we must handle it. Signed-off-by: Richard Henderson ---

[PATCH 02/14] linux-user/sparc: Tidy syscall trap

2023-02-01 Thread Richard Henderson
Use TT_TRAP. For sparc32, 0x88 is the "Slowaris" system call, currently BAD_TRAP in the kernel's ttable_32.S. For sparc64, 0x110 is tl0_linux32, the sparc32 trap, as also seen in the adjacent code. We do not implement multiple abis, so treat this as !defined(CONFIG_COMPAT), which vectors this

Re: [PATCH v9 3/5] riscv: Allow user to set the satp mode

2023-02-01 Thread Alistair Francis
On Wed, Feb 1, 2023 at 1:13 AM Alexandre Ghiti wrote: > > RISC-V specifies multiple sizes for addressable memory and Linux probes for > the machine's support at startup via the satp CSR register (done in > csr.c:validate_vm). > > As per the specification, sv64 must support sv57, which in turn

Re: [PATCH v7 3/7] mac_{old,new}world: Pass MacOS VGA NDRV in card ROM instead of fw_cfg

2023-02-01 Thread BALATON Zoltan
On Wed, 1 Feb 2023, Mark Cave-Ayland wrote: On 24/01/2023 00:13, BALATON Zoltan wrote: On Mon, 23 Jan 2023, Mark Cave-Ayland wrote: On 22/01/2023 22:16, BALATON Zoltan wrote: The problem you are ultimately trying to solve though is that OpenBIOS is loading the NDRV for all VGA PCI devices, so

Re: [PATCH v2] target/riscv: set tval for triggered watchpoints

2023-02-01 Thread Alistair Francis
On Wed, Feb 1, 2023 at 3:35 AM Sergey Matyukevich wrote: > > From: Sergey Matyukevich > > According to priviledged spec, if [sm]tval is written with a nonzero > value when a breakpoint exception occurs, then [sm]tval will contain > the faulting virtual address. Set tval to hit address when

Re: [PATCH v2] target/riscv: set tval for triggered watchpoints

2023-02-01 Thread Alistair Francis
On Wed, Feb 1, 2023 at 3:35 AM Sergey Matyukevich wrote: > > From: Sergey Matyukevich > > According to priviledged spec, if [sm]tval is written with a nonzero > value when a breakpoint exception occurs, then [sm]tval will contain > the faulting virtual address. Set tval to hit address when

  1   2   3   4   >