aboutsummaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@amazon.com>2014-01-24 15:52:44 -0800
committerAnthony Liguori <aliguori@amazon.com>2014-01-24 15:52:44 -0800
commit0169c511554cb0014a00290b0d3d26c31a49818f (patch)
tree14a38b1ffe2fde4125b57198698c5ba791feea58 /kvm-all.c
parent1c51e68b182bb335464bb19ad2517fd43c58c127 (diff)
parent439d19f2922ac409ee224bc1e5522cee7009d829 (diff)
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
* qemu-kvm/uq/master: kvm: always update the MPX model specific register KVM: fix addr type for KVM_IOEVENTFD KVM: Retry KVM_CREATE_VM on EINTR mempath prefault: fix off-by-one error kvm: x86: Separately write feature control MSR on reset roms: Flush icache when writing roms to guest memory target-i386: clear guest TSC on reset target-i386: do not special case TSC writeback target-i386: Intel MPX Conflicts: exec.c aliguori: fix trivial merge conflict in exec.c Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 0bfb060fa7..a3fb8de268 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -499,7 +499,7 @@ int kvm_check_extension(KVMState *s, unsigned int extension)
return ret;
}
-static int kvm_set_ioeventfd_mmio(int fd, uint32_t addr, uint32_t val,
+static int kvm_set_ioeventfd_mmio(int fd, hwaddr addr, uint32_t val,
bool assign, uint32_t size, bool datamatch)
{
int ret;
@@ -1422,16 +1422,22 @@ int kvm_init(void)
nc++;
}
- s->vmfd = kvm_ioctl(s, KVM_CREATE_VM, 0);
- if (s->vmfd < 0) {
+ do {
+ ret = kvm_ioctl(s, KVM_CREATE_VM, 0);
+ } while (ret == -EINTR);
+
+ if (ret < 0) {
+ fprintf(stderr, "ioctl(KVM_CREATE_VM) failed: %d %s\n", -s->vmfd,
+ strerror(-ret));
+
#ifdef TARGET_S390X
fprintf(stderr, "Please add the 'switch_amode' kernel parameter to "
"your host kernel command line\n");
#endif
- ret = s->vmfd;
goto err;
}
+ s->vmfd = ret;
missing_cap = kvm_check_extension_list(s, kvm_required_capabilites);
if (!missing_cap) {
missing_cap =