virtio-ccw: Wire up ioeventfd.

On hosts that support ioeventfd, make use of it for host-to-guest
notifications via diagnose 500.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
This commit is contained in:
Cornelia Huck 2013-02-15 10:18:43 +01:00
parent 6504a93011
commit b4436a0b4d
6 changed files with 161 additions and 1 deletions

View file

@ -1081,6 +1081,7 @@ void kvm_s390_io_interrupt(S390CPU *cpu, uint16_t subchannel_id,
void kvm_s390_crw_mchk(S390CPU *cpu);
void kvm_s390_enable_css_support(S390CPU *cpu);
int kvm_s390_get_registers_partial(CPUState *cpu);
int kvm_s390_assign_subch_ioeventfd(int fd, uint32_t sch, int vq, bool assign);
#else
static inline void kvm_s390_io_interrupt(S390CPU *cpu,
uint16_t subchannel_id,
@ -1099,6 +1100,11 @@ static inline int kvm_s390_get_registers_partial(CPUState *cpu)
{
return -ENOSYS;
}
static inline int kvm_s390_assign_subch_ioeventfd(int fd, uint32_t sch, int vq,
bool assign)
{
return -ENOSYS;
}
#endif
static inline void s390_io_interrupt(S390CPU *cpu,
@ -1125,4 +1131,14 @@ static inline void s390_crw_mchk(S390CPU *cpu)
}
}
static inline int s390_assign_subch_ioeventfd(int fd, uint32_t sch_id, int vq,
bool assign)
{
if (kvm_enabled()) {
return kvm_s390_assign_subch_ioeventfd(fd, sch_id, vq, assign);
} else {
return -ENOSYS;
}
}
#endif