------- Comment From [email protected] 2018-01-24 14:13 EDT------- The reason for this bug is because the h_set_sprg0 and h_page_init hypervisor calls were not yet implemented in Qemu 2.5. The problem was solved by two patches. They implement one hypercall each.
https://github.com/qemu/qemu/commit/423576f771db8c6dbb944ddb8dc15b472f62de4a This is a very simple hypercall that only sets up the SPRG0 register for the guest (since writing to SPRG0 was only permitted to the hypervisor in older versions of the PowerISA). https://github.com/qemu/qemu/commit/3240dd9a6924df18dfccb83defa0914065da076e This hypercall either initializes a page with zeros, or copies another page. According to LoPAPR, the i-cache of the page should also be flushed if using H_ICACHE_INVALIDATE or H_ICACHE_SYNCHRONIZE, and the d-cache should be synchronized to the RAM if the H_ICACHE_SYNCHRONIZE flag is used. For this, two new functions are introduced, kvmppc_dcbst_range() and kvmppc_icbi()_range, which use the corresponding assembler instructions to flush the caches if running with KVM on Power. If the code runs with TCG instead, the code only uses tb_flush(), assuming that this will be enough for synchronization. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1712803 Title: spapr_hcall from ubuntu_kvm_unit_test failed on ppc64el with Z-hwe kernel Status in linux package in Ubuntu: Triaged Status in qemu package in Ubuntu: New Bug description: kernel: 4.10.0-33.37~16.04.1 I think this issue was introduced by the old qemu version (similar issue was spotted on Xenial before), will need to investigate this further. qemu-system-ppc64 -machine pseries,accel=kvm -bios powerpc/boot_rom.bin -display none -serial stdio -kernel powerpc/spapr_hcall.elf -smp 1 FAIL: hypercall: h_set_sprg0: sprg0 = 0xcafebabedeadbeef FAIL: hypercall: h_set_sprg0: sprg0 = 0xaaaaaaaa55555555 FAIL: hypercall: h_set_sprg0: sprg0 = 0x41a588 FAIL: hypercall: h_page_init: h_zero_page FAIL: hypercall: h_page_init: h_copy_page FAIL: hypercall: h_page_init: h_copy_page+h_zero_page FAIL: hypercall: h_page_init: h_zero_page unaligned dst FAIL: hypercall: h_page_init: h_copy_page unaligned src XFAIL: hypercall: h_random: h-call available SUMMARY: 9 tests, 8 unexpected failures, 1 expected failures To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1712803/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp

