[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/6] x86/HVM: slightly adjust RTC reset



At 14:52 +0100 on 29 Apr (1367247135), Jan Beulich wrote:
> We should clear the interrupt enable flags here, deassert the IRQ, and
> clear REG_C.

I'm not sure at all that we should be tinkering with the IE flags here.
AFAICT this code is called on S3 suspend -- Does a real S3 do that (and
not reset any of the other RTC registers?

Deasserting the IRQ seems fair enough, though probably as part of the
ther IRQ-frobbing changes in another patch.

Tim.

> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> --- a/xen/arch/x86/hvm/rtc.c
> +++ b/xen/arch/x86/hvm/rtc.c
> @@ -732,6 +732,11 @@ void rtc_reset(struct domain *d)
>      destroy_periodic_time(&s->pt);
>      s->pt_code = 0;
>      s->pt.source = PTSRC_isa;
> +
> +    s->hw.cmos_data[RTC_REG_B] &= ~(RTC_PIE | RTC_AIE | RTC_UIE);
> +    if ( s->hw.cmos_data[RTC_REG_C] & RTC_IRQF )
> +        hvm_isa_irq_deassert(d, RTC_IRQ);
> +    s->hw.cmos_data[RTC_REG_C] = 0;
>  }
>  
>  void rtc_init(struct domain *d)
> 
> 
> 

> x86/HVM: slightly adjust RTC reset
> 
> We should clear the interrupt enable flags here, deassert the IRQ, and
> clear REG_C.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> --- a/xen/arch/x86/hvm/rtc.c
> +++ b/xen/arch/x86/hvm/rtc.c
> @@ -732,6 +732,11 @@ void rtc_reset(struct domain *d)
>      destroy_periodic_time(&s->pt);
>      s->pt_code = 0;
>      s->pt.source = PTSRC_isa;
> +
> +    s->hw.cmos_data[RTC_REG_B] &= ~(RTC_PIE | RTC_AIE | RTC_UIE);
> +    if ( s->hw.cmos_data[RTC_REG_C] & RTC_IRQF )
> +        hvm_isa_irq_deassert(d, RTC_IRQ);
> +    s->hw.cmos_data[RTC_REG_C] = 0;
>  }
>  
>  void rtc_init(struct domain *d)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.