From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] hvm/hpet: Alter hpet_init() to take a domain rather than vcpu
Date: Fri, 25 Jul 2014 16:38:55 +0100 [thread overview]
Message-ID: <53D27A0F.7070506@citrix.com> (raw)
In-Reply-To: <53D291910200007800026181@mail.emea.novell.com>
On 25/07/14 16:19, Jan Beulich wrote:
>>>> On 25.07.14 at 15:19, <andrew.cooper3@citrix.com> wrote:
>> There is nothing vcpu-specific about hpet_init(); all it does is follow the
>> vcpu's domain pointer to get at the domain vhpet state.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> CC: Jan Beulich <JBeulich@suse.com>
>>
>> ---
>>
>> Despite the comment in scope in hvm_vcpu_initialise(), the call can't
>> currently be moved to hvm_domain_initialise() as the extra hpet_deinit() (in
>> an error path) needs an allocated vcpu which wouldn't be present at that
>> point. I need more tuits to disentangle that mess.
> And indeed I was about to ask that very question. Thanks for the
> patch in any case!
>
> Jan
>
I was wondering whether to extend the comment in the code, as it is not
very obvious that hpet_deinit(d) has an implicit requirement on
d->vcpu[0], but opted for the lazy route.
All of this is wrapped up in the pl_time which combines the vrtc, vhpet
and vpmt, where the vpmt has a hook onto vcpu[0], which all time pieces
share.
In an ideal world, I would expect there to be a vpmt per vcpu, and
vrtc/vhpet to hook onto the vioapic or vi8259 for the purpose of
delivering interrupts. Part of the problem is that vcpu[0]'s guest time
is uses as a substitute for a domain wide time.
~Andrew
prev parent reply other threads:[~2014-07-25 15:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 13:19 [PATCH] hvm/hpet: Alter hpet_init() to take a domain rather than vcpu Andrew Cooper
2014-07-25 15:19 ` Jan Beulich
2014-07-25 15:38 ` Andrew Cooper [this message]
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=53D27A0F.7070506@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.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).