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

2023-03-24 Thread Ninad Palsule
Hello, I have incorporated review comments from Stefan and Cedric. 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

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

2023-03-24 Thread 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 --- V2: Incorporated Stephen's review comments - Added example in the document. ---

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

2023-03-24 Thread 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 temporarily cache the data

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

2023-03-24 Thread 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 calculation is handled in

Re: [Libguestfs] [PATCH 1/1] nbd/server: push pending frames after sending reply

2023-03-24 Thread Florian Westphal
Eric Blake wrote: > On Fri, Mar 24, 2023 at 02:41:20PM -0500, Eric Blake wrote: > > On Fri, Mar 24, 2023 at 11:47:20AM +0100, Florian Westphal wrote: > > > qemu-nbd doesn't set TCP_NODELAY on the tcp socket. > > Replying to myself, WHY aren't we setting TCP_NODELAY on the socket? If the

[PATCH v2 7/7] hw/ipmi: Add a KCS Module for NPCM7XX

2023-03-24 Thread Hao Wu
Add a KCS module for NPCM7xx SoC. This module implements the IPMI responder interface and is responsible to communicate with an external host via the KCS channels in an NPCM7xx SoC. Note that we cannot directly use ipmi_kcs.c since the communication direction is the opposite. For example, in

[PATCH v2 5/7] hw/ipmi: Take out common from ipmi_bmc_extern.c

2023-03-24 Thread Hao Wu
This patch refactors ipmi_bmc_extern.c and takes out the parts that can be used both ipmi_bmc_extern.c and bmc_host_extern.c to a common file ipmi_extern.c. Now we have a connection called IPMIExtern which handles the connection, and IPMIBmcExtern that handles core-side emulation specific stuff.

[PATCH v2 4/7] hw/ipmi: Refactor IPMI interface

2023-03-24 Thread Hao Wu
This patch refactors the IPMI interface so that it can be used by both the BMC side and core-side simulation. Detail changes: (1) Split IPMIInterface into IPMIInterfaceHost (for host side simulation) and IPMIInterfaceClient (for BMC side simulation). (2) rename handle_rsp -> handle_msg so the

[PATCH v2 6/7] hw/ipmi: Add an IPMI external host device

2023-03-24 Thread Hao Wu
The IPMI external host device works for Baseband Management Controller (BMC) emulations. It works as a representation of a host class that connects to a given BMC. It can connect to a real host hardware or a emulated or simulated host device. In particular it can connect to a host QEMU instance

[PATCH v2 3/7] docs/specs: IPMI device emulation: BMC

2023-03-24 Thread Hao Wu
From: Havard Skinnemoen The IPMI document is expanded with a proposal to emulate BMC-side IPMI devices. This allows a QEMU instance running server software to interact with a different QEMU instance running BMC firmware, which should closely model how a real server system works. Signed-off-by:

[PATCH v2 0/7] Handling IPMI for emulated BMC

2023-03-24 Thread Hao Wu
This patch set is follow-up to our BMC side IPMI code that was sent our 18 months ago. It addresses Corey's comments. Baseboard Management Controllers (BMCs) are special processors that monitors state of a computer, often used in data center servers. They often communicate via IPMI. As a result,

[PATCH v2 2/7] docs/specs: IPMI device emulation: main processor

2023-03-24 Thread Hao Wu
From: Havard Skinnemoen This document is an attempt to briefly document the existing IPMI emulation support on the main processor. It provides the necessary background for the BMC-side IPMI emulation proposed by the next patch. Signed-off-by: Havard Skinnemoen Signed-off-by: Hao Wu ---

[PATCH v2 1/7] docs: enable sphinx blockdiag extension

2023-03-24 Thread Hao Wu
From: Havard Skinnemoen This allows use to add block diagrams in documentations, such as the block diagram in docs/specs/impi.rst. Signed-off-by: Havard Skinnemoen Signed-off-by: Hao Wu --- docs/conf.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/conf.py

Re: [Libguestfs] [PATCH 1/1] nbd/server: push pending frames after sending reply

2023-03-24 Thread Eric Blake
On Fri, Mar 24, 2023 at 02:41:20PM -0500, Eric Blake wrote: > On Fri, Mar 24, 2023 at 11:47:20AM +0100, Florian Westphal wrote: > > qemu-nbd doesn't set TCP_NODELAY on the tcp socket. Replying to myself, WHY aren't we setting TCP_NODELAY on the socket? > > And surprisingly, qemu IS using

Re: Adding default config options to the tuxrun baseline kernels and enabling sshd

2023-03-24 Thread Stefano Stabellini
On Fri, 24 Mar 2023, David Woodhouse wrote: > On Fri, 2023-03-24 at 13:53 +0100, Remi Duraffort wrote: > > Le ven. 24 mars 2023 à 12:02, Alex Bennée a écrit : > > >   version: 1 > > >   name: Xen Guest Kernels > > >   description: Build Xen Test Kernels > > >   jobs: > > >   - builds: > > >      

Re: [PATCH 1/1] nbd/server: push pending frames after sending reply

2023-03-24 Thread Eric Blake
On Fri, Mar 24, 2023 at 07:20:17PM +0100, Florian Westphal wrote: > Kevin Wolf wrote: > > Am 24.03.2023 um 11:47 hat Florian Westphal geschrieben: > > > +qio_channel_set_cork(client->ioc, true); > > > + > > > if (ret < 0) { > > > /* It wasn't -EIO, so, according to

Re: [PATCH v3 3/3] New I2C: Add support for TPM devices over I2C bus

2023-03-24 Thread Stefan Berger
On 3/24/23 09:43, Stefan Berger wrote: On 3/24/23 04:24, Cédric Le Goater wrote: Hello Ninad, + +/* + * Convert little endian byte stream into local formated + * unsigned integer + */ +static inline uint32_t tpm_i2c_le_bytes_to_uint(TPMStateI2C *i2cst) +{ +    uint32_t data = 0; +   

Re: [PATCH 1/1] nbd/server: push pending frames after sending reply

2023-03-24 Thread Eric Blake
On Fri, Mar 24, 2023 at 11:47:20AM +0100, Florian Westphal wrote: > qemu-nbd doesn't set TCP_NODELAY on the tcp socket. > > Kernel waits for more data and avoids transmission of small packets. > Without TLS this is barely noticeable, but with TLS this really shows. > > Booting a VM via qemu-nbd

Re: [PATCH v3 1/1] util/async-teardown: wire up query-command-line-options

2023-03-24 Thread Claudio Imbrenda
On Fri, 24 Mar 2023 18:56:06 +0100 Thomas Huth wrote: > On 24/03/2023 18.45, Claudio Imbrenda wrote: > > The recently introduced -async-teardown commandline option was not > > wired up properly and did not show up in the output of the QMP command > > query-command-line-options. This means that

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

2023-03-24 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 9b56ccdd92..a9ed6143f5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2252,6 +2252,7 @@ F:

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

2023-03-24 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 753f17b40c..38aa4596b1 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@

[PATCH v10 3/8] igb: add ICR_RXDW

2023-03-24 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 v10 6/8] igb: respect E1000_VMOLR_RSSE

2023-03-24 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 38aa4596b1..fd61c6c550 100644 --- a/hw/net/igb_core.c +++

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

2023-03-24 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 | 38 ++ hw/net/igb_regs.h | 3 +++ hw/net/trace-events | 2 ++ 3 files changed, 31 insertions(+), 12 deletions(-)

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

2023-03-24 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 v10 8/8] igb: respect VMVIR and VMOLR for VLAN

2023-03-24 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 v10 4/8] igb: implement VFRE and VFTE registers

2023-03-24 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 | 38 +++--- hw/net/igb_core.h | 1 + hw/net/igb_regs.h | 3 +++ 3 files changed, 35 insertions(+),

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

2023-03-24 Thread Sriram Yagnaraman
Based-on: <20230324095434.44973-1-akihiko.od...@daynix.com> ([PATCH for 8.0 0/4] igb fixes for 8.0) Now that Akhiko's patchset for introducing igb device is merged, I have rebased my changes on master. The changes proposed here adds support for - Correct PF/VF reset handling - Introduce

s390x TCG migration failure

2023-03-24 Thread Nina Schoetterl-Glausch
Hi, We're seeing failures running s390x migration kvm-unit-tests tests with TCG. Some initial findings: What seems to be happening is that after migration a control block header accessed by the test code is all zeros which causes an unexpected exception. I did a bisection which points to

Re: [PATCH v3 3/3] New I2C: Add support for TPM devices over I2C bus

2023-03-24 Thread Ninad Palsule
Hello Cedric, On 3/24/23 3:24 AM, Cédric Le Goater wrote: Hello Ninad, On 3/24/23 04:02, Ninad Palsule wrote: 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

Re: [PATCH 1/1] nbd/server: push pending frames after sending reply

2023-03-24 Thread Florian Westphal
Kevin Wolf wrote: > Am 24.03.2023 um 11:47 hat Florian Westphal geschrieben: > > +qio_channel_set_cork(client->ioc, true); > > + > > if (ret < 0) { > > /* It wasn't -EIO, so, according to nbd_co_receive_request() > > * semantics, we should return the error to the

Re: [PATCH v3 3/3] New I2C: Add support for TPM devices over I2C bus

2023-03-24 Thread Ninad Palsule
Hi Stefan, On 3/24/23 9:19 AM, Stefan Berger wrote: On 3/23/23 23:02, Ninad Palsule wrote: 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

Re: [PATCH 7/8] target/riscv: Fix format for comments

2023-03-24 Thread Richard Henderson
On 3/24/23 05:38, Weiwei Li wrote: Fix formats for multi-lines comments. Add spaces around single line comments(after "/*" and before "*/"). Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/arch_dump.c| 3 +- target/riscv/cpu.c | 2

Re: [PATCH 5/8] target/riscv: Remove redundant parentheses

2023-03-24 Thread Richard Henderson
On 3/24/23 05:38, Weiwei Li wrote: Remove redundant parentheses in get_physical_address. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 4/8] target/riscv: Remove check on RVH for riscv_cpu_set_virt_enabled

2023-03-24 Thread Richard Henderson
On 3/24/23 05:38, Weiwei Li wrote: In current implementation, riscv_cpu_set_virt_enabled is only called when RVH is enabled. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu_helper.c | 4 1 file changed, 4 deletions(-) Perhaps assert, or assert under

Re: [PATCH 3/8] target/riscv: Remove check on RVH for riscv_cpu_virt_enabled

2023-03-24 Thread Richard Henderson
On 3/24/23 05:38, Weiwei Li wrote: Since env->virt.VIRT_ONOFF is initialized as false, and will not be set to true when RVH is disabled, so we can just return this bit(false) when RVH is not disabled. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu_helper.c | 4

Re: [PATCH 2/8] target/riscv: Remove redundant check on RVH

2023-03-24 Thread Richard Henderson
On 3/24/23 05:38, Weiwei Li wrote: Check on riscv_cpu_virt_enabled contains the check on RVH. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/op_helper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 1/8] target/riscv: Remove redundant call to riscv_cpu_virt_enabled

2023-03-24 Thread Richard Henderson
On 3/24/23 05:38, Weiwei Li wrote: The assignment is done under the condition riscv_cpu_virt_enabled()=true. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu_helper.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH] Change the default for Mixed declarations.

2023-03-24 Thread Alex Bennée
Juan Quintela writes: > Daniel P. Berrangé wrote: >> On Tue, Feb 14, 2023 at 05:07:38PM +0100, Juan Quintela wrote: >>> Hi >>> >>> I want to enter a discussion about changing the default of the style >>> guide. >>> >>> There are several reasons for that: >>> - they exist since C99 (i.e. all

Re: [PATCH v5 1/2] target/riscv: separate priv from mmu_idx

2023-03-24 Thread Richard Henderson
On 3/23/23 22:41, Fei Wu wrote: @@ -762,7 +764,7 @@ static int get_physical_address(CPURISCVState *env, hwaddr *physical, * (riscv_cpu_do_interrupt) is correct */ MemTxResult res; MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED; -int mode = mmu_idx & TB_FLAGS_PRIV_MMU_MASK; +

Re: [PATCH v3 1/1] util/async-teardown: wire up query-command-line-options

2023-03-24 Thread Thomas Huth
On 24/03/2023 18.45, Claudio Imbrenda wrote: The recently introduced -async-teardown commandline option was not wired up properly and did not show up in the output of the QMP command query-command-line-options. This means that libvirt will have no way to discover whether the feature is

[PATCH v3 1/1] util/async-teardown: wire up query-command-line-options

2023-03-24 Thread Claudio Imbrenda
The recently introduced -async-teardown commandline option was not wired up properly and did not show up in the output of the QMP command query-command-line-options. This means that libvirt will have no way to discover whether the feature is supported. This patch fixes the issue by correctly

[PATCH v3 0/1] util/async-teardown: wire up query-command-line-options

2023-03-24 Thread Claudio Imbrenda
The recently introduced -async-teardown commandline option was not wired up properly and did not show up in the output of the QMP command query-command-line-options. This means that libvirt will have no way to discover whether the feature is supported. This patch fixes the issue by adding a new

Re: [PATCH] qtests: avoid printing comments before g_test_init()

2023-03-24 Thread Alex Bennée
Juan Quintela writes: > Thomas Huth wrote: >> On 23/03/2023 19.31, Juan Quintela wrote: >>> Daniel P. Berrangé wrote: The TAP protocol version line must be the first thing printed on stdout. The migration test failed that requirement in certain scenarios: #

Re: [PATCH] Change the default for Mixed declarations.

2023-03-24 Thread Juan Quintela
Daniel P. Berrangé wrote: > On Tue, Feb 14, 2023 at 05:07:38PM +0100, Juan Quintela wrote: >> Hi >> >> I want to enter a discussion about changing the default of the style >> guide. >> >> There are several reasons for that: >> - they exist since C99 (i.e. all supported compilers support them)

[RFC PATCH] MAINTAINERS: add a section for policy documents

2023-03-24 Thread Alex Bennée
We don't update these often but if your the sort of person who enjoys debating and tuning project policies you could now add yourself as a reviewer here so you don't miss the next debate over tabs vs spaces ;-) Who's with me? Signed-off-by: Alex Bennée Cc: Thomas Huth Cc: Daniel P. Berrangé

Re: qapi: [RFC] Doc comment convention for @arg: sections

2023-03-24 Thread Peter Maydell
On Fri, 24 Mar 2023 at 12:05, Markus Armbruster wrote: > > Peter Maydell writes: > > > On Thu, 23 Mar 2023 at 14:48, Markus Armbruster wrote: > >> > >> The QAPI schema doc comment language provides special syntax for command > >> and event arguments, struct and union members, alternate

Re: [PATCH] qtests: avoid printing comments before g_test_init()

2023-03-24 Thread Juan Quintela
Thomas Huth wrote: > On 23/03/2023 19.31, Juan Quintela wrote: >> Daniel P. Berrangé wrote: >>> The TAP protocol version line must be the first thing printed on >>> stdout. The migration test failed that requirement in certain >>> scenarios: >>> >>># Skipping test: Userfault not available

Re: [PATCH 1/1] nbd/server: push pending frames after sending reply

2023-03-24 Thread Kevin Wolf
Am 24.03.2023 um 11:47 hat Florian Westphal geschrieben: > qemu-nbd doesn't set TCP_NODELAY on the tcp socket. > > Kernel waits for more data and avoids transmission of small packets. > Without TLS this is barely noticeable, but with TLS this really shows. > > Booting a VM via qemu-nbd on

Re: Adding default config options to the tuxrun baseline kernels and enabling sshd

2023-03-24 Thread Alex Bennée
Remi Duraffort writes: > Hello Alex, > > Le ven. 24 mars 2023 à 12:02, Alex Bennée a écrit : > > Hi guys, > > I've been working with David on adding testing for the new KVM Xen guest > functionality and had a couple of questions. His original test is based > on fedora and is fairly

Re: [PATCH v2 3/4] target/riscv: Encode the FS and VS on a normal way for tb flags

2023-03-24 Thread Richard Henderson
On 3/24/23 07:30, LIU Zhiwei wrote: Reuse the MSTATUS_FS and MSTATUS_VS for the tb flags positions is not a normal way. It will make it hard to change the tb flags layout. And even worse, if we want to keep tb flags for a same extension togather without a hole. Signed-off-by: LIU Zhiwei

Re: [PATCH v2 4/4] target/riscv: Add a tb flags field for vstart

2023-03-24 Thread Richard Henderson
On 3/24/23 07:30, LIU Zhiwei wrote: Once we mistook the vstart directly from the env->vstart. As env->vstart is not a constant, we should record it in the tb flags if we want to use it in translation. Reported-by: Richard Henderson Signed-off-by: LIU Zhiwei Reviewed-by: Weiwei Li ---

Re: [PATCH v2 2/4] target/riscv: Add a general status enum for extensions

2023-03-24 Thread Richard Henderson
On 3/24/23 07:30, LIU Zhiwei wrote: The pointer masking is the only extension that directly use status. The vector or float extension uses the status in an indirect way. Replace the pointer masking extension special status fields with the general status. Signed-off-by: LIU Zhiwei --- v1->v2:

Re: [PATCH v2 1/4] target/riscv: Extract virt enabled state from tb flags

2023-03-24 Thread Richard Henderson
On 3/24/23 07:30, LIU Zhiwei wrote: Virt enabled state is not a constant. So we should put it into tb flags. Thus we can use it like a constant condition at translation phase. Reported-by: Richard Henderson Signed-off-by: LIU Zhiwei Reviewed-by: Weiwei Li --- target/riscv/cpu.h| 2 ++

Re: [RESEND PATCH 2/2] hw/cxl: Fix incorrect reset of commit and associated clearing of committed.

2023-03-24 Thread Dave Jiang
On 3/22/23 3:33 AM, Jonathan Cameron wrote: The hardware clearing the commit bit is not spec compliant. Clearing of committed bit when commit is cleared is not specifically stated in the CXL spec, but is the expected (and simplest) permitted behaviour so use that for QEMU emulation.

Re: [PATCH 4/4] target/riscv: Add a tb flags field for vstart

2023-03-24 Thread Richard Henderson
On 3/23/23 22:59, LIU Zhiwei wrote: Once we mistook the vstart directly from the env->vstart. As env->vstart is not a constant, we should record it in the tb flags if we want to use it in translation. Reported-by: Richard Henderson Signed-off-by: LIU Zhiwei --- target/riscv/cpu.h

Re: [PATCH 3/4] target/riscv: Encode the FS and VS on a normal way for tb flags

2023-03-24 Thread Richard Henderson
On 3/23/23 22:59, LIU Zhiwei wrote: Reuse the MSTATUS_FS and MSTATUS_VS for the tb flags positions is not a normal way. It will make us change the tb flags layout difficult. And even worse, if we want to keep tb flags for a same extension togather without a hole. Signed-off-by: LIU Zhiwei

Re: [PATCH 1/4] target/riscv: Extract virt enabled state from tb flags

2023-03-24 Thread Richard Henderson
On 3/23/23 22:59, LIU Zhiwei wrote: Virt enabled state is not a constant. So we should put it into tb flags. Thus we can use it like a constant condition at translation phase. Reported-by: Richard Henderson Signed-off-by: LIU Zhiwei --- target/riscv/cpu.h| 2 ++

[PATCH 2/2] hw/nvme: check maximum copy length (MCL) for COPY

2023-03-24 Thread Minwoo Im
MCL(Maximum Copy Length) in the Identify Namespace data structure limits the number of LBAs to be copied inside of the controller. We've not checked it at all, so added the check with returning the proper error status. Signed-off-by: Minwoo Im Reviewed-by: Klaus Jensen --- hw/nvme/ctrl.c | 24

[PATCH v5 2/2] target/riscv: reduce overhead of MSTATUS_SUM change

2023-03-24 Thread Fei Wu
Kernel needs to access user mode memory e.g. during syscalls, the window is usually opened up for a very limited time through MSTATUS.SUM, the overhead is too much if tlb_flush() gets called for every SUM change. This patch creates a separate MMU index for S+SUM, so that it's not necessary to

Re: [PATCH for-8.1 v4 14/25] target/riscv: add RVG

2023-03-24 Thread liweiwei
On 2023/3/23 06:19, Daniel Henrique Barboza wrote: The 'G' bit in misa_ext is a virtual extension that enables a set of extensions (i, m, a, f, d, icsr and ifencei). We're already have code to handle it but no bit definition. Add it. Add RVG to set_misa() in rv64_thead_c906_cpu_init() and

[RFC PATCH] tests/avocado: Test Xen guest support under KVM

2023-03-24 Thread Alex Bennée
From: David Woodhouse Exercise guests with a few different modes for interrupt delivery. In particular we want to cover: • Xen event channel delivery via GSI to the I/O APIC • Xen event channel delivery via GSI to the i8259 PIC • MSIs routed to PIRQ event channels • GSIs routed to PIRQ

[PATCH] target/riscv: Fix itrigger when icount is used

2023-03-24 Thread LIU Zhiwei
When I boot a ubuntu image, QEMU output a "Bad icount read" message and exit. The reason is that when execute helper_mret or helper_sret, it will cause a call to icount_get_raw_locked (), which needs set can_do_io flag on cpustate. Thus we setting this flag when execute these two instructions.

[PULL 2/2] hw/xenpv: Initialize Xen backend operations

2023-03-24 Thread Anthony PERARD via
From: David Woodhouse As the Xen backend operations were abstracted out into a function table to allow for internally emulated Xen support, we missed the xen_init_pv() code path which also needs to install the operations for the true Xen libraries. Add the missing call to

[qemu-web PATCH] fix cases where the left column becomes too large

2023-03-24 Thread Paolo Bonzini
On the blogs page, long lines under a tag will make the left column overlap the sidebar. Fix it in the CSS. Signed-off-by: Paolo Bonzini --- _includes/assets.html| 2 +- assets/css/skel-noscript.css | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git

Adding default config options to the tuxrun baseline kernels and enabling sshd

2023-03-24 Thread Alex Bennée
Hi guys, I've been working with David on adding testing for the new KVM Xen guest functionality and had a couple of questions. His original test is based on fedora and is fairly comprehensive: https://git.infradead.org/users/dwmw2/qemu.git/commitdiff/48f78f9bb860dca446e20d6ed8db3aa9d857505f

Re: [RESEND PATCH 2/2] hw/cxl: Fix incorrect reset of commit and associated clearing of committed.

2023-03-24 Thread Jonathan Cameron via
On Wed, 22 Mar 2023 16:21:26 + Fan Ni wrote: > On Wed, Mar 22, 2023 at 10:33:00AM +, Jonathan Cameron wrote: > > The hardware clearing the commit bit is not spec compliant. > > Clearing of committed bit when commit is cleared is not specifically > > stated in the CXL spec, but is the

Re: [PATCH] qtests: avoid printing comments before g_test_init()

2023-03-24 Thread Thomas Huth
On 23/03/2023 19.31, Juan Quintela wrote: Daniel P. Berrangé wrote: The TAP protocol version line must be the first thing printed on stdout. The migration test failed that requirement in certain scenarios: # Skipping test: Userfault not available (builtdtime) TAP version 13 # random

[PATCH 4/8] target/riscv: Remove check on RVH for riscv_cpu_set_virt_enabled

2023-03-24 Thread Weiwei Li
In current implementation, riscv_cpu_set_virt_enabled is only called when RVH is enabled. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu_helper.c | 4 1 file changed, 4 deletions(-) diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index

[PATCH 5/8] target/riscv: Remove redundant parentheses

2023-03-24 Thread Weiwei Li
Remove redundant parentheses in get_physical_address. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index 3862e7b677..de2d4a8c1d

[PATCH 0/8] target/riscv: Simplification for RVH related check and code style fix

2023-03-24 Thread Weiwei Li
This patchset tries to simplify the RVH related check and fix some code style problems, such as problems for indentation, multi-line comments and lines with over 80 characters. The port is available here: https://github.com/plctlab/plct-qemu/tree/plct-cleanup-upstream Weiwei Li (8):

Re: [PATCH for-8.1 v4 22/25] target/riscv: use misa_ext val in riscv_cpu_validate_extensions()

2023-03-24 Thread liweiwei
On 2023/3/23 06:20, Daniel Henrique Barboza wrote: Similar to what we did with riscv_cpu_validate_misa_ext(), let's read all MISA bits from a misa_ext val instead of reading from the cpu->cfg object. This will allow write_misa() to use riscv_cpu_validate_extensions(). Signed-off-by: Daniel

Re: [PATCH 1/4] target/riscv: Extract virt enabled state from tb flags

2023-03-24 Thread liweiwei
On 2023/3/24 13:59, LIU Zhiwei wrote: Virt enabled state is not a constant. So we should put it into tb flags. Thus we can use it like a constant condition at translation phase. Reported-by: Richard Henderson Signed-off-by: LIU Zhiwei --- Reviewed-by: Weiwei Li Weiwei L

Re: [PATCH 4/6] target/ppc: Alignment faults do not set DSISR in ISA v3.0 onward

2023-03-24 Thread Fabiano Rosas
Nicholas Piggin writes: > This optional behavior was removed from the ISA in v3.0, see > Summary of Changes preface: > > Data Storage Interrupt Status Register for Alignment Interrupt: > Simplifies the Alignment interrupt by remov- ing the Data Storage > Interrupt Status Register (DSISR)

[PATCH v9 3/5] block: add accounting for zone append operation

2023-03-24 Thread Sam Li
Taking account of the new zone append write operation for zoned devices, BLOCK_ACCT_ZONE_APPEND enum is introduced as other I/O request type (read, write, flush). Signed-off-by: Sam Li --- block/qapi-sysemu.c| 11 ++ block/qapi.c | 18 ++ hw/block/virtio-blk.c

Re: [RFC QEMU PATCH 08/18] virtio-gpu: Initialize Venus

2023-03-24 Thread Huang Rui
On Thu, Mar 16, 2023 at 07:14:47AM +0800, Dmitry Osipenko wrote: > On 3/13/23 18:55, Huang Rui wrote: > > On Mon, Mar 13, 2023 at 01:51:03AM +0800, Dmitry Osipenko wrote: > >> On 3/12/23 12:22, Huang Rui wrote: > >>> From: Antonio Caggiano > >>> > >>> Request Venus when initializing VirGL. > >>>

Re: [PATCH v3 3/3] New I2C: Add support for TPM devices over I2C bus

2023-03-24 Thread Stefan Berger
On 3/24/23 04:24, Cédric Le Goater wrote: Hello Ninad, + +/* + * Convert little endian byte stream into local formated + * unsigned integer + */ +static inline uint32_t tpm_i2c_le_bytes_to_uint(TPMStateI2C *i2cst) +{ +    uint32_t data = 0; +    int  i; + +    assert(i2cst->offset <=

Re: [PATCH] Change the default for Mixed declarations.

2023-03-24 Thread Philippe Mathieu-Daudé
On 23/3/23 20:00, Daniel P. Berrangé wrote: On Tue, Feb 14, 2023 at 05:07:38PM +0100, Juan Quintela wrote: Hi I want to enter a discussion about changing the default of the style guide. There are several reasons for that: - they exist since C99 (i.e. all supported compilers support them) -

[PULL 1/8] hw/ide: replace TABs with space

2023-03-24 Thread Thomas Huth
From: Yeqi Fu Bring the block files in line with the QEMU coding style, with spaces for indentation. This patch partially resolves the issue 371. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371 Signed-off-by: Yeqi Fu Message-Id: <20230315043229.62100-1-fufuyqqq...@gmail.com>

[PATCH v9 4/5] virtio-blk: add some trace events for zoned emulation

2023-03-24 Thread Sam Li
Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- hw/block/trace-events | 7 +++ hw/block/virtio-blk.c | 12 2 files changed, 19 insertions(+) diff --git a/hw/block/trace-events b/hw/block/trace-events index 2c45a62bd5..34be8b9135 100644 --- a/hw/block/trace-events +++

Re: [PATCH for-8.1 v4 23/25] target/riscv: rework write_misa()

2023-03-24 Thread liweiwei
On 2023/3/23 06:20, Daniel Henrique Barboza wrote: write_misa() must use as much common logic as possible. We want to open code just the bits that are exclusive to the CSR write operation and TCG internals. Rewrite write_misa() to work as follows: - mask the write using misa_ext_mask to

Re: [PATCH v3 2/3] TPM TIS: Add support for TPM devices over I2C bus

2023-03-24 Thread Stefan Berger
On 3/23/23 23:02, Ninad Palsule wrote: 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

[PATCH for 8.0 2/4] igb: Fix DMA requester specification for Tx packet

2023-03-24 Thread Akihiko Odaki
igb used to specify the PF as DMA requester when reading Tx packets. This made Tx requests from VFs to be performed on the address space of the PF, defeating the purpose of SR-IOV. Add some logic to change the requester depending on the queue, which can be assigned to a VF. Fixes: 3a977deebe

Re: [PATCH v15 4/4] vhost-vdpa: Add support for vIOMMU.

2023-03-24 Thread Jason Wang
On Thu, Mar 23, 2023 at 4:41 PM Cindy Lu wrote: > > On Thu, Mar 23, 2023 at 11:47 AM Jason Wang wrote: > > > > On Tue, Mar 21, 2023 at 10:24 PM Cindy Lu wrote: > > > > > > 1. The vIOMMU support will make vDPA can work in IOMMU mode. This > > > will fix security issues while using the no-IOMMU

Re: [PATCH v4 06/10] migration: Introduce dirty-limit capability

2023-03-24 Thread Markus Armbruster
huang...@chinatelecom.cn writes: > From: Hyman Huang(黄勇) > > Introduce migration dirty-limit capability, which can > be turned on before live migration and limit dirty > page rate durty live migration. > > Introduce migrate_dirty_limit function to help check > if dirty-limit capability enabled

Re: [PATCH v4 00/10] migration: introduce dirtylimit capability

2023-03-24 Thread Hyman Huang
Ping again, to make sure this series not be forgotten. :) Please review the last three commit if you are free. Thanks, Yong 在 2023/3/1 23:53, Hyman Huang 写道: Ping ? 在 2023/2/17 0:18, huang...@chinatelecom.cn 写道: From: Hyman Huang(黄勇) v4: 1. Polish the docs and update the release version

Re: [PATCH 3/3] New I2C: Add support for TPM devices over I2C bus

2023-03-24 Thread Cédric Le Goater
On 3/23/23 23:32, Ninad Palsule wrote: On 3/23/23 3:37 AM, Cédric Le Goater wrote: On 3/23/23 04:01, Ninad Palsule wrote: 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

Re: [PATCH for-8.1 v4 15/25] target/riscv/cpu.c: split RVG code from validate_set_extensions()

2023-03-24 Thread liweiwei
On 2023/3/23 06:19, Daniel Henrique Barboza wrote: We can set all RVG related extensions during realize time, before validate_set_extensions() itself. Put it in a separated function so the validate function already uses the updated state. Note that we're setting both cfg->ext_N and

Re: [PATCH 3/6] target/ppc: Fix instruction loading endianness in alignment interrupt

2023-03-24 Thread Fabiano Rosas
Hi Nick, > powerpc ifetch endianness depends on MSR[LE] so it has to byteswap > after cpu_ldl_code(). This corrects DSISR bits in alignment > interrupts when running in little endian mode. > Just a thought, we have these tests that perhaps could have caught this:

[PATCH 1/4] target/riscv: Extract virt enabled state from tb flags

2023-03-24 Thread LIU Zhiwei
Virt enabled state is not a constant. So we should put it into tb flags. Thus we can use it like a constant condition at translation phase. Reported-by: Richard Henderson Signed-off-by: LIU Zhiwei --- target/riscv/cpu.h| 2 ++ target/riscv/cpu_helper.c | 2 ++

[PATCH 3/4] target/riscv: Encode the FS and VS on a normal way for tb flags

2023-03-24 Thread LIU Zhiwei
Reuse the MSTATUS_FS and MSTATUS_VS for the tb flags positions is not a normal way. It will make us change the tb flags layout difficult. And even worse, if we want to keep tb flags for a same extension togather without a hole. Signed-off-by: LIU Zhiwei --- target/riscv/cpu.h

[PATCH 2/4] target/riscv: Add a general status enum for extensions

2023-03-24 Thread LIU Zhiwei
The pointer masking is the only extension that directly use status. The vector or float extension uses the status in an indirect way. Replace the pointer masking extension special status fields with the general status. Signed-off-by: LIU Zhiwei --- target/riscv/cpu.c | 2 +-

[PATCH v18 5/8] config: add check to block layer

2023-03-24 Thread Sam Li
Putting zoned/non-zoned BlockDrivers on top of each other is not allowed. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Hannes Reinecke Reviewed-by: Dmitry Fomichev --- block.c | 19 +++ block/file-posix.c | 12

Re: [PATCH v3 3/3] New I2C: Add support for TPM devices over I2C bus

2023-03-24 Thread Stefan Berger
On 3/23/23 23:02, Ninad Palsule wrote: 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

[PATCH 2/8] target/riscv: Remove redundant check on RVH

2023-03-24 Thread Weiwei Li
Check on riscv_cpu_virt_enabled contains the check on RVH. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/op_helper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/riscv/op_helper.c b/target/riscv/op_helper.c index 84ee018f7d..1eecae9547

[PULL 4/8] target/ppc: Fix helper_pminsn() prototype

2023-03-24 Thread Thomas Huth
From: Cédric Le Goater GCC13 reports an error: ../target/ppc/excp_helper.c:2625:6: error: conflicting types for ‘helper_pminsn’ due to enum/integer mismatch; have ‘void(CPUPPCState *, powerpc_pm_insn_t)’ {aka ‘void(struct CPUArchState *, powerpc_pm_insn_t)’} [-Werror=enum-int-mismatch] 2625

[PATCH for 8.0 0/4] igb fixes for 8.0

2023-03-24 Thread Akihiko Odaki
This series have several fixes igb for 8.0 release. Akihiko Odaki (4): igb: Save more Tx states igb: Fix DMA requester specification for Tx packet hw/net/net_tx_pkt: Ignore ECN bit hw/net/net_tx_pkt: Align l3_hdr hw/net/e1000e_core.c | 6 ++--- hw/net/igb.c | 26

[PATCH v18 1/8] include: add zoned device structs

2023-03-24 Thread Sam Li
Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Dmitry Fomichev --- include/block/block-common.h | 43 1 file changed, 43 insertions(+) diff --git a/include/block/block-common.h

[PATCH 4/4] target/riscv: Add a tb flags field for vstart

2023-03-24 Thread LIU Zhiwei
Once we mistook the vstart directly from the env->vstart. As env->vstart is not a constant, we should record it in the tb flags if we want to use it in translation. Reported-by: Richard Henderson Signed-off-by: LIU Zhiwei --- target/riscv/cpu.h | 21 +++--

[PATCH v9 1/5] include: update virtio_blk headers to v6.3-rc1

2023-03-24 Thread Sam Li
Use scripts/update-linux-headers.sh to update headers to 6.3-rc1. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Dmitry Fomichev --- include/standard-headers/drm/drm_fourcc.h| 12 +++ include/standard-headers/linux/ethtool.h | 48 -

  1   2   >