From: Juergen Gross <jgross@suse.com>
To: xen-devel <xen-devel@lists.xenproject.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
"George.Dunlap@eu.citrix.com" <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
Jan Beulich <JBeulich@suse.com>
Subject: Supporting consistency of vcpu_runstate_info across cpus
Date: Thu, 19 May 2016 09:53:27 +0200 [thread overview]
Message-ID: <573D70F7.3000209@suse.com> (raw)
A guest kernel can use the vcpu_op hypercall sub-op
VCPUOP_register_runstate_memory_area to get a copy of the
vcpu_runstate_info of a vcpu mapped into its memory. As this structure
has no update indicator it is only save to be read by the vcpu it is
containing the runstate information of.
Being able to read the runstate info of another cpu is required e.g.
by the Linux kernel to be able to calculate vruntime: see
http://lists.xen.org/archives/html/xen-devel/2016-05/msg01790.html
I'd suggest to add an "update in progress" indicator in the highest
bit of vcpu_runstate_info->state_entry_time as this structure element is
already used to detect vcpu scheduling when vcpu_runstate_info is read
by the owning vcpu.
The question is how to enable setting this indicator, as the guest must
be able to cope with it (I believe the Linux kernel would just run fine,
but we can't be sure this is true for all guests).
I see the following possible solutions:
a) Introduce a new vcpu_op hypercall sub-op for mapping the
vcpu_runstate_info with update indicator support (a guest supporting
this would try the new sub-op first and could fall back to
VCPUOP_register_runstate_memory_area in case of ENOSYS).
b) Add a virtual MSR to switch on the feature (not being able to set the
appropriate bit would indicate the feature not being available). This
is the variant KVM is using. Does ARM have something like MSRs?
c) Add another hypercall to switch on the feature (similar to
XENVER_get_features we could have a XENVER_set_features).
Any preferences?
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next reply other threads:[~2016-05-19 7:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-19 7:53 Juergen Gross [this message]
2016-05-19 8:09 ` Supporting consistency of vcpu_runstate_info across cpus Andrew Cooper
2016-05-19 8:49 ` Juergen Gross
2016-05-19 10:21 ` Dario Faggioli
2016-05-19 13:57 ` Roger Pau Monne
2016-05-19 10:40 ` Stefano Stabellini
2016-05-19 10:45 ` Jan Beulich
2016-05-19 10:48 ` Stefano Stabellini
2016-05-19 14:11 ` Juergen Gross
2016-05-19 16:54 ` 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=573D70F7.3000209@suse.com \
--to=jgross@suse.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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.