xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Support consistent reads of mapped vcpu_runstate_info
@ 2016-06-17  5:26 Juergen Gross
  2016-06-17  5:26 ` [PATCH v3 1/2] xen/arm: add support for vm_assist hypercall Juergen Gross
  2016-06-17  5:26 ` [PATCH v3 2/2] xen: add update indicator to vcpu_runstate_info Juergen Gross
  0 siblings, 2 replies; 5+ messages in thread
From: Juergen Gross @ 2016-06-17  5:26 UTC (permalink / raw)
  To: xen-devel
  Cc: Juergen Gross, sstabellini, wei.liu2, George.Dunlap,
	andrew.cooper3, ian.jackson, tim, julien.grall, jbeulich

There has been a report about incorrect vruntime accounting in Linux
guests under Xen. A Linux kernel with CONFIG_PARAVIRT_TIME_ACCOUNTING
set is capable to do correct vruntime accounting, but this would
require the kernel to be able to read the runstate data of other cpus.

A guest mapping vcpu_runstate_info into its memory can't read this
information from another cpu but the one the data is referring to.
Reason is there is no reliable way for the guest to detect a concurrent
data update by the hypervisor.

This patch series adds an update flag to the mapped data which can be
used by the guest to detect an update is occurring. As this flag is
modifying the current interface it has to be activated by using a
vm_assist hypercall, which in turn has to be made available for ARM.

Runtime tested on x86 with a modified Linux kernel using the new
feature.
Compile tested only for ARM.

Changes in V3:
- patch 2: simplify update_runstate_area() address calculation as
  requested by Jan Beulich

Changes in V2:
- patch 1: readded the #ifdef's as requested by Jan Beulich
- patch 2: smp_wmb() instead of wmb() as requested by Andrew Cooper
- patch 2: use sizeof() as requested by Jan Beulich
- patch 2: eliminate new variable update_flag as requested by Jan Beulich

Juergen Gross (2):
  xen/arm: add support for vm_assist hypercall
  xen: add update indicator to vcpu_runstate_info

 xen/arch/arm/domain.c        | 20 ++++++++++++++++++++
 xen/arch/arm/traps.c         |  1 +
 xen/arch/x86/domain.c        | 21 +++++++++++++++++++++
 xen/include/asm-arm/config.h |  2 ++
 xen/include/asm-x86/config.h |  1 +
 xen/include/public/vcpu.h    |  6 ++++++
 xen/include/public/xen.h     |  7 +++++++
 7 files changed, 58 insertions(+)

-- 
2.6.6


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-06-20 17:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-17  5:26 [PATCH v3 0/2] Support consistent reads of mapped vcpu_runstate_info Juergen Gross
2016-06-17  5:26 ` [PATCH v3 1/2] xen/arm: add support for vm_assist hypercall Juergen Gross
2016-06-17  5:26 ` [PATCH v3 2/2] xen: add update indicator to vcpu_runstate_info Juergen Gross
2016-06-17  8:03   ` Jan Beulich
2016-06-20 17:36   ` Julien Grall

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).