diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-05-21 21:21:26 +0200 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-05-21 21:21:26 +0200 |
| commit | 4b927bc37359dec23f67d3427fc982945f24f404 (patch) | |
| tree | 245449ef9146942dc7fffd0235b48b7e70a00bf2 /gitlab/issues/target_arm/host_missing/accel_HVF/864.toml | |
| parent | aa8bd79cec7bf6790ddb01d156c2ef2201abbaab (diff) | |
| download | emulator-bug-study-4b927bc37359dec23f67d3427fc982945f24f404.tar.gz emulator-bug-study-4b927bc37359dec23f67d3427fc982945f24f404.zip | |
add gitlab issues in toml format
Diffstat (limited to 'gitlab/issues/target_arm/host_missing/accel_HVF/864.toml')
| -rw-r--r-- | gitlab/issues/target_arm/host_missing/accel_HVF/864.toml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gitlab/issues/target_arm/host_missing/accel_HVF/864.toml b/gitlab/issues/target_arm/host_missing/accel_HVF/864.toml new file mode 100644 index 00000000..91907f99 --- /dev/null +++ b/gitlab/issues/target_arm/host_missing/accel_HVF/864.toml @@ -0,0 +1,23 @@ +id = 864 +title = "HVF virtual counter diverges from CLOCK_VIRTUAL when the host sleeps" +state = "opened" +created_at = "2022-02-10T01:36:27.240Z" +closed_at = "n/a" +labels = ["accel: HVF", "target: arm"] +url = "https://gitlab.com/qemu-project/qemu/-/issues/864" +host-os = "macOS" +host-arch = "arm64" +qemu-version = "6621441db50d5bae7e34dbd04bf3c57a27a71b32" +guest-os = "Fedora 35" +guest-arch = "aarch64" +description = """HVF's virtual counter diverges from `CLOCK_VIRTUAL` when the host sleeps and causes the inconsistency between Linux's system counter and everything else. + +HVF's virtual counter apparently relies on something similar to `mach_absolute_time`, which stops when the host sleeps and resumes after it wakes up. However, `CLOCK_VIRTUAL` is implemented with `mach_continuous_time`, which continues even while the host sleeps. Linux uses the virtual counter as the source of the system counter and sees inconsistencies between the system counter and the other devices.""" +reproduce = """1. Launch Fedora. +2. Compare the time shown at the top of the guest display and one at the top of the host display. The difference should be less than 2 minutes. +3. Let the host sleep for 3 minutes. +4. Compare the times again. The difference is now greater than 2 minutes.""" +additional = """Here are solutions I've came up with so far. There are trade-offs but any of them should be better than the current situation. I'm happy to implement one if the maintainers have decided which one is the best or figure out a superior alternative. +- Implement `cpus_get_virtual_clock` of `AccelOpsClass` with `mach_absolute_time`. It would make HVF inconsistent with the other accelerators. Linux also expects the virtual clock is "continuous" and it leaves the divergence from the real time. +- Request XNU `HOST_NOTIFY_CALENDAR_CHANGE` to update the virtual clock with the continuous time. The interface is undocumented. +- Use `IORegisterForSystemPower` to update the virtual clock with the continuous time. It is undocumented that the interface handles every cases where `mach_absolute_time` and `mach_continuous_time`, but it actually does if I read XNU's source code correctly.""" |