From: claudio.fontana@huawei.com (Claudio Fontana)
To: linux-arm-kernel@lists.infradead.org
Subject: stand-alone kvmtool
Date: Fri, 13 Feb 2015 17:36:10 +0100 [thread overview]
Message-ID: <54DE27FA.6070507@huawei.com> (raw)
In-Reply-To: <54DE0CDD.70308@arm.com>
On 13.02.2015 15:40, Andre Przywara wrote:
> Ciao Claudio,
>
> On 13/02/15 14:30, Claudio Fontana wrote:
>> Hello Andre,
>>
>> On 13.02.2015 11:39, Andre Przywara wrote:
>>> Hi,
>>>
>>> as I found it increasingly inconvenient to use kvmtool[1] as part of a
>>> Linux repository, I decided to give it a go and make it a stand-alone
>>> project. So I filtered all the respective commits, adjusted the paths in
>>> there (while keeping authorship and commit date, of course) and then
>>> added the missing bits to let it compile without a kernel tree nearby.
>>> The result is now available on:
>>>
>>> git://linux-arm.org/kvmtool.git
>>> http://linux-arm.org/kvmtool.git
>>
>> It builds fine on x86_64, but when I tried to crosscompile from x86_64 to AArch64,
>> I get in trouble because of libfdt: I have the aarch64 libs (static and shared), but how do I instruct the build system to get it from the right place?
>
> You have to install them into your cross-compiler's SYSROOT.
> Get the location of that by executing
> $ ${CROSS_COMPILE}gcc -print-sysroot.
> If it's just for libfdt, it's probably the easiest to copy them
> manually, the header files into $SYSROOT/usr/include, the libraries into
> $SYSROOT/usr/lib/aarch64-linux-gnu
> That fixed it for me ;-)
Thanks!
>
> For a more robust approach you would use your distribution's packaging
> system to install the aarch64 package into $SYSROOT.
>
> Cheers,
> Andre.
I still prefer to be forced to understand things so I actually prefer the manual route.
Ciao,
Claudio
>>
>>>
>>> You can simply check it out, type make and use "./lkvm run" for a quick
>>> test. So far I briefly tested x86-64, arm and arm64, the later two were
>>> also cross-compiled. For sure there are rough edges in there (for
>>> instance copying a few non-uapi header files into), but I deem it worthy
>>> enough to get some public comments.
>>> For me that also fixed some nasty warnings about libfdt, which now are
>>> gone due it using your system library version of it.
>>> I also managed to get rid of the libc-i386-dev dependency when compiling
>>> for x86-64, but that still needs to be cleaned up and thus is not in the
>>> current HEAD.
>>> I haven't got around to compile-test the other supported architectures,
>>> but supporting them should be as easy as copying over the uapi kvm.h
>>> header file (see the respective ARM commit). Contributions (and tests!)
>>> are welcome.
>>>
>>> Please give it a go and tell me what you think. I don't want to fork the
>>> project, so I am happy if someone "official" picks it up.
>>>
>>> Cheers,
>>> Andre.
>>>
>>> [1] https://github.com/penberg/linux-kvm/tree/master/tools/kvm
>>> _______________________________________________
>>> kvmarm mailing list
>>> kvmarm at lists.cs.columbia.edu
>>> https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
>>>
>>
>>
WARNING: multiple messages have this Message-ID (diff)
From: Claudio Fontana <claudio.fontana@huawei.com>
To: Andre Przywara <andre.przywara@arm.com>,
Pekka Enberg <penberg@kernel.org>,
Sasha Levin <sasha.levin@oracle.com>,
Cyrill Gorcunov <gorcunov@gmail.com>,
Asias He <asias.hejun@gmail.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
Marc Zyngier <Marc.Zyngier@arm.com>,
Will Deacon <Will.Deacon@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Ronald Minnich <rminnich@google.com>,
"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: stand-alone kvmtool
Date: Fri, 13 Feb 2015 17:36:10 +0100 [thread overview]
Message-ID: <54DE27FA.6070507@huawei.com> (raw)
In-Reply-To: <54DE0CDD.70308@arm.com>
On 13.02.2015 15:40, Andre Przywara wrote:
> Ciao Claudio,
>
> On 13/02/15 14:30, Claudio Fontana wrote:
>> Hello Andre,
>>
>> On 13.02.2015 11:39, Andre Przywara wrote:
>>> Hi,
>>>
>>> as I found it increasingly inconvenient to use kvmtool[1] as part of a
>>> Linux repository, I decided to give it a go and make it a stand-alone
>>> project. So I filtered all the respective commits, adjusted the paths in
>>> there (while keeping authorship and commit date, of course) and then
>>> added the missing bits to let it compile without a kernel tree nearby.
>>> The result is now available on:
>>>
>>> git://linux-arm.org/kvmtool.git
>>> http://linux-arm.org/kvmtool.git
>>
>> It builds fine on x86_64, but when I tried to crosscompile from x86_64 to AArch64,
>> I get in trouble because of libfdt: I have the aarch64 libs (static and shared), but how do I instruct the build system to get it from the right place?
>
> You have to install them into your cross-compiler's SYSROOT.
> Get the location of that by executing
> $ ${CROSS_COMPILE}gcc -print-sysroot.
> If it's just for libfdt, it's probably the easiest to copy them
> manually, the header files into $SYSROOT/usr/include, the libraries into
> $SYSROOT/usr/lib/aarch64-linux-gnu
> That fixed it for me ;-)
Thanks!
>
> For a more robust approach you would use your distribution's packaging
> system to install the aarch64 package into $SYSROOT.
>
> Cheers,
> Andre.
I still prefer to be forced to understand things so I actually prefer the manual route.
Ciao,
Claudio
>>
>>>
>>> You can simply check it out, type make and use "./lkvm run" for a quick
>>> test. So far I briefly tested x86-64, arm and arm64, the later two were
>>> also cross-compiled. For sure there are rough edges in there (for
>>> instance copying a few non-uapi header files into), but I deem it worthy
>>> enough to get some public comments.
>>> For me that also fixed some nasty warnings about libfdt, which now are
>>> gone due it using your system library version of it.
>>> I also managed to get rid of the libc-i386-dev dependency when compiling
>>> for x86-64, but that still needs to be cleaned up and thus is not in the
>>> current HEAD.
>>> I haven't got around to compile-test the other supported architectures,
>>> but supporting them should be as easy as copying over the uapi kvm.h
>>> header file (see the respective ARM commit). Contributions (and tests!)
>>> are welcome.
>>>
>>> Please give it a go and tell me what you think. I don't want to fork the
>>> project, so I am happy if someone "official" picks it up.
>>>
>>> Cheers,
>>> Andre.
>>>
>>> [1] https://github.com/penberg/linux-kvm/tree/master/tools/kvm
>>> _______________________________________________
>>> kvmarm mailing list
>>> kvmarm@lists.cs.columbia.edu
>>> https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
>>>
>>
>>
next prev parent reply other threads:[~2015-02-13 16:36 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-13 10:39 stand-alone kvmtool Andre Przywara
2015-02-13 10:39 ` Andre Przywara
2015-02-13 14:30 ` Claudio Fontana
2015-02-13 14:30 ` Claudio Fontana
2015-02-13 14:40 ` Andre Przywara
2015-02-13 14:40 ` Andre Przywara
2015-02-13 16:36 ` Claudio Fontana [this message]
2015-02-13 16:36 ` Claudio Fontana
2015-02-18 15:50 ` Will Deacon
2015-02-18 15:50 ` Will Deacon
2015-02-23 10:11 ` Andre Przywara
2015-02-23 10:11 ` Andre Przywara
2015-02-23 10:11 ` Andre Przywara
2015-02-26 11:02 ` Alex Bennée
2015-02-26 11:02 ` Alex Bennée
2015-02-26 11:02 ` Alex Bennée
2015-03-01 10:21 ` Pekka Enberg
2015-03-01 10:21 ` Pekka Enberg
2015-03-01 10:21 ` Pekka Enberg
2015-02-23 17:23 ` Pekka Enberg
2015-02-23 17:23 ` Pekka Enberg
2015-02-23 17:23 ` Pekka Enberg
2015-02-25 12:16 ` Will Deacon
2015-02-25 12:16 ` Will Deacon
2015-06-03 17:04 ` Will Deacon
2015-06-03 17:04 ` Will Deacon
2015-06-03 17:07 ` Ronald Minnich
2015-02-19 10:56 ` Sasha Levin
2015-02-19 10:56 ` Sasha Levin
2015-02-19 10:56 ` Sasha Levin
2015-02-23 11:12 ` Andre Przywara
2015-02-23 11:12 ` Andre Przywara
2015-02-23 11:12 ` Andre Przywara
2015-02-23 12:14 ` Russell King - ARM Linux
2015-02-23 12:14 ` Russell King - ARM Linux
2015-02-23 12:14 ` Russell King - ARM Linux
2015-02-23 14:27 ` Christoffer Dall
2015-02-23 14:27 ` Christoffer Dall
2015-02-23 16:35 ` Ronald Minnich
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=54DE27FA.6070507@huawei.com \
--to=claudio.fontana@huawei.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.