-
Notifications
You must be signed in to change notification settings - Fork 92
Conversation
Hey @Pennyzct the changes looks good, I wonder do you have the list of options that make conflict with aarch64 I see some options duplicated with the new config file I wonder if we could have a function to call the minimal set of options needed for kata. And then in the architecture specific function add the only ones that are different. |
Hi~ @jcvenegas the majority of the qemu options are same with x86_64, only a little would be different. here are the difference:
At first, I was considering the minimal set of qemu options for all arch, but I really couldn't decide what's the common in ppc64le😭. |
@Pennyzct thanks for explain what is different IMO because it is an small about of differences I would prefer to only add a few checks and enabled and disable options needed by the achitecture. If we see the list of difference is bigger lets change it. @grahamwhaley @sboeuf @egernst @bergwolf @jodh-intel any comment about it ? |
sorry for the delay @devimc. since getting no further comments, i will update asap following @jcvenegas's suggestion.😊 |
@jcvenegas sorry for the delay, ptal.😊 |
scripts/configure-hypervisor.sh
Outdated
@@ -424,14 +405,69 @@ main() | |||
unset _qemu_ldflags | |||
|
|||
# Where to install qemu libraries | |||
[ "$arch" = x86_64 ] && qemu_options+=(arch:--libdir=/usr/lib64/${hypervisor}) | |||
[ "$arch" == "x86_64" ] || [ "$arch" == "aarch64" ] || [ "$arch" == "ppc64le" ] && qemu_options+=(arch:--libdir=/usr/lib64/${hypervisor}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qemu_options+=(arch:--libdir=/usr/lib64/${hypervisor})
is the same for all architectures, please remove [ "$arch" == "x86_64" ] || [ "$arch" == "aarch64" ] || [ "$arch" == "ppc64le" ] &&
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. thanks.
scripts/configure-hypervisor.sh
Outdated
@@ -370,7 +343,7 @@ main() | |||
# Other options | |||
|
|||
# 64-bit only | |||
[ "$arch" = x86_64 ] && qemu_options+=(arch:"--target-list=${arch}-softmmu") | |||
[ "$arch" == "x86_64" ] || [ "$arch" == "aarch64" ] || [ "$arch" == "ppc64le" ] && qemu_options+=(arch:"--target-list=${arch}-softmmu") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove [ "$arch" == "x86_64" ] || [ "$arch" == "aarch64" ] || [ "$arch" == "ppc64le" ] &&
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. thanks
@Pennyzct your PR adds support for arm64 and ppc64, please update the tittle and the commit message |
scripts/configure-hypervisor.sh
Outdated
@@ -277,7 +229,11 @@ main() | |||
qemu_options+=(size:--disable-vnc-sasl) | |||
|
|||
# Disable unused filesystem support | |||
qemu_options+=(size:--disable-fdt) | |||
case "$arch" in | |||
aarch64) ;; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from #102 (comment)
please use following:
[ "$arch" == x86_64 ] && qemu_options+=(size:--disable-fdt)
;; | ||
ppc64le) | ||
qemu_options+=(size:--disable-debug-tcg) | ||
qemu_options+=(size:--disable-tcg-interpreter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nitkon please take a look
scripts/configure-hypervisor.sh
Outdated
@@ -15,6 +15,23 @@ | |||
#--------------------------------------------------------------------- | |||
|
|||
script_name=${0##*/} | |||
hypervisor_dir=${0%/*} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
lgtm but let's wait for feedback from @nitkon. |
Added dnm label until we have a ppc64le review. |
Okay. So applying this patch and building on ppc64le results in the following:
|
@nitkon I think this error is because of in your test you are not using Step 13/17 if [ "$goarch" = "amd64" ]; then
/root/configure-hypervisor.sh -s kata-qemu | xargs ./configure --prefix=/opt/kata --with-pkgversion=kata-static;
else
./configure --prefix=/opt/kata --with-pkgversion=kata-static ;
fi and seems like you have some problems in your environment
|
@devimc : Oops u were right. I had git cloned by mistake my local git branch instead of kata containers packaging master branch. I see the following error: ERROR: Unknown target name 'ppc64le-softmmu' The command '/bin/sh -c /root/configure-hypervisor.sh -s kata-qemu | xargs ./configure --prefix=/opt/kata --with-pkgversion=kata-static' returned a non-zero code: 123 U need to use However post those 2 fixes, i still see a string of errors (which I need to look into more): https://paste.fedoraproject.org/paste/-bAEtTzzkVebmrOqe~66Hw |
for now, when encountering difference in arm, I left ppc64le the same options as with amd64. |
Sounds reasonable to me - any thoughts @nitkon? |
@jodh-intel: I am ok with it. |
a few qemu options generated by configure-hypervisor.sh were only suitable for amd64, leading compilation err in aarch64. Fixes: kata-containers#92 Signed-off-by: Penny Zheng <penny.zheng@arm.com> Signed-off-by: Wei Chen <Wei.Chen@arm.com>
@jodh-intel @Pennyzct : I figured out why qemu static build was failing on ppc64le. But since @Pennyzct has already roll backed the changes , I can send a PR for it. |
@jodh-intel @devimc : Since this has 2 lgtms already, I am ok to send a new PR. You may go ahead and merge. Thnx! |
Thanks @nitkon. |
Commit b8f1a68 ("rootfs: Simplify code") introduced a variable called destdir but accidentally used dest_dir with cp(1) instead. This causes kernel modules to be copied to the wrong location. Rename the variable to dest_dir to be consistent with module_dir and rootfs_dir variables used in this function. Fixes: #94 Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
a few qemu options generated by configure-hypervisor.sh weren't suitable for arm64, leading compilation err. lib-configure-hypervisor-aarch64.sh will create specific qemu options for arm64.
Fixes: #92
Signed-off-by: Penny Zheng penny.zheng@arm.com
Signed-off-by: Wei Chen Wei.Chen@arm.com