Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aarch64: fix get time runtime service failure #290

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

jongwu
Copy link
Contributor

@jongwu jongwu commented Oct 25, 2023

When enable efi_rtc inside guest kernel, a warning occurs:

[ 0.764401] [Firmware Bug]: Unable to handle paging request in EFI runtime service
[ 0.770671] ------------[ cut here ]------------
[ 0.772014] WARNING: CPU: 0 PID: 1 at drivers/firmware/efi/runtime-wrappers.c:262 virt_efi_get_time+0x12c/0x17c

It derives from that there is lack of memory map descriptor for IO address of RTC_PL031 passed to kernel. Allocate IO Map for it before execute kernel/bootloader can avoid this failure and then we can get the right time inside guest.

Fixes: #289

@jongwu
Copy link
Contributor Author

jongwu commented Oct 26, 2023

Hello @retrage -, any comments?

@retrage
Copy link
Contributor

retrage commented Oct 26, 2023

Sorry for the late reply. Just a quick feedback. It’s good idea to allocate the reserved region, but the allocation should be done in populate_allocator function. For example, insert the change to here

.

When enable efi_rtc inside guest kernel, a warning occurs:

[    0.764401] [Firmware Bug]: Unable to handle paging request in EFI runtime service
[    0.770671] ------------[ cut here ]------------
[    0.772014] WARNING: CPU: 0 PID: 1 at drivers/firmware/efi/runtime-wrappers.c:262 virt_efi_get_time+0x12c/0x17c

It derives from that there is lack of memory map descriptor for IO address
of RTC_PL031 passed to kernel. Allocate IO Map for it before execute
kernel/bootloader can avoid this failure and then we can get the right
time inside guest.

Fixes: cloud-hypervisor#289
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
@jongwu
Copy link
Contributor Author

jongwu commented Oct 27, 2023

Thanks @retrage -, fixed.

Copy link
Contributor

@retrage retrage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@retrage retrage merged commit 128d513 into cloud-hypervisor:main Oct 27, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aarch64: efi get time fail in guest kernel
2 participants