On 1/25/22 10:59, Jinrong Liang wrote:
From: Jinrong Liang <cloudliang@xxxxxxxxxxx>
The "struct kvm_vcpu *vcpu" parameter of sev_vcpu_deliver_sipi_vector()
is not used, so remove it. No functional change intended.
Signed-off-by: Jinrong Liang <cloudliang@xxxxxxxxxxx>
---
arch/x86/kvm/svm/sev.c | 2 +-
arch/x86/kvm/svm/svm.c | 2 +-
arch/x86/kvm/svm/svm.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index 0727ac7221d7..2fd1e91054b3 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -2925,7 +2925,7 @@ void sev_es_prepare_guest_switch(unsigned int cpu)
hostsa->xss = host_xss;
}
-void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector)
+void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index 3e75ae834412..aead235a90ee 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -4348,7 +4348,7 @@ static void svm_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector)
if (!sev_es_guest(vcpu->kvm))
return kvm_vcpu_deliver_sipi_vector(vcpu, vector);
- sev_vcpu_deliver_sipi_vector(vcpu, vector);
+ sev_vcpu_deliver_sipi_vector(vcpu);
}
static void svm_vm_destroy(struct kvm *kvm)
diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h
index 0a749bbda738..61c96f4a7006 100644
--- a/arch/x86/kvm/svm/svm.h
+++ b/arch/x86/kvm/svm/svm.h
@@ -621,7 +621,7 @@ int sev_handle_vmgexit(struct kvm_vcpu *vcpu);
int sev_es_string_io(struct vcpu_svm *svm, int size, unsigned int port, int in);
void sev_es_init_vmcb(struct vcpu_svm *svm);
void sev_es_vcpu_reset(struct vcpu_svm *svm);
-void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector);
+void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu);
void sev_es_prepare_guest_switch(unsigned int cpu);
void sev_es_unmap_ghcb(struct vcpu_svm *svm);
For this one and patch 10, even if the argument is not used, the code
seems more natural if it is there. It is more of an implementation
detail that it is not used.
Paolo