When including asm-generic/types.h instead of asm/types.h it results
in conflicting types for __s64 et al (at least with my
toolchain). Other header files are including asm/types.h
(e.g. include/kvm/ioport.h) and types defined there don't necessarily
match the types defined in asm-generic/types.h.
Signed-off-by: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
For x86 the files that become the BIOS blob are compiled with -m32.
Although we avoid including any system libraries, we use some headers
from /usr/include, which asks for trouble if compiling on a x86-64
multiarch system (Debian/Ubuntu). Without 32-bit compat headers
installed there, the compiler will not find the right files.
However as the BIOS code is actually a self-contained binary without
any relationship to the Linux userland, it should not use or rely
on Linux system headers.
Replace includes of linux/types.h in BIOS code with asm/bios/types.h,
which simply contains the u{8,16,32,64} data types needed by the code.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
kvmtool's types.h includes <asm/types.h>, which by default on PPC64 brings in
int-l64.h; define __SANE_USERSPACE_TYPES__ to get LL64 types.
This patch also adds CFLAGS to the final link, so that any -m64 is obeyed
when linking, too.
Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Ingo reported a build breakage caused by absence of 'notrace' definition. Fix
it by adding compiler.h into own headers set.
Reported-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Adds kernel headers so that <linux/list.h> (and others) could be included
directly.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Make the MIN_RAM_SIZE_MB constant 64-bit on 32-bit systems as well, otherwise
we get this build failure:
kvm-run.c: In function ‘kvm_cmd_run’:
kvm-run.c:119: error: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘u64’
Also adjust affected printf format string - this necessiates the use of
the sane Linux definition of u64 instead of the brain-dead int64_t
variant.
That also allows (and necessiates) the removal of the ugly PRIu64 format
string hackery. Friends don't let friends use PRI* hackeries! :-)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This patch adds KVM ABI headers to the source tree. We can no longer include
<linux/kvm.h> directly because someone added a "#warning" to <linux/types.h>
that prevents kernel header inclusion from userspace.
We can switch back to using kernel headers if we ever make it to Linux
mainline.
Signed-off-by: Pekka Enberg <penberg@kernel.org>