qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/boards: make it safe to include for linux-user
@ 2015-03-10 17:33 Michael S. Tsirkin
  2015-03-10 17:34 ` Andreas Färber
  0 siblings, 1 reply; 6+ messages in thread
From: Michael S. Tsirkin @ 2015-03-10 17:33 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marcel Apfelbaum, Paolo Bonzini,
	=?UTF-8?q?Andreas=20F=C3=A4rber?=, Alexander Graf

Make it safe to include hw/boards.h in exec.c
for linux-user configurations.
We don't need any of its contents though.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---

Already on my tree as Marcel's patches needed this.

 include/hw/boards.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/hw/boards.h b/include/hw/boards.h
index 1f21bdf..0bf00f7 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -3,6 +3,8 @@
 #ifndef HW_BOARDS_H
 #define HW_BOARDS_H
 
+#if !defined(CONFIG_USER_ONLY)
+
 #include "qemu/typedefs.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/accel.h"
@@ -154,3 +156,5 @@ struct MachineState {
 };
 
 #endif
+
+#endif
-- 
MST

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

* Re: [Qemu-devel] [PATCH] hw/boards: make it safe to include for linux-user
  2015-03-10 17:33 [Qemu-devel] [PATCH] hw/boards: make it safe to include for linux-user Michael S. Tsirkin
@ 2015-03-10 17:34 ` Andreas Färber
  2015-03-10 17:41   ` Michael S. Tsirkin
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Färber @ 2015-03-10 17:34 UTC (permalink / raw)
  To: Michael S. Tsirkin, qemu-devel
  Cc: Marcel Apfelbaum, Paolo Bonzini, Alexander Graf

Am 10.03.2015 um 18:33 schrieb Michael S. Tsirkin:
> Make it safe to include hw/boards.h in exec.c
> for linux-user configurations.
> We don't need any of its contents though.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> 
> Already on my tree as Marcel's patches needed this.

Why? Which patches?

Andreas

> 
>  include/hw/boards.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/hw/boards.h b/include/hw/boards.h
> index 1f21bdf..0bf00f7 100644
> --- a/include/hw/boards.h
> +++ b/include/hw/boards.h
> @@ -3,6 +3,8 @@
>  #ifndef HW_BOARDS_H
>  #define HW_BOARDS_H
>  
> +#if !defined(CONFIG_USER_ONLY)
> +
>  #include "qemu/typedefs.h"
>  #include "sysemu/blockdev.h"
>  #include "sysemu/accel.h"
> @@ -154,3 +156,5 @@ struct MachineState {
>  };
>  
>  #endif
> +
> +#endif
> 


-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)

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

* Re: [Qemu-devel] [PATCH] hw/boards: make it safe to include for linux-user
  2015-03-10 17:34 ` Andreas Färber
@ 2015-03-10 17:41   ` Michael S. Tsirkin
  2015-03-10 17:53     ` Andreas Färber
  0 siblings, 1 reply; 6+ messages in thread
From: Michael S. Tsirkin @ 2015-03-10 17:41 UTC (permalink / raw)
  To: Andreas Färber
  Cc: Marcel Apfelbaum, Paolo Bonzini, qemu-devel, Alexander Graf

On Tue, Mar 10, 2015 at 06:34:44PM +0100, Andreas Färber wrote:
> Am 10.03.2015 um 18:33 schrieb Michael S. Tsirkin:
> > Make it safe to include hw/boards.h in exec.c
> > for linux-user configurations.
> > We don't need any of its contents though.
> > 
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> > 
> > Already on my tree as Marcel's patches needed this.
> 
> Why? Which patches?
> 
> Andreas

This one:
    machine: query dump-guest-core machine property rather than qemu opts


> > 
> >  include/hw/boards.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/include/hw/boards.h b/include/hw/boards.h
> > index 1f21bdf..0bf00f7 100644
> > --- a/include/hw/boards.h
> > +++ b/include/hw/boards.h
> > @@ -3,6 +3,8 @@
> >  #ifndef HW_BOARDS_H
> >  #define HW_BOARDS_H
> >  
> > +#if !defined(CONFIG_USER_ONLY)
> > +
> >  #include "qemu/typedefs.h"
> >  #include "sysemu/blockdev.h"
> >  #include "sysemu/accel.h"
> > @@ -154,3 +156,5 @@ struct MachineState {
> >  };
> >  
> >  #endif
> > +
> > +#endif
> > 
> 
> 
> -- 
> SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
> Graham Norton; HRB 21284 (AG Nürnberg)

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

* Re: [Qemu-devel] [PATCH] hw/boards: make it safe to include for linux-user
  2015-03-10 17:41   ` Michael S. Tsirkin
@ 2015-03-10 17:53     ` Andreas Färber
  2015-03-10 18:04       ` Peter Maydell
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Färber @ 2015-03-10 17:53 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Marcel Apfelbaum, Paolo Bonzini, qemu-devel, Alexander Graf

Am 10.03.2015 um 18:41 schrieb Michael S. Tsirkin:
> On Tue, Mar 10, 2015 at 06:34:44PM +0100, Andreas Färber wrote:
>> Am 10.03.2015 um 18:33 schrieb Michael S. Tsirkin:
>>> Make it safe to include hw/boards.h in exec.c
>>> for linux-user configurations.
>>> We don't need any of its contents though.
>>>
>>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>>> ---
>>>
>>> Already on my tree as Marcel's patches needed this.
>>
>> Why? Which patches?
>>
>> Andreas
> 
> This one:
>     machine: query dump-guest-core machine property rather than qemu opts

Let's please find a better way to fix that. hw/boards.h shouldn't be
used outside softmmu code.

Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)

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

* Re: [Qemu-devel] [PATCH] hw/boards: make it safe to include for linux-user
  2015-03-10 17:53     ` Andreas Färber
@ 2015-03-10 18:04       ` Peter Maydell
  2015-03-10 21:22         ` Michael S. Tsirkin
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2015-03-10 18:04 UTC (permalink / raw)
  To: Andreas Färber
  Cc: Marcel Apfelbaum, Paolo Bonzini, Alexander Graf, QEMU Developers,
	Michael S. Tsirkin

On 10 March 2015 at 17:53, Andreas Färber <afaerber@suse.de> wrote:
> Am 10.03.2015 um 18:41 schrieb Michael S. Tsirkin:
>> On Tue, Mar 10, 2015 at 06:34:44PM +0100, Andreas Färber wrote:
>>> Am 10.03.2015 um 18:33 schrieb Michael S. Tsirkin:
>>>> Make it safe to include hw/boards.h in exec.c
>>>> for linux-user configurations.
>>>> We don't need any of its contents though.
>>>>
>>>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>>>> ---
>>>>
>>>> Already on my tree as Marcel's patches needed this.
>>>
>>> Why? Which patches?
>>>
>>> Andreas
>>
>> This one:
>>     machine: query dump-guest-core machine property rather than qemu opts
>
> Let's please find a better way to fix that. hw/boards.h shouldn't be
> used outside softmmu code.

Agreed.

-- PMM

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

* Re: [Qemu-devel] [PATCH] hw/boards: make it safe to include for linux-user
  2015-03-10 18:04       ` Peter Maydell
@ 2015-03-10 21:22         ` Michael S. Tsirkin
  0 siblings, 0 replies; 6+ messages in thread
From: Michael S. Tsirkin @ 2015-03-10 21:22 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Marcel Apfelbaum, Paolo Bonzini, Alexander Graf,
	Andreas Färber, QEMU Developers

On Tue, Mar 10, 2015 at 06:04:20PM +0000, Peter Maydell wrote:
> On 10 March 2015 at 17:53, Andreas Färber <afaerber@suse.de> wrote:
> > Am 10.03.2015 um 18:41 schrieb Michael S. Tsirkin:
> >> On Tue, Mar 10, 2015 at 06:34:44PM +0100, Andreas Färber wrote:
> >>> Am 10.03.2015 um 18:33 schrieb Michael S. Tsirkin:
> >>>> Make it safe to include hw/boards.h in exec.c
> >>>> for linux-user configurations.
> >>>> We don't need any of its contents though.
> >>>>
> >>>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >>>> ---
> >>>>
> >>>> Already on my tree as Marcel's patches needed this.
> >>>
> >>> Why? Which patches?
> >>>
> >>> Andreas
> >>
> >> This one:
> >>     machine: query dump-guest-core machine property rather than qemu opts
> >
> > Let's please find a better way to fix that. hw/boards.h shouldn't be
> > used outside softmmu code.
> 
> Agreed.
> 
> -- PMM


What is prefered?

#ifndef USER
#include "hw/boards.h"
#endif

?

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

end of thread, other threads:[~2015-03-10 21:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-10 17:33 [Qemu-devel] [PATCH] hw/boards: make it safe to include for linux-user Michael S. Tsirkin
2015-03-10 17:34 ` Andreas Färber
2015-03-10 17:41   ` Michael S. Tsirkin
2015-03-10 17:53     ` Andreas Färber
2015-03-10 18:04       ` Peter Maydell
2015-03-10 21:22         ` Michael S. Tsirkin

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).