With this patch, when the kernel exits with errno of EAGAIN, kvm_run is restarted like EINTR. It is a preparation patch for SMP using in-kernel APIC.
This patch also fixes a duplication bug of pre_kvm_run
Signed-off-by: Qing He <[EMAIL PROTECTED]>
---
user/kvmctl.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/user/kvmctl.c b/user/kvmctl.c
index 31e3494..795e7b3 100644
--- a/user/kvmctl.c
+++ b/user/kvmctl.c
@@ -1084,11 +1084,10 @@ again:
r = pre_kvm_run(kvm, vcpu);
if (r)
return r;
- pre_kvm_run(kvm, vcpu);
r = ioctl(fd, KVM_RUN, 0);
post_kvm_run(kvm, vcpu);
- if (r == -1 && errno != EINTR) {
+ if (r == -1 && errno != EINTR && errno != EAGAIN) {
r = -errno;
printf("kvm_run: %m\n");
return r;
0001-libkvm-eagain-restart.patch
Description: 0001-libkvm-eagain-restart.patch
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________ kvm-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/kvm-devel
