[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/11] hpet: ignore high bits of comparator in 32-bit mode
From: |
Paolo Bonzini |
Subject: |
[PULL 06/11] hpet: ignore high bits of comparator in 32-bit mode |
Date: |
Tue, 23 Jul 2024 16:15:24 +0200 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/timer/hpet.c | 4 ++++
hw/timer/trace-events | 1 +
2 files changed, 5 insertions(+)
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
index 58073df02b5..bbb1e5f0897 100644
--- a/hw/timer/hpet.c
+++ b/hw/timer/hpet.c
@@ -585,6 +585,10 @@ static void hpet_ram_write(void *opaque, hwaddr addr,
}
break;
case HPET_TN_CMP + 4: // comparator register high order
+ if (timer->config & HPET_TN_32BIT) {
+ trace_hpet_ram_write_invalid_tn_cmp();
+ break;
+ }
trace_hpet_ram_write_tn_cmp(4);
if (!timer_is_periodic(timer)
|| (timer->config & HPET_TN_SETVAL)) {
diff --git a/hw/timer/trace-events b/hw/timer/trace-events
index de769f4b716..a5fafbc6796 100644
--- a/hw/timer/trace-events
+++ b/hw/timer/trace-events
@@ -111,6 +111,7 @@ hpet_ram_write_timer_id(uint64_t timer_id) "hpet_ram_writel
timer_id = 0x%" PRIx
hpet_ram_write_tn_cfg(void) "hpet_ram_writel HPET_TN_CFG"
hpet_ram_write_invalid_tn_cfg(uint8_t reg_off) "invalid HPET_TN_CFG + %" PRIu8
" write"
hpet_ram_write_tn_cmp(uint8_t reg_off) "hpet_ram_writel HPET_TN_CMP + %" PRIu8
+hpet_ram_write_invalid_tn_cmp(void) "invalid HPET_TN_CMP + 4 write"
hpet_ram_write_invalid(void) "invalid hpet_ram_writel"
hpet_ram_write_counter_write_while_enabled(void) "Writing counter while HPET
enabled!"
hpet_ram_write_counter_written(uint8_t reg_off, uint64_t value, uint64_t
counter) "HPET counter + %" PRIu8 "written. crt = 0x%" PRIx64 " -> 0x%" PRIx64
--
2.45.2
- [PULL 00/11] target/i386, HPET changes for QEMU 9.1 soft freeze, Paolo Bonzini, 2024/07/23
- [PULL 01/11] target/i386: do not crash if microvm guest uses SGX CPUID leaves, Paolo Bonzini, 2024/07/23
- [PULL 02/11] qio: add support for SO_PEERCRED for socket channel, Paolo Bonzini, 2024/07/23
- [PULL 03/11] tools: build qemu-vmsr-helper, Paolo Bonzini, 2024/07/23
- [PULL 05/11] hpet: fix and cleanup persistence of interrupt status, Paolo Bonzini, 2024/07/23
- [PULL 04/11] Add support for RAPL MSRs in KVM/Qemu, Paolo Bonzini, 2024/07/23
- [PULL 07/11] hpet: remove unnecessary variable "index", Paolo Bonzini, 2024/07/23
- [PULL 08/11] hpet: place read-only bits directly in "new_val", Paolo Bonzini, 2024/07/23
- [PULL 06/11] hpet: ignore high bits of comparator in 32-bit mode,
Paolo Bonzini <=
- [PULL 11/11] hpet: avoid timer storms on periodic timers, Paolo Bonzini, 2024/07/23
- [PULL 09/11] hpet: accept 64-bit reads and writes, Paolo Bonzini, 2024/07/23
- [PULL 10/11] hpet: store full 64-bit target value of the counter, Paolo Bonzini, 2024/07/23
- Re: [PULL 00/11] target/i386, HPET changes for QEMU 9.1 soft freeze, Richard Henderson, 2024/07/23