Re: FreeBSD update required for CI?

2024-07-15 Thread Li-Wen Hsu
Oh yes, the default python version has been changed to 3.11 so the `py39-` prefix of the package name should be also changed to `py311-` Where are those packages name listed? I can check if it is possible to change to use some more deterministic names. Best, Li-Wen

Re: [PATCH] char-mux: Don't overwrite the receive buffer

2024-07-09 Thread Ruihan Li
Hi, On Tue, Jul 09, 2024 at 06:58:41PM GMT, Marc-André Lureau wrote: > Hi > > On Tue, Jul 9, 2024 at 6:41 PM Ruihan Li wrote: > > > Hi, > > > > On Mon, Jul 08, 2024 at 03:21:58PM GMT, Marc-André Lureau wrote: > > > Hi > > > > &

Re: [PATCH] char-mux: Don't overwrite the receive buffer

2024-07-09 Thread Ruihan Li
Hi, On Mon, Jul 08, 2024 at 03:21:58PM GMT, Marc-André Lureau wrote: > Hi > > On Mon, Jul 8, 2024 at 12:12 AM Ruihan Li wrote: > > > Hi, > > > > Thanks for your quick review! > > > > On Sun, Jul 07, 2024 at 08:28:50PM GMT, Marc-André Lureau wrote: >

Re: [PATCH] char-mux: Don't overwrite the receive buffer

2024-07-07 Thread Ruihan Li
Hi, Thanks for your quick review! On Sun, Jul 07, 2024 at 08:28:50PM GMT, Marc-André Lureau wrote: > Hi > > On Sun, Jul 7, 2024 at 3:26 PM Ruihan Li wrote: > > > This commit fixes a bug that causes incorrect results when pasting more > > than 32 bytes, the size of the

[PATCH v1 1/1] target/i386: Add VMX entry load FRED control name to VMX feature words

2024-07-07 Thread Xin Li (Intel)
As VMX entry load FRED control is required to enable FRED in nested VMX, add it to VMX feature words. Signed-off-by: Xin Li (Intel) --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index c05765eeaf..84a09c19cf 100644

[PATCH] char-mux: Don't overwrite the receive buffer

2024-07-07 Thread Ruihan Li
r_read also passes the data to the backend one byte at a time. Signed-off-by: Ruihan Li --- chardev/char-mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chardev/char-mux.c b/chardev/char-mux.c index ee2d47b..5c6eea2 100644 --- a/chardev/char-mux.c +++ b/chardev/char-mux.c @@

RE: [PATCH v3 4/6] target/i386: add support for VMX FRED controls

2024-07-06 Thread Li, Xin3
On 7/6/2024 9:23 AM, Paolo Bonzini wrote: > > > Il sab 6 lug 2024, 17:57 Li, Xin3 <mailto:xin3...@intel.com>> ha scritto: > > >> The bits in the secondary vmexit controls are not supported, and > in general the same > >> is true for the s

RE: [PATCH v3 4/6] target/i386: add support for VMX FRED controls

2024-07-06 Thread Li, Xin3
>> The bits in the secondary vmexit controls are not supported, and in general >> the same >> is true for the secondary vmexit case. I think it's better to not include >> the vmx-entry- >> load-fred bit either, and only do the vmxcap changes. > Right, we don't need it at all. Hi Paolo, We

Re: [PATCH] hw/cxl/cxl-host: Fix guest crash when getting cxl-fmw property

2024-07-04 Thread Zhijian Li (Fujitsu)
xl-host: Fix segmentation fault when getting cxl-fmw property Otherwise, Reviewed-by: Li Zhijian > (QEMU) qom-get path=machine property=cxl-fmw > > This issue is caused by accessing wrong callback (opaque) type in > machine_get_cfmw(). > > cxl_machine_init() sets the callback

Re: [PATCH 1/3] hw/cxl: Get rid of unused cfmw_list

2024-07-04 Thread Zhijian Li (Fujitsu)
o stable QEMU. Your fix[0] requires CXLState.cfmw_list, and I think CXLState.cfmw_list was designed for *get* purpose but got mistake at that time. [0] https://lore.kernel.org/qemu-devel/20240704093404.1848132-1-zhao1@linux.intel.com/ > >> On 02/07/2024 22:34, Jonathan Cameron wrot

Re: [PATCH 1/3] hw/cxl: Get rid of unused cfmw_list

2024-07-04 Thread Zhijian Li (Fujitsu)
Jonathan, There is a new user for cfmw_list now https://lore.kernel.org/qemu-devel/20240704093404.1848132-1-zhao1@linux.intel.com/ So I think we should drop this patch. On 02/07/2024 22:34, Jonathan Cameron wrote: > From: Li Zhijian > > There is no user for this member. Al

[PATCH] i386/cpu: Drop the check of phys_bits in host_cpu_realizefn()

2024-07-04 Thread Xiaoyao Li
off-by: Xiaoyao Li --- target/i386/host-cpu.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/target/i386/host-cpu.c b/target/i386/host-cpu.c index 8b8bf5afeccf..b109c1a2221f 100644 --- a/target/i386/host-cpu.c +++ b/target/i386/host-cpu.c @@ -75,17 +75,7 @@ b

Re: [PATCH] intel-iommu: fix Read DMAR IQA REG DW

2024-07-04 Thread Yee Li
Sorry, the patch missing "(( ))" Replace "& VTD_IQA_QS" with "& (VTD_IQA_QS | VTD_IQA_DW_MASK))" is correct. Revised patch as follows, Signed-off-by: yeeli --- hw/i386/intel_iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu.c

Re: [PATCH v4 20/31] i386/sev: Add support for SNP CPUID validation

2024-07-03 Thread Xiaoyao Li
On 7/4/2024 8:34 AM, Michael Roth wrote: On Tue, Jul 02, 2024 at 11:07:18AM +0800, Xiaoyao Li wrote: On 5/30/2024 7:16 PM, Pankaj Gupta wrote: From: Michael Roth SEV-SNP firmware allows a special guest page to be populated with a table of guest CPUID values so that they can be validated

Re: [PATCH 4/4] target/i386: Update CMPLegacy handling for Zhaoxin and VIA CPUs

2024-07-03 Thread Xiaoyao Li
On 7/4/2024 11:14 AM, Ewan Hai wrote: On 7/3/24 10:49, Xiaoyao Li wrote: On 6/25/2024 5:19 PM, EwanHai wrote: Zhaoxin and VIA CPUs handle the CMPLegacy bit in the same way as Intel CPUs. This patch simplifies the existing logic by using the IS_XXX_CPU macro and includes checks for Zhaoxin

Re: [PATCH 4/4] target/i386: Update CMPLegacy handling for Zhaoxin and VIA CPUs

2024-07-03 Thread Xiaoyao Li
On 6/25/2024 5:19 PM, EwanHai wrote: Zhaoxin and VIA CPUs handle the CMPLegacy bit in the same way as Intel CPUs. This patch simplifies the existing logic by using the IS_XXX_CPU macro and includes checks for Zhaoxin and VIA vendors to align their behavior with Intel. Signed-off-by: EwanHai

[PATCH v1 1/1] target/i386: Delete a duplicated macro definition CR4_FRED_MASK

2024-07-02 Thread Xin Li (Intel)
Macro CR4_FRED_MASK is defined twice due to a merge incident, delete one. Signed-off-by: Xin Li (Intel) --- target/i386/cpu.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 29daf37048..b73685a745 100644 --- a/target/i386/cpu.h +++ b/target

Re: [PATCH v4 20/31] i386/sev: Add support for SNP CPUID validation

2024-07-01 Thread Xiaoyao Li
On 5/30/2024 7:16 PM, Pankaj Gupta wrote: From: Michael Roth SEV-SNP firmware allows a special guest page to be populated with a table of guest CPUID values so that they can be validated through firmware before being loaded into encrypted guest memory where they can be used in place of

[PATCH] target/riscv: Validate the mode in write_vstvec

2024-06-30 Thread Jiayi Li
Base on the riscv-privileged spec, vstvec substitutes for the usual stvec. Therefore, the encoding of the MODE should also be restricted to 0 and 1. Signed-off-by: Jiayi Li --- target/riscv/csr.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/riscv/csr.c b

Re: [PATCH 2/2] target/i386: drop AMD machine check bits from Intel CPUID

2024-06-28 Thread Xiaoyao Li
on vendor in kvm_arch_get_supported_cpuid() is better than in x86_cpu_get_supported_feature_word(). Otherwise kvm_arch_get_supported_cpuid() still returns "risky" value for Intel VMs. Suggested-by: Xiaoyao Li Cc: John Allen Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 16 +

Re: [PATCH 1/2] target/i386: pass X86CPU to x86_cpu_get_supported_feature_word

2024-06-28 Thread Xiaoyao Li
D, and bits from AMD should be dropped when configuring the guest for an Intel model. Cc: Xiaoyao Li Cc: John Allen Signed-off-by: Paolo Bonzini --- target/i386/cpu.h | 3 +-- target/i386/cpu.c | 13 ++--- target/i386/kvm/kvm-cpu.c | 2 +- 3 files changed, 8 inserti

Re: [PATCH v5 25/65] i386/tdx: Add property sept-ve-disable for tdx-guest object

2024-06-26 Thread Xiaoyao Li
On 6/24/2024 11:01 PM, Daniel P. Berrangé wrote: On Fri, Jun 14, 2024 at 08:49:57AM +0100, Daniel P. Berrangé wrote: On Fri, Jun 14, 2024 at 09:04:33AM +0800, Xiaoyao Li wrote: On 6/13/2024 4:35 PM, Duan, Zhenzhong wrote: -Original Message- From: Li, Xiaoyao Subject: Re: [PATCH v5

[PATCH] hw/loongarch: Modify flash block size to 256K

2024-06-23 Thread Xianglai Li
loongarch added a common library for edk2 to parse flash base addresses through fdt. For compatibility with other architectures, the flash block size in qemu is now changed to 256k. Signed-off-by: Xianglai Li --- Cc: Bibo Mao Cc: Song Gao include/hw/loongarch/virt.h | 2 +- 1 file changed, 1

[PATCH] hw/loongarch: Change the tpm support by default

2024-06-23 Thread Xianglai Li
Add devices that support tpm by default, Fixed incomplete tpm acpi table information. Signed-off-by: Xianglai Li --- Cc: Bibo Mao Cc: Paolo Bonzini Cc: Song Gao hw/loongarch/Kconfig | 1 + hw/loongarch/acpi-build.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/hw/loongarch

Re: [PATCH] migration: Remove unused VMSTATE_ARRAY_TEST() macro

2024-06-21 Thread Zhijian Li (Fujitsu)
On 21/06/2024 15:03, Philippe Mathieu-Daudé wrote: > Last use of VMSTATE_ARRAY_TEST() was removed in commit 46baa9007f > ("migration/i386: Remove old non-softfloat 64bit FP support"), we > can safely get rid of it. > > Signed-off-by: Philippe Mathieu-Daudé

Re: [PATCH v2 02/10] migration: Rename thread debug names

2024-06-18 Thread Zhijian Li (Fujitsu)
recv}_%d". > > We used to have "live_migration" thread for a very long time, now it's > called "mig/src/main". We may hope to have "mig/dst/main" soon but not > yet. > > Reviewed-by: Fabiano Rosas > Signed-off-by: Peter Xu R

Re: [PATCH v4 28/31] hw/i386: Add support for loading BIOS using guest_memfd

2024-06-14 Thread Xiaoyao Li
On 6/14/2024 4:48 PM, Gupta, Pankaj wrote: On 6/14/2024 10:34 AM, Xiaoyao Li wrote: On 5/30/2024 7:16 PM, Pankaj Gupta wrote: From: Michael Roth When guest_memfd is enabled, the BIOS is generally part of the initial encrypted guest image and will be accessed as private guest memory. Add

Re: [PATCH v4 27/31] hw/i386/sev: Use guest_memfd for legacy ROMs

2024-06-14 Thread Xiaoyao Li
On 5/30/2024 7:16 PM, Pankaj Gupta wrote: From: Michael Roth Current SNP guest kernels will attempt to access these regions with with C-bit set, so guest_memfd is needed to handle that. Otherwise, kvm_convert_memory() will fail when the guest kernel tries to access it and QEMU attempts to call

Re: [PATCH v4 28/31] hw/i386: Add support for loading BIOS using guest_memfd

2024-06-14 Thread Xiaoyao Li
On 5/30/2024 7:16 PM, Pankaj Gupta wrote: From: Michael Roth When guest_memfd is enabled, the BIOS is generally part of the initial encrypted guest image and will be accessed as private guest memory. Add the necessary changes to set up the associated RAM region with a guest_memfd backend to

Re: [PATCH v5 25/65] i386/tdx: Add property sept-ve-disable for tdx-guest object

2024-06-13 Thread Xiaoyao Li
On 6/13/2024 4:35 PM, Duan, Zhenzhong wrote: -Original Message- From: Li, Xiaoyao Subject: Re: [PATCH v5 25/65] i386/tdx: Add property sept-ve-disable for tdx-guest object On 6/6/2024 6:45 PM, Daniel P. Berrangé wrote: Copying Zhenzhong Duan as my point relates to the proposed

Re: [PATCH v5 17/65] i386/tdx: Adjust the supported CPUID based on TDX restrictions

2024-06-13 Thread Xiaoyao Li
On 6/13/2024 4:26 PM, Duan, Zhenzhong wrote: + * + * It also has side effect to enable unsupported bits, e.g., the + * bits of "fixed0" type while present natively. It's safe because + * the unsupported bits will be masked off by .fixed0 later. + */ +    *ret |=

Re: [PULL 39/42] i386: Add support for SUCCOR feature

2024-06-13 Thread Xiaoyao Li
On 6/8/2024 4:34 PM, Paolo Bonzini wrote: From: John Allen Add cpuid bit definition for the SUCCOR feature. This cpuid bit is required to be exposed to guests to allow them to handle machine check exceptions on AMD hosts. v2: - Add "succor" feature word. - Add case to

Re: [PATCH v5 18/65] i386/tdx: Make Intel-PT unsupported for TD guest

2024-06-12 Thread Xiaoyao Li
On 5/31/2024 5:27 PM, Duan, Zhenzhong wrote: On 2/29/2024 2:36 PM, Xiaoyao Li wrote: Due to the fact that Intel-PT virtualization support has been broken in QEMU since Sapphire Rapids generation[1], below warning is triggered when luanching TD guest:    warning: host doesn't support requested

Re: [PATCH v5 17/65] i386/tdx: Adjust the supported CPUID based on TDX restrictions

2024-06-12 Thread Xiaoyao Li
On 5/31/2024 4:47 PM, Duan, Zhenzhong wrote: On 2/29/2024 2:36 PM, Xiaoyao Li wrote: According to Chapter "CPUID Virtualization" in TDX module spec, CPUID bits of TD can be classified into 6 types: 1 | As

Re: [PATCH v5 25/65] i386/tdx: Add property sept-ve-disable for tdx-guest object

2024-06-12 Thread Xiaoyao Li
On 6/6/2024 6:45 PM, Daniel P. Berrangé wrote: Copying Zhenzhong Duan as my point relates to the proposed libvirt TDX patches. On Thu, Feb 29, 2024 at 01:36:46AM -0500, Xiaoyao Li wrote: Bit 28 of TD attribute, named SEPT_VE_DISABLE. When set to 1, it disables EPT violation conversion to #VE

RE: [PATCH v3 4/6] target/i386: add support for VMX FRED controls

2024-06-07 Thread Li, Xin3
> The bits in the secondary vmexit controls are not supported, and in general > the same > is true for the secondary vmexit case. I think it's better to not include > the vmx-entry- > load-fred bit either, and only do the vmxcap changes. Right, we don't need it at all. > > Also, in patch 1

Re: [PATCH] i386/apic: Add hint on boot failure because of disabling x2APIC

2024-06-07 Thread Xiaoyao Li
On 6/7/2024 3:46 PM, Zhao Liu wrote: Hi Philippe, On Fri, Jun 07, 2024 at 08:17:36AM +0200, Philippe Mathieu-Daudé wrote: Date: Fri, 7 Jun 2024 08:17:36 +0200 From: Philippe Mathieu-Daudé Subject: Re: [PATCH] i386/apic: Add hint on boot failure because of disabling x2APIC On 6/6/24 16:08,

Re: [PATCH 0/6] refactor RDMA live migration based on rsocket API

2024-06-06 Thread Zhijian Li (Fujitsu)
On 06/06/2024 19:31, Leon Romanovsky wrote: > On Wed, Jun 05, 2024 at 10:00:24AM +, Gonglei (Arei) wrote: >> >> >>> -Original Message- >>> From: Michael S. Tsirkin [mailto:m...@redhat.com] >>> Sent: Wednesday, June 5, 2024 3:57 PM >>> To: Gonglei (Arei) >>> Cc:

Re: [PATCH] target/i386: SEV: do not assume machine->cgs is SEV

2024-06-06 Thread Xiaoyao Li
On 6/6/2024 6:44 AM, Paolo Bonzini wrote: There can be other confidential computing classes that are not derived from sev-common. Avoid aborting when encountering them. I hit it today when rebasing TDX patches to latest QEMU master, which has the SEV-SNP series merged. (I didn't get time to

Re: [PATCH] cxl: Get rid of unused cfmw_list

2024-06-05 Thread Zhijian Li (Fujitsu)
On 05/06/2024 20:02, Jonathan Cameron wrote: > On Fri, 31 May 2024 14:13:17 +0800 > Li Zhijian wrote: > >> There is no user for this member. All '-M cxl-fmw.N' options have >> been parsed and saved to CXLState.fixed_windows. >> >> Signed-off-by: Li Zhijian &g

Re: [PATCH V3 2/2] target/i386: Advertise MWAIT iff host supports

2024-06-04 Thread Xiaoyao Li
tch merges host_cpu_enable_cpu_pm() into kvm_cpu_realizefn(). Fixes: f5cc5a5c1686 ("i386: split cpu accelerators from cpu.c, using AccelCPUClass") Fixes: 662175b91ff2 ("i386: reorder call to cpu_exec_realizefn") Signed-off-by: Zide Chen Reviewed-by: Xiaoyao Li --- V3: - don't set CPUID_EX

Re: [PATCH v2] i386/cpu: fixup number of addressable IDs for processor cores in the physical package

2024-06-04 Thread Xiaoyao Li
On 6/4/2024 5:43 PM, Zhao Liu wrote: Hi Chuang, On Mon, Jun 03, 2024 at 04:36:41PM +0800, Chuang Xu wrote: Date: Mon, 3 Jun 2024 16:36:41 +0800 From: Chuang Xu Subject: [PATCH v2] i386/cpu: fixup number of addressable IDs for processor cores in the physical package X-Mailer: git-send-email

[PATCH] cxl: Get rid of unused cfmw_list

2024-05-31 Thread Li Zhijian via
There is no user for this member. All '-M cxl-fmw.N' options have been parsed and saved to CXLState.fixed_windows. Signed-off-by: Li Zhijian --- hw/cxl/cxl-host.c| 1 - include/hw/cxl/cxl.h | 1 - 2 files changed, 2 deletions(-) diff --git a/hw/cxl/cxl-host.c b/hw/cxl/cxl-host.c index

Re: [PATCH v8 06/14] hw/mem/cxl_type3: Add support to create DC regions to type3 memory devices

2024-05-27 Thread Zhijian Li (Fujitsu)
/bus/cxl/drivers/cxl_region/bind > > Reviewed-by: Gregory Price > Reviewed-by: Jonathan Cameron > Signed-off-by: Fan Ni Reviewed-by: Li Zhijian

[PATCH] dump: use 10 base for phys_base

2024-05-23 Thread Zhibin Li
>From vmcoreinfo 'phys_base' is a decimal instead a hexadecimal so use base of 10 instead of 16 when converting this string. Signed-off-by: Zhibin Li --- Hi everyone. I'm trying to use 'dump-guest-memory' QMP command to generate a kdump-compressed vmcore file which can be consu

Re: [PATCH v7 00/12] Enabling DCD emulation support in Qemu

2024-05-16 Thread Zhijian Li (Fujitsu)
] RBP: 7ffebec70bd0 R08: R09: 7ffebec70640 [ 127.000879] R10: R11: 0246 R12: 00403840 [ 127.003572] R13: R14: R15: [ 127.005543] Thanks Zhijian On 17/05/2024 01:12, fan wrote: > On Tue

[PATCH v2 3/3] migration/colo: Tidy up bql_unlock() around bdrv_activate_all()

2024-05-15 Thread Li Zhijian via
Make the code more tight. Suggested-by: Michael Tokarev Reviewed-by: Peter Xu Reviewed-by: Zhang Chen Signed-off-by: Li Zhijian --- V2: Collected reviewed-by tags This change/comment suggested by "Michael Tokarev " came a bit late at that time, let's update it together in these

[PATCH v2 2/3] migration/colo: make colo_incoming_co() return void

2024-05-15 Thread Li Zhijian via
Rosas Reviewed-by: Peter Xu Reviewed-by: Zhang Chen Signed-off-by: Li Zhijian --- V2: Fix compilation failed, reported by Fabiano Rosas Collected reviewed-by tags --- include/migration/colo.h | 2 +- migration/colo-stubs.c | 3 +-- migration/colo.c | 9 ++--- migration

[PATCH v2 1/3] migration/colo: Minor fix for colo error message

2024-05-15 Thread Li Zhijian via
- Explicitly show the missing module name: replication - Fix capability name to x-colo Reviewed-by: Peter Xu Reviewed-by: Zhang Chen Signed-off-by: Li Zhijian --- V2: Collected reviewed-by tags --- migration/migration.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [PATCH 2/3] migration/colo: make colo_incoming_co() return void

2024-05-15 Thread Zhijian Li (Fujitsu)
On 16/05/2024 03:04, Fabiano Rosas wrote: > Li Zhijian via writes: > >> Currently, it always returns 0, no need to check the return value at all. >> In addition, enter colo coroutine only if migration_incoming_colo_enabled() >> is true. >> Once the destinati

[PATCH v4 1/2] Revert "vhost-user: fix lost reconnect"

2024-05-15 Thread Li Feng
ing in subsequent reconnection not being executed. The next patch will completely fix this issue with a better approach. Signed-off-by: Li Feng --- hw/block/vhost-user-blk.c | 2 +- hw/scsi/vhost-user-scsi.c | 3 +-- hw/virtio/vhost-user-base.c| 2 +- hw/virtio/vhost-use

[PATCH v4 2/2] vhost-user: fix lost reconnect again

2024-05-15 Thread Li Feng
his issue, including vhost-user-blk/scsi. Fixes: 71e076a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling") Signed-off-by: Li Feng --- hw/block/vhost-user-blk.c | 3 ++- hw/scsi/vhost-user-scsi.c | 3 ++- hw/virtio/vhost-user-base.c | 3 ++- hw/virtio/vhost-user.c | 10

Re: [PATCH 2/2] tests: add testing of parameter=1 for SMP topology

2024-05-15 Thread Xiaoyao Li
On 5/13/2024 8:33 PM, Daniel P. Berrangé wrote: Validate that it is possible to pass 'parameter=1' for any SMP topology parameter, since unsupported parameters are implicitly considered to always have a value of 1. Signed-off-by: Daniel P. Berrangé --- tests/unit/test-smp-parse.c | 8

Re: [PATCH v3 2/2] vhost-user: fix lost reconnect again

2024-05-15 Thread Li Feng
> 2024年5月15日 23:47,Raphael Norwitz 写道: > > The case your describing makes sense but now I have some concerns on > the vhost_dev_cleanup bit. > > On Wed, May 15, 2024 at 1:47 AM Li Feng <mailto:fen...@smartx.com>> wrote: >> >> >> >>&g

Re: [PATCH v3 2/2] vhost-user: fix lost reconnect again

2024-05-14 Thread Li Feng
> 2024年5月14日 21:58,Raphael Norwitz 写道: > > Code looks good. Just a question on the error case you're trying to fix. > > On Tue, May 14, 2024 at 2:12 AM Li Feng wrote: >> >> When the vhost-user is reconnecting to the backend, and if the vhost-user >

Re: [PATCH v3 1/2] Revert "vhost-user: fix lost reconnect"

2024-05-14 Thread Li Feng
> 2024年5月14日 21:58,Raphael Norwitz 写道: > > The code for these two patches looks fine. Just some questions on the > failure case you're trying to fix. > > > On Tue, May 14, 2024 at 2:12 AM Li Feng wrote: >> >> This reverts commit f02a4b8e6431598612466

Re: [PATCH v7 06/12] hw/mem/cxl_type3: Add host backend and address space handling for DC regions

2024-05-14 Thread Zhijian Li (Fujitsu)
On 19/04/2024 07:10, nifan@gmail.com wrote: > +uint64_t dc_size; > + > +mr = host_memory_backend_get_memory(ct3d->dc.host_dc); > +dc_size = memory_region_size(mr); > +region_len = DIV_ROUND_UP(dc_size, ct3d->dc.num_regions); > + > +if (dc_size % (ct3d->dc.num_regions *

Re: [PATCH v7 04/12] hw/mem/cxl_type3: Add support to create DC regions to type3 memory devices

2024-05-14 Thread Zhijian Li (Fujitsu)
On 19/04/2024 07:10, nifan@gmail.com wrote: > From: Fan Ni > > +} > + > static bool cxl_setup_memory(CXLType3Dev *ct3d, Error **errp) > { > DeviceState *ds = DEVICE(ct3d); > @@ -635,6 +676,13 @@ static bool cxl_setup_memory(CXLType3Dev *ct3d, Error > **errp) >

[PATCH v3 1/2] Revert "vhost-user: fix lost reconnect"

2024-05-14 Thread Li Feng
ing in subsequent reconnection not being executed. The next patch will completely fix this issue with a better approach. Signed-off-by: Li Feng --- hw/block/vhost-user-blk.c | 2 +- hw/scsi/vhost-user-scsi.c | 3 +-- hw/virtio/vhost-user-base.c| 2 +- hw/virtio/vhost-use

[PATCH v3 2/2] vhost-user: fix lost reconnect again

2024-05-14 Thread Li Feng
false. At this time, the event handler will be cleared. We need to ensure that the event handler can remain installed. All vhost-user devices have this issue, including vhost-user-blk/scsi. Fixes: 71e076a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling") Signed-off-by: Li Feng --- hw/

Re: [PATCH v7 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-05-13 Thread Zhijian Li (Fujitsu)
On 19/04/2024 07:11, nifan@gmail.com wrote: > +} else if (type == DC_EVENT_ADD_CAPACITY) { > +if (cxl_extents_overlaps_dpa_range(>dc.extents, dpa, len)) { > +error_setg(errp, > + "cannot add DPA already accessible to the same >

Re: [PATCH v7 00/12] Enabling DCD emulation support in Qemu

2024-05-13 Thread Zhijian Li (Fujitsu)
Hi Fan Do you have a newer instruction to play with the DCD. It seems that the instruction in RFC[0] doesn't work for current code. [0] https://lore.kernel.org/all/20230511175609.2091136-1-fan...@samsung.com/ On 19/04/2024 07:10, nifan@gmail.com wrote: > A git tree of this series can be

[PATCH v2 1/2] Revert "vhost-user: fix lost reconnect"

2024-05-13 Thread Li Feng
This reverts commit f02a4b8e6431598612466f76aac64ab492849abf. Signed-off-by: Li Feng --- hw/block/vhost-user-blk.c | 2 +- hw/scsi/vhost-user-scsi.c | 3 +-- hw/virtio/vhost-user-base.c| 2 +- hw/virtio/vhost-user.c | 10 ++ include/hw/virtio/vhost-user.h | 3

[PATCH v2 2/2] vhost-user: fix lost reconnect again

2024-05-13 Thread Li Feng
false. At this time, the event handler will be cleared. We need to ensure that the event handler can remain installed. All vhost-user devices have this issue, including vhost-user-blk/scsi. Fixes: 71e076a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling") Signed-off-by: Li Feng --- hw/

[PATCH 2/3] migration/colo: make colo_incoming_co() return void

2024-05-08 Thread Li Zhijian via
-by: Li Zhijian --- migration/colo.c | 9 ++--- migration/migration.c | 6 +++--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/migration/colo.c b/migration/colo.c index 5600a43d78..991806c06a 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -929,16 +929,13 @@ out

[PATCH 3/3] migration/colo: Tidy up bql_unlock() around bdrv_activate_all()

2024-05-08 Thread Li Zhijian via
Make the code more tight. Cc: Michael Tokarev Signed-off-by: Li Zhijian --- This change/comment suggested by "Michael Tokarev " came a bit late at that time, let's update it together in these minor set this time. --- migration/colo.c | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH 1/3] migration/colo: Minor fix for colo error message

2024-05-08 Thread Li Zhijian via
- Explicitly show the missing module name: replication - Fix capability name to x-colo Signed-off-by: Li Zhijian --- migration/migration.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 6502e169a3..b4a09c561c 100644

Re: [PATCH] qemu-io: add cvtnum() error handling for zone commands

2024-05-07 Thread Sam Li
not be represented. > > Reported-by: Peter Maydell > Cc: Sam Li > Signed-off-by: Stefan Hajnoczi > --- > qemu-io-cmds.c | 48 +++- > 1 file changed, 47 insertions(+), 1 deletion(-) Reviewed-by: Sam Li Hi Stefan, Thank you for fixing th

Re: [PATCH v3 1/1] accel/kvm: Fix segmentation fault

2024-05-06 Thread Zhijian Li (Fujitsu)
a null check for kvm_status to prevent segmentation faults. > > Signed-off-by: Masato Imai LGTM, Tested-by: Li Zhijian > --- > accel/kvm/kvm-all.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c >

Re: [PATCH 6/6] target/i386/confidential-guest: Fix comment of x86_confidential_guest_kvm_type()

2024-04-26 Thread Xiaoyao Li
On 4/26/2024 6:07 PM, Zhao Liu wrote: Update the comment to match the X86ConfidentialGuestClass implementation. Suggested-by: Xiaoyao Li I think it should be "Reported-by" Signed-off-by: Zhao Liu --- target/i386/confidential-guest.h | 2 +- 1 file changed, 1 insertion(+),

[PATCH 2/2] vhost-user: fix lost reconnect again

2024-04-26 Thread Li Feng
Fixes: 71e076a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling") Signed-off-by: Li Feng --- hw/virtio/vhost-user.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index c929097e87..c407ea8939 100644 --- a/hw/vir

[PATCH 1/2] Revert "vhost-user: fix lost reconnect"

2024-04-26 Thread Li Feng
This reverts commit f02a4b8e6431598612466f76aac64ab492849abf. Signed-off-by: Li Feng --- hw/block/vhost-user-blk.c | 2 +- hw/scsi/vhost-user-scsi.c | 3 +-- hw/virtio/vhost-user-base.c| 2 +- hw/virtio/vhost-user.c | 10 ++ include/hw/virtio/vhost-user.h | 3

[PATCH 0/2] Fixed the problem of vhost-user reconnection

2024-04-26 Thread Li Feng
Previous discussion here: https://lore.kernel.org/all/f86d6159-5610-476c-a69e-cd3a717f9...@nvidia.com/ The merged version cannot fully cover all possible scenarios. Here we revert the previous fixes and then use new methods to fix them. Li Feng (2): Revert "vhost-user: fix lost reco

Re: [PATCH v2] hw/mem/cxl_type3: reset dvsecs in ct3d_reset()

2024-04-25 Thread Zhijian Li (Fujitsu)
ping On 11/04/2024 18:18, Jonathan Cameron wrote: > On Tue, 9 Apr 2024 15:58:46 +0800 > Li Zhijian wrote: > >> After the kernel commit >> 0cab68720598 ("cxl/pci: Fix disabling memory if DVSEC CXL Range does not >> match a CFMWS window") >> CXL

Re: [PATCH for-9.1 0/7] target/i386/kvm: Cleanup the kvmclock feature name

2024-04-25 Thread Xiaoyao Li
On 4/25/2024 6:29 PM, Zhao Liu wrote: On Thu, Apr 25, 2024 at 04:40:10PM +0800, Xiaoyao Li wrote: Date: Thu, 25 Apr 2024 16:40:10 +0800 From: Xiaoyao Li Subject: Re: [PATCH for-9.1 0/7] target/i386/kvm: Cleanup the kvmclock feature name On 4/25/2024 3:17 PM, Zhao Liu wrote: Hi Xiaoyao

Re: [PATCH for-9.1 0/7] target/i386/kvm: Cleanup the kvmclock feature name

2024-04-25 Thread Xiaoyao Li
On 4/25/2024 3:17 PM, Zhao Liu wrote: Hi Xiaoyao, On Wed, Apr 24, 2024 at 11:57:11PM +0800, Xiaoyao Li wrote: Date: Wed, 24 Apr 2024 23:57:11 +0800 From: Xiaoyao Li Subject: Re: [PATCH for-9.1 0/7] target/i386/kvm: Cleanup the kvmclock feature name On 3/29/2024 6:19 PM, Zhao Liu wrote

Re: [PATCH for-9.1 0/7] target/i386/kvm: Cleanup the kvmclock feature name

2024-04-24 Thread Xiaoyao Li
On 3/29/2024 6:19 PM, Zhao Liu wrote: From: Zhao Liu Hi list, This series is based on Paolo's guest_phys_bits patchset [1]. Currently, the old and new kvmclocks have the same feature name "kvmclock" in FeatureWordInfo[FEAT_KVM]. When I tried to dig into the history of this unusual naming

Re: [PATCH for-9.1 2/7] target/i386/kvm: Remove local MSR_KVM_WALL_CLOCK and MSR_KVM_SYSTEM_TIME definitions

2024-04-24 Thread Xiaoyao Li
On 3/29/2024 6:19 PM, Zhao Liu wrote: From: Zhao Liu These 2 MSRs have been already defined in the kvm_para header (standard-headers/asm-x86/kvm_para.h). Remove QEMU local definitions to avoid duplication. Signed-off-by: Zhao Liu Reviewed-by: Xiaoyao Li --- target/i386/kvm/kvm.c | 3

Re: [PATCH for-9.1 1/7] target/i386/kvm: Add feature bit definitions for KVM CPUID

2024-04-24 Thread Xiaoyao Li
On 3/29/2024 6:19 PM, Zhao Liu wrote: From: Zhao Liu Add feature definiations for KVM_CPUID_FEATURES in CPUID ( CPUID[4000_0001].EAX and CPUID[4000_0001].EDX), to get rid of lots of offset calculations. Signed-off-by: Zhao Liu --- hw/i386/kvm/clock.c | 5 ++--- target/i386/cpu.h |

Re: [PULL 43/63] target/i386: Implement mc->kvm_type() to get VM type

2024-04-24 Thread Xiaoyao Li
On 4/23/2024 11:09 PM, Paolo Bonzini wrote: + +/** + * x86_confidential_guest_kvm_type: + * + * Calls #X86ConfidentialGuestClass.unplug callback of @plug_handler. the comment needs to be updated: Calls #X86ConfidentialGuestClass.kvm_type() callback + */ +static inline int

Re: [PATCH v2 1/1] migration/dirtyrate: Fix segmentation fault

2024-04-24 Thread Zhijian Li (Fujitsu)
On 24/04/2024 12:52, mii wrote: > > On 2024/04/24 10:28, Yong Huang wrote: >> >> >> On Tue, Apr 23, 2024 at 9:35 PM Peter Xu wrote: >> >> On Tue, Apr 23, 2024 at 09:13:08AM +, Masato Imai wrote: >> > When the KVM acceleration parameter is not set, executing >> calc_dirty_rate >>

Re: [PULL 25/63] i386/kvm: Move architectural CPUID leaf generation to separate helper

2024-04-23 Thread Xiaoyao Li
this is just a cleanup, so keep the function static. Signed-off-by: Sean Christopherson Signed-off-by: Xiaoyao Li Message-ID: <20240229063726.610065-23-xiaoyao...@intel.com> Reviewed-by: Xiaoyao Li Signed-off-by: Paolo Bonzini --- target/i386/kvm/kvm.c

[PATCH] backends/cryptodev-builtin: Fix local_error leaks

2024-04-22 Thread Li Zhijian via
It seems that this error does not need to be propagated to the upper, directly output the error to avoid the leaks Closes: https://gitlab.com/qemu-project/qemu/-/issues/2283 Signed-off-by: Li Zhijian --- backends/cryptodev-builtin.c | 9 + 1 file changed, 5 insertions(+), 4 deletions

Re: [PATCH v2] migration/colo: Fix bdrv_graph_rdlock_main_loop: Assertion `!qemu_in_coroutine()' failed.

2024-04-17 Thread Zhijian Li (Fujitsu)
On 17/04/2024 14:13, Philippe Mathieu-Daudé wrote: > On 17/4/24 04:56, Li Zhijian via wrote: >> bdrv_activate_all() should not be called from the coroutine context, move >> it to the QEMU thread colo_process_incoming_thread() with the bql_lock >> protected. >> >

Re: [PATCH] migration/colo: Fix bdrv_graph_rdlock_main_loop: Assertion `!qemu_in_coroutine()' failed.

2024-04-16 Thread Zhijian Li (Fujitsu)
On 17/04/2024 10:44, Li Zhijian wrote: > bdrv_activate_all() should not be called from the coroutine context, move > it to the QEMU thread colo_process_incoming_thread() with the bql_lock > protected. > > The backtrace is as follows: > #4 0x561af7948362 in bdrv_grap

[PATCH v2] migration/colo: Fix bdrv_graph_rdlock_main_loop: Assertion `!qemu_in_coroutine()' failed.

2024-04-16 Thread Li Zhijian via
/-/issues/2277 Fixes: 2b3912f135 ("block: Mark bdrv_first_blk() and bdrv_is_root_node() GRAPH_RDLOCK") Signed-off-by: Li Zhijian --- V2: fix missing bql_unlock() in error path. --- migration/colo.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a

[PATCH] migration/colo: Fix bdrv_graph_rdlock_main_loop: Assertion `!qemu_in_coroutine()' failed.

2024-04-16 Thread Li Zhijian via
/-/issues/2277 Fixes: 2b3912f135 ("block: Mark bdrv_first_blk() and bdrv_is_root_node() GRAPH_RDLOCK") Signed-off-by: Li Zhijian --- migration/colo.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/migration/colo.c b/migration/colo.c index 84632a603e..

Re: [PATCH v5 28/65] i386/tdx: Disable pmu for TD guest

2024-04-16 Thread Xiaoyao Li
On 4/16/2024 4:32 PM, Chenyi Qiang wrote: On 2/29/2024 2:36 PM, Xiaoyao Li wrote: Current KVM doesn't support PMU for TD guest. It returns error if TD is created with PMU bit being set in attributes. Disable PMU for TD guest on QEMU side. Signed-off-by: Xiaoyao Li --- target/i386/kvm

Re: [PATCH v2] target/i386: Give IRQs a chance when resetting HF_INHIBIT_IRQ_MASK

2024-04-15 Thread Ruihan Li
inhibit_reset = true; > } else if (inhibit) { > gen_set_hflag(s, HF_INHIBIT_IRQ_MASK); > } Yes, I agree with you that your changes look a bit clearer. I have tested your changes and verified that they fix the reported bug. > No need to submit v3, I can do the change myself when applying. Thank you for your review. Feel free to do that. Thanks, Ruihan Li

[PATCH v2] target/i386: Give IRQs a chance when resetting HF_INHIBIT_IRQ_MASK

2024-04-15 Thread Ruihan Li
-by: Ruihan Li --- The same problem was discovered two years ago, see [StackOverflow][so]. [so]: https://stackoverflow.com/questions/68135305/executing-ret-after-sti-doesnt-start-interrupts Changes since v1: - Fix a typo: "RET is followed by STI" -> "STI is followed by RET"

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-04-09 Thread Zhijian Li (Fujitsu)
on 4/10/2024 3:46 AM, Peter Xu wrote: >> Is there document/link about the unittest/CI for migration tests, Why >> are those tests missing? >> Is it hard or very special to set up an environment for that? maybe we >> can help in this regards. > See tests/qtest/migration-test.c. We put most of

[PATCH v2] hw/mem/cxl_type3: reset dvsecs in ct3d_reset()

2024-04-09 Thread Li Zhijian via
registers could be changed by the firmware or OS, let them have their initial value in reboot so that the OS can read their clean status. Fixes: e1706ea83da0 ("hw/cxl/device: Add a memory device (8.2.8.5)") Signed-off-by: Li Zhijian --- root_port, usp and dsp have the same issue, if this p

Re: [PATCH v2] hw/i386/acpi: Set PCAT_COMPAT bit only when pic is not disabled

2024-04-03 Thread Xiaoyao Li
On 4/3/2024 11:12 PM, Igor Mammedov wrote: On Wed, 3 Apr 2024 10:59:53 -0400 Xiaoyao Li wrote: A value 1 of PCAT_COMPAT (bit 0) of MADT.Flags indicates that the system also has a PC-AT-compatible dual-8259 setup, i.e., the PIC. When PIC is not enabled (pic=off) for x86 machine

[PATCH v2] hw/i386/acpi: Set PCAT_COMPAT bit only when pic is not disabled

2024-04-03 Thread Xiaoyao Li
-by: Xiaoyao Li --- changes in v2: - Clarify more in commit message; --- hw/i386/acpi-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/i386/acpi-common.c b/hw/i386/acpi-common.c index 20f19269da40..0cc2919bb851 100644 --- a/hw/i386/acpi-common.c +++ b/hw/i386/acpi-common.c

Re: [PATCH 2/2] CXL/cxl_type3: reset DVSEC CXL Control in ct3d_reset

2024-04-03 Thread Zhijian Li (Fujitsu)
On 03/04/2024 11:42, Li Zhijian wrote: > > > On 02/04/2024 17:17, Jonathan Cameron wrote: >> On Tue,  2 Apr 2024 09:46:47 +0800 >> Li Zhijian wrote: >> >>> After the kernel commit >>> 0cab68720598 ("cxl/pci: Fix disabling memory if

Re: [PATCH 2/2] CXL/cxl_type3: reset DVSEC CXL Control in ct3d_reset

2024-04-02 Thread Zhijian Li (Fujitsu)
On 02/04/2024 17:17, Jonathan Cameron wrote: > On Tue, 2 Apr 2024 09:46:47 +0800 > Li Zhijian wrote: > >> After the kernel commit >> 0cab68720598 ("cxl/pci: Fix disabling memory if DVSEC CXL Range does not >> match a CFMWS window") > > Fixes tag

Re: [PATCH] hw/i386/acpi: Set PCAT_COMPAT bit only when pic is not disabled

2024-04-02 Thread Xiaoyao Li
On 4/2/2024 10:31 PM, Michael S. Tsirkin wrote: On Tue, Apr 02, 2024 at 09:18:44PM +0800, Xiaoyao Li wrote: On 4/2/2024 6:02 PM, Michael S. Tsirkin wrote: On Tue, Apr 02, 2024 at 04:25:16AM -0400, Xiaoyao Li wrote: Set MADT.FLAGS[bit 0].PCAT_COMPAT based on x86ms->pic. Signed-off-by: Xiao

Re: [PATCH] hw/i386/acpi: Set PCAT_COMPAT bit only when pic is not disabled

2024-04-02 Thread Xiaoyao Li
On 4/2/2024 6:02 PM, Michael S. Tsirkin wrote: On Tue, Apr 02, 2024 at 04:25:16AM -0400, Xiaoyao Li wrote: Set MADT.FLAGS[bit 0].PCAT_COMPAT based on x86ms->pic. Signed-off-by: Xiaoyao Li Please include more info in the commit log: what is the behaviour you observe, why it is wrong,

Re: vhost-user-blk reconnect issue

2024-04-02 Thread Li Feng
comments? Revert: https://lore.kernel.org/all/a68c0148e9bf105f9e83ff5e763b8fcb6f7ba9be.1697644299.git@redhat.com/ New: https://lore.kernel.org/all/20230804052954.2918915-2-fen...@smartx.com/ Thanks, Li > 2024年4月1日 16:43,Yajun Wu 写道: > > > > On 4/1/2024 4:34 PM, Li Feng wrote:

[PATCH] hw/i386/acpi: Set PCAT_COMPAT bit only when pic is not disabled

2024-04-02 Thread Xiaoyao Li
Set MADT.FLAGS[bit 0].PCAT_COMPAT based on x86ms->pic. Signed-off-by: Xiaoyao Li --- hw/i386/acpi-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/i386/acpi-common.c b/hw/i386/acpi-common.c index 20f19269da40..0cc2919bb851 100644 --- a/hw/i386/acpi-commo

  1   2   3   4   5   6   7   8   9   10   >