All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	"Tim (Xen.org)" <tim@xen.org>,
	xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 1/6] x86/HVM: fix processing of RTC REG_B writes
Date: Thu, 2 May 2013 10:07:21 +0200	[thread overview]
Message-ID: <51821EB9.4040603@citrix.com> (raw)
In-Reply-To: <517E970D02000078000D1B00@nat28.tlf.novell.com>

On 29/04/13 15:51, Jan Beulich wrote:
> We must store the new values before calling rtc_update_irq(), and we
> need to call rtc_timer_update() when PIE transitions from 0 to 1 (as we
> may have previously turned off the periodic timer due to the guest not
> reading REG_C, and hence may have to re-enable it in order to start
> IRQs getting delivered to the guest).
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Tested-by: Roger Pau Monné <roger.pau@citrix.com>

On FreeBSD

> 
> --- a/xen/arch/x86/hvm/rtc.c
> +++ b/xen/arch/x86/hvm/rtc.c
> @@ -468,12 +468,14 @@ static int rtc_ioport_write(void *opaque
>              if ( orig & RTC_SET )
>                  rtc_set_time(s);
>          }
> +        s->hw.cmos_data[RTC_REG_B] = data;
>          /*
>           * If the interrupt is already set when the interrupt becomes
>           * enabled, raise an interrupt immediately.
>           */
>          rtc_update_irq(s);
> -        s->hw.cmos_data[RTC_REG_B] = data;
> +        if ( (data & RTC_PIE) && !(orig & RTC_PIE) )
> +            rtc_timer_update(s);
>          if ( (data ^ orig) & RTC_SET )
>              check_update_timer(s);
>          if ( (data ^ orig) & (RTC_24H | RTC_DM_BINARY | RTC_SET) )
> 
> 
> 

  reply	other threads:[~2013-05-02  8:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-29 13:42 [PATCH 0/6] x86/HVM: RTC/VPT adjustments Jan Beulich
2013-04-29 13:51 ` [PATCH 1/6] x86/HVM: fix processing of RTC REG_B writes Jan Beulich
2013-05-02  8:07   ` Roger Pau Monné [this message]
2013-05-02  9:21   ` Tim Deegan
2013-05-02  9:40     ` Jan Beulich
2013-05-02  9:48       ` Tim Deegan
2013-04-29 13:52 ` [PATCH 2/6] x86/HVM: slightly adjust RTC reset Jan Beulich
2013-05-02  9:27   ` Tim Deegan
2013-05-02  9:51     ` Jan Beulich
2013-05-02 10:05       ` Tim Deegan
2013-04-29 13:53 ` [PATCH 3/6] x86/HVM: adjust IRQ (de-)assertion Jan Beulich
2013-05-02  9:34   ` Tim Deegan
2013-05-02  9:54     ` Jan Beulich
2013-04-29 13:53 ` [PATCH 4/6] x86/HVM: properly handle RTC periodic timer even when !RTC_PIE Jan Beulich
2013-05-02  9:41   ` Tim Deegan
2013-05-02 10:02     ` Jan Beulich
2013-04-29 13:54 ` [PATCH 5/6] x86/HVM: fix legacy PIC check in pt_update_irq() Jan Beulich
2013-05-02  9:46   ` Tim Deegan
2013-04-29 13:56 ` [PATCH 6/6] x86/HVM: RTC code must be in line with WAET flags passed by hvmloader Jan Beulich
2013-05-01 16:15 ` [PATCH 0/6] x86/HVM: RTC/VPT adjustments George Dunlap
2013-05-02  6:58   ` Jan Beulich
2013-05-02  9:23     ` George Dunlap
2013-05-02  9:53       ` Tim Deegan
2013-05-02 10:03       ` Jan Beulich
2013-05-02  8:15 ` Roger Pau Monné
2013-05-02  8:50   ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51821EB9.4040603@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.