kvm: Introduce kvm_has_intx_set_mask
Will be used by PCI device assignment code. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
cc57407e96
commit
3ab7384244
@ -88,6 +88,7 @@ struct KVMState
|
|||||||
int pit_state2;
|
int pit_state2;
|
||||||
int xsave, xcrs;
|
int xsave, xcrs;
|
||||||
int many_ioeventfds;
|
int many_ioeventfds;
|
||||||
|
int intx_set_mask;
|
||||||
/* The man page (and posix) say ioctl numbers are signed int, but
|
/* The man page (and posix) say ioctl numbers are signed int, but
|
||||||
* they're not. Linux, glibc and *BSD all treat ioctl numbers as
|
* they're not. Linux, glibc and *BSD all treat ioctl numbers as
|
||||||
* unsigned, and treating them as signed here can break things */
|
* unsigned, and treating them as signed here can break things */
|
||||||
@ -1386,6 +1387,8 @@ int kvm_init(void)
|
|||||||
s->direct_msi = (kvm_check_extension(s, KVM_CAP_SIGNAL_MSI) > 0);
|
s->direct_msi = (kvm_check_extension(s, KVM_CAP_SIGNAL_MSI) > 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
s->intx_set_mask = kvm_check_extension(s, KVM_CAP_PCI_2_3);
|
||||||
|
|
||||||
ret = kvm_arch_init(s);
|
ret = kvm_arch_init(s);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
goto err;
|
goto err;
|
||||||
@ -1740,6 +1743,11 @@ int kvm_has_gsi_routing(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int kvm_has_intx_set_mask(void)
|
||||||
|
{
|
||||||
|
return kvm_state->intx_set_mask;
|
||||||
|
}
|
||||||
|
|
||||||
void *kvm_vmalloc(ram_addr_t size)
|
void *kvm_vmalloc(ram_addr_t size)
|
||||||
{
|
{
|
||||||
#ifdef TARGET_S390X
|
#ifdef TARGET_S390X
|
||||||
|
1
kvm.h
1
kvm.h
@ -117,6 +117,7 @@ int kvm_has_xcrs(void);
|
|||||||
int kvm_has_pit_state2(void);
|
int kvm_has_pit_state2(void);
|
||||||
int kvm_has_many_ioeventfds(void);
|
int kvm_has_many_ioeventfds(void);
|
||||||
int kvm_has_gsi_routing(void);
|
int kvm_has_gsi_routing(void);
|
||||||
|
int kvm_has_intx_set_mask(void);
|
||||||
|
|
||||||
#ifdef NEED_CPU_H
|
#ifdef NEED_CPU_H
|
||||||
int kvm_init_vcpu(CPUArchState *env);
|
int kvm_init_vcpu(CPUArchState *env);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user