Commit Graph

1506 Commits

Author SHA1 Message Date
Andre Przywara d77bd4f466 Fix call to connect()
According to the manpage and the prototype the second argument to
connect(2) is a "const struct sockaddr*", so cast our protocol
specific type back to the super type.
This fixes compilation on musl-libc.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-20 18:25:48 +01:00
Andre Przywara 369c27e683 ui: remove pointless double const in keymap declarations
clang does not like two const specifiers in one declaration, so
remove one to let clang compile kvmtool.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-20 18:25:48 +01:00
Andre Przywara 5389d44f5f Makefile: remove unneeded -s switch on compiling BIOS files
Stripping has no effect on object files, so having "-s -c" on the
command line makes no sense.
In fact clang complains about it and aborts with an error, so lets
just remove the unneeded "-s" switch here.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-20 18:25:48 +01:00
Andre Przywara a2583dbf82 kvm-ipc: use proper type for file descriptor
A socket (as any other file descriptor) is of type "int" to catch the
negative error cases. Fix the declaration to allow errors to be
detected.
Found and needed by clang.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-20 18:25:48 +01:00
Andre Przywara 823c7fd8e9 qcow: fix signedness bugs
Some functions in qcow.c return u64, but are checked against < 0
because they want to check for the -1 error return value.
Do an explicit comparison against the casted -1 to express this
properly.
This was silently compiled out by gcc, but clang complained about it.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-20 18:25:48 +01:00
Andre Przywara 15542bab78 avoid casts when initializing structures
Due to our kernel heritage we have code in kvmtool that relies on
the (still) implicit -std=gnu89 compiler switch.
It turns out that this just affects some structure initialization,
where we currently provide a cast to the type, which upsets GCC for
anything beyond -std=gnu89 (for instance gnu99 or gnu11).
We do need the casts when initializing structures that are not
assigned to the same type, so we put it there explicitly.

This allows us to compile with all the three GNU standards GCC
currently supports: gnu89/90, gnu99 and gnu11.
GCC threatens people with moving to gnu11 as the new default standard,
so lets fix this better sooner than later.
(Compiling without GNU extensions still breaks and I don't bother to
fix that without very good reasons.)

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-20 18:25:47 +01:00
Andre Przywara 43d2781c27 arm: use new irqchip parameter to create different vGIC types
Currently we unconditionally create a virtual GICv2 in the guest.
Add a --irqchip= parameter to let the user specify a different GIC
type for the guest, when omitting this parameter it still defaults to
--irqchip=gicv2.
For now the only other supported type is --irqchip=gicv3

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
[will: use pr_err instead of fprintf]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-08 17:41:00 +01:00
Andre Przywara bfb2c70376 arm: add support for supplying GICv3 redistributor addresses
Instead of the GIC virtual CPU interface an emulated GICv3 needs to
have accesses to its emulated redistributors trapped in the guest.
Add code to tell the kernel about the mapping if a GICv3 emulation was
requested by the user.

This contains some defines which are not (yet) in the (32 bit) header
files to allow compilation for ARM.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-08 17:39:32 +01:00
Andre Przywara 02017c1d16 arm: prepare for instantiating different IRQ chip devices
Extend the vGIC handling code to potentially deal with different IRQ
chip devices instead of hard-coding the GICv2 in.
We extend most vGIC functions to take a type parameter, but still put
GICv2 in at the top for the time being.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-08 17:39:32 +01:00
Andre Przywara 5e8e9a011c limit number of VCPUs on demand
Currently the ARM GIC checks the number of VCPUs against a fixed
limit, which is GICv2 specific. Don't pretend we know better than the
kernel and let's get rid of that explicit check.
We now fail if the number of requested VCPUs could not be
instantiated instead of limiting the number of VCPUs.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-08 17:39:32 +01:00
Andre Przywara ce6ae1228a arm: simplify MMIO dispatching
Currently we separate any incoming MMIO request into one of the ARM
memory map regions and take care to spare the GIC.
It turns out that this is unnecessary, as we only have one special
region (the IO port area in the first 64 KByte). The MMIO rbtree
takes care about unhandled MMIO ranges, so we can simply drop all the
special range checking (except that for the IO range) in
kvm_cpu__emulate_mmio().
As the GIC is handled in the kernel, a GIC MMIO access should never
reach userland (and we don't know what to do with it anyway).
This lets us delete some more code and simplifies future extensions
(like expanding the GIC regions).
To be in line with the other architectures, move the now simpler
code into a header file.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-08 17:39:32 +01:00
Andre Przywara b579030279 arm: finish VGIC initialisation explicitly
Since Linux 3.19-rc1 there is a new API to explicitly initialise
the in-kernel GIC emulation by a userland KVM device call.
Use that to tell the kernel we are finished with the GIC
initialisation, since the automatic GIC init will only be provided
as a legacy functionality in the future.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-08 17:39:32 +01:00
Marc Zyngier bed2bd9e1f AArch{32,64}: dynamically configure the number of GIC interrupts
In order to reduce the memory usage of large guests (as well
as improve performance), tell KVM about the number of interrupts
we require.

To avoid synchronization with the various device creation,
use a late_init callback to compute the GIC configuration.
[Andre: rename to gic__init_gic() to ease future expansion]

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-08 17:39:32 +01:00
Marc Zyngier cb87229be5 irq: add irq__get_nr_allocated_lines
The ARM GIC emulation needs to be told the number of interrupts
it has to support. As commit 1c262fa1dc7bc ("kvm tools: irq: make
irq__alloc_line generic") made the interrupt counter private,
add a new accessor returning the number of interrupt lines we've
allocated so far.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-08 17:39:32 +01:00
Marc Zyngier 69b9a17ac8 AArch{32,64}: use KVM_CREATE_DEVICE & co to instanciate the GIC
As of 3.14, KVM/arm supports the creation/configuration of the GIC through
a more generic device API, which is now the preferred way to do so.

Plumb the new API in, and allow the old code to be used as a fallback.

[Andre: Rename some functions on the way to differentiate between
creation and initialisation more clearly and fix error path.]

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-08 17:39:32 +01:00
Marc Zyngier 3fc7fe4ff1 AArch64: Reserve two 64k pages for GIC CPU interface
On AArch64 system with a GICv2, the GICC range can be aligned
to the last 4k block of a 64k page, ending up straddling two
64k pages. In order not to conflict with the distributor mapping,
allocate two 64k pages to the CPU interface.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-08 17:39:32 +01:00
Will Deacon 50687d873a Typo fix in error message
s/unsuppored/unsupported/

Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-08 17:38:30 +01:00
Andre Przywara 71ca0fac39 kvmtool: vhost-net: fix ioeventfd registration
On registering the ioeventfds for the virtio-pci device we cover both
the I/O ports and the MMIO BAR.
But as the current code advertises both as PIO, the host kernel gets
the wrong bus number for the MMIO region.
Fix the issue by marking only the actual PIO area as PIO.
This fixes vhost-net on x86.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-29 10:49:45 +01:00
Andreas Herrmann 57896feeda kvmtool, mips: Support more than 256 MB guest memory
Two guest memory regions need to be defined and two "mem=" parameters
need to be passed to guest kernel to support more than 256 MB.

Signed-off-by: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-29 10:45:52 +01:00
Andre Przywara e9922aaf43 kvmtool: don't use PCI config space IRQ line field
In PCI config space there is an interrupt line field (offset 0x3f),
which is used to initially communicate the IRQ line number from
firmware to the OS. _Hardware_ should never use this information,
as the OS is free to write any information in there.
But kvmtool uses this number when it triggers IRQs in the guest,
which fails starting with Linux 3.19-rc1, where the PCI layer starts
writing the virtual IRQ number in there.

Fix that by storing the IRQ number in a separate field in
struct virtio_pci, which is independent from the PCI config space
and cannot be influenced by the guest.
This fixes ARM/ARM64 guests using PCI with newer kernels.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-22 15:42:49 +01:00
Michael Ellerman e6655b75f2 powerpc: Enable 32-bit build
We have always built kvmtool as 64-bit on powerpc, but mainly just out
of habit. There's not AFAIK any reason we *can't* build 32-bit.

So fix up a few places where we were assuming 64-bit, and drop the
Makefile logic that forces 64-bit.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-19 11:15:35 +01:00
Michael Ellerman 241f595f92 powerpc: Define the hcall opcodes & return values we need
Now that we don't have the kernel header on hand, just define the
minimum set of hcall opcodes and return values we need in order to
build.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-19 11:15:35 +01:00
Andre Przywara e96a27a107 powerpc: implement barrier primitives
Instead of referring to the Linux header including the barrier
macros, copy over the rather simple implementation for the PowerPC
barrier instructions kvmtool uses. This fixes build for powerpc.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-17 11:48:15 +01:00
Andre Przywara 372f583d35 guest/init: update reboot() call
The reboot() call that guest/init used was an older version, the
manpage talks about libc4 and libc5.
Update it to the current version exported by glibc by using the right
include file and adjusting the parameter.
This also fixed GCC 5.1.0 compile, because linux/reboot.h misses the
actual prototype.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-16 18:31:42 +01:00
Andre Przywara 9ed717c350 guest/init: add missing #includes
GCC 5.1.0 complains about missing prototypes for waitpid() and
mkdir(), so add the appropriate #includes to get rid of the warning.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-16 18:31:42 +01:00
Andreas Herrmann fe50bacba8 kvmtool: Fix length of ioevent for VIRTIO_PCI_QUEUE_NOTIFY
VIRTIO_PCI_QUEUE_NOTIFY is 16-bit and iowrite16 is used in
drivers/virtio/virtio_pci.c to notify the other side.

If the size doesn't match notification via mmio write will fail.

Signed-off-by: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-16 18:25:33 +01:00
Andreas Herrmann 7f9733c2dd kvmtool: Register each guest memory bank as vhost_memory_region
Otherwise vhost does not work if a virtio descriptor is used that was
allocated from a guest memory bank not registered as
vhost_memory_region.

Signed-off-by: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-16 18:25:33 +01:00
Andreas Herrmann f83dc816a9 kvmtool: Fix regression introduced with d2a7ddff4
Since commit d2a7ddff4 (Add minimal support for macvtap) opening
of tap device might fail. lkvm shows

  Warning: Config tap device error. Are you root?

virtio_net_request_tap passed wrong pointer for struct ifreq to
TUNSETIFF ioctl.

Signed-off-by: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-16 18:25:33 +01:00
Andreas Herrmann c8058b8837 kvmtool: Fix compile error on MIPS
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>
2015-06-16 18:25:33 +01:00
Andre Przywara 0fc7018d0b kvmtool: Makefile: Don't defer error output on unsupported architectures
Having ARCH defined to something unknown or trying to compile kvmtool
on an unsupported architecture barfs quite late, actually after
checking for libraries. This gives a lot of messages, but the only
useful one (architecture not supported) is easily overseen.
Abort early if ARCH contains an unknown architecture name.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-05 16:31:26 +01:00
Andre Przywara 8618570ee3 kvmtool: Makefile: only enable framebuffer output on x86
The Makefile checks for the libaries needed to display the guest's
framebuffer unconditionally on all architectures.
However currently only x86 supports a guest framebuffer.
Introduce ARCH_HAS_FRAMEBUFFER in the Makefile and check for the
needed libraries only on x86. If other architectures add support for
it later, we can add them easily.
This avoids pulling in unneeded libraries into the lkvm binary, which
breaks copying over binaries into systems with only minimal userland.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-05 16:31:26 +01:00
Will Deacon 57fa349a97 Don't inherit CFLAGS and LDFLAGS from the environment
kvmtool doesn't build with arbitrary flags, so let's clear CFLAGS and
LDFLAGS by default at the top of the Makefile, allowing people to add
additional options there if they really want to.

Reported by Dave Jones, who ended up passing -std=gnu99 by mistake.

Reported-by: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-04 16:50:42 +01:00
Will Deacon 50780c69e0 Remove CFLAGS_EASYGOING variable from Makefile
We don't build any external targets, so remove this unused variable from
our Makefile.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-04 16:50:40 +01:00
Russell King 7411007ad6 Remove visible dependency files
After building, there is a lot of clutter from the dependency system.
Let's clean this up by using dir/.file.d style dependencies, similar
to those used in the Linux kernel.

In order to support this, rearrange the dependency generation to
create the dependency files as we build rather than as a separate
step, and have make clean remove them.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
[will: added make target for builtin-help.static.o]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-01 17:54:09 +01:00
Russell King 992bd60d19 Add vim .swp files to gitignore
Avoid accidential commits of vim editor temporary files.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-01 17:54:09 +01:00
Russell King 644140ef4b virtio: fix fsync() on a directory
dpkg in the guest fails when it tries to use fsync() on a directory:

openat(AT_FDCWD, "/var/lib/dpkg", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 4
fsync(4)                                = -1 EINVAL (Invalid argument)

stracing lkvm shows that this is converted to:

openat(AT_FDCWD, "/root/rootfs-32//var/lib/dpkg", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 368
fsync(0)                = -1 EINVAL (Invalid argument)

In other words, we sync against the wrong file descriptor.  This case
is not handled in the kvmtool code, let's add support for it.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-01 17:54:09 +01:00
Suzuki K. Poulose edb4a8a0e4 kvmtool: Set the thread names for terminal and virtio-net-ctrl
The terminal handling thread and the virtio-net-ctrl don't
set their name, which ends up as follows up:

 terminal => lkvm
 virtio-net-ctrl => kvm-cpu-X !!

Set the thread name explicitly to term-poll and virtio-net-ctrl
respectively

Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-01 17:54:09 +01:00
Andre Przywara 2006613929 kvmtool: remove unneeded EXPORT_SYMBOL from iovec.c
In util/iovec.c we reference EXPORT_SYMBOL, which is only useful
within the kernel. To get rid of the dummy include file, simply
remove those lines.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-01 17:54:09 +01:00
Andre Przywara eaf4f96561 kvmtool: remove no longer needed kvm/types.h
include/kvm/types.h seemed to be in use once, but it does no longer
contain any useful definition. Remove it.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-01 17:54:09 +01:00
Andre Przywara 9759db0dd9 kvmtool: move include/bios/memcpy.h to x86/include/asm/bios
This file contains a prototype solely used by the BIOS blob code
for x86 systems. Make this clear by moving the include file into
the x86 directory.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-01 17:54:09 +01:00
Andre Przywara 813359ed4a kvmtool: add processor-flags.h with the single EFLAGS_CF define
Two BIOS source files used a definition from <asm/processor-flags.h>,
which could not be found on x86_64 multiarch machines without the
compat headers installed.
Create a file with the single definition actually used in the kvmtool
source tree.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-01 17:54:09 +01:00
Andre Przywara 1cbb2c50ce kvmtool: remove kvm/segment.h
This header just holds three trivial functions, but pulls in
linux/types.h, which calls for trouble when compiling BIOS files on
x86-64 multiarch machines.
Remove unnecessary includes and move the definitions into the files
where they are used.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-01 17:54:09 +01:00
Andre Przywara f323796502 kvmtool: pull x86 system header e820 definitions into kvm/e820.h
The x86 BIOS code included some definitions for the E820 table from
the Linux system headers, but those could not be found on x86_64
multiarch systems without the compat headers installed.
Pull the required definitions into the kvmtool source directory,
removing the reference to <asm/e820.h>.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-01 17:54:09 +01:00
Andre Przywara f23171ca13 kvmtool: remove reference to <asm/types.h> from BIOS include files
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>
2015-06-01 17:54:09 +01:00
Andre Przywara 002f5604de kvmtool: Update documentation to mark version as stand-alone
At this point kvmtool compiles fines out of the Linux tree (at least
for x86 and arm/arm64), so update the README to reflect this.
Also add an INSTALL file to give more user friendly building
instructions.
Document the optional libraries and their common package names on the
way.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-01 17:54:09 +01:00
Andre Przywara e9beb4a990 kvmtool: Makefile: improve warning on missing optional packages
Currently there is a warning when the (highly optional) GTK3 support
cannot be compiled in. Actually many may consider GTK3 the least
interesting of the optional packages, so replace this rather verbose
warning with a brief list of not found optional packages: This will
give a much nicer output like this:

Makefile:291: Skipping optional libraries: bfd GTK3 vncserver aio

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-01 17:54:09 +01:00
Andre Przywara 20ecab3073 kvmtool: Makefile: check libfdt availability
Instead of hardcoding libfdt availability, check for it like for
the other libraries and fail (and warn) if it's not available.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-01 17:54:09 +01:00
Andre Przywara da4699ad87 kvmtool: Makefile: replace kernel libfdt source with system library
kvmtool used the in-kernel version of the device tree handling
library. Now that we are a proper userland tool, use the system's
library for that purpose. Actually this seems to fix some
long-standing warning generated by the Linux copy.
Also fix up a bogus x86 warning (no FDT needed here).

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-01 16:40:11 +01:00
Andre Przywara 7e66b1218d kvmtool: Makefile: fix bogus definition of try-cc
In config/utilities.mak we have two macros checking either
compile-ability or build-ability of a library. Actually they are
defined the same, with try-cc behaving like try-build for no reason.
Fix try-cc to really only test compilation (no linking) and replace
all calls to try-cc in the Makefile with try-build (as this is what
we need). Simplify the Makefile calls a bit on the way.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-01 16:40:11 +01:00
Andre Przywara c6cb7c7573 kvmtool: 9p: teach kvmtool about kuid_t and kgid_t
The 9p kernel code uses separate types for uid_t and gid_t. To avoid
changing too much code needlessly, copy over the kernel definitions
from uidgid.h into 9p.h.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-06-01 16:40:11 +01:00