mbox series

[RFC,0/3] QEMU as IPMI BMC emulator

Message ID 20200929003916.4183696-1-hskinnemoen@google.com (mailing list archive)
Headers show
Series QEMU as IPMI BMC emulator | expand

Message

Zhijian Li (Fujitsu)" via Sept. 29, 2020, 12:39 a.m. UTC
This series briefly documents the existing IPMI device support for main
processor emulation, and goes on to propose a similar device structure to
emulate IPMI responder devices in BMC machines. This would allow a qemu
instance running BMC firmware to serve as an external BMC for a qemu instance
running server software.

RFC only at this point because the series does not include actual code to
implement this. I'd appreciate some initial feedback on

1. Whether anyone else is interested in something like this.
2. Completeness (i.e. anything that could be explained in more detail in the
   docs).
3. Naming, and whether 'specs' is the right place to put this.
4. Whether it's OK to enable the blockdiag sphinx extension (if not, I'll just
   toss the block diagrams and turn the docs into walls of text).

If this seems reasonable, I'll start working with one of my team mates on
implementing the common part, as well as the Nuvoton-specific responder device.
Possibly also an Aspeed device.

Havard Skinnemoen (3):
  docs: enable sphinx blockdiag extension
  docs/specs: IPMI device emulation: main processor
  docs/specs: IPMI device emulation: BMC

 docs/conf.py         |   5 +-
 docs/specs/index.rst |   1 +
 docs/specs/ipmi.rst  | 183 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 188 insertions(+), 1 deletion(-)
 create mode 100644 docs/specs/ipmi.rst

Comments

no-reply@patchew.org Sept. 29, 2020, 2:48 a.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20200929003916.4183696-1-hskinnemoen@google.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20200929003916.4183696-1-hskinnemoen@google.com
Subject: [RFC 0/3] QEMU as IPMI BMC emulator

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Switched to a new branch 'test'
572df61 docs/specs: IPMI device emulation: BMC
27c176d docs/specs: IPMI device emulation: main processor
cf7927e docs: enable sphinx blockdiag extension

=== OUTPUT BEGIN ===
1/3 Checking commit cf7927e5561e (docs: enable sphinx blockdiag extension)
WARNING: line over 80 characters
#19: FILE: docs/conf.py:70:
+extensions = ['kerneldoc', 'qmp_lexer', 'hxtool', 'depfile', 'sphinxcontrib.blockdiag']

WARNING: line over 80 characters
#22: FILE: docs/conf.py:73:
+blockdiag_fontpath = '/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf'

total: 0 errors, 2 warnings, 11 lines checked

Patch 1/3 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/3 Checking commit 27c176d70bcd (docs/specs: IPMI device emulation: main processor)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#26: 
new file mode 100644

ERROR: trailing whitespace
#51: FILE: docs/specs/ipmi.rst:21:
+  $

total: 1 errors, 1 warnings, 106 lines checked

Patch 2/3 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

3/3 Checking commit 572df6110448 (docs/specs: IPMI device emulation: BMC)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200929003916.4183696-1-hskinnemoen@google.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
no-reply@patchew.org Sept. 29, 2020, 2:51 a.m. UTC | #2
Patchew URL: https://patchew.org/QEMU/20200929003916.4183696-1-hskinnemoen@google.com/



Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#! /bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-mingw@fedora J=14 NETWORK=1
=== TEST SCRIPT END ===

--enable-werror --target-list=x86_64-softmmu,aarch64-softmmu --prefix=/tmp/qemu-test/install --python=/usr/bin/python3 --cross-prefix=x86_64-w64-mingw32- --enable-trace-backends=simple --enable-gnutls --enable-nettle --enable-curl --enable-vnc --enable-bzip2 --enable-guest-agent --enable-docs
Warning: /usr/bin/sphinx-build-3 exists but it is either too old or uses too old a Python version

ERROR: User requested feature docs
       configure was not able to find it.
       Install texinfo, Perl/perl-podlators and a Python 3 version of python-sphinx

---
funcs: do_compiler do_cc compile_object check_define main
lines: 141 173 652 678 0
x86_64-w64-mingw32-gcc -std=gnu99 -Wall -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 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:2:2: error: #error __linux__ not defined
    2 | #error __linux__ not defined
      |  ^~~~~

---
funcs: do_compiler do_cc compile_object check_define main
lines: 141 173 652 730 0
x86_64-w64-mingw32-gcc -std=gnu99 -Wall -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 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:2:2: error: #error __i386__ not defined
    2 | #error __i386__ not defined
      |  ^~~~~

---
funcs: do_compiler do_cc compile_object check_define main
lines: 141 173 652 733 0
x86_64-w64-mingw32-gcc -std=gnu99 -Wall -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 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:2:2: error: #error __ILP32__ not defined
    2 | #error __ILP32__ not defined
      |  ^~~~~

---
funcs: do_compiler do_cc compile_prog cc_has_warning_flag main
lines: 141 179 2138 2142 0
x86_64-w64-mingw32-gcc -mthreads -std=gnu99 -Wall -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 -Werror -Winitializer-overrides -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -m64
x86_64-w64-mingw32-gcc: error: unrecognized command line option '-Winitializer-overrides'

funcs: do_compiler do_cc compile_prog cc_has_warning_flag main
lines: 141 179 2138 2142 0
---
funcs: do_compiler do_cc compile_prog cc_has_warning_flag main
lines: 141 179 2138 2142 0
x86_64-w64-mingw32-gcc -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Werror -Wstring-plus-int -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -m64
x86_64-w64-mingw32-gcc: error: unrecognized command line option '-Wstring-plus-int'

funcs: do_compiler do_cc compile_prog cc_has_warning_flag main
lines: 141 179 2138 2142 0
x86_64-w64-mingw32-gcc -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Werror -Wtypedef-redefinition -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -m64
x86_64-w64-mingw32-gcc: error: unrecognized command line option '-Wtypedef-redefinition'

funcs: do_compiler do_cc compile_prog cc_has_warning_flag main
lines: 141 179 2138 2142 0
x86_64-w64-mingw32-gcc -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Werror -Wtautological-type-limit-compare -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -m64
x86_64-w64-mingw32-gcc: error: unrecognized command line option '-Wtautological-type-limit-compare'; did you mean '-Wtautological-compare'?

funcs: do_compiler do_cc compile_prog cc_has_warning_flag main
lines: 141 179 2138 2142 0
---
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -Wl,-z,relro -Wl,-z,now
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: unrecognized option '-z'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status

funcs: do_compiler do_cc compile_object main
lines: 141 173 2369 0
---
lines: 141 173 2415 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -Werror -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c: In function 'main':
config-temp/qemu-conf.c:4:21: error: unknown conversion type character 'z' in format [-Werror=format=]
    4 |     return printf("%zu", SIZE_MAX);
      |                     ^
config-temp/qemu-conf.c:4:19: error: too many arguments for format [-Werror=format-extra-args]
    4 |     return printf("%zu", SIZE_MAX);
      |                   ^~~~~
config-temp/qemu-conf.c:4:21: error: unknown conversion type character 'z' in format [-Werror=format=]
    4 |     return printf("%zu", SIZE_MAX);
      |                     ^
config-temp/qemu-conf.c:4:19: error: too many arguments for format [-Werror=format-extra-args]
    4 |     return printf("%zu", SIZE_MAX);
      |                   ^~~~~
cc1: all warnings being treated as errors
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 2427 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:1:10: fatal error: sys/socket.h: No such file or directory
    1 | #include <sys/socket.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_object check_include main
lines: 141 173 660 2433 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:1:10: fatal error: pty.h: No such file or directory
    1 | #include <pty.h>
      |          ^~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 2445 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:1:10: fatal error: sys/mman.h: No such file or directory
    1 | #include <sys/mman.h>
      |          ^~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 2568 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -llzo2
config-temp/qemu-conf.c:1:10: fatal error: lzo/lzo1x.h: No such file or directory
    1 | #include <lzo/lzo1x.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 2587 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lsnappy
config-temp/qemu-conf.c:1:10: fatal error: snappy-c.h: No such file or directory
    1 | #include <snappy-c.h>
      |          ^~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 2624 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -llzfse
config-temp/qemu-conf.c:1:10: fatal error: lzfse.h: No such file or directory
    1 | #include <lzfse.h>
      |          ^~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 2704 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lxenstore -lxenctrl -lxenguest
config-temp/qemu-conf.c:1:10: fatal error: xenctrl.h: No such file or directory
    1 | #include <xenctrl.h>
      |          ^~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_object check_include main
lines: 141 173 660 2989 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:1:10: fatal error: WinHvPlatform.h: No such file or directory
    1 | #include <WinHvPlatform.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 3253 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lpam
config-temp/qemu-conf.c:1:10: fatal error: security/pam_appl.h: No such file or directory
    1 | #include <security/pam_appl.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_object check_include main
lines: 141 173 660 3268 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:1:10: fatal error: ifaddrs.h: No such file or directory
    1 | #include <ifaddrs.h>
      |          ^~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_object check_include main
lines: 141 173 660 3275 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:1:10: fatal error: libdrm/drm.h: No such file or directory
    1 | #include <libdrm/drm.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_object check_include main
lines: 141 173 660 3282 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:1:10: fatal error: sys/signal.h: No such file or directory
    1 | #include <sys/signal.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 3316 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lrdmacm -libverbs -libumad
config-temp/qemu-conf.c:1:10: fatal error: rdma/rdma_cma.h: No such file or directory
    1 | #include <rdma/rdma_cma.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 3414 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:2:10: fatal error: xfs/xfs.h: No such file or directory
    2 | #include <xfs/xfs.h>
      |          ^~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 3438 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lvdeplug
config-temp/qemu-conf.c:1:10: fatal error: libvdeplug.h: No such file or directory
    1 | #include <libvdeplug.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 3488 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lcap-ng
config-temp/qemu-conf.c:1:10: fatal error: cap-ng.h: No such file or directory
    1 | #include <cap-ng.h>
      |          ^~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 3603 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lbrlapi
config-temp/qemu-conf.c:1:10: fatal error: brlapi.h: No such file or directory
    1 | #include <brlapi.h>
      |          ^~~~~~~~~~
compilation terminated.
---
lines: 141 179 3634 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -I/usr/local/include -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -L/usr/local/lib
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: /tmp/cc72Rohq.o:qemu-conf.c:(.text+0x1c): undefined reference to `iconv_open'
collect2: error: ld returned 1 exit status
looking at iconv in '-I/usr/local/include' '-L/usr/local/lib -liconv'

funcs: do_compiler do_cc compile_prog main
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 3692 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -DNCURSES_WIDECHAR -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:2:10: fatal error: curses.h: No such file or directory
    2 | #include <curses.h>
      |          ^~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 3692 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -DNCURSES_WIDECHAR -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lpdcurses
config-temp/qemu-conf.c:2:10: fatal error: curses.h: No such file or directory
    2 | #include <curses.h>
      |          ^~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 3876 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -ludev -lmultipath -lmpathpersist
config-temp/qemu-conf.c:1:10: fatal error: libudev.h: No such file or directory
    1 | #include <libudev.h>
      |          ^~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 3892 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -ludev -lmultipath -lmpathpersist
config-temp/qemu-conf.c:1:10: fatal error: libudev.h: No such file or directory
    1 | #include <libudev.h>
      |          ^~~~~~~~~~~
compilation terminated.
---
lines: 141 179 3975 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c: In function 'f':
config-temp/qemu-conf.c:3:46: warning: passing argument 1 of 'pthread_setname_np' makes integer from pointer without a cast [-Wint-conversion]
    3 | static void *f(void *p) { pthread_setname_np("QEMU"); return NULL; }
      |                                              ^~~~~~
      |                                              |
---
/usr/x86_64-w64-mingw32/sys-root/mingw/include/pthread.h:317:55: note: expected 'pthread_t' {aka 'long long unsigned int'} but argument is of type 'const char *'
  317 | int       WINPTHREAD_API pthread_setname_np(pthread_t thread, const char *name);
      |                                             ~~~~~~~~~~^~~~~~
config-temp/qemu-conf.c:3:27: error: too few arguments to function 'pthread_setname_np'
    3 | static void *f(void *p) { pthread_setname_np("QEMU"); return NULL; }
      |                           ^~~~~~~~~~~~~~~~~~
In file included from config-temp/qemu-conf.c:1:
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 3992 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lrbd -lrados
config-temp/qemu-conf.c:2:10: fatal error: rbd/librbd.h: No such file or directory
    2 | #include <rbd/librbd.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4044 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -laio
config-temp/qemu-conf.c:1:10: fatal error: libaio.h: No such file or directory
    1 | #include <libaio.h>
      |          ^~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4099 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:6:10: fatal error: sys/xattr.h: No such file or directory
    6 | #include <sys/xattr.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4102 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -DCONFIG_LIBATTR -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lattr
config-temp/qemu-conf.c:4:10: fatal error: attr/xattr.h: No such file or directory
    4 | #include <attr/xattr.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4123 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:2:10: fatal error: sys/uio.h: No such file or directory
    2 | #include <sys/uio.h>
      |          ^~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4136 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:2:10: fatal error: sys/uio.h: No such file or directory
    2 | #include <sys/uio.h>
      |          ^~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4178 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lfdt
config-temp/qemu-conf.c:1:10: fatal error: libfdt.h: No such file or directory
    1 | #include <libfdt.h>
      |          ^~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4345 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:1:10: fatal error: sys/inotify.h: No such file or directory
    1 | #include <sys/inotify.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4360 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:1:10: fatal error: sys/inotify.h: No such file or directory
    1 | #include <sys/inotify.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
---
lines: 141 179 4376 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c: In function 'main':
config-temp/qemu-conf.c:7:12: warning: implicit declaration of function 'pipe2' [-Wimplicit-function-declaration]
    7 |     return pipe2(pipefd, O_CLOEXEC);
      |            ^~~~~
config-temp/qemu-conf.c:7:12: warning: nested extern declaration of 'pipe2' [-Wnested-externs]
config-temp/qemu-conf.c:7:26: error: 'O_CLOEXEC' undeclared (first use in this function)
    7 |     return pipe2(pipefd, O_CLOEXEC);
      |                          ^~~~~~~~~
config-temp/qemu-conf.c:7:26: note: each undeclared identifier is reported only once for each function it appears in
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4392 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:1:10: fatal error: sys/socket.h: No such file or directory
    1 | #include <sys/socket.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
---
lines: 141 179 4411 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c: In function 'main':
config-temp/qemu-conf.c:8:11: warning: implicit declaration of function 'tee' [-Wimplicit-function-declaration]
    8 |     len = tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, SPLICE_F_NONBLOCK);
      |           ^~~
config-temp/qemu-conf.c:8:11: warning: nested extern declaration of 'tee' [-Wnested-externs]
config-temp/qemu-conf.c:8:53: error: 'SPLICE_F_NONBLOCK' undeclared (first use in this function)
    8 |     len = tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, SPLICE_F_NONBLOCK);
      |                                                     ^~~~~~~~~~~~~~~~~
config-temp/qemu-conf.c:8:53: note: each undeclared identifier is reported only once for each function it appears in
config-temp/qemu-conf.c:9:5: warning: implicit declaration of function 'splice' [-Wimplicit-function-declaration]
    9 |     splice(STDIN_FILENO, NULL, fd, NULL, len, SPLICE_F_MOVE);
      |     ^~~~~~
config-temp/qemu-conf.c:9:5: warning: nested extern declaration of 'splice' [-Wnested-externs]
config-temp/qemu-conf.c:9:47: error: 'SPLICE_F_MOVE' undeclared (first use in this function)
    9 |     splice(STDIN_FILENO, NULL, fd, NULL, len, SPLICE_F_MOVE);
      |                                               ^~~~~~~~~~~~~

funcs: do_compiler do_cc compile_prog main
lines: 141 179 4424 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lnuma
config-temp/qemu-conf.c:1:10: fatal error: numa.h: No such file or directory
    1 | #include <numa.h>
      |          ^~~~~~~~
compilation terminated.
---
lines: 141 179 4457 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c: In function 'main':
config-temp/qemu-conf.c:2:18: warning: implicit declaration of function 'malloc_trim' [-Wimplicit-function-declaration]
    2 | int main(void) { malloc_trim(0); return 0; }
      |                  ^~~~~~~~~~~
config-temp/qemu-conf.c:2:18: warning: nested extern declaration of 'malloc_trim' [-Wnested-externs]
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: /tmp/ccbkwhr1.o:qemu-conf.c:(.text+0x13): undefined reference to `malloc_trim'
collect2: error: ld returned 1 exit status

funcs: do_compiler do_cc compile_prog main
lines: 141 179 4518 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:2:10: fatal error: sys/syscall.h: No such file or directory
    2 | #include <sys/syscall.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
---
lines: 141 179 4529 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c: In function 'main':
config-temp/qemu-conf.c:2:25: error: 'optreset' undeclared (first use in this function)
    2 | int main(void) { return optreset; }
      |                         ^~~~~~~~
config-temp/qemu-conf.c:2:25: note: each undeclared identifier is reported only once for each function it appears in
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4543 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:1:10: fatal error: sys/eventfd.h: No such file or directory
    1 | #include <sys/eventfd.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4557 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:1:10: fatal error: sys/mman.h: No such file or directory
    1 | #include <sys/mman.h>
      |          ^~~~~~~~~~~~
compilation terminated.
---
lines: 141 179 4596 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c: In function 'main':
config-temp/qemu-conf.c:5:5: warning: implicit declaration of function 'fallocate' [-Wimplicit-function-declaration]
    5 |     fallocate(0, 0, 0, 0);
      |     ^~~~~~~~~
config-temp/qemu-conf.c:5:5: warning: nested extern declaration of 'fallocate' [-Wnested-externs]
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: /tmp/ccfx5nBn.o:qemu-conf.c:(.text+0x24): undefined reference to `fallocate'
collect2: error: ld returned 1 exit status

funcs: do_compiler do_cc compile_prog main
lines: 141 179 4612 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:2:10: fatal error: linux/falloc.h: No such file or directory
    2 | #include <linux/falloc.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4628 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:2:10: fatal error: linux/falloc.h: No such file or directory
    2 | #include <linux/falloc.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
---
lines: 141 179 4643 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c: In function 'main':
config-temp/qemu-conf.c:5:5: warning: implicit declaration of function 'posix_fallocate' [-Wimplicit-function-declaration]
    5 |     posix_fallocate(0, 0, 0);
      |     ^~~~~~~~~~~~~~~
config-temp/qemu-conf.c:5:5: warning: nested extern declaration of 'posix_fallocate' [-Wnested-externs]
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: /tmp/ccjrAizg.o:qemu-conf.c:(.text+0x1e): undefined reference to `posix_fallocate'
collect2: error: ld returned 1 exit status

funcs: do_compiler do_cc compile_prog main
lines: 141 179 4658 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c: In function 'main':
config-temp/qemu-conf.c:5:5: warning: implicit declaration of function 'sync_file_range' [-Wimplicit-function-declaration]
    5 |     sync_file_range(0, 0, 0, 0);
      |     ^~~~~~~~~~~~~~~
config-temp/qemu-conf.c:5:5: warning: nested extern declaration of 'sync_file_range' [-Wnested-externs]
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: /tmp/ccX16RYG.o:qemu-conf.c:(.text+0x24): undefined reference to `sync_file_range'
collect2: error: ld returned 1 exit status

funcs: do_compiler do_cc compile_prog main
lines: 141 179 4675 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:1:10: fatal error: sys/ioctl.h: No such file or directory
    1 | #include <sys/ioctl.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
---
lines: 141 179 4690 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c: In function 'main':
config-temp/qemu-conf.c:5:5: warning: implicit declaration of function 'dup3'; did you mean 'dup2'? [-Wimplicit-function-declaration]
    5 |     dup3(0, 0, 0);
      |     ^~~~
      |     dup2
config-temp/qemu-conf.c:5:5: warning: nested extern declaration of 'dup3' [-Wnested-externs]
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: /tmp/ccChIJko.o:qemu-conf.c:(.text+0x1e): undefined reference to `dup3'
collect2: error: ld returned 1 exit status

funcs: do_compiler do_cc compile_prog main
lines: 141 179 4706 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:1:10: fatal error: poll.h: No such file or directory
    1 | #include <poll.h>
      |          ^~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4721 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:1:10: fatal error: sys/prctl.h: No such file or directory
    1 | #include <sys/prctl.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4736 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:1:10: fatal error: sys/epoll.h: No such file or directory
    1 | #include <sys/epoll.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4759 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:1:10: fatal error: sys/epoll.h: No such file or directory
    1 | #include <sys/epoll.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4773 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:1:10: fatal error: sys/sendfile.h: No such file or directory
    1 | #include <sys/sendfile.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 141 179 4787 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c:1:10: fatal error: sys/timerfd.h: No such file or directory
    1 | #include <sys/timerfd.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
---
lines: 141 179 4804 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c: In function 'main':
config-temp/qemu-conf.c:6:11: warning: implicit declaration of function 'setns' [-Wimplicit-function-declaration]
    6 |     ret = setns(0, 0);
      |           ^~~~~
config-temp/qemu-conf.c:6:11: warning: nested extern declaration of 'setns' [-Wnested-externs]
config-temp/qemu-conf.c:7:11: warning: implicit declaration of function 'unshare' [-Wimplicit-function-declaration]
    7 |     ret = unshare(0);
      |           ^~~~~~~
config-temp/qemu-conf.c:7:11: warning: nested extern declaration of 'unshare' [-Wnested-externs]
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: /tmp/cc6ITGDb.o:qemu-conf.c:(.text+0x18): undefined reference to `setns'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: /tmp/cc6ITGDb.o:qemu-conf.c:(.text+0x25): undefined reference to `unshare'
collect2: error: ld returned 1 exit status

funcs: do_compiler do_cc compile_prog main
lines: 141 179 4819 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c: In function 'main':
config-temp/qemu-conf.c:5:12: warning: implicit declaration of function 'clock_adjtime'; did you mean 'clock_settime'? [-Wimplicit-function-declaration]
    5 |     return clock_adjtime(0, 0);
      |            ^~~~~~~~~~~~~
      |            clock_settime
config-temp/qemu-conf.c:5:12: warning: nested extern declaration of 'clock_adjtime' [-Wnested-externs]
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: /tmp/cc0RZaZF.o:qemu-conf.c:(.text+0x18): undefined reference to `clock_adjtime'
collect2: error: ld returned 1 exit status

funcs: do_compiler do_cc compile_prog main
lines: 141 179 4834 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong
config-temp/qemu-conf.c: In function 'main':
config-temp/qemu-conf.c:5:12: warning: implicit declaration of function 'syncfs' [-Wimplicit-function-declaration]
    5 |     return syncfs(0);
      |            ^~~~~~
config-temp/qemu-conf.c:5:12: warning: nested extern declaration of 'syncfs' [-Wnested-externs]
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: /tmp/ccQHqyO7.o:qemu-conf.c:(.text+0x13): undefined reference to `syncfs'
collect2: error: ld returned 1 exit status

funcs: do_compiler do_cc compile_object check_include main
lines: 141 173 660 4840 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:1:10: fatal error: sys/kcov.h: No such file or directory
    1 | #include <sys/kcov.h>
      |          ^~~~~~~~~~~~
compilation terminated.
---
funcs: do_compiler do_cc compile_object check_include main
lines: 141 173 660 4846 0
x86_64-w64-mingw32-gcc -fno-pie -mthreads -std=gnu99 -Wall -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 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:1:10: fatal error: linux/btrfs.h: No such file or directory
    1 | #include <linux/btrfs.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Running Sphinx v2.2.2

Extension error:
Could not import extension sphinxcontrib.blockdiag (exception: No module named 'sphinxcontrib.blockdiag')
Failed to run 'configure'
Traceback (most recent call last):
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--rm', '--label', 'com.qemu.instance.uuid=e833b101becc473c90fe011b8fa84fd2', '-u', '1003', '--security-opt', 'seccomp=unconfined', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-pavxrr8f/src/docker-src.2020-09-28-22.49.08.6708:/var/tmp/qemu:z,ro', 'qemu/fedora', '/var/tmp/qemu/run', 'test-mingw']' returned non-zero exit status 1.
filter=--filter=label=com.qemu.instance.uuid=e833b101becc473c90fe011b8fa84fd2
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-pavxrr8f/src'
make: *** [docker-run-test-mingw@fedora] Error 2

real    2m10.748s
user    0m21.131s


The full log is available at
http://patchew.org/logs/20200929003916.4183696-1-hskinnemoen@google.com/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Cédric Le Goater Sept. 29, 2020, 5:27 a.m. UTC | #3
On 9/29/20 2:39 AM, Havard Skinnemoen wrote:
> This series briefly documents the existing IPMI device support for main
> processor emulation, and goes on to propose a similar device structure to
> emulate IPMI responder devices in BMC machines. This would allow a qemu
> instance running BMC firmware to serve as an external BMC for a qemu instance
> running server software.

Great idea ! 

I started working on this topic some years ago with the QEMU PowerNV machine 
and the Aspeed machine. They can communicate over network with this iBT device 
patch :

  https://github.com/legoater/qemu/commit/3677ee52f75065b0f65f36382a62f080ac74d683

This is good enough for the IPMI needs of OpenPOWER systems but the overall
system lacks a few bus. An important one being the LPC bus which we use for 
PNOR mappings.

So, we added a little PNOR device in the QEMU PowerNV machine and mapped
its contents in the FW address space of the LPC bus. With the internal IPMI 
BMC simulator, it mimics well enough an OpenPOWER system from the host 
perspective.

All this to say, that if the goal is full system emulation, we should may 
be take another approach and work on the QEMU internals to run multiple 
architectures in the same QEMU binary. 

According to Peter, this is mostly a configure/build issue and cleanups
are needed to remove the assumptions that were done with single arch
binaries. A big task but not necessarily difficult. I will help for 
ARM and PPC ! 


Anyhow, the IPMI documentation you provided is good to have. 

Thanks,

C. 



> RFC only at this point because the series does not include actual code to
> implement this. I'd appreciate some initial feedback on
> 
> 1. Whether anyone else is interested in something like this.
> 2. Completeness (i.e. anything that could be explained in more detail in the
>    docs).
> 3. Naming, and whether 'specs' is the right place to put this.
> 4. Whether it's OK to enable the blockdiag sphinx extension (if not, I'll just
>    toss the block diagrams and turn the docs into walls of text).
> 
> If this seems reasonable, I'll start working with one of my team mates on
> implementing the common part, as well as the Nuvoton-specific responder device.
> Possibly also an Aspeed device.
> 
> Havard Skinnemoen (3):
>   docs: enable sphinx blockdiag extension
>   docs/specs: IPMI device emulation: main processor
>   docs/specs: IPMI device emulation: BMC
> 
>  docs/conf.py         |   5 +-
>  docs/specs/index.rst |   1 +
>  docs/specs/ipmi.rst  | 183 +++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 188 insertions(+), 1 deletion(-)
>  create mode 100644 docs/specs/ipmi.rst
>
Havard Skinnemoen Sept. 29, 2020, 4:28 p.m. UTC | #4
On Mon, Sep 28, 2020 at 10:27 PM Cédric Le Goater <clg@kaod.org> wrote:
>
> On 9/29/20 2:39 AM, Havard Skinnemoen wrote:
> > This series briefly documents the existing IPMI device support for main
> > processor emulation, and goes on to propose a similar device structure to
> > emulate IPMI responder devices in BMC machines. This would allow a qemu
> > instance running BMC firmware to serve as an external BMC for a qemu instance
> > running server software.
>
> Great idea !
>
> I started working on this topic some years ago with the QEMU PowerNV machine
> and the Aspeed machine. They can communicate over network with this iBT device
> patch :
>
>   https://github.com/legoater/qemu/commit/3677ee52f75065b0f65f36382a62f080ac74d683

Oh, cool, if we split that into an Aspeed part and a VM protocol part,
it's basically what I had in mind. Are you planning to submit that, or
would it be OK if we base our work on it?

> This is good enough for the IPMI needs of OpenPOWER systems but the overall
> system lacks a few bus. An important one being the LPC bus which we use for
> PNOR mappings.

Right. Perhaps the next step should be an out-of-process flash protocol?

> So, we added a little PNOR device in the QEMU PowerNV machine and mapped
> its contents in the FW address space of the LPC bus. With the internal IPMI
> BMC simulator, it mimics well enough an OpenPOWER system from the host
> perspective.

Cool.

> All this to say, that if the goal is full system emulation, we should may
> be take another approach and work on the QEMU internals to run multiple
> architectures in the same QEMU binary.

Interesting. Will it be too slow to run the server and BMC in separate
processes?

We might actually be more interested in going the other way and move
more things out of process, as we start to tackle larger, more complex
systems.

> According to Peter, this is mostly a configure/build issue and cleanups
> are needed to remove the assumptions that were done with single arch
> binaries. A big task but not necessarily difficult. I will help for
> ARM and PPC !

It sounds great to have the option to simulate multiple architectures
in the same process, and getting rid of single-arch assumptions seems
like a nice cleanup. However, I'm hoping we'll still support
multi-process system emulation (and the MultiProcessQEMU work seems to
be moving in that direction as well).

> Anyhow, the IPMI documentation you provided is good to have.

If you like, I can split off patch 1-2 (or just 2) and post them
separately while we work on the BMC-side device emulation. If we
decide to keep patch 1 and the block diagrams, we probably need to do
something better for the font path.

Thanks,

Havard
Corey Minyard Sept. 29, 2020, 5:46 p.m. UTC | #5
On Mon, Sep 28, 2020 at 05:39:13PM -0700, Havard Skinnemoen via wrote:
> This series briefly documents the existing IPMI device support for main
> processor emulation, and goes on to propose a similar device structure to
> emulate IPMI responder devices in BMC machines. This would allow a qemu
> instance running BMC firmware to serve as an external BMC for a qemu instance
> running server software.
> 
> RFC only at this point because the series does not include actual code to
> implement this. I'd appreciate some initial feedback on
> 
> 1. Whether anyone else is interested in something like this.

Though I've had this idea once or twice, I'm not working on real BMCs,
so I didn't really pursue anything.  It's a good idea, I think, for the
BMC developers, and possibly for system developers trying to do
integration testing between BMCs and system software.

You will need to tie in to more emulation than just the BMC side of the
system interface registers.  You will also need to tie into GPIOs or
whatnot for things like host reset.

Power handling is going to be a bit weird.  The OpenIPMI emulator
starts/stops qemu based upon power control.  It might be possible to do
the same thing in this sort of emulator.

You may need extensions to the protocol, and that's fine.  I can't think
of any at the moment, but you never know.

> 2. Completeness (i.e. anything that could be explained in more detail in the
>    docs).

It's certainly a good start.  The second patch would be useful right
now.  There are more details, of course, but I think that's covered in
the man page under the various devices.

Thanks,

-corey

> 3. Naming, and whether 'specs' is the right place to put this.
> 4. Whether it's OK to enable the blockdiag sphinx extension (if not, I'll just
>    toss the block diagrams and turn the docs into walls of text).
> 
> If this seems reasonable, I'll start working with one of my team mates on
> implementing the common part, as well as the Nuvoton-specific responder device.
> Possibly also an Aspeed device.
> 
> Havard Skinnemoen (3):
>   docs: enable sphinx blockdiag extension
>   docs/specs: IPMI device emulation: main processor
>   docs/specs: IPMI device emulation: BMC
> 
>  docs/conf.py         |   5 +-
>  docs/specs/index.rst |   1 +
>  docs/specs/ipmi.rst  | 183 +++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 188 insertions(+), 1 deletion(-)
>  create mode 100644 docs/specs/ipmi.rst
> 
> -- 
> 2.28.0.709.gb0816b6eb0-goog
> 
>
Havard Skinnemoen Sept. 30, 2020, 1:05 a.m. UTC | #6
On Tue, Sep 29, 2020 at 10:46 AM Corey Minyard <minyard@acm.org> wrote:
>
> On Mon, Sep 28, 2020 at 05:39:13PM -0700, Havard Skinnemoen via wrote:
> > This series briefly documents the existing IPMI device support for main
> > processor emulation, and goes on to propose a similar device structure to
> > emulate IPMI responder devices in BMC machines. This would allow a qemu
> > instance running BMC firmware to serve as an external BMC for a qemu instance
> > running server software.
> >
> > RFC only at this point because the series does not include actual code to
> > implement this. I'd appreciate some initial feedback on
> >
> > 1. Whether anyone else is interested in something like this.
>
> Though I've had this idea once or twice, I'm not working on real BMCs,
> so I didn't really pursue anything.  It's a good idea, I think, for the
> BMC developers, and possibly for system developers trying to do
> integration testing between BMCs and system software.
>
> You will need to tie in to more emulation than just the BMC side of the
> system interface registers.  You will also need to tie into GPIOs or
> whatnot for things like host reset.

That is true. The OpenIPMI protocol seems to handle at least some of
that, so it should be just a matter of adding a few GPIO inputs
(power, reset, ATTN, ...) to the ipmi-host-extern device.

I should add some more details about this to the doc.

> Power handling is going to be a bit weird.  The OpenIPMI emulator
> starts/stops qemu based upon power control.  It might be possible to do
> the same thing in this sort of emulator.

Hmm, yeah, I guess we can't kill/restart qemu from within qemu itself.
But perhaps stopping all CPUs and doing a full system reset might be a
good enough approximation for power-off?

> You may need extensions to the protocol, and that's fine.  I can't think
> of any at the moment, but you never know.

True.

> > 2. Completeness (i.e. anything that could be explained in more detail in the
> >    docs).
>
> It's certainly a good start.  The second patch would be useful right
> now.  There are more details, of course, but I think that's covered in
> the man page under the various devices.

Thanks, I might send the second patch separately in the next round.

Havard

> Thanks,
>
> -corey
>
> > 3. Naming, and whether 'specs' is the right place to put this.
> > 4. Whether it's OK to enable the blockdiag sphinx extension (if not, I'll just
> >    toss the block diagrams and turn the docs into walls of text).
> >
> > If this seems reasonable, I'll start working with one of my team mates on
> > implementing the common part, as well as the Nuvoton-specific responder device.
> > Possibly also an Aspeed device.
> >
> > Havard Skinnemoen (3):
> >   docs: enable sphinx blockdiag extension
> >   docs/specs: IPMI device emulation: main processor
> >   docs/specs: IPMI device emulation: BMC
> >
> >  docs/conf.py         |   5 +-
> >  docs/specs/index.rst |   1 +
> >  docs/specs/ipmi.rst  | 183 +++++++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 188 insertions(+), 1 deletion(-)
> >  create mode 100644 docs/specs/ipmi.rst
> >
> > --
> > 2.28.0.709.gb0816b6eb0-goog
> >
> >
Corey Minyard Sept. 30, 2020, 1:54 a.m. UTC | #7
On Tue, Sep 29, 2020 at 06:05:16PM -0700, Havard Skinnemoen wrote:
> On Tue, Sep 29, 2020 at 10:46 AM Corey Minyard <minyard@acm.org> wrote:
> >
> > On Mon, Sep 28, 2020 at 05:39:13PM -0700, Havard Skinnemoen via wrote:
> > > This series briefly documents the existing IPMI device support for main
> > > processor emulation, and goes on to propose a similar device structure to
> > > emulate IPMI responder devices in BMC machines. This would allow a qemu
> > > instance running BMC firmware to serve as an external BMC for a qemu instance
> > > running server software.
> > >
> > > RFC only at this point because the series does not include actual code to
> > > implement this. I'd appreciate some initial feedback on
> > >
> > > 1. Whether anyone else is interested in something like this.
> >
> > Though I've had this idea once or twice, I'm not working on real BMCs,
> > so I didn't really pursue anything.  It's a good idea, I think, for the
> > BMC developers, and possibly for system developers trying to do
> > integration testing between BMCs and system software.
> >
> > You will need to tie in to more emulation than just the BMC side of the
> > system interface registers.  You will also need to tie into GPIOs or
> > whatnot for things like host reset.
> 
> That is true. The OpenIPMI protocol seems to handle at least some of
> that, so it should be just a matter of adding a few GPIO inputs
> (power, reset, ATTN, ...) to the ipmi-host-extern device.
> 
> I should add some more details about this to the doc.
> 
> > Power handling is going to be a bit weird.  The OpenIPMI emulator
> > starts/stops qemu based upon power control.  It might be possible to do
> > the same thing in this sort of emulator.
> 
> Hmm, yeah, I guess we can't kill/restart qemu from within qemu itself.
> But perhaps stopping all CPUs and doing a full system reset might be a
> good enough approximation for power-off?

This might be argument for keeping them in separate qemu processes.  But
it would be really cool if you could start up a single qemu and have a
BMC built-in running it's own code.  I'm sure something could be done to
simulate a power off.  If you can stop the CPUs, that's probably good
enough.

-corey

> 
> > You may need extensions to the protocol, and that's fine.  I can't think
> > of any at the moment, but you never know.
> 
> True.
> 
> > > 2. Completeness (i.e. anything that could be explained in more detail in the
> > >    docs).
> >
> > It's certainly a good start.  The second patch would be useful right
> > now.  There are more details, of course, but I think that's covered in
> > the man page under the various devices.
> 
> Thanks, I might send the second patch separately in the next round.
> 
> Havard
> 
> > Thanks,
> >
> > -corey
> >
> > > 3. Naming, and whether 'specs' is the right place to put this.
> > > 4. Whether it's OK to enable the blockdiag sphinx extension (if not, I'll just
> > >    toss the block diagrams and turn the docs into walls of text).
> > >
> > > If this seems reasonable, I'll start working with one of my team mates on
> > > implementing the common part, as well as the Nuvoton-specific responder device.
> > > Possibly also an Aspeed device.
> > >
> > > Havard Skinnemoen (3):
> > >   docs: enable sphinx blockdiag extension
> > >   docs/specs: IPMI device emulation: main processor
> > >   docs/specs: IPMI device emulation: BMC
> > >
> > >  docs/conf.py         |   5 +-
> > >  docs/specs/index.rst |   1 +
> > >  docs/specs/ipmi.rst  | 183 +++++++++++++++++++++++++++++++++++++++++++
> > >  3 files changed, 188 insertions(+), 1 deletion(-)
> > >  create mode 100644 docs/specs/ipmi.rst
> > >
> > > --
> > > 2.28.0.709.gb0816b6eb0-goog
> > >
> > >
Cédric Le Goater Oct. 1, 2020, 3:28 p.m. UTC | #8
On 9/29/20 6:28 PM, Havard Skinnemoen wrote:
> On Mon, Sep 28, 2020 at 10:27 PM Cédric Le Goater <clg@kaod.org> wrote:
>>
>> On 9/29/20 2:39 AM, Havard Skinnemoen wrote:
>>> This series briefly documents the existing IPMI device support for main
>>> processor emulation, and goes on to propose a similar device structure to
>>> emulate IPMI responder devices in BMC machines. This would allow a qemu
>>> instance running BMC firmware to serve as an external BMC for a qemu instance
>>> running server software.
>>
>> Great idea !
>>
>> I started working on this topic some years ago with the QEMU PowerNV machine
>> and the Aspeed machine. They can communicate over network with this iBT device
>> patch :
>>
>>   https://github.com/legoater/qemu/commit/3677ee52f75065b0f65f36382a62f080ac74d683
> 
> Oh, cool, if we split that into an Aspeed part and a VM protocol part,
> it's basically what I had in mind. Are you planning to submit that, or
> would it be OK if we base our work on it?

I had no plan to send it any time soon. You can base your work on this patch.

>> This is good enough for the IPMI needs of OpenPOWER systems but the overall
>> system lacks a few bus. An important one being the LPC bus which we use for
>> PNOR mappings.
> 
> Right. Perhaps the next step should be an out-of-process flash protocol?

OpenPOWER systems use the hiomap protocol for that :

  https://github.com/openbmc/hiomapd/blob/master/Documentation/protocol.md#create_read_window-command

It's based on IPMI but the reads are still done from the LPC bus. We would
need a way to transfer the mem ops between processes.  

>> So, we added a little PNOR device in the QEMU PowerNV machine and mapped
>> its contents in the FW address space of the LPC bus. With the internal IPMI
>> BMC simulator, it mimics well enough an OpenPOWER system from the host
>> perspective.
> 
> Cool.
> 
>> All this to say, that if the goal is full system emulation, we should may
>> be take another approach and work on the QEMU internals to run multiple
>> architectures in the same QEMU binary.
> 
> Interesting. Will it be too slow to run the server and BMC in separate
> processes?

No. It will be much simpler to run in a single process I think. Memory
operation, gpio lines can cross borders between architectures.
 
> We might actually be more interested in going the other way and move
> more things out of process, as we start to tackle larger, more complex
> systems.
>
>> According to Peter, this is mostly a configure/build issue and cleanups
>> are needed to remove the assumptions that were done with single arch
>> binaries. A big task but not necessarily difficult. I will help for
>> ARM and PPC !
> 
> It sounds great to have the option to simulate multiple architectures
> in the same process, and getting rid of single-arch assumptions seems
> like a nice cleanup. However, I'm hoping we'll still support
> multi-process system emulation (and the MultiProcessQEMU work seems to
> be moving in that direction as well).

I haven't been following that closely enough but it looked promising.
Having a way to offload mem operations and interrupts should help
modeling in some areas, such as interconnecting external simulators. 
But that might raise some other issues like time control.  

>> Anyhow, the IPMI documentation you provided is good to have.
> 
> If you like, I can split off patch 1-2 (or just 2) and post them
> separately while we work on the BMC-side device emulation. If we
> decide to keep patch 1 and the block diagrams, we probably need to do
> something better for the font path.

These looked good as they were. Were there any objections ? 

Thanks,

C.
Cédric Le Goater Oct. 1, 2020, 3:32 p.m. UTC | #9
>> Power handling is going to be a bit weird.  The OpenIPMI emulator
>> starts/stops qemu based upon power control.  It might be possible to do
>> the same thing in this sort of emulator.
> 
> Hmm, yeah, I guess we can't kill/restart qemu from within qemu itself.
> But perhaps stopping all CPUs and doing a full system reset might be a
> good enough approximation for power-off?

You can take a look at the QEMU PowerNV machine. It powers down through IPMI.
Power ON is another story  ...

C.