kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kvm: compile process_smi_save_seg_64() only for x86_64
@ 2015-09-06 13:35 Alexander Kuleshov
  2015-09-06 14:22 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Kuleshov @ 2015-09-06 13:35 UTC (permalink / raw)
  To: Gleb Natapov
  Cc: Paolo Bonzini, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	kvm, linux-kernel, Alexander Kuleshov

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kvm: compile process_smi_save_seg_64() only for x86_64
  2015-09-06 13:35 [PATCH] kvm: compile process_smi_save_seg_64() only for x86_64 Alexander Kuleshov
@ 2015-09-06 14:22 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2015-09-06 14:22 UTC (permalink / raw)
  To: Alexander Kuleshov, Gleb Natapov
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, kvm,
	linux-kernel



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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-06 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-06 13:35 [PATCH] kvm: compile process_smi_save_seg_64() only for x86_64 Alexander Kuleshov
2015-09-06 14:22 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).