xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: embeddev student <embed.dev.student@gmail.com>
Cc: xen-devel@lists.xen.org
Subject: Re: Xen Guest Timer (ARM) question
Date: Sun, 31 Aug 2014 15:26:56 +0100	[thread overview]
Message-ID: <1409495216.7613.3.camel@citrix.com> (raw)
In-Reply-To: <CABSFOwB5jnLBdOFTfVkxRoL5Oiu+kdOTLQvx+vH2toSaOePUwA@mail.gmail.com>

On Sun, 2014-08-31 at 15:01 +0530, embeddev student wrote:

> Q1. Why is guest not given only a virtual timer, What is the need for
> the guest to have a physical timer as well ?

Some guest kernels may not know about the virt timer yet, since it is
new, or they may choose not to use it for some reason (not so likely
since we require paravirt of the timers under Xen today, but eventually
we may want to think about running unmodified OSes on ARM).

It can also occasionally be useful for Paravirtualisation to know both
the real and virtual time (although I can't think of an example off
hand...)

> Q2. In virt_timer_save set_timer is called. If vcpu is going in a
> suspended state what is the requirement of a timer being set ?

This is setting a Xen software timer, not a hardware timer (except that
setting  software timer may trigger the hypervisor timer to be used to
fulfil it).

Since we are descheduling the vcpu we save its virt+phys timer state,
including the comparators, so we can use the hardware for the next vcpu.
The timer is there to make sure we wake up the vcpu when its timer would
have expired and triggered an interrupt.

Ian.

  reply	other threads:[~2014-08-31 14:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-31  9:31 Xen Guest Timer (ARM) question embeddev student
2014-08-31 14:26 ` Ian Campbell [this message]
2014-09-02  0:25   ` embeddev student
2014-09-03  1:29     ` Stefano Stabellini

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=1409495216.7613.3.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=embed.dev.student@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).