From: bugzilla-daemon@kernel.org
To: kvm@vger.kernel.org
Subject: [Bug 216365] New: kvm selftests build fail
Date: Mon, 15 Aug 2022 06:29:11 +0000 [thread overview]
Message-ID: <bug-216365-28872@https.bugzilla.kernel.org/> (raw)
https://bugzilla.kernel.org/show_bug.cgi?id=216365
Bug ID: 216365
Summary: kvm selftests build fail
Product: Virtualization
Version: unspecified
Kernel Version: 5.20
Hardware: Intel
OS: Linux
Tree: Mainline
Status: NEW
Severity: high
Priority: P1
Component: kvm
Assignee: virtualization_kvm@kernel-bugs.osdl.org
Reporter: lixiao.yang@intel.com
Regression: No
Environment:
Host kernel: 5.19.0-rc8
Host OS: rhel8.3
upstream kvm repo: https://git.kernel.org/pub/scm/virt/kvm/kvm.git
branch: next
commit: 19a7cc817a380f7a412d7d76e145e9e2bc47e52f
GCC version: gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)
Bug Detailed Description:
Error happens when trying to compile upstream kvm selftests.
git clone https://git.kernel.org/pub/scm/virt/kvm/kvm.git
git checkout -b next origin/next
cd kvm/tools/testing/selftests/kvm
make
Expected results:
Successfully build
Actual results:
gcc -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99
-fno-stack-protector -fno-PIE -I../../../../tools/include
-I../../../../tools/arch/x86/include -I../../../../usr/include/ -Iinclude -Ilib
-Iinclude/x86_64 -I ../rseq -I.. -c lib/assert.c -o
/home/lxy/kvm/tools/testing/selftests/kvm/lib/assert.o
gcc -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99
-fno-stack-protector -fno-PIE -I../../../../tools/include
-I../../../../tools/arch/x86/include -I../../../../usr/include/ -Iinclude -Ilib
-Iinclude/x86_64 -I ../rseq -I.. -c lib/elf.c -o
/home/lxy/kvm/tools/testing/selftests/kvm/lib/elf.o
In file included from include/kvm_util.h:10,
from lib/elf.c:13:
include/kvm_util_base.h:93:26: error: field ‘stats_header’ has incomplete type
struct kvm_stats_header stats_header;
^~~~~~~~~~~~
In file included from ../../../../tools/include/linux/kernel.h:8,
from ../../../../tools/include/linux/list.h:7,
from ../../../../tools/include/linux/hashtable.h:10,
from include/kvm_util_base.h:13,
from include/kvm_util.h:10,
from lib/elf.c:13:
include/kvm_util_base.h: In function ‘kvm_vm_reset_dirty_ring’:
include/kvm_util_base.h:308:24: error: ‘KVM_RESET_DIRTY_RINGS’ undeclared
(first use in this function); did you mean ‘KVM_GET_DIRTY_LOG’?
return __vm_ioctl(vm, KVM_RESET_DIRTY_RINGS, NULL);
^~~~~~~~~~~~~~~~~~~~~
../../../../tools/include/linux/build_bug.h:79:56: note: in definition of macro
‘__static_assert’
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^~~~
include/kvm_util_base.h:193:2: note: in expansion of macro ‘static_assert’
static_assert(!_IOC_SIZE(cmd) || sizeof(*arg) == _IOC_SIZE(cmd), ""); \
^~~~~~~~~~~~~
include/kvm_util_base.h:216:2: note: in expansion of macro ‘kvm_do_ioctl’
kvm_do_ioctl((vm)->fd, cmd, arg); \
^~~~~~~~~~~~
include/kvm_util_base.h:308:9: note: in expansion of macro ‘__vm_ioctl’
return __vm_ioctl(vm, KVM_RESET_DIRTY_RINGS, NULL);
^~~~~~~~~~
include/kvm_util_base.h:308:24: note: each undeclared identifier is reported
only once for each function it appears in
return __vm_ioctl(vm, KVM_RESET_DIRTY_RINGS, NULL);
^~~~~~~~~~~~~~~~~~~~~
../../../../tools/include/linux/build_bug.h:79:56: note: in definition of macro
‘__static_assert’
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^~~~
include/kvm_util_base.h:193:2: note: in expansion of macro ‘static_assert’
static_assert(!_IOC_SIZE(cmd) || sizeof(*arg) == _IOC_SIZE(cmd), ""); \
^~~~~~~~~~~~~
include/kvm_util_base.h:216:2: note: in expansion of macro ‘kvm_do_ioctl’
kvm_do_ioctl((vm)->fd, cmd, arg); \
^~~~~~~~~~~~
include/kvm_util_base.h:308:9: note: in expansion of macro ‘__vm_ioctl’
return __vm_ioctl(vm, KVM_RESET_DIRTY_RINGS, NULL);
^~~~~~~~~~
include/kvm_util_base.h:193:16: error: expression in static assertion is not an
integer
static_assert(!_IOC_SIZE(cmd) || sizeof(*arg) == _IOC_SIZE(cmd), ""); \
^
../../../../tools/include/linux/build_bug.h:79:56: note: in definition of macro
‘__static_assert’
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^~~~
include/kvm_util_base.h:193:2: note: in expansion of macro ‘static_assert’
static_assert(!_IOC_SIZE(cmd) || sizeof(*arg) == _IOC_SIZE(cmd), ""); \
^~~~~~~~~~~~~
include/kvm_util_base.h:216:2: note: in expansion of macro ‘kvm_do_ioctl’
kvm_do_ioctl((vm)->fd, cmd, arg); \
^~~~~~~~~~~~
include/kvm_util_base.h:308:9: note: in expansion of macro ‘__vm_ioctl’
return __vm_ioctl(vm, KVM_RESET_DIRTY_RINGS, NULL);
^~~~~~~~~~
include/kvm_util_base.h: In function ‘vm_get_stats_fd’:
include/kvm_util_base.h:313:26: error: ‘KVM_GET_STATS_FD’ undeclared (first use
in this function); did you mean ‘KVM_GET_SREGS’?
int fd = __vm_ioctl(vm, KVM_GET_STATS_FD, NULL);
^~~~~~~~~~~~~~~~
../../../../tools/include/linux/build_bug.h:79:56: note: in definition of macro
‘__static_assert’
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^~~~
include/kvm_util_base.h:193:2: note: in expansion of macro ‘static_assert’
static_assert(!_IOC_SIZE(cmd) || sizeof(*arg) == _IOC_SIZE(cmd), ""); \
^~~~~~~~~~~~~
include/kvm_util_base.h:216:2: note: in expansion of macro ‘kvm_do_ioctl’
kvm_do_ioctl((vm)->fd, cmd, arg); \
^~~~~~~~~~~~
include/kvm_util_base.h:313:11: note: in expansion of macro ‘__vm_ioctl’
int fd = __vm_ioctl(vm, KVM_GET_STATS_FD, NULL);
^~~~~~~~~~
include/kvm_util_base.h:193:16: error: expression in static assertion is not an
integer
static_assert(!_IOC_SIZE(cmd) || sizeof(*arg) == _IOC_SIZE(cmd), ""); \
^
../../../../tools/include/linux/build_bug.h:79:56: note: in definition of macro
‘__static_assert’
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^~~~
include/kvm_util_base.h:193:2: note: in expansion of macro ‘static_assert’
static_assert(!_IOC_SIZE(cmd) || sizeof(*arg) == _IOC_SIZE(cmd), ""); \
^~~~~~~~~~~~~
include/kvm_util_base.h:216:2: note: in expansion of macro ‘kvm_do_ioctl’
kvm_do_ioctl((vm)->fd, cmd, arg); \
^~~~~~~~~~~~
include/kvm_util_base.h:313:11: note: in expansion of macro ‘__vm_ioctl’
int fd = __vm_ioctl(vm, KVM_GET_STATS_FD, NULL);
^~~~~~~~~~
In file included from include/kvm_util.h:10,
from lib/elf.c:13:
include/kvm_util_base.h: In function ‘read_stats_header’:
include/kvm_util_base.h:323:38: error: dereferencing pointer to incomplete type
‘struct kvm_stats_header’
ret = read(stats_fd, header, sizeof(*header));
^~~~~~~
include/kvm_util_base.h: In function ‘get_stats_descriptor_size’:
include/kvm_util_base.h:338:16: error: invalid application of ‘sizeof’ to
incomplete type ‘struct kvm_stats_desc’
return sizeof(struct kvm_stats_desc) + header->name_size;
^~~~~~
In file included from ../../../../tools/include/linux/kernel.h:8,
from ../../../../tools/include/linux/list.h:7,
from ../../../../tools/include/linux/hashtable.h:10,
from include/kvm_util_base.h:13,
from include/kvm_util.h:10,
from lib/elf.c:13:
include/kvm_util_base.h: In function ‘vcpu_get_stats_fd’:
include/kvm_util_base.h:517:30: error: ‘KVM_GET_STATS_FD’ undeclared (first use
in this function); did you mean ‘KVM_GET_SREGS’?
int fd = __vcpu_ioctl(vcpu, KVM_GET_STATS_FD, NULL);
^~~~~~~~~~~~~~~~
../../../../tools/include/linux/build_bug.h:79:56: note: in definition of macro
‘__static_assert’
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^~~~
include/kvm_util_base.h:193:2: note: in expansion of macro ‘static_assert’
static_assert(!_IOC_SIZE(cmd) || sizeof(*arg) == _IOC_SIZE(cmd), ""); \
^~~~~~~~~~~~~
include/kvm_util_base.h:235:2: note: in expansion of macro ‘kvm_do_ioctl’
kvm_do_ioctl((vcpu)->fd, cmd, arg); \
^~~~~~~~~~~~
include/kvm_util_base.h:517:11: note: in expansion of macro ‘__vcpu_ioctl’
int fd = __vcpu_ioctl(vcpu, KVM_GET_STATS_FD, NULL);
^~~~~~~~~~~~
include/kvm_util_base.h:193:16: error: expression in static assertion is not an
integer
static_assert(!_IOC_SIZE(cmd) || sizeof(*arg) == _IOC_SIZE(cmd), ""); \
^
../../../../tools/include/linux/build_bug.h:79:56: note: in definition of macro
‘__static_assert’
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^~~~
include/kvm_util_base.h:193:2: note: in expansion of macro ‘static_assert’
static_assert(!_IOC_SIZE(cmd) || sizeof(*arg) == _IOC_SIZE(cmd), ""); \
^~~~~~~~~~~~~
include/kvm_util_base.h:235:2: note: in expansion of macro ‘kvm_do_ioctl’
kvm_do_ioctl((vcpu)->fd, cmd, arg); \
^~~~~~~~~~~~
include/kvm_util_base.h:517:11: note: in expansion of macro ‘__vcpu_ioctl’
int fd = __vcpu_ioctl(vcpu, KVM_GET_STATS_FD, NULL);
^~~~~~~~~~~~
In file included from include/kvm_util.h:10,
from lib/elf.c:13:
include/kvm_util_base.h: In function ‘__vm_disable_nx_huge_pages’:
include/kvm_util_base.h:834:29: error: ‘KVM_CAP_VM_DISABLE_NX_HUGE_PAGES’
undeclared (first use in this function); did you mean
‘KVM_CAP_X86_DISABLE_EXITS’?
return __vm_enable_cap(vm, KVM_CAP_VM_DISABLE_NX_HUGE_PAGES, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
KVM_CAP_X86_DISABLE_EXITS
make: *** [Makefile:229: /home/lxy/kvm/tools/testing/selftests/kvm/lib/elf.o]
Error 1
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next reply other threads:[~2022-08-15 6:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 6:29 bugzilla-daemon [this message]
2022-09-09 6:04 ` [Bug 216365] kvm selftests build fail bugzilla-daemon
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=bug-216365-28872@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=kvm@vger.kernel.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