|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86: re-enable VCPUOP_register_vcpu_time_memory_area
commit ae5092f420e87a4a6b541bf581378c8cc0ee3a99
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon May 27 08:59:38 2013 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon May 27 08:59:38 2013 +0200
x86: re-enable VCPUOP_register_vcpu_time_memory_area
By moving the call to update_vcpu_system_time() out of schedule() into
arch-specific context switch code, the original problem of the function
accessing the wrong domain's address space goes away (obvious even from
patch context, as update_runstate_area() does similar copying).
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---
xen/arch/arm/domain.c | 3 +++
xen/arch/x86/domain.c | 9 +++------
xen/arch/x86/hvm/hvm.c | 2 ++
xen/common/schedule.c | 2 --
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index ee12b5f..4c434a1 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -232,6 +232,9 @@ static void schedule_tail(struct vcpu *prev)
if ( prev != current )
update_runstate_area(current);
+
+ /* Ensure that the vcpu has an up-to-date time base. */
+ update_vcpu_system_time(current);
}
static void continue_new_vcpu(struct vcpu *prev)
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 161d1b3..5c89197 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -966,11 +966,6 @@ arch_do_vcpu_op(
switch ( cmd )
{
- /*
- * XXX Disable for 4.0.0: __update_vcpu_system_time() writes to the given
- * virtual address even when running in another domain's address space.
- */
-#if 0
case VCPUOP_register_vcpu_time_memory_area:
{
struct vcpu_register_time_memory_area area;
@@ -989,7 +984,6 @@ arch_do_vcpu_op(
break;
}
-#endif
case VCPUOP_get_physid:
{
@@ -1457,6 +1451,9 @@ void context_switch(struct vcpu *prev, struct vcpu *next)
if (prev != next)
update_runstate_area(next);
+ /* Ensure that the vcpu has an up-to-date time base. */
+ update_vcpu_system_time(next);
+
schedule_tail(next);
BUG();
}
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index bcf9609..a962ce2 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3191,6 +3191,7 @@ static long hvm_vcpu_op(
case VCPUOP_set_singleshot_timer:
case VCPUOP_stop_singleshot_timer:
case VCPUOP_register_vcpu_info:
+ case VCPUOP_register_vcpu_time_memory_area:
rc = do_vcpu_op(cmd, vcpuid, arg);
break;
default:
@@ -3249,6 +3250,7 @@ static long hvm_vcpu_op_compat32(
case VCPUOP_set_singleshot_timer:
case VCPUOP_stop_singleshot_timer:
case VCPUOP_register_vcpu_info:
+ case VCPUOP_register_vcpu_time_memory_area:
rc = compat_vcpu_op(cmd, vcpuid, arg);
break;
default:
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index e526602..a8398bd 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -1231,8 +1231,6 @@ static void schedule(void)
if ( next_slice.migrated )
evtchn_move_pirqs(next);
- /* Ensure that the domain has an up-to-date time base. */
- update_vcpu_system_time(next);
vcpu_periodic_timer_work(next);
context_switch(prev, next);
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |