kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>, kvm <kvm@vger.kernel.org>,
	Arthur Chunqi Li <yzt356@gmail.com>
Subject: [PATCH v2 06/15] lib/x86/smp: Fix compiler warnings
Date: Tue, 17 Dec 2013 12:17:57 +0100	[thread overview]
Message-ID: <52B032E5.6080203@siemens.com> (raw)
In-Reply-To: <52B028D7.6060405@redhat.com>

On 2013-12-17 11:35, Paolo Bonzini wrote:
> Il 16/12/2013 10:57, Jan Kiszka ha scritto:
>> Add missing include of desc.h for prototypes of setup_idt and
>> set_idt_entry and cast away the volatile of ipi_data - it's not volatile
>> while we run the IPI handler.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> 
> The right fix is to change the declaration from
> 
>   static volatile void *ipi_data;  // Pointer to volatile void
> 
> to
> 
>   static void *volatile ipi_data;  // Volatile pointer to void

Indeed, find v2 below.

Jan

---8<---

Add missing include of desc.h for prototypes of setup_idt and
set_idt_entry and adjust type of ipi_data to what it should actually be:
a volatile pointer the a void.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 lib/x86/smp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/x86/smp.c b/lib/x86/smp.c
index d4c8106..1eb49f2 100644
--- a/lib/x86/smp.c
+++ b/lib/x86/smp.c
@@ -3,6 +3,7 @@
 #include "smp.h"
 #include "apic.h"
 #include "fwcfg.h"
+#include "desc.h"

 #define IPI_VECTOR 0x20

@@ -10,7 +11,7 @@ typedef void (*ipi_function_type)(void *data);

 static struct spinlock ipi_lock;
 static volatile ipi_function_type ipi_function;
-static volatile void *ipi_data;
+static void *volatile ipi_data;
 static volatile int ipi_done;
 static volatile bool ipi_wait;
 static int _cpu_count;
-- 
1.8.1.1.298.ge7eed54


  reply	other threads:[~2013-12-17 11:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16  9:57 [PATCH 00/15] kvm-unit-tests: Fix and enhance nVMX tests Jan Kiszka
2013-12-16  9:57 ` [PATCH 01/15] VMX: Fix initialization of GDT, IDT and TR descriptors Jan Kiszka
2013-12-16  9:57 ` [PATCH 02/15] VMX: Drop redundant return statements Jan Kiszka
2013-12-16  9:57 ` [PATCH 03/15] rmap_chain: Remove dead code Jan Kiszka
2013-12-16  9:57 ` [PATCH 04/15] emulator: Exclude test_lgdt_lidt from building Jan Kiszka
2013-12-17 10:31   ` Paolo Bonzini
2013-12-16  9:57 ` [PATCH 05/15] init: Fix warning about returning without code Jan Kiszka
2013-12-16  9:57 ` [PATCH 06/15] lib/x86/smp: Fix compiler warnings Jan Kiszka
2013-12-17 10:33   ` Paolo Bonzini
2013-12-17 10:35   ` Paolo Bonzini
2013-12-17 11:17     ` Jan Kiszka [this message]
2013-12-16  9:57 ` [PATCH 07/15] VMX: Remove unneeded basic_init Jan Kiszka
2013-12-16  9:57 ` [PATCH 08/15] VMX: Fix capability check for EPT test Jan Kiszka
2013-12-16  9:57 ` [PATCH 09/15] VMX: Let init handler decide about test start Jan Kiszka
2013-12-16  9:57 ` [PATCH 10/15] VMX: Remove unused return code from setup_ept_range Jan Kiszka
2013-12-16  9:57 ` [PATCH 11/15] VMX: Make syscall handler optional Jan Kiszka
2013-12-16  9:57 ` [PATCH 12/15] VMX: Simplify basic handlers Jan Kiszka
2013-12-16  9:57 ` [PATCH 13/15] VMX: Rework and enhance initial feature detection/enabling Jan Kiszka
2013-12-16  9:57 ` [PATCH 14/15] VMX: Add test cases around interrupt injection and halting Jan Kiszka
2014-03-25 11:18   ` Paolo Bonzini
2014-03-25 12:05     ` Jan Kiszka
2013-12-16  9:57 ` [PATCH 15/15] VMX: Add test case for preemption timer firing during hlt Jan Kiszka
2013-12-18  9:36 ` [PATCH 00/15] kvm-unit-tests: Fix and enhance nVMX tests Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52B032E5.6080203@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=gleb@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=yzt356@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).