Message ID | 8bbfaead-2be9-4e30-4743-ddc95d60df95@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86/HVM: avoid truncation of PM timer I/O port range version | expand |
On Thu, Jan 30, 2020 at 05:47:03PM +0100, Jan Beulich wrote: > Don't silently ignore the upper 32 bits. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Wei Liu <wl@xen.org>
On 30/01/2020 16:56, Wei Liu wrote: > On Thu, Jan 30, 2020 at 05:47:03PM +0100, Jan Beulich wrote: >> Don't silently ignore the upper 32 bits. >> >> Signed-off-by: Jan Beulich <jbeulich@suse.com> > Reviewed-by: Wei Liu <wl@xen.org> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
--- a/xen/arch/x86/hvm/pmtimer.c +++ b/xen/arch/x86/hvm/pmtimer.c @@ -313,9 +313,9 @@ static int acpi_load(struct domain *d, h HVM_REGISTER_SAVE_RESTORE(PMTIMER, acpi_save, acpi_load, 1, HVMSR_PER_DOM); -int pmtimer_change_ioport(struct domain *d, unsigned int version) +int pmtimer_change_ioport(struct domain *d, uint64_t version) { - unsigned int old_version; + uint64_t old_version; if ( !has_vpm(d) ) return -ENODEV; --- a/xen/include/asm-x86/hvm/vpt.h +++ b/xen/include/asm-x86/hvm/vpt.h @@ -188,7 +188,7 @@ void rtc_update_clock(struct domain *d); void pmtimer_init(struct vcpu *v); void pmtimer_deinit(struct domain *d); void pmtimer_reset(struct domain *d); -int pmtimer_change_ioport(struct domain *d, unsigned int version); +int pmtimer_change_ioport(struct domain *d, uint64_t version); void hpet_init(struct domain *d); void hpet_deinit(struct domain *d);
Don't silently ignore the upper 32 bits. Signed-off-by: Jan Beulich <jbeulich@suse.com>