[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/4] kvm: Introduce kvm_has_intx_set_mask
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [PATCH 2/4] kvm: Introduce kvm_has_intx_set_mask |
Date: |
Mon, 27 Aug 2012 08:28:39 +0200 |
From: Jan Kiszka <address@hidden>
Will be used by PCI device assignment code.
Signed-off-by: Jan Kiszka <address@hidden>
---
kvm-all.c | 8 ++++++++
kvm.h | 1 +
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index fd9d9b4..84d4f7f 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -88,6 +88,7 @@ struct KVMState
int pit_state2;
int xsave, xcrs;
int many_ioeventfds;
+ int intx_set_mask;
/* 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 */
@@ -1387,6 +1388,8 @@ int kvm_init(void)
s->irq_set_ioctl = KVM_IRQ_LINE_STATUS;
}
+ s->intx_set_mask = kvm_check_extension(s, KVM_CAP_PCI_2_3);
+
ret = kvm_arch_init(s);
if (ret < 0) {
goto err;
@@ -1739,6 +1742,11 @@ int kvm_has_gsi_routing(void)
#endif
}
+int kvm_has_intx_set_mask(void)
+{
+ return kvm_state->intx_set_mask;
+}
+
void *kvm_vmalloc(ram_addr_t size)
{
#ifdef TARGET_S390X
diff --git a/kvm.h b/kvm.h
index 5cefe3a..dea2998 100644
--- a/kvm.h
+++ b/kvm.h
@@ -117,6 +117,7 @@ int kvm_has_xcrs(void);
int kvm_has_pit_state2(void);
int kvm_has_many_ioeventfds(void);
int kvm_has_gsi_routing(void);
+int kvm_has_intx_set_mask(void);
#ifdef NEED_CPU_H
int kvm_init_vcpu(CPUArchState *env);
--
1.7.3.4
- [Qemu-devel] [PATCH 0/4] uq/master: Add classic PCI device assignment, Jan Kiszka, 2012/08/27
- [Qemu-devel] [PATCH 1/4] kvm: Introduce kvm_irqchip_update_msi_route, Jan Kiszka, 2012/08/27
- [Qemu-devel] [PATCH 2/4] kvm: Introduce kvm_has_intx_set_mask,
Jan Kiszka <=
- [Qemu-devel] [PATCH 3/4] kvm: i386: Add services required for PCI device assignment, Jan Kiszka, 2012/08/27
- [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Jan Kiszka, 2012/08/27
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Andreas Färber, 2012/08/27
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Jan Kiszka, 2012/08/27
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Peter Maydell, 2012/08/28
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Jan Kiszka, 2012/08/29
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Peter Maydell, 2012/08/29
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Jan Kiszka, 2012/08/29
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Anthony Liguori, 2012/08/28
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Andreas Färber, 2012/08/29