Hi Will,
On 02/11/15 14:58, Will Deacon wrote:
> On Fri, Oct 30, 2015 at 06:26:53PM +0000, Andre Przywara wrote:
>> Hi,
>
> Hello Andre,
>
>> this series cleans up kvmtool's kernel loading functionality a bit.
>> It has been broken out of a previous series I
Hi Dimitri,
On 02/11/15 15:17, Dimitri John Ledkov wrote:
> On 2 November 2015 at 14:58, Will Deacon <will.dea...@arm.com> wrote:
>> On Fri, Oct 30, 2015 at 06:26:53PM +, Andre Przywara wrote:
>>> Hi,
>>
>> Hello Andre,
>>
>>> this series cle
Use the new read_file() wrapper in our arm/arm64 kernel image loading
function instead of the private implementation.
Signed-off-by: Andre Przywara <andre.przyw...@arm.com>
---
arm/fdt.c | 40 ++--
1 file changed, 18 insertions(+), 22 deletions(-)
diff
string.
Signed-off-by: Andre Przywara <andre.przyw...@arm.com>
---
arm/fdt.c | 95 +--
arm/kvm.c | 88 ++
2 files changed, 89 insertions(+), 94 deletions(-)
diff --git a/arm/f
Replace the unsafe read-loops in the powerpc kernel image loading
function with our new and safe read_file() wrapper.
This should fix random fails in kernel image loading, especially
from pipes and sockets.
Signed-off-by: Andre Przywara <andre.przyw...@arm.com>
---
powerpc/kvm.
Replace the unsafe read-loops in the x86 kernel image loading
functions with our safe read_file() and read_in_full() wrappers.
This should fix random fails in kernel image loading, especially
from pipes and sockets.
Signed-off-by: Andre Przywara <andre.przyw...@arm.com>
---
x86/kvm.
,
Andre.
[1] http://marc.info/?l=kvm=143825354808135=2
Andre Przywara (7):
Refactor kernel image loading
provide generic read_file() implementation
powerpc: use read_file() in kernel and initrd loading
MIPS: use read wrappers in kernel loading
x86: use read wrappers in kernel loading
for MIPS as special
cases for those architectures (removing the arch specific code from
the generic kvm.c file on the way) and rename the existing "flat binary"
loader functions for the other architectures to the new name.
Signed-off-by: Andre Przywara <andre.przyw...@arm.com>
Replace the unsafe read-loops used in the MIPS kernel image loading
with our safe read_file() and read_in_full() wrappers.
This should fix random fails in kernel image loading, especially
from pipes and sockets.
Signed-off-by: Andre Przywara <andre.przyw...@arm.com>
---
mips/kvm.
to provide the only safe implementation, so take
that as an inspiration to provide a generic read_file() function
usable by every part of kvmtool.
Signed-off-by: Andre Przywara <andre.przyw...@arm.com>
---
include/kvm/read-write.h | 2 ++
util/read-write.c| 21 +
2
Use the newly introduced pseek() function when skipping to the start
offset in the ELF file.
The layout of an ELF file should satisfy the constraints of pseek, so
that we should be able to use a pipe file descriptor as well.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
mips/kvm.c | 4
Replace the unsafe read-loops in the powerpc kernel image loading
function with our new and safe read_file() wrapper.
This should fix random fails in kernel image loading, especially
from pipes and sockets.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
powerpc/kvm.c | 36
architecture over to using the safe read wrappers.
These patches apply on top of the latest kvmtool master branch.
So far I could test arm, arm64 and x86, with MIPS and PowerPC
being at least compile-tested.
Cheers,
Andre.
Andre Przywara (14):
Refactor kernel image loading
arm/powerpc: remove
Remove the need to rewind the kernel image file if loading it as a
flat binary by re-using the already read portion of the file passed
in as a buffer.
This allows the MIPS flat binary kernel image to be read from a pipe.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
mips/kvm.c | 14
amount of data.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/read-write.h | 2 ++
util/read-write.c| 40
2 files changed, 42 insertions(+)
diff --git a/include/kvm/read-write.h b/include/kvm/read-write.h
index 67571f9..87eb167
Replace the unsafe read-loops used in the MIPS kernel image loading
with our safe read_file() and read_in_full() wrappers.
This should fix random fails in kernel image loading, especially
from pipes and sockets.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
mips/kvm.c | 35
more work.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/fdt.c | 3 ---
powerpc/kvm.c | 3 ---
2 files changed, 6 deletions(-)
diff --git a/arm/fdt.c b/arm/fdt.c
index ec7453f..cb4f00d 100644
--- a/arm/fdt.c
+++ b/arm/fdt.c
@@ -245,9 +245,6 @@ bool kvm__arch_load_kernel_image
to provide the only safe implementation, so take
that as an inspiration to provide a generic read_file() function
usable by every part of kvmtool.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/read-write.h | 2 ++
util/read-write.c| 21 +
2 files
Refactor MIPS' load_elf_binary() implementation by not reading the
ELF header itself, but using a pointer to a memory buffer instead.
This prepares for removing the need to rewind the image file later.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
mips/kvm.c | 52
string.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/fdt.c | 96 +--
arm/kvm.c | 89 ++
2 files changed, 90 insertions(+), 95 deletions(-)
diff --git a/arm/fdt.c b
for MIPS as special
cases for those architectures and rename the existing flat binary
loader functions for the other architectures to the new name.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/fdt.c | 4 ++--
include/kvm/kvm.h | 5 ++---
kvm.c | 42
Replace the unsafe read-loops in the x86 kernel image loading
functions with our safe read_file() and read_in_full() wrappers.
This should fix random fails in kernel image loading, especially
from pipes and sockets.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
x86/kvm.c | 40
Use the new read_file() wrapper in our arm/arm64 kernel image loading
function instead of the private implementation.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/kvm.c | 42 --
1 file changed, 20 insertions(+), 22 deletions(-)
diff --git
without using a seek, so kvmtool will happily accept any file
descriptor (including pipes) for the image file.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
x86/kvm.c | 48 +---
1 file changed, 25 insertions(+), 23 deletions(-)
diff --git a/x86
Streamline the x86 kernel loading implementation by removing unneeded
seeks and thus allow an x86 bzImage to be loaded from a pipe.
Flat binaries are taken care of in a separate patch.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
x86/kvm.c | 11 ---
1 file changed, 4
Hi Michael,
On 19/06/15 02:14, Michael Ellerman wrote:
On Thu, 2015-06-18 at 16:50 +0100, Andre Przywara wrote:
Currently we set CC unconditionally to ${CROSS_COMPILE}gcc, the same
for LD.
Allow people to override the compiler name by specifying it explicitly
on the command line or via
Hi Michael,
On 19/06/15 02:08, Michael Ellerman wrote:
On Thu, 2015-06-18 at 15:52 +0100, Andre Przywara wrote:
Hi,
On 06/17/2015 10:43 AM, Andre Przywara wrote:
For converting the guest/init binary into an object file, we call
the linker binary, setting the endianness to big endian
Hi,
On 06/17/2015 10:43 AM, Andre Przywara wrote:
For converting the guest/init binary into an object file, we call
the linker binary, setting the endianness to big endian explicitly
when compiling kvmtool for powerpc.
This breaks if the compiler is actually targetting little endian
(which
rid of the PowerPC
overrides in the Makefile. Possible uses:
$ make CC=gcc -m64 LD=ld -melf64ppc
(build kvmtool on a PowerPC toolchain defaulting to 32-bit)
$ make CC=gcc -m32 LD=ld -melf_i386
(build a 32-bit binary on a multilib-enabled x86-64 compiler)
Signed-off-by: Andre Przywara andre.przyw
The powerpc code uses some PAPR hypercalls, of which we need the
hypercall number. Copy just the needed macro definitions from the
kernel's (private) hvcall.h file and remove the extra tricks formerly
used to be able to include this header file directly.
Signed-off-by: Andre Przywara andre.przyw
Hello,
some patches to fix at least the build of the new kvmtool for
PowerPC. I could only compile test it so far, so I'd be grateful
if people more familiar with that architecture can have a look
and maybe even test it on actual machines.
Cheers,
Andre.
Andre Przywara (3):
powerpc: implement
the explicit big endianness switch from the linker call to
allow linking on little endian PowerPC builds again.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
Hi,
this fixed the powerpc64le build for me, while still compiling fine
for big endian. Admittedly this whole init-guest_init.o
The powerpc code uses some PAPR hypercalls, of which we need the
hypercall number. Copy the macro definition parts from the kernel's
(private) hvcall.h file and remove the extra tricks formerly used
to be able to include this header file directly.
Signed-off-by: Andre Przywara andre.przyw
33 matches
Mail list logo