[PATCH v2] KVM: Optimize kvm_arch_vcpu_ioctl_run function

2020-04-15 Thread Tianjia Zhang
, and extract it from the 'kvm_vcpu' structure if necessary. Signed-off-by: Tianjia Zhang --- v2 change: remove 'kvm_run' parameter and extract it from 'kvm_vcpu' arch/mips/kvm/mips.c | 3 ++- arch/powerpc/kvm/powerpc.c | 3 ++- arch/s390/kvm/kvm-s390.c | 3 ++- arch/x86/kvm/x86.c

[PATCH] KVM: X86: Fix compile error in svm/sev.c

2020-04-19 Thread Tianjia Zhang
); ^ The reason is that the 'pagemap.h' header file is not included. Signed-off-by: Tianjia Zhang --- arch/x86/kvm/svm/sev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index 0e3fc311d7da..3ef99e87c1db 100644 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86

[PATCH 7/7] KVM: MIPS: clean up redundant kvm_run parameters in assembly

2020-04-19 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/mips/include/asm/kvm_host.h | 4 ++-- arch/mips/kvm/entry.c| 15 +-- arch/mips/kvm/mips.c | 3 ++- arch/mips/kvm/trap_emul.c| 2 +- arch/mips/kvm/vz.c | 2 +- 5 files changed, 11 insertions(+), 15

[PATCH 5/7] KVM: PPC: clean up redundant kvm_run parameters in assembly

2020-04-19 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/powerpc/include/asm/kvm_ppc.h| 2 +- arch/powerpc/kvm/book3s_interrupts.S | 17 - arch/powerpc/kvm/book3s_pr.c | 9 - arch/powerpc/kvm/booke.c | 9 - arch/powerpc/kvm/booke_interrupts.S | 9

[PATCH 4/7] KVM: PPC: clean up redundant 'kvm_run' parameters

2020-04-19 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/powerpc/include/asm/kvm_book3s.h| 16 +++--- arch/powerpc/include/asm/kvm_ppc.h | 27 + arch/powerpc/kvm/book3s.c| 4 +- arch/powerpc/kvm/book3s.h| 2 +- arch/powerpc/kvm/book3s_64_mmu_hv.c | 12 ++-- arch

[PATCH 6/7] KVM: MIPS: clean up redundant 'kvm_run' parameters

2020-04-19 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/mips/include/asm/kvm_host.h | 28 +--- arch/mips/kvm/emulate.c | 59 ++-- arch/mips/kvm/mips.c | 11 ++- arch/mips/kvm/trap_emul.c| 114 ++- arch/mips/kvm/vz.c | 26

[PATCH 3/7] KVM: PPC: Remove redundant kvm_run from vcpu_arch

2020-04-19 Thread Tianjia Zhang
The 'kvm_run' field already exists in the 'vcpu' structure, which is the same structure as the 'kvm_run' in the 'vcpu_arch' and should be deleted. Signed-off-by: Tianjia Zhang --- arch/powerpc/include/asm/kvm_host.h | 1 - arch/powerpc/kvm/book3s_hv.c| 6 ++ arch/powerpc/kvm

[PATCH 1/7] KVM: s390: clean up redundant 'kvm_run' parameters

2020-04-19 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/s390/kvm/kvm-s390.c | 127 +-- 1 file changed, 67 insertions(+), 60 deletions(-) diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 443af3ead739..cf420d013ba3 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b

[PATCH 2/7] KVM: arm64: clean up redundant 'kvm_run' parameters

2020-04-19 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/arm64/include/asm/kvm_coproc.h | 12 +- arch/arm64/include/asm/kvm_host.h | 11 - arch/arm64/include/asm/kvm_mmu.h| 2 +- arch/arm64/kvm/handle_exit.c| 36 ++--- arch/arm64/kvm/sys_regs.c | 13

[PATCH 0/7] clean up redundant 'kvm_run' parameters

2020-04-19 Thread Tianjia Zhang
' in 'vcpu_arch', which has also been cleaned separately. Thanks and best. Tianjia Zhang (7): KVM: s390: clean up redundant 'kvm_run' parameters KVM: arm64: clean up redundant 'kvm_run' parameters KVM: PPC: Remove redundant kvm_run from vcpu_arch KVM: PPC: clean up redundant 'kvm_run' parameters KVM

Re: [PATCH 1/7] KVM: s390: clean up redundant 'kvm_run' parameters

2020-04-20 Thread Tianjia Zhang
On 2020/4/20 15:07, Christian Borntraeger wrote: On 19.04.20 09:51, Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. Earlier than historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters

Re: [PATCH] KVM: X86: Fix compile error in svm/sev.c

2020-04-20 Thread Tianjia Zhang
On 2020/4/19 16:24, Xiaoyao Li wrote: On 4/19/2020 3:30 PM, Tianjia Zhang wrote: The compiler reported the following compilation errors: arch/x86/kvm/svm/sev.c: In function ‘sev_pin_memory’: arch/x86/kvm/svm/sev.c:361:3: error: implicit declaration of function ‘release_pages’ [-Werror

Re: [PATCH 7/7] KVM: MIPS: clean up redundant kvm_run parameters in assembly

2020-04-20 Thread Tianjia Zhang
On 2020/4/20 18:32, maobibo wrote: On 04/19/2020 03:51 PM, Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. Earlier than historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters

Re: [PATCH v2] KVM: Optimize kvm_arch_vcpu_ioctl_run function

2020-04-16 Thread Tianjia Zhang
On 2020/4/16 16:28, Marc Zyngier wrote: On 2020-04-16 08:03, Vitaly Kuznetsov wrote: Tianjia Zhang writes: In earlier versions of kvm, 'kvm_run' is an independent structure and is not included in the vcpu structure. At present, 'kvm_run' is already included in the vcpu structure, so

Re: [PATCH v2] KVM: Optimize kvm_arch_vcpu_ioctl_run function

2020-04-16 Thread Tianjia Zhang
On 2020/4/16 16:50, Cornelia Huck wrote: On Thu, 16 Apr 2020 16:45:33 +0800 Tianjia Zhang wrote: On 2020/4/16 16:28, Marc Zyngier wrote: On 2020-04-16 08:03, Vitaly Kuznetsov wrote: Tianjia Zhang writes: In earlier versions of kvm, 'kvm_run' is an independent structure

Re: [PATCH v2 1/7] KVM: s390: clean up redundant 'kvm_run' parameters

2020-04-28 Thread Tianjia Zhang
On 2020/4/26 20:59, Thomas Huth wrote: On 23/04/2020 13.00, Christian Borntraeger wrote: On 23.04.20 12:58, Tianjia Zhang wrote: On 2020/4/23 18:39, Cornelia Huck wrote: On Thu, 23 Apr 2020 11:01:43 +0800 Tianjia Zhang wrote: On 2020/4/23 0:04, Cornelia Huck wrote: On Wed, 22 Apr

[PATCH v3 7/7] KVM: MIPS: clean up redundant kvm_run parameters in assembly

2020-04-26 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/mips/include/asm/kvm_host.h | 4 ++-- arch/mips/kvm/entry.c| 15 +-- arch/mips/kvm/mips.c | 3 ++- arch/mips/kvm/trap_emul.c| 2 +- arch/mips/kvm/vz.c | 2 +- 5 files changed, 11 insertions(+), 15

[PATCH v3 0/7] clean up redundant 'kvm_run' parameters

2020-04-26 Thread Tianjia Zhang
' in 'vcpu_arch', which has also been cleaned separately. --- v3 change: Keep the existing `vcpu->run` in the function body unchanged. v2 change: s390 retains the original variable name and minimizes modification. Tianjia Zhang (7): KVM: s390: clean up redundant 'kvm_run' parameters KVM: arm64: cl

[PATCH v3 5/7] KVM: PPC: clean up redundant kvm_run parameters in assembly

2020-04-26 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/powerpc/include/asm/kvm_ppc.h| 2 +- arch/powerpc/kvm/book3s_interrupts.S | 17 - arch/powerpc/kvm/book3s_pr.c | 9 - arch/powerpc/kvm/booke.c | 9 - arch/powerpc/kvm/booke_interrupts.S | 9

[PATCH v3 3/7] KVM: PPC: Remove redundant kvm_run from vcpu_arch

2020-04-26 Thread Tianjia Zhang
The 'kvm_run' field already exists in the 'vcpu' structure, which is the same structure as the 'kvm_run' in the 'vcpu_arch' and should be deleted. Signed-off-by: Tianjia Zhang --- arch/powerpc/include/asm/kvm_host.h | 1 - arch/powerpc/kvm/book3s_hv.c| 6 ++ arch/powerpc/kvm

[PATCH v3 1/7] KVM: s390: clean up redundant 'kvm_run' parameters

2020-04-26 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/s390/kvm/kvm-s390.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index e335a7e5ead7..c0d94eaa00d7 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm

[PATCH v3 2/7] KVM: arm64: clean up redundant 'kvm_run' parameters

2020-04-26 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/arm64/include/asm/kvm_coproc.h | 12 +- arch/arm64/include/asm/kvm_host.h | 11 - arch/arm64/include/asm/kvm_mmu.h| 2 +- arch/arm64/kvm/handle_exit.c| 36 ++--- arch/arm64/kvm/sys_regs.c | 13

[PATCH v3 4/7] KVM: PPC: clean up redundant 'kvm_run' parameters

2020-04-26 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/powerpc/include/asm/kvm_book3s.h| 16 +++--- arch/powerpc/include/asm/kvm_ppc.h | 27 + arch/powerpc/kvm/book3s.c| 4 +- arch/powerpc/kvm/book3s.h| 2 +- arch/powerpc/kvm/book3s_64_mmu_hv.c | 12 ++-- arch

[PATCH v3 6/7] KVM: MIPS: clean up redundant 'kvm_run' parameters

2020-04-26 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/mips/include/asm/kvm_host.h | 28 +--- arch/mips/kvm/emulate.c | 59 ++-- arch/mips/kvm/mips.c | 11 ++- arch/mips/kvm/trap_emul.c| 114 ++- arch/mips/kvm/vz.c | 26

Re: [PATCH v2 1/7] KVM: s390: clean up redundant 'kvm_run' parameters

2020-04-22 Thread Tianjia Zhang
On 2020/4/22 23:58, Christian Borntraeger wrote: On 22.04.20 15:45, Cornelia Huck wrote: On Wed, 22 Apr 2020 20:58:04 +0800 Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. Earlier than historical reasons, many kvm-related

Re: [PATCH v2 1/7] KVM: s390: clean up redundant 'kvm_run' parameters

2020-04-22 Thread Tianjia Zhang
On 2020/4/22 21:45, Cornelia Huck wrote: On Wed, 22 Apr 2020 20:58:04 +0800 Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. Earlier than historical reasons, many kvm-related function s/Earlier than/For/ ? Yes, it should

Re: [PATCH v2 1/7] KVM: s390: clean up redundant 'kvm_run' parameters

2020-04-22 Thread Tianjia Zhang
On 2020/4/23 0:04, Cornelia Huck wrote: On Wed, 22 Apr 2020 17:58:04 +0200 Christian Borntraeger wrote: On 22.04.20 15:45, Cornelia Huck wrote: On Wed, 22 Apr 2020 20:58:04 +0800 Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure

Re: [PATCH v2 1/7] KVM: s390: clean up redundant 'kvm_run' parameters

2020-04-23 Thread Tianjia Zhang
On 2020/4/23 19:00, Christian Borntraeger wrote: On 23.04.20 12:58, Tianjia Zhang wrote: On 2020/4/23 18:39, Cornelia Huck wrote: On Thu, 23 Apr 2020 11:01:43 +0800 Tianjia Zhang wrote: On 2020/4/23 0:04, Cornelia Huck wrote: On Wed, 22 Apr 2020 17:58:04 +0200 Christian Borntraeger

Re: [PATCH v2 1/7] KVM: s390: clean up redundant 'kvm_run' parameters

2020-04-23 Thread Tianjia Zhang
On 2020/4/23 18:39, Cornelia Huck wrote: On Thu, 23 Apr 2020 11:01:43 +0800 Tianjia Zhang wrote: On 2020/4/23 0:04, Cornelia Huck wrote: On Wed, 22 Apr 2020 17:58:04 +0200 Christian Borntraeger wrote: On 22.04.20 15:45, Cornelia Huck wrote: On Wed, 22 Apr 2020 20:58:04 +0800

[PATCH v2 5/7] KVM: PPC: clean up redundant kvm_run parameters in assembly

2020-04-22 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/powerpc/include/asm/kvm_ppc.h| 2 +- arch/powerpc/kvm/book3s_interrupts.S | 17 - arch/powerpc/kvm/book3s_pr.c | 9 - arch/powerpc/kvm/booke.c | 9 - arch/powerpc/kvm/booke_interrupts.S | 9

[PATCH v2 6/7] KVM: MIPS: clean up redundant 'kvm_run' parameters

2020-04-22 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/mips/include/asm/kvm_host.h | 28 +--- arch/mips/kvm/emulate.c | 59 ++-- arch/mips/kvm/mips.c | 11 ++- arch/mips/kvm/trap_emul.c| 114 ++- arch/mips/kvm/vz.c | 26

[PATCH v2 1/7] KVM: s390: clean up redundant 'kvm_run' parameters

2020-04-22 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/s390/kvm/kvm-s390.c | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index e335a7e5ead7..d7bb2e7a07ff 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch

[PATCH v2 4/7] KVM: PPC: clean up redundant 'kvm_run' parameters

2020-04-22 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/powerpc/include/asm/kvm_book3s.h| 16 +++--- arch/powerpc/include/asm/kvm_ppc.h | 27 + arch/powerpc/kvm/book3s.c| 4 +- arch/powerpc/kvm/book3s.h| 2 +- arch/powerpc/kvm/book3s_64_mmu_hv.c | 12 ++-- arch

[PATCH v2 0/7] clean up redundant 'kvm_run' parameters

2020-04-22 Thread Tianjia Zhang
' in 'vcpu_arch', which has also been cleaned separately. --- v2 change: s390 retains the original variable name and minimizes modification. Tianjia Zhang (7): KVM: s390: clean up redundant 'kvm_run' parameters KVM: arm64: clean up redundant 'kvm_run' parameters KVM: PPC: Remove redundant kvm_run from

[PATCH v2 7/7] KVM: MIPS: clean up redundant kvm_run parameters in assembly

2020-04-22 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/mips/include/asm/kvm_host.h | 4 ++-- arch/mips/kvm/entry.c| 15 +-- arch/mips/kvm/mips.c | 3 ++- arch/mips/kvm/trap_emul.c| 2 +- arch/mips/kvm/vz.c | 2 +- 5 files changed, 11 insertions(+), 15

[PATCH v2 3/7] KVM: PPC: Remove redundant kvm_run from vcpu_arch

2020-04-22 Thread Tianjia Zhang
The 'kvm_run' field already exists in the 'vcpu' structure, which is the same structure as the 'kvm_run' in the 'vcpu_arch' and should be deleted. Signed-off-by: Tianjia Zhang --- arch/powerpc/include/asm/kvm_host.h | 1 - arch/powerpc/kvm/book3s_hv.c| 6 ++ arch/powerpc/kvm

[PATCH v2 2/7] KVM: arm64: clean up redundant 'kvm_run' parameters

2020-04-22 Thread Tianjia Zhang
. Signed-off-by: Tianjia Zhang --- arch/arm64/include/asm/kvm_coproc.h | 12 +- arch/arm64/include/asm/kvm_host.h | 11 - arch/arm64/include/asm/kvm_mmu.h| 2 +- arch/arm64/kvm/handle_exit.c| 36 ++--- arch/arm64/kvm/sys_regs.c | 13

Re: [PATCH v4 0/7] clean up redundant 'kvm_run' parameters

2020-05-04 Thread Tianjia Zhang
Paolo Bonzini, any opinion on this? Thanks and best, Tianjia On 2020/4/27 12:35, Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. For historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters

[PATCH v4 2/7] KVM: arm64: clean up redundant 'kvm_run' parameters

2020-04-26 Thread Tianjia Zhang
-by: Tianjia Zhang --- arch/arm64/include/asm/kvm_coproc.h | 12 +- arch/arm64/include/asm/kvm_host.h | 11 - arch/arm64/include/asm/kvm_mmu.h| 2 +- arch/arm64/kvm/handle_exit.c| 36 ++--- arch/arm64/kvm/sys_regs.c | 13

[PATCH v4 5/7] KVM: PPC: clean up redundant kvm_run parameters in assembly

2020-04-26 Thread Tianjia Zhang
-by: Tianjia Zhang --- arch/powerpc/include/asm/kvm_ppc.h| 2 +- arch/powerpc/kvm/book3s_interrupts.S | 17 - arch/powerpc/kvm/book3s_pr.c | 9 - arch/powerpc/kvm/booke.c | 9 - arch/powerpc/kvm/booke_interrupts.S | 9 - arch

[PATCH v4 3/7] KVM: PPC: Remove redundant kvm_run from vcpu_arch

2020-04-26 Thread Tianjia Zhang
The 'kvm_run' field already exists in the 'vcpu' structure, which is the same structure as the 'kvm_run' in the 'vcpu_arch' and should be deleted. Signed-off-by: Tianjia Zhang --- arch/powerpc/include/asm/kvm_host.h | 1 - arch/powerpc/kvm/book3s_hv.c| 6 ++ arch/powerpc/kvm

[PATCH v4 6/7] KVM: MIPS: clean up redundant 'kvm_run' parameters

2020-04-26 Thread Tianjia Zhang
-by: Tianjia Zhang --- arch/mips/include/asm/kvm_host.h | 28 +--- arch/mips/kvm/emulate.c | 59 ++-- arch/mips/kvm/mips.c | 11 ++- arch/mips/kvm/trap_emul.c| 114 ++- arch/mips/kvm/vz.c | 26 +++ 5

[PATCH v4 7/7] KVM: MIPS: clean up redundant kvm_run parameters in assembly

2020-04-26 Thread Tianjia Zhang
-by: Tianjia Zhang --- arch/mips/include/asm/kvm_host.h | 4 ++-- arch/mips/kvm/entry.c| 21 - arch/mips/kvm/mips.c | 3 ++- arch/mips/kvm/trap_emul.c| 2 +- arch/mips/kvm/vz.c | 2 +- 5 files changed, 14 insertions(+), 18

[PATCH v4 4/7] KVM: PPC: clean up redundant 'kvm_run' parameters

2020-04-26 Thread Tianjia Zhang
-by: Tianjia Zhang --- arch/powerpc/include/asm/kvm_book3s.h| 16 +++--- arch/powerpc/include/asm/kvm_ppc.h | 27 + arch/powerpc/kvm/book3s.c| 4 +- arch/powerpc/kvm/book3s.h| 2 +- arch/powerpc/kvm/book3s_64_mmu_hv.c | 12 ++-- arch/powerpc

Re: [PATCH v3 7/7] KVM: MIPS: clean up redundant kvm_run parameters in assembly

2020-04-26 Thread Tianjia Zhang
On 2020/4/27 11:51, Huacai Chen wrote: Hi, Tianjia, On Sun, Apr 26, 2020 at 8:40 PM Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. Earlier than historical reasons, many kvm-related function parameters retain the 'kvm_run

[PATCH v4 0/7] clean up redundant 'kvm_run' parameters

2020-04-26 Thread Tianjia Zhang
', which has also been cleaned separately. --- v4 change: mips: fixes two errors in entry.c. v3 change: Keep the existing `vcpu->run` in the function body unchanged. v2 change: s390 retains the original variable name and minimizes modification. Tianjia Zhang (7): KVM: s390: clean up redund

[PATCH v4 1/7] KVM: s390: clean up redundant 'kvm_run' parameters

2020-04-26 Thread Tianjia Zhang
-by: Tianjia Zhang --- arch/s390/kvm/kvm-s390.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index e335a7e5ead7..c0d94eaa00d7 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c

Re: [PATCH v4 2/7] KVM: arm64: clean up redundant 'kvm_run' parameters

2020-05-07 Thread Tianjia Zhang
On 2020/5/5 16:39, Marc Zyngier wrote: Hi Tianjia, On 2020-04-27 05:35, Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. For historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters

[PATCH v5] KVM: PPC: clean up redundant kvm_run parameters in assembly

2020-05-28 Thread Tianjia Zhang
-by: Tianjia Zhang --- arch/powerpc/include/asm/kvm_ppc.h| 2 +- arch/powerpc/kvm/book3s_interrupts.S | 22 ++ arch/powerpc/kvm/book3s_pr.c | 9 - arch/powerpc/kvm/booke.c | 9 - arch/powerpc/kvm/booke_interrupts.S | 9

Re: [PATCH v4 6/7] KVM: MIPS: clean up redundant 'kvm_run' parameters

2020-05-27 Thread Tianjia Zhang
On 2020/4/27 13:40, Huacai Chen wrote: Reviewed-by: Huacai Chen On Mon, Apr 27, 2020 at 12:35 PM Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. For historical reasons, many kvm-related function parameters retain the 'kvm_run

Re: [PATCH v4 3/7] KVM: PPC: Remove redundant kvm_run from vcpu_arch

2020-05-26 Thread Tianjia Zhang
On 2020/5/27 12:20, Paul Mackerras wrote: On Mon, Apr 27, 2020 at 12:35:10PM +0800, Tianjia Zhang wrote: The 'kvm_run' field already exists in the 'vcpu' structure, which is the same structure as the 'kvm_run' in the 'vcpu_arch' and should be deleted. Signed-off-by: Tianjia Zhang Thanks

Re: [PATCH v6 0/5] clean up redundant 'kvm_run' parameters

2020-07-10 Thread Tianjia Zhang
Hi Paolo, Any opinion on this series patches? Can I help with this patchset ? Thanks and best, Tianjia On 2020/6/23 21:14, Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. For historical reasons, many kvm-related function parameters

Re: [PATCH v4 5/7] KVM: PPC: clean up redundant kvm_run parameters in assembly

2020-07-12 Thread Tianjia Zhang
On 2020/5/26 13:59, Paul Mackerras wrote: On Mon, Apr 27, 2020 at 12:35:12PM +0800, Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. For historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu

[PATCH v6 2/5] KVM: arm64: clean up redundant 'kvm_run' parameters

2020-06-23 Thread Tianjia Zhang
-by: Tianjia Zhang Reviewed-by: Vitaly Kuznetsov --- arch/arm64/include/asm/kvm_coproc.h | 12 +- arch/arm64/include/asm/kvm_host.h | 11 - arch/arm64/include/asm/kvm_mmu.h| 2 +- arch/arm64/kvm/arm.c| 6 ++--- arch/arm64/kvm/handle_exit.c| 36

[PATCH v6 4/5] KVM: MIPS: clean up redundant 'kvm_run' parameters

2020-06-23 Thread Tianjia Zhang
-by: Tianjia Zhang Reviewed-by: Huacai Chen --- arch/mips/include/asm/kvm_host.h | 28 +--- arch/mips/kvm/emulate.c | 59 ++-- arch/mips/kvm/mips.c | 11 ++- arch/mips/kvm/trap_emul.c| 114 ++- arch/mips/kvm/vz.c

[PATCH v6 1/5] KVM: s390: clean up redundant 'kvm_run' parameters

2020-06-23 Thread Tianjia Zhang
-by: Tianjia Zhang Reviewed-by: Vitaly Kuznetsov --- arch/s390/kvm/kvm-s390.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index d47c19718615..f5f96dc33712 100644 --- a/arch/s390/kvm/kvm-s390.c

[PATCH v6 0/5] clean up redundant 'kvm_run' parameters

2020-06-23 Thread Tianjia Zhang
nge: s390 retains the original variable name and minimizes modification. Tianjia Zhang (5): KVM: s390: clean up redundant 'kvm_run' parameters KVM: arm64: clean up redundant 'kvm_run' parameters KVM: PPC: clean up redundant kvm_run parameters in assembly KVM: MIPS: clean up redundant 'kvm_

[PATCH v6 3/5] KVM: PPC: clean up redundant kvm_run parameters in assembly

2020-06-23 Thread Tianjia Zhang
-by: Tianjia Zhang --- arch/powerpc/include/asm/kvm_ppc.h| 2 +- arch/powerpc/kvm/book3s_interrupts.S | 22 ++ arch/powerpc/kvm/book3s_pr.c | 9 - arch/powerpc/kvm/booke.c | 9 - arch/powerpc/kvm/booke_interrupts.S | 9

[PATCH v6 5/5] KVM: MIPS: clean up redundant kvm_run parameters in assembly

2020-06-23 Thread Tianjia Zhang
-by: Tianjia Zhang Reviewed-by: Huacai Chen --- arch/mips/include/asm/kvm_host.h | 4 ++-- arch/mips/kvm/entry.c| 21 - arch/mips/kvm/mips.c | 3 ++- arch/mips/kvm/trap_emul.c| 2 +- arch/mips/kvm/vz.c | 2 +- 5 files changed

Re: [PATCH v4 0/7] clean up redundant 'kvm_run' parameters

2020-06-23 Thread Tianjia Zhang
On 2020/6/23 17:42, Paolo Bonzini wrote: On 27/04/20 06:35, Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. For historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time

Re: [PATCH v4 6/7] KVM: MIPS: clean up redundant 'kvm_run' parameters

2020-06-16 Thread Tianjia Zhang
On 2020/5/29 17:48, Paolo Bonzini wrote: On 27/05/20 08:24, Tianjia Zhang wrote: Hi Huacai, These two patches(6/7 and 7/7) should be merged into the tree of the mips architecture separately. At present, there seems to be no good way to merge the whole architecture patchs

Re: [PATCH v6 1/5] KVM: s390: clean up redundant 'kvm_run' parameters

2020-06-23 Thread Tianjia Zhang
On 2020/6/23 23:31, Christian Borntraeger wrote: On 23.06.20 15:14, Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. For historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters

[PATCH 2/5] crypto: mips/sha - remove duplicate hash init function

2021-12-20 Thread Tianjia Zhang
sha*_base_init() series functions has implemented the initialization of the hash context, this commit use sha*_base_init() function to replace repeated implementations. Signed-off-by: Tianjia Zhang --- arch/mips/cavium-octeon/crypto/octeon-sha1.c | 17 +--- .../mips/cavium-octeon/crypto

[PATCH 1/5] crypto: sha256 - remove duplicate generic hash init function

2021-12-20 Thread Tianjia Zhang
crypto_sha256_init() and sha256_base_init() are the same repeated implementations, remove the crypto_sha256_init() in generic implementation, sha224 is the same process. Signed-off-by: Tianjia Zhang --- crypto/sha256_generic.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions

[PATCH 0/5] Remove duplicate context init function for sha algorithm

2021-12-20 Thread Tianjia Zhang
of functions are used uniformly. Tianjia Zhang (5): crypto: sha256 - remove duplicate generic hash init function crypto: mips/sha - remove duplicate hash init function crypto: powerpc/sha - remove duplicate hash init function crypto: sparc/sha - remove duplicate hash init function crypto: s390

[PATCH 5/5] crypto: s390/sha512 - Use macros instead of direct IV numbers

2021-12-20 Thread Tianjia Zhang
In the init functions of sha512 and sha384, the initial hash value use macros instead of numbers. Signed-off-by: Tianjia Zhang --- arch/s390/crypto/sha512_s390.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/arch/s390/crypto/sha512_s390.c

[PATCH 4/5] crypto: sparc/sha - remove duplicate hash init function

2021-12-20 Thread Tianjia Zhang
sha*_base_init() series functions has implemented the initialization of the hash context, this commit use sha*_base_init() function to replace repeated implementations. Signed-off-by: Tianjia Zhang --- arch/sparc/crypto/sha1_glue.c | 14 ++--- arch/sparc/crypto/sha256_glue.c | 37

[PATCH 3/5] crypto: powerpc/sha - remove duplicate hash init function

2021-12-20 Thread Tianjia Zhang
sha*_base_init() series functions has implemented the initialization of the hash context, this commit use sha*_base_init() function to replace repeated implementations. Signed-off-by: Tianjia Zhang --- arch/powerpc/crypto/sha1-spe-glue.c | 17 ++-- arch/powerpc/crypto/sha1.c

Re: [PATCH 1/5] crypto: sha256 - remove duplicate generic hash init function

2021-12-22 Thread Tianjia Zhang
Hi Julian, On 12/23/21 6:35 AM, Julian Calaby wrote: Hi Tianjia, On Mon, Dec 20, 2021 at 8:25 PM Tianjia Zhang wrote: crypto_sha256_init() and sha256_base_init() are the same repeated implementations, remove the crypto_sha256_init() in generic implementation, sha224 is the same process