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.

For this series of patches, some architectures have been merged, some
need to update the patch.


Hi Tianjia, I will take care of this during the merge window.

Thanks,

Paolo



Hi Paolo,

The following individual patch is the v5 version of 5/7 in this group of 
patches.


https://lkml.org/lkml/2020/5/28/106
([v5] KVM: PPC: clean up redundant kvm_run parameters in assembly)

Thanks and best,
Tianjia


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

2020-05-29 Thread Paolo Bonzini
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.
> 
> For this series of patches, some architectures have been merged, some
> need to update the patch.

Hi Tianjia, I will take care of this during the merge window.

Thanks,

Paolo



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' and 'kvm_vcpu' parameters at the same time. This
patch does a unified cleanup of these remaining redundant parameters.

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 +++
  5 files changed, 87 insertions(+), 151 deletions(-)



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.


For this series of patches, some architectures have been merged, some 
need to update the patch.


Thanks and best,
Tianjia


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

2020-04-26 Thread Huacai Chen
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' and 'kvm_vcpu' parameters at the same time. This
> patch does a unified cleanup of these remaining redundant parameters.
>
> 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 +++
>  5 files changed, 87 insertions(+), 151 deletions(-)
>
> diff --git a/arch/mips/include/asm/kvm_host.h 
> b/arch/mips/include/asm/kvm_host.h
> index 2c343c346b79..971439297cea 100644
> --- a/arch/mips/include/asm/kvm_host.h
> +++ b/arch/mips/include/asm/kvm_host.h
> @@ -812,8 +812,8 @@ struct kvm_mips_callbacks {
>const struct kvm_one_reg *reg, s64 v);
> int (*vcpu_load)(struct kvm_vcpu *vcpu, int cpu);
> int (*vcpu_put)(struct kvm_vcpu *vcpu, int cpu);
> -   int (*vcpu_run)(struct kvm_run *run, struct kvm_vcpu *vcpu);
> -   void (*vcpu_reenter)(struct kvm_run *run, struct kvm_vcpu *vcpu);
> +   int (*vcpu_run)(struct kvm_vcpu *vcpu);
> +   void (*vcpu_reenter)(struct kvm_vcpu *vcpu);
>  };
>  extern struct kvm_mips_callbacks *kvm_mips_callbacks;
>  int kvm_mips_emulation_init(struct kvm_mips_callbacks **install_callbacks);
> @@ -868,7 +868,6 @@ extern int kvm_mips_handle_mapped_seg_tlb_fault(struct 
> kvm_vcpu *vcpu,
>
>  extern enum emulation_result kvm_mips_handle_tlbmiss(u32 cause,
>  u32 *opc,
> -struct kvm_run *run,
>  struct kvm_vcpu *vcpu,
>  bool write_fault);
>
> @@ -975,83 +974,67 @@ static inline bool kvm_is_ifetch_fault(struct 
> kvm_vcpu_arch *vcpu)
>
>  extern enum emulation_result kvm_mips_emulate_inst(u32 cause,
>u32 *opc,
> -  struct kvm_run *run,
>struct kvm_vcpu *vcpu);
>
>  long kvm_mips_guest_exception_base(struct kvm_vcpu *vcpu);
>
>  extern enum emulation_result kvm_mips_emulate_syscall(u32 cause,
>   u32 *opc,
> - struct kvm_run *run,
>   struct kvm_vcpu *vcpu);
>
>  extern enum emulation_result kvm_mips_emulate_tlbmiss_ld(u32 cause,
>  u32 *opc,
> -struct kvm_run *run,
>  struct kvm_vcpu 
> *vcpu);
>
>  extern enum emulation_result kvm_mips_emulate_tlbinv_ld(u32 cause,
> u32 *opc,
> -   struct kvm_run *run,
> struct kvm_vcpu 
> *vcpu);
>
>  extern enum emulation_result kvm_mips_emulate_tlbmiss_st(u32 cause,
>  u32 *opc,
> -struct kvm_run *run,
>  struct kvm_vcpu 
> *vcpu);
>
>  extern enum emulation_result kvm_mips_emulate_tlbinv_st(u32 cause,
> u32 *opc,
> -   struct kvm_run *run,
> struct kvm_vcpu 
> *vcpu);
>
>  extern enum emulation_result kvm_mips_emulate_tlbmod(u32 cause,
>  u32 *opc,
> -struct kvm_run *run,
>  struct kvm_vcpu *vcpu);
>
>  extern enum emulation_result kvm_mips_emulate_fpu_exc(u32 cause,
>   u32 *opc,
> - struct kvm_run *run,
>   struct kvm_vcpu *vcpu);
>
>  extern enum emulation_result kvm_mips_handle_ri(u32 cause,
> u32 *opc,
> -   struct kvm_run *run,
> struct kvm_vcpu *vcpu);
>
>  extern enum emulation_result kvm_mips_emulate_ri_exc(u32 cause,
>  u32 *opc,
> 

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

2020-04-26 Thread Tianjia Zhang
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. This
patch does a unified cleanup of these remaining redundant parameters.

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 +++
 5 files changed, 87 insertions(+), 151 deletions(-)

diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h
index 2c343c346b79..971439297cea 100644
--- a/arch/mips/include/asm/kvm_host.h
+++ b/arch/mips/include/asm/kvm_host.h
@@ -812,8 +812,8 @@ struct kvm_mips_callbacks {
   const struct kvm_one_reg *reg, s64 v);
int (*vcpu_load)(struct kvm_vcpu *vcpu, int cpu);
int (*vcpu_put)(struct kvm_vcpu *vcpu, int cpu);
-   int (*vcpu_run)(struct kvm_run *run, struct kvm_vcpu *vcpu);
-   void (*vcpu_reenter)(struct kvm_run *run, struct kvm_vcpu *vcpu);
+   int (*vcpu_run)(struct kvm_vcpu *vcpu);
+   void (*vcpu_reenter)(struct kvm_vcpu *vcpu);
 };
 extern struct kvm_mips_callbacks *kvm_mips_callbacks;
 int kvm_mips_emulation_init(struct kvm_mips_callbacks **install_callbacks);
@@ -868,7 +868,6 @@ extern int kvm_mips_handle_mapped_seg_tlb_fault(struct 
kvm_vcpu *vcpu,
 
 extern enum emulation_result kvm_mips_handle_tlbmiss(u32 cause,
 u32 *opc,
-struct kvm_run *run,
 struct kvm_vcpu *vcpu,
 bool write_fault);
 
@@ -975,83 +974,67 @@ static inline bool kvm_is_ifetch_fault(struct 
kvm_vcpu_arch *vcpu)
 
 extern enum emulation_result kvm_mips_emulate_inst(u32 cause,
   u32 *opc,
-  struct kvm_run *run,
   struct kvm_vcpu *vcpu);
 
 long kvm_mips_guest_exception_base(struct kvm_vcpu *vcpu);
 
 extern enum emulation_result kvm_mips_emulate_syscall(u32 cause,
  u32 *opc,
- struct kvm_run *run,
  struct kvm_vcpu *vcpu);
 
 extern enum emulation_result kvm_mips_emulate_tlbmiss_ld(u32 cause,
 u32 *opc,
-struct kvm_run *run,
 struct kvm_vcpu *vcpu);
 
 extern enum emulation_result kvm_mips_emulate_tlbinv_ld(u32 cause,
u32 *opc,
-   struct kvm_run *run,
struct kvm_vcpu *vcpu);
 
 extern enum emulation_result kvm_mips_emulate_tlbmiss_st(u32 cause,
 u32 *opc,
-struct kvm_run *run,
 struct kvm_vcpu *vcpu);
 
 extern enum emulation_result kvm_mips_emulate_tlbinv_st(u32 cause,
u32 *opc,
-   struct kvm_run *run,
struct kvm_vcpu *vcpu);
 
 extern enum emulation_result kvm_mips_emulate_tlbmod(u32 cause,
 u32 *opc,
-struct kvm_run *run,
 struct kvm_vcpu *vcpu);
 
 extern enum emulation_result kvm_mips_emulate_fpu_exc(u32 cause,
  u32 *opc,
- struct kvm_run *run,
  struct kvm_vcpu *vcpu);
 
 extern enum emulation_result kvm_mips_handle_ri(u32 cause,
u32 *opc,
-   struct kvm_run *run,
struct kvm_vcpu *vcpu);
 
 extern enum emulation_result kvm_mips_emulate_ri_exc(u32 cause,
 u32 *opc,
-struct kvm_run *run,
 struct kvm_vcpu *vcpu);
 
 extern enum emulation_result kvm_mips_emulate_bp_exc(u32 cause,