Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

kernel: update guest kernel to 4.19.8 on aarch64 #269

Merged

Conversation

Pennyzct
Copy link
Contributor

@Pennyzct Pennyzct commented Dec 4, 2018

we should include set-up and install of the dev-kernel, since some siginificant features haven't be supported on stable kernel for now, for instance, the crucial nvdimm-support on aarch64 only
works well on the latest 4.20-rc3+ kernel.

Fixes: #268

Signed-off-by: Penny Zheng penny.zheng@arm.com
Signed-off-by: Wei Chen Wei.Chen@arm.com

@Pennyzct
Copy link
Contributor Author

Pennyzct commented Dec 4, 2018

@grahamwhaley @jodh-intel @Weichen81
we want to update guest kernel on arm64 to 4.20-rc3+ for nvdimm-aupport. we have discussed here #843.
ptal. ;)

@jodh-intel
Copy link
Contributor

As discussed on the issue (and mentioned elsewhere), the default kernel stance is to use the newest longerm kernel (currently 4.14.85).

I guess we don't have much choice here and eventually the features needed for aarch64 will end up in a longterm kernel version. But we should get more input on this PR since not only is 4.20 a mainline version, it's an rc version (and not the newest) to boot (pun intended ;)

Note that currently this PR will fail CI as you need to increase the number in kernel/kata_config_version.

@Weichen81
Copy link
Contributor

@jodh-intel As it's not good to use a RC version kernel. And I remember that @grahamwhaley had said, we are planning to upgrade kernel to 4.19.
So we have done another investigation:
We have backported Suzuki K Poulose's Dynamic IPA and 52bit IPA support patch series to stable 4.19.6. kernel. And then, we can support NVDIMM and run multiple kata-containers on one host.
In this case, we plan to upgrade Arm64 guest kernel version in version.yaml to 4.19.6 and upload a new config file arm64_kata_kvm_4.19.x to replace arm64_kata_kvm_4.14.x. And stop to support the 4.14.x guest kernel for Arm64. And we don't need the kernel/dev folder any more.
How do you think about it?
@Pennyzct @gnawux

@jodh-intel
Copy link
Contributor

/cc @kata-containers/kernel ;)

@Pennyzct Pennyzct changed the title kernel: update guest kernel to 4.20-rc3+ on aarch64 kernel: update guest kernel to 4.19.6 on aarch64 Dec 6, 2018
@Pennyzct
Copy link
Contributor Author

Pennyzct commented Dec 6, 2018

Hi~ all. @kata-containers/kernel
we have just updated the kernel on aarch64 to the long-term 4.19.6, and backported related patches to support nvdimm on guest kernel. PTAL. :)

@jodh-intel
Copy link
Contributor

Hi @Pennyzct - 4.19.6 is "stable", not "longterm" fwics?

@Weichen81
Copy link
Contributor

@jodh-intel yes, you’re right, it’s a stable kernel, not a long term version. I think it’s a typo of @Pennyzct ; )
Do we require the guest kernel to be long term version? If yes, it is difficult for us to back port nvdimm support to 4.14.x.

@jodh-intel
Copy link
Contributor

jodh-intel commented Dec 6, 2018

It's not ideal to have a deviation between kernel versions for different architectures, but this does seem unavoidable here. Hence, I'm in agreement with @gnawux + @grahamwhaley (see kata-containers/runtime#843).

What do others think?

/cc @sboeuf, @jcvenegas, @egernst. @WeiZhang555

lgtm

Approved with PullApprove

@sboeuf
Copy link

sboeuf commented Dec 6, 2018

@jodh-intel we had a discussion this morning with a few Intel folks on that, and I think we all agreed that having Kata kernel being stable instead of longterm would be nice. This would be a little bit more of maintenance when bumping versions, but it'd be worth the pain because we want to make sure Kata guest kernel can leverage all the latest features from the Linux kernel.

@jodh-intel
Copy link
Contributor

wfm as long as @gnawux, @WeiZhang555 and @jon raise no objections?

We do mention the kernel type briefly in https://github.com/kata-containers/documentation/blob/master/Upgrading.md#guest-kernel but that's not a very prominent document so if/when we're all in agreement I think we should:

@Pennyzct
Copy link
Contributor Author

@jodh-intel @marcov Hi~I just updated the kernel version to v4.19.8 to follow #278 and deleted all arch-dependent code. once @alicefr landing her PR to remove patch 0003 , I will rebase this one, increase reference count in kata_config_version and finally run ARM CI to see how it works.

For supporting nvdimm, we need to update kernel on aarch64 to the
stable version 4.19.8 and backport Suzuki K Poulose's latest
Dynamic IPA and 52bit IPA support patch series
(https://patchwork.kernel.org/cover/10616271/)which has been included
in 4.20-rc3+ to the v4.19.8.

Fixes: kata-containers#268

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Signed-off-by: Wei Chen <Wei.Chen@arm.com>
@Pennyzct
Copy link
Contributor Author

Hi~ all. I have already updated based on the latest master branch. ;) Since amd64 reversing the kernel config back to 4.14.x and ppc64le missing out @nitkon, should we make config arch-dependent to walk around like PR runtime/#973 suggests?

@Pennyzct Pennyzct changed the title kernel: update guest kernel to 4.19.6 on aarch64 kernel: update guest kernel to 4.19.8 on aarch64 Dec 17, 2018
@marcov
Copy link
Contributor

marcov commented Dec 17, 2018

Hi @Pennyzct, I recognize the need to have different kernel versions for different architectures. Forcing a single version just to keep things simpler is going to limit you and others extending kata to other architectures.

I just wanted to note that going this road, instead of having a single kernel package built for different architectures, we will likely need one kernel package per architecture, and this will take more effort to maintain.

@caoruidong
Copy link
Member

/test

@caoruidong
Copy link
Member

caoruidong commented Jan 2, 2019

lgtm

Approved with PullApprove

@jodh-intel jodh-intel merged commit 63024cd into kata-containers:master Jan 2, 2019
@bergwolf
Copy link
Member

bergwolf commented Jan 3, 2019

The added patch 0003-backport-Arm64-KVM-Dynamic-IPA-and-52bit-IPA-support.patch doesn't apply and is causing all CI to fail. /cc @Pennyzct

bergwolf added a commit that referenced this pull request Jan 3, 2019
Reverts #269

The added kernel patch doesn't apply and is causing all CI to fail. FYI, the current guest kernel version is 4.14.67. Please rebase and re-submit your PR cleanly @Pennyzct.

e.g., http://jenkins.katacontainers.io/job/kata-containers-runtime-centos-7-4-PR/995/console

NFO: Applying patch /tmp/jenkins/workspace/kata-containers-runtime-centos-7-4-PR/go/src/github.com/kata-containers/packaging/kernel/patches/0003-backport-Arm64-KVM-Dynamic-IPA-and-52bit-IPA-support.patch
patching file arch/arm/include/asm/kvm_arm.h
patching file arch/arm/include/asm/kvm_host.h
Hunk #1 succeeded at 266 (offset -7 lines).
Hunk #2 succeeded at 314 with fuzz 2 (offset -40 lines).
patching file arch/arm/include/asm/kvm_mmu.h
Hunk #1 FAILED at 35.
Hunk #2 succeeded at 47 with fuzz 2 (offset -5 lines).
Hunk #3 succeeded at 266 with fuzz 2 (offset -96 lines).
1 out of 3 hunks FAILED -- saving rejects to file arch/arm/include/asm/kvm_mmu.h.rej
patching file arch/arm/include/asm/stage2_pgtable.h
patching file arch/arm64/include/asm/cpufeature.h
Hunk #1 FAILED at 262.
Hunk #2 succeeded at 284 (offset -246 lines).
1 out of 2 hunks FAILED -- saving rejects to file arch/arm64/include/asm/cpufeature.h.rej
patching file arch/arm64/include/asm/kvm_arm.h
Hunk #1 succeeded at 102 (offset -5 lines).
Hunk #2 succeeded at 116 (offset -5 lines).
Hunk #3 succeeded at 305 (offset -7 lines).
patching file arch/arm64/include/asm/kvm_asm.h
Hunk #1 succeeded at 27 (offset -3 lines).
Hunk #2 FAILED at 73.
1 out of 2 hunks FAILED -- saving rejects to file arch/arm64/include/asm/kvm_asm.h.rej
patching file arch/arm64/include/asm/kvm_host.h
Hunk #1 succeeded at 48 (offset -5 lines).
Hunk #2 FAILED at 61.
Hunk #3 succeeded at 399 with fuzz 2 (offset -41 lines).
Hunk #4 FAILED at 503.
2 out of 4 hunks FAILED -- saving rejects to file arch/arm64/include/asm/kvm_host.h.rej
patching file arch/arm64/include/asm/kvm_hyp.h
patching file arch/arm64/include/asm/kvm_mmu.h
Hunk #1 succeeded at 154 (offset 13 lines).
Hunk #2 succeeded at 229 with fuzz 1 (offset -17 lines).
Hunk #3 succeeded at 409 with fuzz 2 (offset -110 lines).
patching file arch/arm64/include/asm/stage2_pgtable-nopmd.h
patching file arch/arm64/include/asm/stage2_pgtable-nopud.h
patching file arch/arm64/include/asm/stage2_pgtable.h
patching file arch/arm64/kvm/guest.c
Hunk #1 succeeded at 305 (offset -86 lines).
patching file arch/arm64/kvm/hyp-init.S
Hunk #1 FAILED at 65.
1 out of 1 hunk FAILED -- saving rejects to file arch/arm64/kvm/hyp-init.S.rej
patching file arch/arm64/kvm/hyp/Makefile
Hunk #1 succeeded at 18 (offset -1 lines).
patching file arch/arm64/kvm/hyp/s2-setup.c
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file arch/arm64/kvm/hyp/s2-setup.c.rej
patching file arch/arm64/kvm/hyp/switch.c
Hunk #1 FAILED at 198.
Hunk #2 succeeded at 226 (offset -37 lines).
1 out of 2 hunks FAILED -- saving rejects to file arch/arm64/kvm/hyp/switch.c.rej
patching file arch/arm64/kvm/hyp/tlb.c
Hunk #1 succeeded at 29 (offset -1 lines).
Hunk #2 succeeded at 38 (offset -1 lines).
patching file arch/arm64/kvm/reset.c
Hunk #4 FAILED at 86.
Hunk #5 succeeded at 133 (offset -4 lines).
1 out of 5 hunks FAILED -- saving rejects to file arch/arm64/kvm/reset.c.rej
patching file include/linux/irqchip/arm-gic-v3.h
Hunk #1 succeeded at 374 (offset -14 lines).
patching file include/uapi/linux/kvm.h
Hunk #1 succeeded at 739 (offset -11 lines).
Hunk #2 FAILED at 962.
1 out of 2 hunks FAILED -- saving rejects to file include/uapi/linux/kvm.h.rej
patching file virt/kvm/arm/arm.c
Hunk #1 succeeded at 115 (offset -5 lines).
Hunk #2 succeeded at 207 (offset -6 lines).
Hunk #3 succeeded at 236 (offset -6 lines).
Hunk #4 succeeded at 463 (offset -35 lines).
Hunk #5 FAILED at 546.
Hunk #6 succeeded at 1164 with fuzz 2 (offset -145 lines).
Hunk #7 succeeded at 1261 (offset -147 lines).
1 out of 7 hunks FAILED -- saving rejects to file virt/kvm/arm/arm.c.rej
patching file virt/kvm/arm/mmu.c
Hunk #1 succeeded at 43 with fuzz 2 (offset -2 lines).
Hunk #2 succeeded at 147 (offset -2 lines).
Hunk #3 succeeded at 216 (offset -35 lines).
Hunk #4 succeeded at 226 (offset -35 lines).
Hunk #5 succeeded at 245 (offset -35 lines).
Hunk #6 succeeded at 255 (offset -35 lines).
Hunk #7 succeeded at 272 (offset -35 lines).
Hunk #8 succeeded at 371 with fuzz 2 (offset 40 lines).
Hunk #9 FAILED at 340.
Hunk #10 FAILED at 370.
Hunk #11 FAILED at 388.
Hunk #12 FAILED at 408.
Hunk #13 succeeded at 753 (offset -143 lines).
Hunk #14 succeeded at 842 (offset -143 lines).
Hunk #15 succeeded at 850 (offset -143 lines).
Hunk #16 succeeded at 859 (offset -143 lines).
Hunk #17 succeeded at 881 (offset -143 lines).
Hunk #18 succeeded at 1024 (offset -182 lines).
Hunk #19 succeeded at 1114 (offset -188 lines).
Hunk #20 succeeded at 1148 (offset -188 lines).
Hunk #21 succeeded at 1176 (offset -188 lines).
Hunk #22 succeeded at 1190 (offset -188 lines).
Hunk #23 succeeded at 1333 (offset -196 lines).
Hunk #24 succeeded at 1552 (offset -220 lines).
Hunk #25 succeeded at 1852 (offset -219 lines).
4 out of 25 hunks FAILED -- saving rejects to file virt/kvm/arm/mmu.c.rej
patching file virt/kvm/arm/vgic/vgic-its.c
Hunk #1 succeeded at 233 (offset -8 lines).
Hunk #2 succeeded at 696 (offset -56 lines).
Hunk #3 succeeded at 721 (offset -56 lines).
Hunk #4 succeeded at 736 (offset -56 lines).
Hunk #5 succeeded at 746 (offset -56 lines).
Hunk #6 succeeded at 1214 (offset -80 lines).
Hunk #7 succeeded at 1232 (offset -80 lines).
Hunk #8 succeeded at 1279 (offset -80 lines).
Hunk #9 succeeded at 2135 (offset -82 lines).
Hunk #10 succeeded at 2207 (offset -82 lines).
Hunk #11 succeeded at 2256 (offset -82 lines).
patching file virt/kvm/arm/vgic/vgic-mmio-v3.c
Hunk #1 succeeded at 326 (offset -38 lines).
Hunk #2 succeeded at 343 (offset -38 lines).
Build step 'Execute shell' marked build as failure
Performing Post build task...
Match found for :.* : True
Logical operation result is TRUE
Running script : #!/bin/bash

Fixes: #296
Signed-off-by: Peng Tao <bergwolf@gmail.com>
@jcvenegas
Copy link
Member

This is also something we should in this PR job

bergwolf added a commit that referenced this pull request Jan 4, 2019
Reverts #269

The added kernel patch doesn't apply and is causing all CI to fail. FYI, the current guest kernel version is 4.14.67. Please rebase and re-submit your PR cleanly @Pennyzct.

e.g., http://jenkins.katacontainers.io/job/kata-containers-runtime-centos-7-4-PR/995/console

NFO: Applying patch /tmp/jenkins/workspace/kata-containers-runtime-centos-7-4-PR/go/src/github.com/kata-containers/packaging/kernel/patches/0003-backport-Arm64-KVM-Dynamic-IPA-and-52bit-IPA-support.patch
patching file arch/arm/include/asm/kvm_arm.h
patching file arch/arm/include/asm/kvm_host.h
Hunk #1 succeeded at 266 (offset -7 lines).
Hunk #2 succeeded at 314 with fuzz 2 (offset -40 lines).
patching file arch/arm/include/asm/kvm_mmu.h
Hunk #1 FAILED at 35.
Hunk #2 succeeded at 47 with fuzz 2 (offset -5 lines).
Hunk #3 succeeded at 266 with fuzz 2 (offset -96 lines).
1 out of 3 hunks FAILED -- saving rejects to file arch/arm/include/asm/kvm_mmu.h.rej
patching file arch/arm/include/asm/stage2_pgtable.h
patching file arch/arm64/include/asm/cpufeature.h
Hunk #1 FAILED at 262.
Hunk #2 succeeded at 284 (offset -246 lines).
1 out of 2 hunks FAILED -- saving rejects to file arch/arm64/include/asm/cpufeature.h.rej
patching file arch/arm64/include/asm/kvm_arm.h
Hunk #1 succeeded at 102 (offset -5 lines).
Hunk #2 succeeded at 116 (offset -5 lines).
Hunk #3 succeeded at 305 (offset -7 lines).
patching file arch/arm64/include/asm/kvm_asm.h
Hunk #1 succeeded at 27 (offset -3 lines).
Hunk #2 FAILED at 73.
1 out of 2 hunks FAILED -- saving rejects to file arch/arm64/include/asm/kvm_asm.h.rej
patching file arch/arm64/include/asm/kvm_host.h
Hunk #1 succeeded at 48 (offset -5 lines).
Hunk #2 FAILED at 61.
Hunk #3 succeeded at 399 with fuzz 2 (offset -41 lines).
Hunk #4 FAILED at 503.
2 out of 4 hunks FAILED -- saving rejects to file arch/arm64/include/asm/kvm_host.h.rej
patching file arch/arm64/include/asm/kvm_hyp.h
patching file arch/arm64/include/asm/kvm_mmu.h
Hunk #1 succeeded at 154 (offset 13 lines).
Hunk #2 succeeded at 229 with fuzz 1 (offset -17 lines).
Hunk #3 succeeded at 409 with fuzz 2 (offset -110 lines).
patching file arch/arm64/include/asm/stage2_pgtable-nopmd.h
patching file arch/arm64/include/asm/stage2_pgtable-nopud.h
patching file arch/arm64/include/asm/stage2_pgtable.h
patching file arch/arm64/kvm/guest.c
Hunk #1 succeeded at 305 (offset -86 lines).
patching file arch/arm64/kvm/hyp-init.S
Hunk #1 FAILED at 65.
1 out of 1 hunk FAILED -- saving rejects to file arch/arm64/kvm/hyp-init.S.rej
patching file arch/arm64/kvm/hyp/Makefile
Hunk #1 succeeded at 18 (offset -1 lines).
patching file arch/arm64/kvm/hyp/s2-setup.c
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file arch/arm64/kvm/hyp/s2-setup.c.rej
patching file arch/arm64/kvm/hyp/switch.c
Hunk #1 FAILED at 198.
Hunk #2 succeeded at 226 (offset -37 lines).
1 out of 2 hunks FAILED -- saving rejects to file arch/arm64/kvm/hyp/switch.c.rej
patching file arch/arm64/kvm/hyp/tlb.c
Hunk #1 succeeded at 29 (offset -1 lines).
Hunk #2 succeeded at 38 (offset -1 lines).
patching file arch/arm64/kvm/reset.c
Hunk #4 FAILED at 86.
Hunk #5 succeeded at 133 (offset -4 lines).
1 out of 5 hunks FAILED -- saving rejects to file arch/arm64/kvm/reset.c.rej
patching file include/linux/irqchip/arm-gic-v3.h
Hunk #1 succeeded at 374 (offset -14 lines).
patching file include/uapi/linux/kvm.h
Hunk #1 succeeded at 739 (offset -11 lines).
Hunk #2 FAILED at 962.
1 out of 2 hunks FAILED -- saving rejects to file include/uapi/linux/kvm.h.rej
patching file virt/kvm/arm/arm.c
Hunk #1 succeeded at 115 (offset -5 lines).
Hunk #2 succeeded at 207 (offset -6 lines).
Hunk #3 succeeded at 236 (offset -6 lines).
Hunk #4 succeeded at 463 (offset -35 lines).
Hunk #5 FAILED at 546.
Hunk #6 succeeded at 1164 with fuzz 2 (offset -145 lines).
Hunk #7 succeeded at 1261 (offset -147 lines).
1 out of 7 hunks FAILED -- saving rejects to file virt/kvm/arm/arm.c.rej
patching file virt/kvm/arm/mmu.c
Hunk #1 succeeded at 43 with fuzz 2 (offset -2 lines).
Hunk #2 succeeded at 147 (offset -2 lines).
Hunk #3 succeeded at 216 (offset -35 lines).
Hunk #4 succeeded at 226 (offset -35 lines).
Hunk #5 succeeded at 245 (offset -35 lines).
Hunk #6 succeeded at 255 (offset -35 lines).
Hunk #7 succeeded at 272 (offset -35 lines).
Hunk #8 succeeded at 371 with fuzz 2 (offset 40 lines).
Hunk #9 FAILED at 340.
Hunk #10 FAILED at 370.
Hunk #11 FAILED at 388.
Hunk #12 FAILED at 408.
Hunk #13 succeeded at 753 (offset -143 lines).
Hunk #14 succeeded at 842 (offset -143 lines).
Hunk #15 succeeded at 850 (offset -143 lines).
Hunk #16 succeeded at 859 (offset -143 lines).
Hunk #17 succeeded at 881 (offset -143 lines).
Hunk #18 succeeded at 1024 (offset -182 lines).
Hunk #19 succeeded at 1114 (offset -188 lines).
Hunk #20 succeeded at 1148 (offset -188 lines).
Hunk #21 succeeded at 1176 (offset -188 lines).
Hunk #22 succeeded at 1190 (offset -188 lines).
Hunk #23 succeeded at 1333 (offset -196 lines).
Hunk #24 succeeded at 1552 (offset -220 lines).
Hunk #25 succeeded at 1852 (offset -219 lines).
4 out of 25 hunks FAILED -- saving rejects to file virt/kvm/arm/mmu.c.rej
patching file virt/kvm/arm/vgic/vgic-its.c
Hunk #1 succeeded at 233 (offset -8 lines).
Hunk #2 succeeded at 696 (offset -56 lines).
Hunk #3 succeeded at 721 (offset -56 lines).
Hunk #4 succeeded at 736 (offset -56 lines).
Hunk #5 succeeded at 746 (offset -56 lines).
Hunk #6 succeeded at 1214 (offset -80 lines).
Hunk #7 succeeded at 1232 (offset -80 lines).
Hunk #8 succeeded at 1279 (offset -80 lines).
Hunk #9 succeeded at 2135 (offset -82 lines).
Hunk #10 succeeded at 2207 (offset -82 lines).
Hunk #11 succeeded at 2256 (offset -82 lines).
patching file virt/kvm/arm/vgic/vgic-mmio-v3.c
Hunk #1 succeeded at 326 (offset -38 lines).
Hunk #2 succeeded at 343 (offset -38 lines).
Build step 'Execute shell' marked build as failure
Performing Post build task...
Match found for :.* : True
Logical operation result is TRUE
Running script : #!/bin/bash

Fixes: #296
Signed-off-by: Peng Tao <bergwolf@gmail.com>
jcvenegas pushed a commit that referenced this pull request Jul 2, 2019
rootfs-builder: add rootfs.sh DOCKER_RUNTIME env var
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants