All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Latest Git fails to compile in cpus.c
@ 2010-04-07  9:13 Nigel Horne
  2010-04-07 17:32 ` malc
  0 siblings, 1 reply; 7+ messages in thread
From: Nigel Horne @ 2010-04-07  9:13 UTC (permalink / raw)
  To: qemu-devel

  ./configure --enable-linux-aio --enable-io-thread --enable-kvm:

....

/home/njh/src/qemu/cpus.c:360: error: ‘SIG_IPI’ undeclared (first use in 
this function)
/home/njh/src/qemu/cpus.c:360: error: (Each undeclared identifier is 
reported only once

-Nigel

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

* Re: [Qemu-devel] Latest Git fails to compile in cpus.c
  2010-04-07  9:13 [Qemu-devel] Latest Git fails to compile in cpus.c Nigel Horne
@ 2010-04-07 17:32 ` malc
  2010-04-07 18:02   ` Blue Swirl
  0 siblings, 1 reply; 7+ messages in thread
From: malc @ 2010-04-07 17:32 UTC (permalink / raw)
  To: Nigel Horne; +Cc: qemu-devel

On Wed, 7 Apr 2010, Nigel Horne wrote:

>  ./configure --enable-linux-aio --enable-io-thread --enable-kvm:
> 
> ....
> 
> /home/njh/src/qemu/cpus.c:360: error: ?SIG_IPI? undeclared (first use in this
> function)
> /home/njh/src/qemu/cpus.c:360: error: (Each undeclared identifier is reported
> only once

And even if one defines that things will still not work due to:
.../cpus.c:657: error: 'vmstop_requested' undeclared (first use in this function)

IOW --enable-io-thread is broken as it is now.

-- 
mailto:av1474@comtv.ru

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

* Re: [Qemu-devel] Latest Git fails to compile in cpus.c
  2010-04-07 17:32 ` malc
@ 2010-04-07 18:02   ` Blue Swirl
  2010-04-08  1:27     ` Marcelo Tosatti
  0 siblings, 1 reply; 7+ messages in thread
From: Blue Swirl @ 2010-04-07 18:02 UTC (permalink / raw)
  To: malc; +Cc: Nigel Horne, qemu-devel

On 4/7/10, malc <av1474@comtv.ru> wrote:
> On Wed, 7 Apr 2010, Nigel Horne wrote:
>
>  >  ./configure --enable-linux-aio --enable-io-thread --enable-kvm:
>  >
>  > ....
>  >
>  > /home/njh/src/qemu/cpus.c:360: error: ?SIG_IPI? undeclared (first use in this
>  > function)
>  > /home/njh/src/qemu/cpus.c:360: error: (Each undeclared identifier is reported
>  > only once
>
>
> And even if one defines that things will still not work due to:
>  .../cpus.c:657: error: 'vmstop_requested' undeclared (first use in this function)
>
>  IOW --enable-io-thread is broken as it is now.

Didn't anybody test the patch I sent:
http://lists.gnu.org/archive/html/qemu-devel/2010-04/msg00051.html

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

* Re: [Qemu-devel] Latest Git fails to compile in cpus.c
  2010-04-07 18:02   ` Blue Swirl
@ 2010-04-08  1:27     ` Marcelo Tosatti
  2010-04-11 16:29       ` Blue Swirl
  0 siblings, 1 reply; 7+ messages in thread
From: Marcelo Tosatti @ 2010-04-08  1:27 UTC (permalink / raw)
  To: Blue Swirl; +Cc: Nigel Horne, qemu-devel

On Wed, Apr 07, 2010 at 09:02:53PM +0300, Blue Swirl wrote:
> On 4/7/10, malc <av1474@comtv.ru> wrote:
> > On Wed, 7 Apr 2010, Nigel Horne wrote:
> >
> >  >  ./configure --enable-linux-aio --enable-io-thread --enable-kvm:
> >  >
> >  > ....
> >  >
> >  > /home/njh/src/qemu/cpus.c:360: error: ?SIG_IPI? undeclared (first use in this
> >  > function)
> >  > /home/njh/src/qemu/cpus.c:360: error: (Each undeclared identifier is reported
> >  > only once
> >
> >
> > And even if one defines that things will still not work due to:
> >  .../cpus.c:657: error: 'vmstop_requested' undeclared (first use in this function)
> >
> >  IOW --enable-io-thread is broken as it is now.
> 
> Didn't anybody test the patch I sent:
> http://lists.gnu.org/archive/html/qemu-devel/2010-04/msg00051.html
> 

The broadcast must be signalled after the machine is fully initialized.

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

* Re: [Qemu-devel] Latest Git fails to compile in cpus.c
  2010-04-08  1:27     ` Marcelo Tosatti
@ 2010-04-11 16:29       ` Blue Swirl
  2010-04-12 16:49         ` Marcelo Tosatti
  0 siblings, 1 reply; 7+ messages in thread
From: Blue Swirl @ 2010-04-11 16:29 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Nigel Horne, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]

On 4/8/10, Marcelo Tosatti <mtosatti@redhat.com> wrote:
> On Wed, Apr 07, 2010 at 09:02:53PM +0300, Blue Swirl wrote:
>  > On 4/7/10, malc <av1474@comtv.ru> wrote:
>  > > On Wed, 7 Apr 2010, Nigel Horne wrote:
>  > >
>  > >  >  ./configure --enable-linux-aio --enable-io-thread --enable-kvm:
>  > >  >
>  > >  > ....
>  > >  >
>  > >  > /home/njh/src/qemu/cpus.c:360: error: ?SIG_IPI? undeclared (first use in this
>  > >  > function)
>  > >  > /home/njh/src/qemu/cpus.c:360: error: (Each undeclared identifier is reported
>  > >  > only once
>  > >
>  > >
>  > > And even if one defines that things will still not work due to:
>  > >  .../cpus.c:657: error: 'vmstop_requested' undeclared (first use in this function)
>  > >
>  > >  IOW --enable-io-thread is broken as it is now.
>  >
>  > Didn't anybody test the patch I sent:
>  > http://lists.gnu.org/archive/html/qemu-devel/2010-04/msg00051.html
>  >
>
>
> The broadcast must be signalled after the machine is fully initialized.

I made a new version which does not change the call sequence.

[-- Attachment #2: 0001-Fix-build-when-configured-with-enable-io-thread.patch --]
[-- Type: text/x-diff, Size: 2539 bytes --]

From cad37052c7dd2a7a572614b62d76d9f2e8a2a406 Mon Sep 17 00:00:00 2001
From: Blue Swirl <blauwirbel@gmail.com>
Date: Sun, 11 Apr 2010 16:26:54 +0000
Subject: [PATCH] Fix build when configured with --enable-io-thread

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 cpus.c |   16 ++++++++++++++++
 cpus.h |    4 +++-
 vl.c   |   13 ++-----------
 3 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/cpus.c b/cpus.c
index 0debe77..8450ee4 100644
--- a/cpus.c
+++ b/cpus.c
@@ -33,6 +33,12 @@
 
 #include "cpus.h"
 
+#ifdef SIGRTMIN
+#define SIG_IPI (SIGRTMIN+4)
+#else
+#define SIG_IPI SIGUSR1
+#endif
+
 static CPUState *cur_cpu;
 static CPUState *next_cpu;
 
@@ -226,6 +232,10 @@ int qemu_init_main_loop(void)
     return qemu_event_init();
 }
 
+void qemu_main_loop_start(void)
+{
+}
+
 void qemu_init_vcpu(void *_env)
 {
     CPUState *env = _env;
@@ -318,6 +328,12 @@ int qemu_init_main_loop(void)
     return 0;
 }
 
+void qemu_main_loop_start(void)
+{
+    qemu_system_ready = 1;
+    qemu_cond_broadcast(&qemu_system_cond);
+}
+
 static void qemu_wait_io_event_common(CPUState *env)
 {
     if (env->stop) {
diff --git a/cpus.h b/cpus.h
index 67c9a3b..4ebad3a 100644
--- a/cpus.h
+++ b/cpus.h
@@ -1,8 +1,9 @@
 #ifndef QEMU_CPUS_H
 #define QEMU_CPUS_H
 
-/* cpu-common.c */
+/* cpus.c */
 int qemu_init_main_loop(void);
+void qemu_main_loop_start(void);
 void resume_all_vcpus(void);
 void pause_all_vcpus(void);
 
@@ -10,6 +11,7 @@ void pause_all_vcpus(void);
 extern int smp_cores;
 extern int smp_threads;
 extern int debug_requested;
+extern int vmstop_requested;
 void vm_state_notify(int running, int reason);
 bool tcg_cpu_exec(void);
 void set_numa_modes(void);
diff --git a/vl.c b/vl.c
index ea79ac4..4fb55b8 100644
--- a/vl.c
+++ b/vl.c
@@ -244,12 +244,6 @@ int kvm_allowed = 0;
 uint32_t xen_domid;
 enum xen_mode xen_mode = XEN_EMULATE;
 
-#ifdef SIGRTMIN
-#define SIG_IPI (SIGRTMIN+4)
-#else
-#define SIG_IPI SIGUSR1
-#endif
-
 static int default_serial = 1;
 static int default_parallel = 1;
 static int default_virtcon = 1;
@@ -1717,7 +1711,7 @@ static int reset_requested;
 static int shutdown_requested;
 static int powerdown_requested;
 int debug_requested;
-static int vmstop_requested;
+int vmstop_requested;
 
 int qemu_shutdown_requested(void)
 {
@@ -1955,10 +1949,7 @@ static void main_loop(void)
 {
     int r;
 
-#ifdef CONFIG_IOTHREAD
-    qemu_system_ready = 1;
-    qemu_cond_broadcast(&qemu_system_cond);
-#endif
+    qemu_main_loop_start();
 
     for (;;) {
         do {
-- 
1.5.6.5


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

* Re: [Qemu-devel] Latest Git fails to compile in cpus.c
  2010-04-11 16:29       ` Blue Swirl
@ 2010-04-12 16:49         ` Marcelo Tosatti
  2010-04-12 17:33           ` Blue Swirl
  0 siblings, 1 reply; 7+ messages in thread
From: Marcelo Tosatti @ 2010-04-12 16:49 UTC (permalink / raw)
  To: Blue Swirl; +Cc: Nigel Horne, qemu-devel

On Sun, Apr 11, 2010 at 07:29:04PM +0300, Blue Swirl wrote:
> On 4/8/10, Marcelo Tosatti <mtosatti@redhat.com> wrote:
> > On Wed, Apr 07, 2010 at 09:02:53PM +0300, Blue Swirl wrote:
> >  > On 4/7/10, malc <av1474@comtv.ru> wrote:
> >  > > On Wed, 7 Apr 2010, Nigel Horne wrote:
> >  > >
> >  > >  >  ./configure --enable-linux-aio --enable-io-thread --enable-kvm:
> >  > >  >
> >  > >  > ....
> >  > >  >
> >  > >  > /home/njh/src/qemu/cpus.c:360: error: ?SIG_IPI? undeclared (first use in this
> >  > >  > function)
> >  > >  > /home/njh/src/qemu/cpus.c:360: error: (Each undeclared identifier is reported
> >  > >  > only once
> >  > >
> >  > >
> >  > > And even if one defines that things will still not work due to:
> >  > >  .../cpus.c:657: error: 'vmstop_requested' undeclared (first use in this function)
> >  > >
> >  > >  IOW --enable-io-thread is broken as it is now.
> >  >
> >  > Didn't anybody test the patch I sent:
> >  > http://lists.gnu.org/archive/html/qemu-devel/2010-04/msg00051.html
> >  >
> >
> >
> > The broadcast must be signalled after the machine is fully initialized.
> 
> I made a new version which does not change the call sequence.

ACK


> From cad37052c7dd2a7a572614b62d76d9f2e8a2a406 Mon Sep 17 00:00:00 2001
> From: Blue Swirl <blauwirbel@gmail.com>
> Date: Sun, 11 Apr 2010 16:26:54 +0000
> Subject: [PATCH] Fix build when configured with --enable-io-thread
> 
> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
> ---
>  cpus.c |   16 ++++++++++++++++
>  cpus.h |    4 +++-
>  vl.c   |   13 ++-----------
>  3 files changed, 21 insertions(+), 12 deletions(-)
> 
> diff --git a/cpus.c b/cpus.c
> index 0debe77..8450ee4 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -33,6 +33,12 @@
>  
>  #include "cpus.h"
>  
> +#ifdef SIGRTMIN
> +#define SIG_IPI (SIGRTMIN+4)
> +#else
> +#define SIG_IPI SIGUSR1
> +#endif
> +
>  static CPUState *cur_cpu;
>  static CPUState *next_cpu;
>  
> @@ -226,6 +232,10 @@ int qemu_init_main_loop(void)
>      return qemu_event_init();
>  }
>  
> +void qemu_main_loop_start(void)
> +{
> +}
> +
>  void qemu_init_vcpu(void *_env)
>  {
>      CPUState *env = _env;
> @@ -318,6 +328,12 @@ int qemu_init_main_loop(void)
>      return 0;
>  }
>  
> +void qemu_main_loop_start(void)
> +{
> +    qemu_system_ready = 1;
> +    qemu_cond_broadcast(&qemu_system_cond);
> +}
> +
>  static void qemu_wait_io_event_common(CPUState *env)
>  {
>      if (env->stop) {
> diff --git a/cpus.h b/cpus.h
> index 67c9a3b..4ebad3a 100644
> --- a/cpus.h
> +++ b/cpus.h
> @@ -1,8 +1,9 @@
>  #ifndef QEMU_CPUS_H
>  #define QEMU_CPUS_H
>  
> -/* cpu-common.c */
> +/* cpus.c */
>  int qemu_init_main_loop(void);
> +void qemu_main_loop_start(void);
>  void resume_all_vcpus(void);
>  void pause_all_vcpus(void);
>  
> @@ -10,6 +11,7 @@ void pause_all_vcpus(void);
>  extern int smp_cores;
>  extern int smp_threads;
>  extern int debug_requested;
> +extern int vmstop_requested;
>  void vm_state_notify(int running, int reason);
>  bool tcg_cpu_exec(void);
>  void set_numa_modes(void);
> diff --git a/vl.c b/vl.c
> index ea79ac4..4fb55b8 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -244,12 +244,6 @@ int kvm_allowed = 0;
>  uint32_t xen_domid;
>  enum xen_mode xen_mode = XEN_EMULATE;
>  
> -#ifdef SIGRTMIN
> -#define SIG_IPI (SIGRTMIN+4)
> -#else
> -#define SIG_IPI SIGUSR1
> -#endif
> -
>  static int default_serial = 1;
>  static int default_parallel = 1;
>  static int default_virtcon = 1;
> @@ -1717,7 +1711,7 @@ static int reset_requested;
>  static int shutdown_requested;
>  static int powerdown_requested;
>  int debug_requested;
> -static int vmstop_requested;
> +int vmstop_requested;
>  
>  int qemu_shutdown_requested(void)
>  {
> @@ -1955,10 +1949,7 @@ static void main_loop(void)
>  {
>      int r;
>  
> -#ifdef CONFIG_IOTHREAD
> -    qemu_system_ready = 1;
> -    qemu_cond_broadcast(&qemu_system_cond);
> -#endif
> +    qemu_main_loop_start();
>  
>      for (;;) {
>          do {
> -- 
> 1.5.6.5
> 

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

* Re: [Qemu-devel] Latest Git fails to compile in cpus.c
  2010-04-12 16:49         ` Marcelo Tosatti
@ 2010-04-12 17:33           ` Blue Swirl
  0 siblings, 0 replies; 7+ messages in thread
From: Blue Swirl @ 2010-04-12 17:33 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Nigel Horne, qemu-devel

On 4/12/10, Marcelo Tosatti <mtosatti@redhat.com> wrote:
> On Sun, Apr 11, 2010 at 07:29:04PM +0300, Blue Swirl wrote:
>  > On 4/8/10, Marcelo Tosatti <mtosatti@redhat.com> wrote:
>  > > On Wed, Apr 07, 2010 at 09:02:53PM +0300, Blue Swirl wrote:
>  > >  > On 4/7/10, malc <av1474@comtv.ru> wrote:
>  > >  > > On Wed, 7 Apr 2010, Nigel Horne wrote:
>  > >  > >
>  > >  > >  >  ./configure --enable-linux-aio --enable-io-thread --enable-kvm:
>  > >  > >  >
>  > >  > >  > ....
>  > >  > >  >
>  > >  > >  > /home/njh/src/qemu/cpus.c:360: error: ?SIG_IPI? undeclared (first use in this
>  > >  > >  > function)
>  > >  > >  > /home/njh/src/qemu/cpus.c:360: error: (Each undeclared identifier is reported
>  > >  > >  > only once
>  > >  > >
>  > >  > >
>  > >  > > And even if one defines that things will still not work due to:
>  > >  > >  .../cpus.c:657: error: 'vmstop_requested' undeclared (first use in this function)
>  > >  > >
>  > >  > >  IOW --enable-io-thread is broken as it is now.
>  > >  >
>  > >  > Didn't anybody test the patch I sent:
>  > >  > http://lists.gnu.org/archive/html/qemu-devel/2010-04/msg00051.html
>  > >  >
>  > >
>  > >
>  > > The broadcast must be signalled after the machine is fully initialized.
>  >
>  > I made a new version which does not change the call sequence.
>
>
> ACK

Thanks for the ACK, applied.

>  > From cad37052c7dd2a7a572614b62d76d9f2e8a2a406 Mon Sep 17 00:00:00 2001
>  > From: Blue Swirl <blauwirbel@gmail.com>
>  > Date: Sun, 11 Apr 2010 16:26:54 +0000
>  > Subject: [PATCH] Fix build when configured with --enable-io-thread
>  >
>  > Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
>  > ---
>  >  cpus.c |   16 ++++++++++++++++
>  >  cpus.h |    4 +++-
>  >  vl.c   |   13 ++-----------
>  >  3 files changed, 21 insertions(+), 12 deletions(-)
>  >
>  > diff --git a/cpus.c b/cpus.c
>  > index 0debe77..8450ee4 100644
>  > --- a/cpus.c
>  > +++ b/cpus.c
>  > @@ -33,6 +33,12 @@
>  >
>  >  #include "cpus.h"
>  >
>  > +#ifdef SIGRTMIN
>  > +#define SIG_IPI (SIGRTMIN+4)
>  > +#else
>  > +#define SIG_IPI SIGUSR1
>  > +#endif
>  > +
>  >  static CPUState *cur_cpu;
>  >  static CPUState *next_cpu;
>  >
>  > @@ -226,6 +232,10 @@ int qemu_init_main_loop(void)
>  >      return qemu_event_init();
>  >  }
>  >
>  > +void qemu_main_loop_start(void)
>  > +{
>  > +}
>  > +
>  >  void qemu_init_vcpu(void *_env)
>  >  {
>  >      CPUState *env = _env;
>  > @@ -318,6 +328,12 @@ int qemu_init_main_loop(void)
>  >      return 0;
>  >  }
>  >
>  > +void qemu_main_loop_start(void)
>  > +{
>  > +    qemu_system_ready = 1;
>  > +    qemu_cond_broadcast(&qemu_system_cond);
>  > +}
>  > +
>  >  static void qemu_wait_io_event_common(CPUState *env)
>  >  {
>  >      if (env->stop) {
>  > diff --git a/cpus.h b/cpus.h
>  > index 67c9a3b..4ebad3a 100644
>  > --- a/cpus.h
>  > +++ b/cpus.h
>  > @@ -1,8 +1,9 @@
>  >  #ifndef QEMU_CPUS_H
>  >  #define QEMU_CPUS_H
>  >
>  > -/* cpu-common.c */
>  > +/* cpus.c */
>  >  int qemu_init_main_loop(void);
>  > +void qemu_main_loop_start(void);
>  >  void resume_all_vcpus(void);
>  >  void pause_all_vcpus(void);
>  >
>  > @@ -10,6 +11,7 @@ void pause_all_vcpus(void);
>  >  extern int smp_cores;
>  >  extern int smp_threads;
>  >  extern int debug_requested;
>  > +extern int vmstop_requested;
>  >  void vm_state_notify(int running, int reason);
>  >  bool tcg_cpu_exec(void);
>  >  void set_numa_modes(void);
>  > diff --git a/vl.c b/vl.c
>  > index ea79ac4..4fb55b8 100644
>  > --- a/vl.c
>  > +++ b/vl.c
>  > @@ -244,12 +244,6 @@ int kvm_allowed = 0;
>  >  uint32_t xen_domid;
>  >  enum xen_mode xen_mode = XEN_EMULATE;
>  >
>  > -#ifdef SIGRTMIN
>  > -#define SIG_IPI (SIGRTMIN+4)
>  > -#else
>  > -#define SIG_IPI SIGUSR1
>  > -#endif
>  > -
>  >  static int default_serial = 1;
>  >  static int default_parallel = 1;
>  >  static int default_virtcon = 1;
>  > @@ -1717,7 +1711,7 @@ static int reset_requested;
>  >  static int shutdown_requested;
>  >  static int powerdown_requested;
>  >  int debug_requested;
>  > -static int vmstop_requested;
>  > +int vmstop_requested;
>  >
>  >  int qemu_shutdown_requested(void)
>  >  {
>  > @@ -1955,10 +1949,7 @@ static void main_loop(void)
>  >  {
>  >      int r;
>  >
>  > -#ifdef CONFIG_IOTHREAD
>  > -    qemu_system_ready = 1;
>  > -    qemu_cond_broadcast(&qemu_system_cond);
>  > -#endif
>  > +    qemu_main_loop_start();
>  >
>  >      for (;;) {
>  >          do {
>  > --
>  > 1.5.6.5
>  >
>
>

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

end of thread, other threads:[~2010-04-12 17:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-07  9:13 [Qemu-devel] Latest Git fails to compile in cpus.c Nigel Horne
2010-04-07 17:32 ` malc
2010-04-07 18:02   ` Blue Swirl
2010-04-08  1:27     ` Marcelo Tosatti
2010-04-11 16:29       ` Blue Swirl
2010-04-12 16:49         ` Marcelo Tosatti
2010-04-12 17:33           ` Blue Swirl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.