Hello Sergio, Thank you for taking care of this change.
In Linux time_init() sets riscv_timebase during initialization of the host. The value is either based on the device-tree's property /cpus/timebase-frequency or on the ACPI table RHTC. With the patch this value is copied to /cpus/timebase-frequency in the client device-tree. env->kvm_timer_dirty is not related to the value of riscv_timebase in the host. This is why it is ignored in the patch. The only code difference I see between https://paste.debian.net/1330417/ and https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/2076927/+attachment/5805536/+files/0001-target-riscv-kvm-fix-timebase-frequency-when-using-K.patch seems to be the placement of this line: uint64_t reg; This line was move up 2 lines in the paste without functional change. Your paste looks correct. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2076927 Title: [SRU] RISC-V: Incorrect time-base frequency in KVM To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/2076927/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
