Re: [RFC PATCH v2 2/4] target/riscv: Reuse TB_FLAGS.MSTATUS_HFS_FS

2023-04-14 Thread Weiwei Li
On 2023/4/15 00:02, Mayuresh Chitale wrote: When misa.F is clear, TB_FLAGS.MSTATUS_HS_FS field is unused and can be used to save the current state of smstateen0.FCSR check which is needed by the floating point translation routines. Signed-off-by: Mayuresh Chitale ---

Re: [RFC PATCH v2 3/4] target/riscv: check smstateen fcsr flag

2023-04-14 Thread Weiwei Li
On 2023/4/15 00:02, Mayuresh Chitale wrote: If misa.F and smstateen_fcsr_ok flag are clear then all the floating point instructions must generate an appropriate exception. Signed-off-by: Mayuresh Chitale --- target/riscv/insn_trans/trans_rvd.c.inc | 13

Re: [RFC PATCH v2 2/4] target/riscv: Reuse TB_FLAGS.MSTATUS_HFS_FS

2023-04-14 Thread Weiwei Li
On 2023/4/15 00:02, Mayuresh Chitale wrote: When misa.F is clear, TB_FLAGS.MSTATUS_HS_FS field is unused and can be used to save the current state of smstateen0.FCSR check which is needed by the floating point translation routines. Signed-off-by: Mayuresh Chitale ---

Re: [RFC PATCH v2 1/4] target/riscv: smstateen check for fcsr

2023-04-14 Thread Weiwei Li
On 2023/4/15 00:01, Mayuresh Chitale wrote: If smstateen is implemented and smtateen0.fcsr is clear and misa.F is off then the floating point operations must return illegal instruction exception or virtual instruction trap, if relevant. Signed-off-by: Mayuresh Chitale ---

Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory

2023-04-14 Thread Sean Christopherson
On Fri, Apr 14, 2023, Sean Christopherson wrote: > On Fri, Apr 14, 2023, Ackerley Tng wrote: > > Sean Christopherson writes: > > > if (WARN_ON_ONCE(file->private_data)) { > > > err = -EEXIST; > > > goto err_fd; > > > } > > > > Did you intend this as a check that the

Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory

2023-04-14 Thread Sean Christopherson
On Fri, Apr 14, 2023, Ackerley Tng wrote: > Sean Christopherson writes: > > > On Thu, Apr 13, 2023, Christian Brauner wrote: > > > * by a mount option to tmpfs that makes it act > > >in this restricted manner then you don't need an ioctl() and can get > > >away with regular open calls.

Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory

2023-04-14 Thread Ackerley Tng
Sean Christopherson writes: On Thu, Apr 13, 2023, Christian Brauner wrote: On Thu, Aug 18, 2022 at 04:24:21PM +0300, Kirill A . Shutemov wrote: > On Wed, Aug 17, 2022 at 10:40:12PM -0700, Hugh Dickins wrote: > > Here's what I would prefer, and imagine much easier for you to maintain; > >

[PATCH v13 0/3] Add support for TPM devices over I2C bus

2023-04-14 Thread Ninad Palsule
Hello, Incorporated review comments from Corey Minyard. Please review. This drop adds support for the TPM devices attached to the I2C bus. It only supports the TPM2 protocol. You need to run it with the external TPM emulator like swtpm. I have tested it with swtpm. I have refered to the work

[PATCH v13 1/3] docs: Add support for TPM devices over I2C bus

2023-04-14 Thread Ninad Palsule
From: Ninad Palsule This is a documentation change for I2C TPM device support. Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. Signed-off-by: Ninad Palsule Reviewed-by: Stefan Berger Reviewed-by: Cédric Le Goater

[PATCH v13 2/3] tpm: Extend common APIs to support TPM TIS I2C

2023-04-14 Thread Ninad Palsule
From: Ninad Palsule Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. This commit includes changes for the common code. - Added support for the new checksum registers which are required for the I2C support. The checksum

[PATCH v13 3/3] tpm: Add support for TPM device over I2C bus

2023-04-14 Thread Ninad Palsule
From: Ninad Palsule Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. I2C model only supports TPM2 protocol. This commit includes changes for the common code. - Added I2C emulation model. Logic was added in the model to

Re: [PATCH v10 9/9] KVM: Enable and expose KVM_MEM_PRIVATE

2023-04-14 Thread Sean Christopherson
On Tue, Mar 28, 2023, Chao Peng wrote: > On Fri, Mar 24, 2023 at 10:29:25AM +0800, Xiaoyao Li wrote: > > On 3/24/2023 10:10 AM, Chao Peng wrote: > > > On Wed, Mar 22, 2023 at 05:41:31PM -0700, Isaku Yamahata wrote: > > > > On Wed, Mar 08, 2023 at 03:40:26PM +0800, > > > > Chao Peng wrote: > > > >

[PATCH 1/2] travis.yml: Add missing clang-10 package to the 'Clang (disable-tcg)' job

2023-04-14 Thread Vaibhav Jain
Since commit 74a1b256d775("configure: Bump minimum Clang version to 10.0") qemu needs Clang version 10.0 as the minimum version to build qemu with Clang. However 'focal' ships by default with Clang version 7.0.0 which causes an error while executing the 'Clang (disable-tcg)' travis job of the form

[PATCH 2/2] travis.yml: Add missing 'flex' package to 'GCC (user)' job

2023-04-14 Thread Vaibhav Jain
Since commit fd8171fe52b5e("target/hexagon: import lexer for idef-parser") the hexagon target uses 'flex' to generate idef-parser. However 'focal' may not have 'flex' pre-installed, consequently following error is seen with travis when trying to execute the 'GCC (user)' job that also tries to

Re: [PATCH 1/3] target/arm: Don't allow stage 2 page table walks to downgrade to NS

2023-04-14 Thread Philippe Mathieu-Daudé
On 14/4/23 18:04, Peter Maydell wrote: Bit 63 in a Table descriptor is only the NSTable bit for stage 1 translations; in stage 2 it is RES0. We were incorrectly looking at it all the time. This causes problems if: * the stage 2 table descriptor was incorrectly setting the RES0 bit * we are

Re: [PATCH 2/2] chardev: Allow setting file chardev input file on the command line

2023-04-14 Thread Marc-André Lureau
On Thu, Apr 13, 2023 at 7:07 PM Peter Maydell wrote: > Our 'file' chardev backend supports both "output from this chardev > is written to a file" and "input from this chardev should be read > from a file" (except on Windows). However, you can only set up > the input file if you're using the QMP

Re: [PATCH V9 00/46] Live Update

2023-04-14 Thread Michael Galaxy
Greetings, For what its worth, our team has been aggressively testing this patch series and to date have not found any deficiencies or bottlenecks whatsoever. Overall, with a very well-tuned system (and linux kernel), we are getting live update downtimes just above 15 seconds, and the vast

Re: [PATCH 0/3] SDL2 usability fixes

2023-04-14 Thread Volker Rümelin
Am 13.04.23 um 22:43 schrieb Bernhard Beschow: Am 13. April 2023 17:54:34 UTC schrieb "Volker Rümelin" : I'm trying to use QEMU on Windows hosts for fun and for profit. While the GTK GUI doesn't seem to support OpenGL under Windows the SDL2 GUI does. Hence I used the SDL2 GUI where I ran

Re: [PATCH 1/2] qtest: Don't assert on "-qtest chardev:myid"

2023-04-14 Thread Marc-André Lureau
On Thu, Apr 13, 2023 at 7:07 PM Peter Maydell wrote: > If the -qtest command line argument is passed a string that says > "use this chardev for I/O", then it will assert: > > $ ./build/clang/qemu-system-i386 -chardev file,path=/dev/null,id=myid > -qtest chardev:myid > Unexpected error in

Re: [QEMU][PATCH v3 2/4] hw/net/can: Introduce Xilinx Versal CANFD controller

2023-04-14 Thread Vikram Garhwal
Hi Peter & Francisco, Apologies for long delay with next version i.e. v4. I was on family leave and resumed work two weeks back. Please see my comments below. On 12/19/22 8:11 AM, Peter Maydell wrote: On Wed, 7 Dec 2022 at 02:13, Vikram Garhwal wrote: The Xilinx Versal CANFD controller is

Re: [RFC PATCH 0/6] Setting memory policy for restrictedmem file

2023-04-14 Thread Sean Christopherson
On Fri, Apr 14, 2023, Michal Hocko wrote: > On Fri 14-04-23 00:11:49, Ackerley Tng wrote: > > 3. A more generic fbind(): it seems like this new functionality is > >really only needed for restrictedmem files, hence a separate, > >specific syscall was proposed to avoid complexities with

[PATCH 10/12] hw/virtio: add config support to vhost-user-device

2023-04-14 Thread Alex Bennée
To use the generic device the user will need to provide the config region size via the command line. We also add a notifier so the guest can be pinged if the remote daemon updates the config. With these changes: -device vhost-user-device-pci,virtio-id=41,num_vqs=2,config_size=8 is equivalent

[PATCH 12/12] docs/system: add a basic enumeration of vhost-user devices

2023-04-14 Thread Alex Bennée
Signed-off-by: Alex Bennée --- docs/system/devices/vhost-user-rng.rst | 2 ++ docs/system/devices/vhost-user.rst | 41 ++ 2 files changed, 43 insertions(+) diff --git a/docs/system/devices/vhost-user-rng.rst b/docs/system/devices/vhost-user-rng.rst index

[PATCH 02/12] include/hw/virtio: document virtio_notify_config

2023-04-14 Thread Alex Bennée
Signed-off-by: Alex Bennée --- include/hw/virtio/virtio.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index f236e94ca6..22ec098462 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -274,6 +274,13 @@

[PATCH 05/12] virtio: add generic vhost-user-device

2023-04-14 Thread Alex Bennée
In theory we shouldn't need to repeat so much boilerplate to support vhost-user backends. This provides a generic vhost-user-device for which the user needs to provide the few bits of information that aren't currently provided by the vhost-user protocol. This should provide a baseline

[PATCH 06/12] virtio: add PCI stub for vhost-user-device

2023-04-14 Thread Alex Bennée
This is all pretty much boilerplate. Signed-off-by: Alex Bennée --- hw/virtio/vhost-user-device-pci.c | 71 +++ hw/virtio/meson.build | 1 + 2 files changed, 72 insertions(+) create mode 100644 hw/virtio/vhost-user-device-pci.c diff --git

[PATCH 09/12] hw/virtio: derive vhost-user-rng from vhost-user-device

2023-04-14 Thread Alex Bennée
Now we can take advantage of our new base class and make vhost-user-rng a much simpler boilerplate wrapper. Signed-off-by: Alex Bennée --- include/hw/virtio/vhost-user-rng.h | 11 +- hw/virtio/vhost-user-rng.c | 264 + 2 files changed, 8 insertions(+), 267

[PATCH 11/12] hw/virtio: derive vhost-user-gpio from vhost-user-device (!BROKEN)

2023-04-14 Thread Alex Bennée
Now we can take advantage of our new base class and make vhost-user-gpio a much simpler boilerplate wrapper. [AJB - and this breaks because of the class init propery hack leading to the config getting overriden and firing the assert. I need a clean QOM way to do this derived class]

[PATCH 1/3] target/arm: Don't allow stage 2 page table walks to downgrade to NS

2023-04-14 Thread Peter Maydell
Bit 63 in a Table descriptor is only the NSTable bit for stage 1 translations; in stage 2 it is RES0. We were incorrectly looking at it all the time. This causes problems if: * the stage 2 table descriptor was incorrectly setting the RES0 bit * we are doing a stage 2 translation in Secure

[PATCH 04/12] include/hw/virtio: document some more usage of notifiers

2023-04-14 Thread Alex Bennée
Lets document some more of the core VirtIODevice structure. Signed-off-by: Alex Bennée --- include/hw/virtio/virtio.h | 8 1 file changed, 8 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 1ba7a9dd74..ef77e9ef0e 100644 ---

[PATCH 03/12] include/hw/virtio: add kerneldoc for virtio_init

2023-04-14 Thread Alex Bennée
Signed-off-by: Alex Bennée --- include/hw/virtio/virtio.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 22ec098462..1ba7a9dd74 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -217,6 +217,12 @@

[PATCH 07/12] include: attempt to document device_class_set_props

2023-04-14 Thread Alex Bennée
I'm still not sure how I achieve by use case of the parent class defining the following properties: static Property vud_properties[] = { DEFINE_PROP_CHR("chardev", VHostUserDevice, chardev), DEFINE_PROP_UINT16("id", VHostUserDevice, id, 0), DEFINE_PROP_UINT32("num_vqs",

[PATCH 00/12] virtio: add vhost-user-generic and reduce copy and paste

2023-04-14 Thread Alex Bennée
A lot of our vhost-user stubs are large chunks of boilerplate that do (mostly) the same thing. This series attempts to fix that by defining a new base class for vhost-user devices and then converting the rng and gpio devices to be based off them. You can even use vhost-user-device directly if you

[PATCH 01/12] hw/virtio: fix typo in VIRTIO_CONFIG_IRQ_IDX comments

2023-04-14 Thread Alex Bennée
Fixes: 544f0278af (virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX) Signed-off-by: Alex Bennée --- hw/display/vhost-user-gpu.c| 4 ++-- hw/net/virtio-net.c| 4 ++-- hw/virtio/vhost-user-fs.c | 4 ++-- hw/virtio/vhost-user-gpio.c| 2 +- hw/virtio/vhost-vsock-common.c | 4

[PATCH 2/3] target/arm: Set ptw->out_secure correctly for stage 2 translations

2023-04-14 Thread Peter Maydell
In S1_ptw_translate(), we are in one of two situations: (1) translating an S1 page table walk through S2 (2) translating an S2 page table walk through a physical regime In case (1), ptw->in_secure indicates whether S1 is a Secure or NonSecure translation regime. In case (2), ptw->in_secure

[PATCH 08/12] qom: allow for properties to become "fixed"

2023-04-14 Thread Alex Bennée
When specialising general purpose objects it is sometimes useful to "fix" some of the properties that were configurable by the base classes. We will use this facility when specialising vhost-user-device. Signed-off-by: Alex Bennée --- qapi/qom.json | 2 ++ include/qom/object.h|

[PATCH 3/3] target/arm: handle ipa_secure vs s2walk_secure correctly

2023-04-14 Thread Peter Maydell
In get_phys_addr_twostage() when we set up the stage 2 translation, we currently incorrectly set all of in_mmu_idx, in_ptw_idx and in_secure based on s2walk_secure. Here s2walk_secure is true if we should be doing this stage 2 walk to physical memory. ipa_secure is true if the intermediate

[PATCH 0/3] target/arm: Fix handling of VSTCR_EL2.SW and VTCR_EL2.NSW

2023-04-14 Thread Peter Maydell
When FEAT_SEL2 (secure EL2) is implemented, the bits VSTCR_EL2.SW and VTCR_EL2.NSW allow the guest to set things up so that the stage 2 walk for an IPA is done to the other address space, eg * a stage 2 walk for an NS IPA done to secure physical memory (where the translation table base address

[RFC PATCH v2 2/4] target/riscv: Reuse TB_FLAGS.MSTATUS_HFS_FS

2023-04-14 Thread Mayuresh Chitale
When misa.F is clear, TB_FLAGS.MSTATUS_HS_FS field is unused and can be used to save the current state of smstateen0.FCSR check which is needed by the floating point translation routines. Signed-off-by: Mayuresh Chitale --- target/riscv/cpu_helper.c | 12 target/riscv/translate.c

[RFC PATCH v2 0/4] Smstateen FCSR

2023-04-14 Thread Mayuresh Chitale
Patch 4 and 5 of the smstateen series need to be re-submitted with changes described in the email below. https://lists.nongnu.org/archive/html/qemu-riscv/2022-11/msg00155.html Hence splitting the patch 4 of the original series into three and re-submitting along with the original patch 5. Changes

[RFC PATCH v2 4/4] target/riscv: smstateen knobs

2023-04-14 Thread Mayuresh Chitale
Add knobs to allow users to enable smstateen and also export it via the ISA extension string. Signed-off-by: Mayuresh Chitale Reviewed-by: Weiwei Li Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/riscv/cpu.c

[RFC PATCH v2 1/4] target/riscv: smstateen check for fcsr

2023-04-14 Thread Mayuresh Chitale
If smstateen is implemented and smtateen0.fcsr is clear and misa.F is off then the floating point operations must return illegal instruction exception or virtual instruction trap, if relevant. Signed-off-by: Mayuresh Chitale --- target/riscv/csr.c | 23 +++ 1 file changed,

[RFC PATCH v2 3/4] target/riscv: check smstateen fcsr flag

2023-04-14 Thread Mayuresh Chitale
If misa.F and smstateen_fcsr_ok flag are clear then all the floating point instructions must generate an appropriate exception. Signed-off-by: Mayuresh Chitale --- target/riscv/insn_trans/trans_rvd.c.inc | 13 target/riscv/insn_trans/trans_rvf.c.inc | 24 +++

Re: [Socratic RFC PATCH] include: attempt to document device_class_set_props

2023-04-14 Thread Alex Bennée
Alex Bennée writes: > Peter Maydell writes: > >> On Mon, 27 Mar 2023 at 23:10, Alex Bennée wrote: >>> >>> >>> Mark Cave-Ayland writes: >>> >>> > On 27/03/2023 17:12, Alex Bennée wrote: >>> > >>> >> Mark Cave-Ayland writes: >>> >> >>> >>> On 27/03/2023 14:15, Alex Bennée wrote: >>> >>> >>>

Re: [PATCH 0/3] SDL2 usability fixes

2023-04-14 Thread BALATON Zoltan
On Fri, 14 Apr 2023, Bernhard Beschow wrote: Am 14. April 2023 06:53:18 UTC schrieb "Volker Rümelin" : Am 13.04.23 um 22:43 schrieb Bernhard Beschow: Am 13. April 2023 17:54:34 UTC schrieb "Volker Rümelin" : I'm trying to use QEMU on Windows hosts for fun and for profit. While the GTK GUI

Re: clean after distclean gobbles source files

2023-04-14 Thread Thomas Huth
On 14/04/2023 17.30, Steven Sistare wrote: On 4/13/2023 7:41 AM, Thomas Huth wrote: On 07/04/2023 17.44, Steven Sistare wrote: Run 'make distclean', and GNUmakefile is removed. But, GNUmakefile is where we cd to build/. Run 'make distclean' or 'make clean' again, and Makefile applies the clean

[PATCH v2] migration: Handle block device inactivation failures better

2023-04-14 Thread Eric Blake
Consider what happens when performing a migration between two host machines connected to an NFS server serving multiple block devices to the guest, when the NFS server becomes unavailable. The migration attempts to inactivate all block devices on the source (a necessary step before the

Re: clean after distclean gobbles source files

2023-04-14 Thread Steven Sistare
On 4/13/2023 7:41 AM, Thomas Huth wrote: > On 07/04/2023 17.44, Steven Sistare wrote: >> Run 'make distclean', and GNUmakefile is removed. >> But, GNUmakefile is where we cd to build/. >> Run 'make distclean' or 'make clean' again, and Makefile applies >> the clean actions, such as this one, at

Re: [PATCH] target/i386: Fix exception classes for SSE/AVX instructions.

2023-04-14 Thread Philippe Mathieu-Daudé
Hi Ricky, On 12/2/23 09:28, Ricky Zhou wrote: Fix the exception classes for some SSE/AVX instructions to match what is documented in the Intel manual. Most of these changes have no functional effect on the behavior that qemu implements (primarily >= 16-byte memory alignment checks). For

Re: [PATCH 2/4] vhost-user: Interface for migration state transfer

2023-04-14 Thread Eugenio Perez Martin
On Thu, Apr 13, 2023 at 7:55 PM Hanna Czenczek wrote: > > On 13.04.23 13:38, Stefan Hajnoczi wrote: > > On Thu, 13 Apr 2023 at 05:24, Hanna Czenczek wrote: > >> On 12.04.23 23:06, Stefan Hajnoczi wrote: > >>> On Tue, Apr 11, 2023 at 05:05:13PM +0200, Hanna Czenczek wrote: > So-called

Re: virtio-iommu hotplug issue

2023-04-14 Thread Jean-Philippe Brucker
On Thu, Apr 13, 2023 at 08:01:54PM +0900, Akihiko Odaki wrote: > Yes, that's right. The guest can dynamically create and delete VFs. The > device is emulated by QEMU: igb, an Intel NIC recently added to QEMU and > projected to be released as part of QEMU 8.0. Ah great, that's really useful, I'll

Re: [PATCH 39/40] MAINTAINERS: Add a reviewer for network packet abstractions

2023-04-14 Thread Philippe Mathieu-Daudé
On 14/4/23 13:37, Akihiko Odaki wrote: I have made significant changes for network packet abstractions so add me as a reviewer. Signed-off-by: Akihiko Odaki --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 38/40] vmxnet3: Do not depend on PC

2023-04-14 Thread Philippe Mathieu-Daudé
On 14/4/23 13:37, Akihiko Odaki wrote: vmxnet3 has no dependency on PC, and VMware Fusion actually makes it available on Apple Silicon according to: https://kb.vmware.com/s/article/90364 Signed-off-by: Akihiko Odaki --- hw/net/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH 25/40] net/eth: Use void pointers

2023-04-14 Thread Philippe Mathieu-Daudé
On 14/4/23 13:37, Akihiko Odaki wrote: The uses of uint8_t pointers were misleading as they are never accessed as an array of octets and it even require more strict alignment to access as struct eth_header. Signed-off-by: Akihiko Odaki --- include/net/eth.h | 4 ++-- net/eth.c | 6

Re: [PATCH 24/40] igb: Fix igb_mac_reg_init alignment

2023-04-14 Thread Philippe Mathieu-Daudé
On 14/4/23 13:37, Akihiko Odaki wrote: Signed-off-by: Akihiko Odaki --- hw/net/igb_core.c | 96 +++ 1 file changed, 48 insertions(+), 48 deletions(-) "Fix igb_mac_reg_init() coding style alignment" to clarify this isn't about data alignment.

Re: [PATCH 23/40] igb: Share common VF constants

2023-04-14 Thread Philippe Mathieu-Daudé
On 14/4/23 13:37, Akihiko Odaki wrote: The constants need to be consistent between the PF and VF. Signed-off-by: Akihiko Odaki --- hw/net/igb.c| 10 +- hw/net/igb_common.h | 8 hw/net/igbvf.c | 7 --- 3 files changed, 13 insertions(+), 12 deletions(-)

Re: [PATCH 17/40] igb: Always log status after building rx metadata

2023-04-14 Thread Philippe Mathieu-Daudé
On 14/4/23 13:37, Akihiko Odaki wrote: Without this change, the status flags may not be traced e.g. if checksum offloading is disabled. Signed-off-by: Akihiko Odaki --- hw/net/igb_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé diff

Re: [PATCH 16/40] e1000e: Always log status after building rx metadata

2023-04-14 Thread Philippe Mathieu-Daudé
On 14/4/23 13:37, Akihiko Odaki wrote: Without this change, the status flags may not be traced e.g. if checksum offloading is disabled. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 15/40] e1000x: Take CRC into consideration for size check

2023-04-14 Thread Philippe Mathieu-Daudé
On 14/4/23 13:37, Akihiko Odaki wrote: Section 13.7.15 Receive Length Error Count says: Packets over 1522 bytes are oversized if LongPacketEnable is 0b (RCTL.LPE). If LongPacketEnable (LPE) is 1b, then an incoming packet is considered oversized if it exceeds 16384 bytes. These lengths are

[PATCH 1/2] gitlab-ci: Avoid to re-run "configure" in the device-crash-test jobs

2023-04-14 Thread Thomas Huth
After "make check-venv" had been added to these jobs, they started to re-run "configure" each time since our logic in the makefile thinks that some files are out of date here. Avoid it with the same trick that we are using in buildtest-template.yml already by disabling the up-to-date check via

[PATCH 0/2] Improvements for the device-crash-test jobs

2023-04-14 Thread Thomas Huth
Improve the runtime of the device-crash-test jobs by avoiding to run "configure" again and by forcing to test with TCG only (instead of testing twice, with TCG and KVM). Thomas Huth (2): gitlab-ci: Avoid to re-run "configure" in the device-crash-test jobs scripts/device-crash-test: Add a

[PATCH 2/2] scripts/device-crash-test: Add a parameter to run with TCG only

2023-04-14 Thread Thomas Huth
We're currently facing the problem that the device-crash-test script runs twice as long in the CI when a runner supports KVM - which sometimes results in a timeout of the CI job. To get a more deterministic runtime here, add an option to the script that allows to run it with TCG only.

Re: [PATCH 2/2] chardev: Allow setting file chardev input file on the command line

2023-04-14 Thread Thomas Huth
On 13/04/2023 17.07, Peter Maydell wrote: Our 'file' chardev backend supports both "output from this chardev is written to a file" and "input from this chardev should be read from a file" (except on Windows). However, you can only set up the input file if you're using the QMP interface -- there

Re: [PATCH 1/2] qtest: Don't assert on "-qtest chardev:myid"

2023-04-14 Thread Thomas Huth
On 13/04/2023 17.07, Peter Maydell wrote: If the -qtest command line argument is passed a string that says "use this chardev for I/O", then it will assert: $ ./build/clang/qemu-system-i386 -chardev file,path=/dev/null,id=myid -qtest chardev:myid Unexpected error in qtest_set_chardev() at

[PATCH] accel/tcg/tcg-accel-ops-rr: ensure fairness with icount

2023-04-14 Thread Jamie Iles
The round-robin scheduler will iterate over the CPU list with an assigned budget until the next timer expiry and may exit early because of a TB exit. This is fine under normal operation but with icount enabled and SMP it is possible for a CPU to be starved of run time and the system live-locks.

Re: [PATCH 09/40] Fix references to igb Avocado test

2023-04-14 Thread Philippe Mathieu-Daudé
On 14/4/23 13:37, Akihiko Odaki wrote: Fixes: 9f95111474 ("tests/avocado: re-factor igb test to avoid timeouts") Signed-off-by: Akihiko Odaki --- MAINTAINERS| 2 +- docs/system/devices/igb.rst| 2 +-

Re: [PATCH 08/40] igb: Always copy ethernet header

2023-04-14 Thread Philippe Mathieu-Daudé
On 14/4/23 13:37, Akihiko Odaki wrote: igb_receive_internal() used to check the iov length to determine copy the iovs to a contiguous buffer, but the check is flawed in two ways: - It does not ensure that iovcnt > 0. - It does not take virtio-net header into consideration. The size of this copy

Re: [PATCH 04/40] igb: Include the second VLAN tag in the buffer

2023-04-14 Thread Philippe Mathieu-Daudé
On 14/4/23 16:32, Philippe Mathieu-Daudé wrote: On 14/4/23 16:28, Philippe Mathieu-Daudé wrote: On 14/4/23 13:37, Akihiko Odaki wrote: Signed-off-by: Akihiko Odaki ---   hw/net/igb_core.c | 2 +-   1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/igb_core.c

Re: [PATCH 04/40] igb: Include the second VLAN tag in the buffer

2023-04-14 Thread Philippe Mathieu-Daudé
On 14/4/23 16:28, Philippe Mathieu-Daudé wrote: On 14/4/23 13:37, Akihiko Odaki wrote: Signed-off-by: Akihiko Odaki ---   hw/net/igb_core.c | 2 +-   1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 55de212447..f725ab97ae 100644 ---

Re: [PATCH 04/40] igb: Include the second VLAN tag in the buffer

2023-04-14 Thread Philippe Mathieu-Daudé
On 14/4/23 13:37, Akihiko Odaki wrote: Signed-off-by: Akihiko Odaki --- hw/net/igb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 55de212447..f725ab97ae 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -1590,7

Re: [PATCH 01/40] hw/net/net_tx_pkt: Decouple from PCI

2023-04-14 Thread Philippe Mathieu-Daudé
On 14/4/23 13:36, Akihiko Odaki wrote: This also fixes the leak of memory mapping when the specified memory is partially mapped. Fixes: e263cd49c7 ("Packet abstraction for VMWARE network devices") Signed-off-by: Akihiko Odaki --- hw/net/net_tx_pkt.c | 65

Re: [PATCH 2/2] chardev: Allow setting file chardev input file on the command line

2023-04-14 Thread Peter Maydell
On Fri, 14 Apr 2023 at 15:03, Philippe Mathieu-Daudé wrote: > > On 13/4/23 17:07, Peter Maydell wrote: > > --- a/qemu-options.hx > > +++ b/qemu-options.hx > > > > -``-chardev file,id=id,path=path`` > > +``-chardev file,id=id,path=path[,input-path=input-path]`` > > Log all traffic received

Re: [RFC PATCH v2 02/10] tests: add python3-venv dependency

2023-04-14 Thread Philippe Mathieu-Daudé
On 14/4/23 07:54, John Snow wrote: Several debian-based tests need the python3-venv dependency as a consequence of Debian debundling the "ensurepip" module normally included with Python. As mkvenv.py stands as of this commit, Debian requires EITHER: (A) setuptools and pip, or (B) ensurepip

Re: [PATCH 2/2] chardev: Allow setting file chardev input file on the command line

2023-04-14 Thread Philippe Mathieu-Daudé
On 13/4/23 17:07, Peter Maydell wrote: Our 'file' chardev backend supports both "output from this chardev is written to a file" and "input from this chardev should be read from a file" (except on Windows). However, you can only set up the input file if you're using the QMP interface -- there is

Re: [PATCH] rtl8139: fix large_send_mss divide-by-zero

2023-04-14 Thread Philippe Mathieu-Daudé
On 13/4/23 19:19, Stefan Hajnoczi wrote: If the driver sets large_send_mss to 0 then a divide-by-zero occurs. Even if the division wasn't a problem, the for loop that emits MSS-sized packets would never terminate. Solve these issues by skipping offloading when large_send_mss=0. This issue was

Re: [PATCH] hw/core: Move numa.c into the target independent source set

2023-04-14 Thread Philippe Mathieu-Daudé
On 13/4/23 20:26, Thomas Huth wrote: There is nothing that depends on target specific macros in this file, so we can move it to the common source set to avoid that we have to compile this file multiple times (one time for each target). Signed-off-by: Thomas Huth --- hw/core/meson.build | 2

Re: [PATCH 0/3] SDL2 usability fixes

2023-04-14 Thread Bernhard Beschow
Am 14. April 2023 06:53:18 UTC schrieb "Volker Rümelin" : >Am 13.04.23 um 22:43 schrieb Bernhard Beschow: >> >> Am 13. April 2023 17:54:34 UTC schrieb "Volker Rümelin" >> : I'm trying to use QEMU on Windows hosts for fun and for profit. While the GTK GUI doesn't seem to

Re: [RFC PATCH] migration: Handle block device inactivation failures better

2023-04-14 Thread Eric Blake
On Fri, Apr 14, 2023 at 02:15:45PM +0200, Juan Quintela wrote: > Eric Blake wrote: > > Consider what happens when performing a migration between two host > > machines connected to an NFS server serving multiple block devices to > > the guest, when the NFS server becomes unavailable. The

Re: [PATCH 0/3] SDL2 usability fixes

2023-04-14 Thread Bernhard Beschow
Am 13. April 2023 21:40:29 UTC schrieb "Volker Rümelin" : >Am 13.04.23 um 22:43 schrieb Bernhard Beschow: >> >> Am 13. April 2023 17:54:34 UTC schrieb "Volker Rümelin" >> : I'm trying to use QEMU on Windows hosts for fun and for profit. While the GTK GUI doesn't seem to

Re: [RFC 1/1] add support of `--initrd` for ELF-ARM kernels

2023-04-14 Thread Lankes, Stefan
> Am 14.04.2023 um 10:54 schrieb Alex Bennée : > Hello Alex, > > Where are these DTB nodes documented? Yes, it is currently missing. > > Also could you not achieve the same thing using the guest-loader which > uses the multiboot spec and sets: > >const char *compat[2] = {

Re: [RFC PATCH] migration: Handle block device inactivation failures better

2023-04-14 Thread Juan Quintela
Eric Blake wrote: > Consider what happens when performing a migration between two host > machines connected to an NFS server serving multiple block devices to > the guest, when the NFS server becomes unavailable. The migration > attempts to inactivate all block devices on the source (a necessary

Re: [PATCH 0/5] Cleanup [h_enter|spapr_exit]_nested routines

2023-04-14 Thread Fabiano Rosas
Harsh Prateek Bora writes: > This patchset introduces helper routines to enable (and does) cleaning > up of h_enter_nested() and spapr_exit_nested() routines in existing api > for nested virtualization on Power/SPAPR for better code readability / > maintenance. No functional changes intended

Re: [RFC PATCH 0/1] Implement entropy leak reporting for virtio-rng

2023-04-14 Thread Amit Shah
On Thu, 2023-04-13 at 15:36 +0200, Babis Chalios wrote: > > On 11/4/23 18:20, Jason A. Donenfeld wrote: > > CAUTION: This email originated from outside of the organization. Do not > > click links or open attachments unless you can confirm the sender and know > > the content is safe. > > > > >

Re: [PATCH 4/5] ppc: spapr: cleanup spapr_exit_nested() with helper routines.

2023-04-14 Thread Fabiano Rosas
Harsh Prateek Bora writes: > Currently, in spapr_exit_nested(), it does a lot of register state > restoring from ptregs/hvstate after mapping each of those before > restoring the L1 host state. This patch breaks down those set of ops > to respective helper routines for better code

Re: [PATCH 5/5] MAINTAINERS: Adding myself in the list for ppc/spapr

2023-04-14 Thread Daniel Henrique Barboza
On 3/31/23 03:53, Harsh Prateek Bora wrote: Would like to get notified of changes in this area and review them. Signed-off-by: Harsh Prateek Bora --- All reviewers are welcome. Reviewed-by: Daniel Henrique Barboza MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH 3/5] ppc: spapr: assert early rather late in h_enter_nested()

2023-04-14 Thread Fabiano Rosas
Harsh Prateek Bora writes: > Currently, it asserts very late in the code flow if lpid is already > initialized. That's not about initializing. It is about making sure the LPIDR is 0. Which has a specific meaning according to the ISA. > Ideally, it should assert in the beginning if that is the

Re: [PATCH] migration: mark mixed functions that can suspend

2023-04-14 Thread Juan Quintela
Paolo Bonzini wrote: > There should be no paths from a coroutine_fn to aio_poll, however in > practice coroutine_mixed_fn will call aio_poll in the !qemu_in_coroutine() > path. By marking mixed functions, we can track accurately the call paths > that execute entirely in coroutine context, and

Re: [PATCH 2/5] ppc: spapr: cleanup h_enter_nested() with helper routines.

2023-04-14 Thread Fabiano Rosas
Harsh Prateek Bora writes: > h_enter_nested() currently does a lot of register specific operations > which should be abstracted logically to simplify the code for better > readability. This patch breaks down relevant blocks into respective > helper routines to make use of them for better

[PATCH 08/40] igb: Always copy ethernet header

2023-04-14 Thread Akihiko Odaki
igb_receive_internal() used to check the iov length to determine copy the iovs to a contiguous buffer, but the check is flawed in two ways: - It does not ensure that iovcnt > 0. - It does not take virtio-net header into consideration. The size of this copy is just 22 octets, which can be even

[PATCH 26/40] net/eth: Always add VLAN tag

2023-04-14 Thread Akihiko Odaki
It is possible to have another VLAN tag even if the packet is already tagged. Signed-off-by: Akihiko Odaki --- hw/net/net_tx_pkt.c | 16 +++- include/net/eth.h | 4 ++-- net/eth.c | 22 ++ 3 files changed, 15 insertions(+), 27 deletions(-) diff

[PATCH 40/40] docs/system/devices/igb: Note igb is tested for DPDK

2023-04-14 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- docs/system/devices/igb.rst | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/system/devices/igb.rst b/docs/system/devices/igb.rst index afe036dad2..60c10bf7c7 100644 --- a/docs/system/devices/igb.rst +++

[PATCH 17/40] igb: Always log status after building rx metadata

2023-04-14 Thread Akihiko Odaki
Without this change, the status flags may not be traced e.g. if checksum offloading is disabled. Signed-off-by: Akihiko Odaki --- hw/net/igb_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 5fdc8bc42d..ccc5a626b4 100644 ---

[PATCH 27/40] hw/net/net_rx_pkt: Enforce alignment for eth_header

2023-04-14 Thread Akihiko Odaki
eth_strip_vlan and eth_strip_vlan_ex refers to ehdr_buf as struct eth_header. Enforce alignment for the structure. Signed-off-by: Akihiko Odaki --- hw/net/net_rx_pkt.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/net/net_rx_pkt.c b/hw/net/net_rx_pkt.c index

[PATCH 10/40] tests/avocado: Remove unused imports

2023-04-14 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- tests/avocado/netdev-ethtool.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/avocado/netdev-ethtool.py b/tests/avocado/netdev-ethtool.py index f7e9464184..8de118e313 100644 --- a/tests/avocado/netdev-ethtool.py +++ b/tests/avocado/netdev-ethtool.py @@

[PATCH 30/40] igb: Implement igb-specific oversize check

2023-04-14 Thread Akihiko Odaki
igb has a configurable size limit for LPE, and uses different limits depending on whether the packet is treated as a VLAN packet. Signed-off-by: Akihiko Odaki --- hw/net/igb_core.c | 41 +++-- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git

[PATCH 28/40] tests/qtest/libqos/igb: Set GPIE.Multiple_MSIX

2023-04-14 Thread Akihiko Odaki
GPIE.Multiple_MSIX is not set by default, and needs to be set to get interrupts from multiple MSI-X vectors. Signed-off-by: Akihiko Odaki --- tests/qtest/libqos/igb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/libqos/igb.c b/tests/qtest/libqos/igb.c index

[PATCH 22/40] igb: Add more definitions for Tx descriptor

2023-04-14 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/net/igb_core.c | 2 +- hw/net/igb_regs.h | 32 +++- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index e5a7021c0e..350462c40c 100644 --- a/hw/net/igb_core.c +++

[PATCH 09/40] Fix references to igb Avocado test

2023-04-14 Thread Akihiko Odaki
Fixes: 9f95111474 ("tests/avocado: re-factor igb test to avoid timeouts") Signed-off-by: Akihiko Odaki --- MAINTAINERS| 2 +- docs/system/devices/igb.rst| 2 +- scripts/ci/org.centos/stream/8/x86_64/test-avocado | 2 +- 3 files

[PATCH 33/40] igb: Implement Tx SCTP CSO

2023-04-14 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/net/igb_core.c | 12 +++- hw/net/net_tx_pkt.c | 18 ++ hw/net/net_tx_pkt.h | 8 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 0e1b681613..955db1b1dc 100644 ---

[PATCH 39/40] MAINTAINERS: Add a reviewer for network packet abstractions

2023-04-14 Thread Akihiko Odaki
I have made significant changes for network packet abstractions so add me as a reviewer. Signed-off-by: Akihiko Odaki --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index c31d2279ab..8b2ef5943c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2214,6

  1   2   >