qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Reinoud Zandijk <reinoud@NetBSD.org>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Reinoud Zandijk <reinoud@NetBSD.org>,
	qemu-devel@nongnu.org, Claudio Fontana <cfontana@suse.de>
Subject: Re: [PATCH v1 1/2] Only check CONFIG_NVMM when NEED_CPU_H is defined
Date: Wed, 8 Sep 2021 11:46:27 +0200	[thread overview]
Message-ID: <YTiGc/0K+rupGIgD@gorilla.13thmonkey.org> (raw)
In-Reply-To: <6059b24a-a5ee-822f-8ff8-7277eb99896c@redhat.com>

On Tue, Sep 07, 2021 at 06:20:33PM +0200, Philippe Mathieu-Daudé wrote:
> On 7/18/21 3:46 PM, Reinoud Zandijk wrote:
> > Userland targers will otherwise use a poisoned CONFIG_NVMM
> 
> Typo "targets", but do you mean bsd-user or linux-user?

Since its on NetBSD, I guess its bsd-user :)

> But what is the error you get here?
> 
> cpu_report_tpr_access() is protected for !CONFIG_USER_ONLY,
> target/i386/nvmm/ is only build on system emulation.
> 
> So when can this happen? Last candidate is "sysemu/hw_accel.h";
> does it really need to include "sysemu/nvmm.h"?

[5560/6718] Compiling C object libcommon.fa.p/hw_core_cpu-common.c.o
FAILED: libcommon.fa.p/hw_core_cpu-common.c.o 
gcc -Ilibcommon.fa.p -I../slirp -I../slirp/src -I../dtc/libfdt
-I../capstone/include/capstone -I. -Iqapi -Itrace -Iui -Iui/shader
-I/usr/pkg/include -I/usr/pkg/include/glib-2.0 -I/usr/pkg/lib/glib-2.0/include
-I/usr/pkg/include/gio-unix-2.0 -I/usr/X11R7/include
-I/usr/pkg/include/spice-1 -I/usr/pkg/include/spice-server
-I/usr/X11R7/include/pixman-1 -I/usr/pkg/include/libpng16
-I/usr/pkg/include/SDL2 -I/usr/pkg/include/ncursesw
-I/usr/X11R7/include/libdrm -I/usr/include -I/usr/pkg/include/ncurses
-I/usr/pkg/include/python3.8 -I/usr/include/krb5 -fdiagnostics-color=auto
-pipe -Wall -Winvalid-pch -std=gnu11 -O2 -iquote . -iquote
/tmp/pkgsrc-gorilla/emulators/qemu-walking/work/qemu-9ad4c7c9b63f89c308fd988d509bed1389953c8b
-iquote
/tmp/pkgsrc-gorilla/emulators/qemu-walking/work/qemu-9ad4c7c9b63f89c308fd988d509bed1389953c8b/include
-iquote
/tmp/pkgsrc-gorilla/emulators/qemu-walking/work/qemu-9ad4c7c9b63f89c308fd988d509bed1389953c8b/disas/libvixl
-iquote
/tmp/pkgsrc-gorilla/emulators/qemu-walking/work/qemu-9ad4c7c9b63f89c308fd988d509bed1389953c8b/tcg/i386
-pthread -U_FORTIFY_SOURCE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef
-Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv
-Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security
-Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs
-Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2
-Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi
-fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE_EXTENDED=1
-fPIC -D_NETBSD_SOURCE -D_XOPEN_SOURCE=600 -DNCURSES_WIDECHAR -D_REENTRANT
-D_THREAD_SAFE -Wno-undef -MD -MQ libcommon.fa.p/hw_core_cpu-common.c.o -MF
libcommon.fa.p/hw_core_cpu-common.c.o.d -o
libcommon.fa.p/hw_core_cpu-common.c.o -c ../hw/core/cpu-common.c
In file included from
/tmp/pkgsrc-gorilla/emulators/qemu-walking/work/qemu-9ad4c7c9b63f89c308fd988d509bed1389953c8b/include/sysemu/hw_accel.h:19:0,
                 from ../hw/core/cpu-common.c:24:
/tmp/pkgsrc-gorilla/emulators/qemu-walking/work/qemu-9ad4c7c9b63f89c308fd988d509bed1389953c8b/include/sysemu/nvmm.h:16:8:
error: attempt to use poisoned "CONFIG_NVMM"
 #ifdef CONFIG_NVMM
        ^
[5589/6718] Compiling C object libcommon.fa.p/hw_net_e1000e_core.c.o
ninja: build stopped: subcommand failed.

With the patch it works fine.

With regards,
Reinoud


> > Signed-off-by: Reinoud Zandijk <Reinoud@NetBSD.org>
> > ---
> >  include/sysemu/nvmm.h | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/include/sysemu/nvmm.h b/include/sysemu/nvmm.h
> > index 6d216599b0..833670fccb 100644
> > --- a/include/sysemu/nvmm.h
> > +++ b/include/sysemu/nvmm.h
> > @@ -10,8 +10,7 @@
> >  #ifndef QEMU_NVMM_H
> >  #define QEMU_NVMM_H
> >  
> > -#include "config-host.h"
> > -#include "qemu-common.h"
> > +#ifdef NEED_CPU_H
> >  
> >  #ifdef CONFIG_NVMM
> >  
> > @@ -23,4 +22,6 @@ int nvmm_enabled(void);
> >  
> >  #endif /* CONFIG_NVMM */
> >  
> > -#endif /* CONFIG_NVMM */
> > +#endif /* NEED_CPU_H */
> > +
> > +#endif /* QEMU_NVMM_H */
> > 


  reply	other threads:[~2021-09-08  9:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-18 13:46 [PATCH v1 0/2] Update NVMM support to recent changes Reinoud Zandijk
2021-07-18 13:46 ` [PATCH v1 1/2] Only check CONFIG_NVMM when NEED_CPU_H is defined Reinoud Zandijk
2021-09-07 16:20   ` Philippe Mathieu-Daudé
2021-09-08  9:46     ` Reinoud Zandijk [this message]
2021-09-08 10:30       ` Philippe Mathieu-Daudé
2021-07-18 13:46 ` [PATCH v1 2/2] Fix nvmm_ram_block_added() function arguments Reinoud Zandijk
2021-07-18 16:38   ` Peter Maydell
2021-07-19 14:54     ` Reinoud Zandijk
2021-08-29 16:04 ` applied? Re: [PATCH v1 0/2] Update NVMM support to recent changes, [PATCH v1 1/2] Only check CONFIG_NVMM when NEED_CPU_H is defined, " Reinoud Zandijk
2021-08-29 16:39   ` Peter Maydell
2021-09-07 16:02     ` Reinoud Zandijk
2021-09-10 16:21       ` 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=YTiGc/0K+rupGIgD@gorilla.13thmonkey.org \
    --to=reinoud@netbsd.org \
    --cc=cfontana@suse.de \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).