[HVM] No need to call hvm_do_resume() on every vm entry.

Original patch from Xin Li <xin.b.li@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kfraser@localhost.localdomain committed 2006-10-23 11:46:41 +01:00
1 parent 61ca72df6f
commit 9464d73f66
7 files changed
+17 -14

No files matched your search

+8 -3
View File
@@ -237,12 +237,17 @@ void hvm_do_resume(struct vcpu *v)
}
p = &get_vio(v->domain, v->vcpu_id)->vp_ioreq;
wait_on_xen_event_channel(v->arch.hvm.xen_port,
wait_on_xen_event_channel(v->arch.hvm_vcpu.xen_port,
p->state != STATE_IOREQ_READY &&
p->state != STATE_IOREQ_INPROCESS);
if ( p->state == STATE_IORESP_READY )
switch ( p->state )
{
case STATE_IORESP_READY:
hvm_io_assist(v);
if ( p->state != STATE_INVALID ) {
break;
case STATE_INVALID:
break;
default:
printf("Weird HVM iorequest state %d.\n", p->state);
domain_crash(v->domain);
}
+2 -1
View File
@@ -727,7 +727,8 @@ static void hvm_send_assist_req(struct vcpu *v)
domain_crash(v->domain);
return;
}
wmb();
prepare_wait_on_xen_event_channel(v->arch.hvm_vcpu.xen_port);
p->state = STATE_IOREQ_READY;
notify_via_xen_event_channel(v->arch.hvm_vcpu.xen_port);
}
-3
View File
@@ -139,9 +139,6 @@ svm_stgi_label:
ENTRY(svm_asm_do_resume)
svm_test_all_events:
GET_CURRENT(%ebx)
pushl %ebx
call hvm_do_resume
addl $4, %esp
/*test_all_events:*/
xorl %ecx,%ecx
notl %ecx
-2
View File
@@ -153,8 +153,6 @@ svm_stgi_label:
ENTRY(svm_asm_do_resume)
svm_test_all_events:
GET_CURRENT(%rbx)
movq %rbx, %rdi
call hvm_do_resume
/*test_all_events:*/
cli # tests must not race interrupts
/*test_softirqs:*/
-3
View File
@@ -97,9 +97,6 @@ vmx_process_softirqs:
ALIGN
ENTRY(vmx_asm_do_vmentry)
GET_CURRENT(%ebx)
pushl %ebx
call hvm_do_resume
addl $4, %esp
cli # tests must not race interrupts
movl VCPU_processor(%ebx),%eax
-2
View File
@@ -106,8 +106,6 @@ vmx_process_softirqs:
ALIGN
ENTRY(vmx_asm_do_vmentry)
GET_CURRENT(%rbx)
movq %rbx, %rdi
call hvm_do_resume
cli # tests must not race interrupts
movl VCPU_processor(%rbx),%eax
+7
View File
@@ -70,4 +70,11 @@ void notify_via_xen_event_channel(int lport);
do_softirq(); \
} while ( 0 )
#define prepare_wait_on_xen_event_channel(port) \
do { \
set_bit(_VCPUF_blocked_in_xen, &current->vcpu_flags); \
raise_softirq(SCHEDULE_SOFTIRQ); \
mb(); /* set blocked status /then/ caller does his work */ \
} while ( 0 )
#endif /* __XEN_EVENT_H__ */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.