CC linaro-kernel.
Hi James,
Thanks a lot for your info! I did the backporting on lsk branch: git://git.linaro.org/kernel/linux-linaro-stable.git v4.1/topic/hibernate or https://git.linaro.org/kernel/linux-linaro-stable.git/shortlog/refs/heads/v4...
which has 142 commits, include 20 conflicts. most of them are just skip some missed commits contents. and I tried to give reasons for other complex conflicts fix.
I merged it into linux-linaro-lsk-v4.1-test branch which booted on my x86 qemu.
Would you like to give a review for that branch? or do a testing if it's trouble you much.
BTW, During the painful backporting I do think your previous version should be better to avoid much commits introductions. Does you previous version are just base kernel change? or some new ideas from community? Honestly, I have a bit regret for not taking Mark's suggestion on this.
Regards Alex
On 05/16/2016 06:57 PM, James Morse wrote:
Hi Mark and Alex,
On 13/05/16 14:58, Mark Brown wrote:
Is that something that you could help out with either by doing the backport (especially if you have versions for older kernels available from your development) or by providing some guidance on what's needed?
I can certainly help debug any problems you come across. What's needed will depend on what else is backported to LSK.
Hibernate reworks cpu_suspend() and kvm's cpu hotplug code (patches from Takahiro Akashi). The cpu_suspend changes may conflict with a t0sz bugfix, and further cleanup of that code by Mark Rutland that added cpu_uninstall_idmap(). (Given kexec uses these calls too, you may want to backport that series) The KVM work will depend on whether you have backported VHE. Beware taking an older version of the kvm patches, the ABI between EL1 and EL2 was changed, and the whole 'hyp-gone' thing is to avoid a user-visible error when the reboot syscall (and eventually kexec) races with guests being scheduled.
Just in case you run into it, one known-issue that Robin Murphy discovered: if you boot with 'no_console_suspend', and hibernate with a task that reads from the serial console after triggering the hibernate (systemd does this for some reason), the console-read blocks after resume, even when characters are sent to the console. Kernel messages still print to the console, and ssh-ing and sending the task sigint is enough to make it restart the syscall and carry on working normally. Given no_console_suspend is a debug option and hibernate/resume did work, its currently on the back-burner.
Let me know how you get on!
Thanks,
James
Hi Alex,
On 25/05/16 16:09, Alex Shi wrote:
Thanks a lot for your info! I did the backporting on lsk branch: git://git.linaro.org/kernel/linux-linaro-stable.git v4.1/topic/hibernate or https://git.linaro.org/kernel/linux-linaro-stable.git/shortlog/refs/heads/v4...
which has 142 commits, include 20 conflicts. most of them are just skip some missed commits contents. and I tried to give reasons for other complex conflicts fix.
I merged it into linux-linaro-lsk-v4.1-test branch which booted on my x86 qemu.
Would you like to give a review for that branch? or do a testing if it's trouble you much.
I gave this branch a spin through the tests I did on Juno, all of which worked fine.
A quick look at the tree shows you are missing:
c612505f8605 ("arm64: kvm: Fix kvm teardown for systems using the extended idmap")
Which fixes a hyp-panic on Seattle with 4K/39 caused by "arm64: kvm: allows kvm cpu hotplug". We didn't find this until after Will had picked the patches, (hence the gap in the git log).
I received the build-warning below[3] ... hibernate didn't touch this code, and I can't remember if its 'normal' for v4.1.
BTW, During the painful backporting I do think your previous version should be better to avoid much commits introductions. Does you previous version are just base kernel change? or some new ideas from community? Honestly, I have a bit regret for not taking Mark's suggestion on this.
The details are in the cover letter of each version of the series [0].
The hyp-gone stuff was based on Marc Zyngier's feedback, a fix for this was needed as it causes problems when reboot() races with guests being scheduled.(original report at [1]). The other recent change was to the kvm->hyp register use, which is shared with the hyp-stub, again this was based on review feedback [2]. These two probably generated most of the backport difficulties as they both touch kvm, which has seen a lot of changes since v4.1. The same patches would also be required for kexec.
Thanks,
James
[0] http://www.spinics.net/lists/arm-kernel/msg500824.html [1] http://lists.infradead.org/pipermail/kexec/2015-December/014932.html [2] http://lists.infradead.org/pipermail/kexec/2016-March/015595.html [3] Build warnings from v4.1/topic/hibernate: ---------------------%<--------------------- In file included from arch/arm64/kvm/hyp/vgic-v3-sr.c:19:0: include/linux/irqchip/arm-gic-v3.h:390:14: warning: ‘struct device_node’ declared inside parameter list struct irq_domain *domain); ^ include/linux/irqchip/arm-gic-v3.h:390:14: warning: its scope is only this definition or declaration, which is probably not what you want ---------------------%<---------------------
On 05/27/2016 10:07 PM, James Morse wrote:
Hi Alex,
On 25/05/16 16:09, Alex Shi wrote:
Thanks a lot for your info! I did the backporting on lsk branch: git://git.linaro.org/kernel/linux-linaro-stable.git v4.1/topic/hibernate or https://git.linaro.org/kernel/linux-linaro-stable.git/shortlog/refs/heads/v4...
which has 142 commits, include 20 conflicts. most of them are just skip some missed commits contents. and I tried to give reasons for other complex conflicts fix.
I merged it into linux-linaro-lsk-v4.1-test branch which booted on my x86 qemu.
Would you like to give a review for that branch? or do a testing if it's trouble you much.
I gave this branch a spin through the tests I did on Juno, all of which worked fine.
A quick look at the tree shows you are missing:
c612505f8605 ("arm64: kvm: Fix kvm teardown for systems using the extended idmap")
Which fixes a hyp-panic on Seattle with 4K/39 caused by "arm64: kvm: allows kvm cpu hotplug". We didn't find this until after Will had picked the patches, (hence the gap in the git log).
Thanks for for this info. I picked up this patch with some dependency. Would you like to review this on the same branches?
I received the build-warning below[3] ... hibernate didn't touch this code, and I can't remember if its 'normal' for v4.1.
This warning has no harm. It's due to gcc first time see the device_node in the its_init function's parameter list instead of a definition in linux/of.h.
To tame this complaints, I add a fix for this: commit fa0d862f428fdfded946bd09d45e78865f6efc45 Author: Alex Shi alex.shi@linaro.org Date: Tue May 31 17:07:32 2016 +0800
vgic-v3: tame the undeclared struct warning
In file included from arch/arm64/kvm/hyp/vgic-v3-sr.c:19:0: include/linux/irqchip/arm-gic-v3.h:390:14: warning: ‘struct device_node’ declared inside parameter list struct irq_domain *domain); ^ include/linux/irqchip/arm-gic-v3.h:390:14: warning: its scope is only this definition or declaration, which is probably not what you want
Above warning is due to gcc has no idea of 'struct device_node' before first meet it in 'its_init(struct device_node *node, struct rdists *rdists ...)' It is no harm here since this function just use it as an pointer. But to tame the extra warning, introduce of.h for device_node defination before its_init.
Signed-off-by: Alex Shi alex.shi@linaro.org
diff --git a/arch/arm64/kvm/hyp/vgic-v3-sr.c b/arch/arm64/kvm/hyp/vgic-v3-sr.c index a769458..a8f5fd4 100644 --- a/arch/arm64/kvm/hyp/vgic-v3-sr.c +++ b/arch/arm64/kvm/hyp/vgic-v3-sr.c @@ -16,6 +16,7 @@ */
#include <linux/compiler.h> +#include <linux/of.h> #include <linux/irqchip/arm-gic-v3.h> #include <linux/kvm_host.h>
BTW, During the painful backporting I do think your previous version should be better to avoid much commits introductions. Does you previous version are just base kernel change? or some new ideas from community? Honestly, I have a bit regret for not taking Mark's suggestion on this.
The details are in the cover letter of each version of the series [0].
The hyp-gone stuff was based on Marc Zyngier's feedback, a fix for this was needed as it causes problems when reboot() races with guests being scheduled.(original report at [1]). The other recent change was to the kvm->hyp register use, which is shared with the hyp-stub, again this was based on review feedback [2]. These two probably generated most of the backport difficulties as they both touch kvm, which has seen a lot of changes since v4.1. The same patches would also be required for kexec.
Thanks a lot for all info. Yes, it is headache for me, a total idiot on kvm.
linaro-kernel@lists.linaro.org