Revision e69917e2
b/kvm-all.c | ||
---|---|---|
57 | 57 |
int fd; |
58 | 58 |
int vmfd; |
59 | 59 |
int coalesced_mmio; |
60 |
int broken_set_mem_region; |
|
60 | 61 |
#ifdef KVM_CAP_SET_GUEST_DEBUG |
61 | 62 |
struct kvm_sw_breakpoint_head kvm_sw_breakpoints; |
62 | 63 |
#endif |
... | ... | |
406 | 407 |
s->coalesced_mmio = 0; |
407 | 408 |
#endif |
408 | 409 |
|
410 |
s->broken_set_mem_region = 1; |
|
411 |
#ifdef KVM_CAP_JOIN_MEMORY_REGIONS_WORKS |
|
412 |
ret = kvm_ioctl(s, KVM_CHECK_EXTENSION, KVM_CAP_JOIN_MEMORY_REGIONS_WORKS); |
|
413 |
if (ret > 0) { |
|
414 |
s->broken_set_mem_region = 0; |
|
415 |
} |
|
416 |
#endif |
|
417 |
|
|
409 | 418 |
ret = kvm_arch_init(s, smp_cpus); |
410 | 419 |
if (ret < 0) |
411 | 420 |
goto err; |
... | ... | |
639 | 648 |
* address as the first existing one. If not or if some overlapping |
640 | 649 |
* slot comes around later, we will fail (not seen in practice so far) |
641 | 650 |
* - and actually require a recent KVM version. */ |
642 |
if (old.start_addr == start_addr && old.memory_size < size && |
|
651 |
if (s->broken_set_mem_region && |
|
652 |
old.start_addr == start_addr && old.memory_size < size && |
|
643 | 653 |
flags < IO_MEM_UNASSIGNED) { |
644 | 654 |
mem = kvm_alloc_slot(s); |
645 | 655 |
mem->memory_size = old.memory_size; |
Also available in: Unified diff