Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1219814 > unrolled thread

[PATCH] kvm: compile process_smi_save_seg_64() only for x86_64

Started byAlexander Kuleshov <kuleshovmail@gmail.com>
First post2015-09-06 15:40 +0200
Last post2015-09-06 16:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] kvm: compile process_smi_save_seg_64() only for x86_64 Alexander Kuleshov <kuleshovmail@gmail.com> - 2015-09-06 15:40 +0200
    Re: [PATCH] kvm: compile process_smi_save_seg_64() only for x86_64 Paolo Bonzini <pbonzini@redhat.com> - 2015-09-06 16:30 +0200

#1219814 — [PATCH] kvm: compile process_smi_save_seg_64() only for x86_64

FromAlexander Kuleshov <kuleshovmail@gmail.com>
Date2015-09-06 15:40 +0200
Subject[PATCH] kvm: compile process_smi_save_seg_64() only for x86_64
Message-ID<q5IkO-a2-29@gated-at.bofh.it>
The process_smi_save_seg_64() function called only in the
process_smi_save_state_64() if the CONFIG_X86_64 is set. This
patch adds #ifdef CONFIG_X86_64 around process_smi_save_seg_64()
to prevent following warning message:

arch/x86/kvm/x86.c:5946:13: warning: ‘process_smi_save_seg_64’ defined but not used [-Wunused-function]
 static void process_smi_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
             ^

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 arch/x86/kvm/x86.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 1e7e76e..a60bdbc 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5943,6 +5943,7 @@ static void process_smi_save_seg_32(struct kvm_vcpu *vcpu, char *buf, int n)
 	put_smstate(u32, buf, offset, process_smi_get_segment_flags(&seg));
 }
 
+#ifdef CONFIG_X86_64
 static void process_smi_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
 {
 	struct kvm_segment seg;
@@ -5958,6 +5959,7 @@ static void process_smi_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
 	put_smstate(u32, buf, offset + 4, seg.limit);
 	put_smstate(u64, buf, offset + 8, seg.base);
 }
+#endif
 
 static void process_smi_save_state_32(struct kvm_vcpu *vcpu, char *buf)
 {
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1219816

FromPaolo Bonzini <pbonzini@redhat.com>
Date2015-09-06 16:30 +0200
Message-ID<q5J7c-1k0-1@gated-at.bofh.it>
In reply to#1219814

On 06/09/2015 15:35, Alexander Kuleshov wrote:
> The process_smi_save_seg_64() function called only in the
> process_smi_save_state_64() if the CONFIG_X86_64 is set. This
> patch adds #ifdef CONFIG_X86_64 around process_smi_save_seg_64()
> to prevent following warning message:
> 
> arch/x86/kvm/x86.c:5946:13: warning: ‘process_smi_save_seg_64’ defined but not used [-Wunused-function]
>  static void process_smi_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
>              ^
> 
> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
> ---
>  arch/x86/kvm/x86.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 1e7e76e..a60bdbc 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -5943,6 +5943,7 @@ static void process_smi_save_seg_32(struct kvm_vcpu *vcpu, char *buf, int n)
>  	put_smstate(u32, buf, offset, process_smi_get_segment_flags(&seg));
>  }
>  
> +#ifdef CONFIG_X86_64
>  static void process_smi_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
>  {
>  	struct kvm_segment seg;
> @@ -5958,6 +5959,7 @@ static void process_smi_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
>  	put_smstate(u32, buf, offset + 4, seg.limit);
>  	put_smstate(u64, buf, offset + 8, seg.base);
>  }
> +#endif
>  
>  static void process_smi_save_state_32(struct kvm_vcpu *vcpu, char *buf)
>  {
> 

Applied, thanks.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web