- 08 Jul, 2015 2 commits
-
-
Marc Zyngier authored
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>
-
Will Deacon authored
s/unsuppored/unsupported/ Signed-off-by:
Will Deacon <will.deacon@arm.com>
-
- 29 Jun, 2015 2 commits
-
-
Andre Przywara authored
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>
-
Andreas Herrmann authored
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>
-
- 22 Jun, 2015 1 commit
-
-
Andre Przywara authored
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>
-
- 19 Jun, 2015 2 commits
-
-
Michael Ellerman authored
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>
-
Michael Ellerman authored
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>
-
- 17 Jun, 2015 1 commit
-
-
Andre Przywara authored
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>
-
- 16 Jun, 2015 6 commits
-
-
Andre Przywara authored
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>
-
Andre Przywara authored
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>
-
Andreas Herrmann authored
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>
-
Andreas Herrmann authored
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>
-
Andreas Herrmann authored
Since commit d2a7ddff (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>
-
Andreas Herrmann authored
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>
-
- 05 Jun, 2015 2 commits
-
-
Andre Przywara authored
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>
-
Andre Przywara authored
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>
-
- 04 Jun, 2015 2 commits
-
-
Will Deacon authored
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>
-
Will Deacon authored
We don't build any external targets, so remove this unused variable from our Makefile. Signed-off-by:
Will Deacon <will.deacon@arm.com>
-
- 01 Jun, 2015 22 commits
-
-
Russell King authored
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>
-
Russell King authored
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>
-
Russell King authored
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>
-
Suzuki Poulose authored
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>
-
Andre Przywara authored
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>
-
Andre Przywara authored
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>
-
Andre Przywara authored
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>
-
Andre Przywara authored
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>
-
Andre Przywara authored
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>
-
Andre Przywara authored
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>
-
Andre Przywara authored
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>
-
Andre Przywara authored
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>
-
Andre Przywara authored
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>
-
Andre Przywara authored
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>
-
Andre Przywara authored
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>
-
Andre Przywara authored
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>
-
Andre Przywara authored
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>
-
Andre Przywara authored
The special Linux poison bits do not make sense in userland, so just replace them with NULL to spot bogus accesses. Signed-off-by:
Andre Przywara <andre.przywara@arm.com> Signed-off-by:
Will Deacon <will.deacon@arm.com>
-
Andre Przywara authored
The original Linux copy of rbtree.c used EXPORT_SYMBOL macros which we don't need. Remove them and get rid of the now unneeded export.h. Signed-off-by:
Andre Przywara <andre.przywara@arm.com> Signed-off-by:
Will Deacon <will.deacon@arm.com>
-
Andre Przywara authored
The ARM part requires psci.h, which is pretty recent, so older distributions might not carry it. This pulls in sizes.h, which is not an uapi header, but quite convenient and not really Linux specific. Signed-off-by:
Andre Przywara <andre.przywara@arm.com> Signed-off-by:
Will Deacon <will.deacon@arm.com>
-
Andre Przywara authored
Although those header files are technically Linux internal, they hold definitions for x86 hardware related bits (APIC, MPSPEC, VESA). We just reuse their definitions, so copy those files over. Signed-off-by:
Andre Przywara <andre.przywara@arm.com> Signed-off-by:
Will Deacon <will.deacon@arm.com>
-
Andre Przywara authored
Similarily to the generic uapi/linux/kvm.h, each architecture carries a kvm.h header in its arch/*/include/uapi/asm directory. These contain bits for the architecture specific interface. Since we use many recent features in kvmtool, the system headers provided by the distribution are usually not up-to-date. Copy the Linux v4.1-rc6 versions of those files for all supported architectures into the kvmtool tree to get access to the full glory. Signed-off-by:
Andre Przywara <andre.przywara@arm.com> Signed-off-by:
Will Deacon <will.deacon@arm.com>
-