summaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-09-17 10:20:27 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2012-09-17 10:20:27 -0500
commit31e165f1770cd10ee4fabf7ef4c1a48566be3336 (patch)
tree042eee73bcc51700ca4606ce36cf4e56ff00bdda /kvm-all.c
parent121afa9e0c02617c2a774996512e4f85f3e93da8 (diff)
parente333cd694920f056573083c6d38fbdf0238c390d (diff)
downloadqemu-31e165f1770cd10ee4fabf7ef4c1a48566be3336.tar.gz
qemu-31e165f1770cd10ee4fabf7ef4c1a48566be3336.tar.bz2
qemu-31e165f1770cd10ee4fabf7ef4c1a48566be3336.zip
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
* qemu-kvm/uq/master: kvm: Rename irqchip_inject_ioctl to irq_set_ioctl kvm: Stop flushing coalesced MMIO on vmexit VGA: Flush coalesced MMIO on related MMIO/PIO accesses memory: Flush coalesced MMIO on mapping and state changes memory: Fold memory_region_update_topology into memory_region_transaction_commit memory: Use transaction_begin/commit also for single-step operations memory: Flush coalesced MMIO on selected region access kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create() update-linux-headers.sh: Don't hard code list of architectures
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 39cff55f5b..b69537ae0b 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -92,7 +92,7 @@ struct KVMState
/* The man page (and posix) say ioctl numbers are signed int, but
* they're not. Linux, glibc and *BSD all treat ioctl numbers as
* unsigned, and treating them as signed here can break things */
- unsigned irqchip_inject_ioctl;
+ unsigned irq_set_ioctl;
#ifdef KVM_CAP_IRQ_ROUTING
struct kvm_irq_routing *irq_routes;
int nr_allocated_irq_routes;
@@ -870,13 +870,13 @@ int kvm_set_irq(KVMState *s, int irq, int level)
event.level = level;
event.irq = irq;
- ret = kvm_vm_ioctl(s, s->irqchip_inject_ioctl, &event);
+ ret = kvm_vm_ioctl(s, s->irq_set_ioctl, &event);
if (ret < 0) {
perror("kvm_set_irq");
abort();
}
- return (s->irqchip_inject_ioctl == KVM_IRQ_LINE) ? 1 : event.status;
+ return (s->irq_set_ioctl == KVM_IRQ_LINE) ? 1 : event.status;
}
#ifdef KVM_CAP_IRQ_ROUTING
@@ -1237,10 +1237,6 @@ static int kvm_irqchip_create(KVMState *s)
return ret;
}
- s->irqchip_inject_ioctl = KVM_IRQ_LINE;
- if (kvm_check_extension(s, KVM_CAP_IRQ_INJECT_STATUS)) {
- s->irqchip_inject_ioctl = KVM_IRQ_LINE_STATUS;
- }
kvm_kernel_irqchip = true;
/* If we have an in-kernel IRQ chip then we must have asynchronous
* interrupt delivery (though the reverse is not necessarily true)
@@ -1389,6 +1385,11 @@ int kvm_init(void)
s->intx_set_mask = kvm_check_extension(s, KVM_CAP_PCI_2_3);
+ s->irq_set_ioctl = KVM_IRQ_LINE;
+ if (kvm_check_extension(s, KVM_CAP_IRQ_INJECT_STATUS)) {
+ s->irq_set_ioctl = KVM_IRQ_LINE_STATUS;
+ }
+
ret = kvm_arch_init(s);
if (ret < 0) {
goto err;
@@ -1576,8 +1577,6 @@ int kvm_cpu_exec(CPUArchState *env)
qemu_mutex_lock_iothread();
kvm_arch_post_run(env, run);
- kvm_flush_coalesced_mmio_buffer();
-
if (run_ret < 0) {
if (run_ret == -EINTR || run_ret == -EAGAIN) {
DPRINTF("io window exit\n");