Merge remote-tracking branch 'cohuck/virtio-ccw-upstr' into staging
# By Cornelia Huck # Via Cornelia Huck * cohuck/virtio-ccw-upstr: virtio-ccw: fix build breakage on windows Message-id: 1372669523-4039-1-git-send-email-cornelia.huck@de.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
commit
f7d1f9d4e7
@ -79,8 +79,7 @@ static int virtio_ccw_set_guest2host_notifier(VirtioCcwDevice *dev, int n,
|
||||
return r;
|
||||
}
|
||||
virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler);
|
||||
r = s390_assign_subch_ioeventfd(event_notifier_get_fd(notifier), sch_id,
|
||||
n, assign);
|
||||
r = s390_assign_subch_ioeventfd(notifier, sch_id, n, assign);
|
||||
if (r < 0) {
|
||||
error_report("%s: unable to assign ioeventfd: %d", __func__, r);
|
||||
virtio_queue_set_host_notifier_fd_handler(vq, false, false);
|
||||
@ -89,8 +88,7 @@ static int virtio_ccw_set_guest2host_notifier(VirtioCcwDevice *dev, int n,
|
||||
}
|
||||
} else {
|
||||
virtio_queue_set_host_notifier_fd_handler(vq, false, false);
|
||||
s390_assign_subch_ioeventfd(event_notifier_get_fd(notifier), sch_id,
|
||||
n, assign);
|
||||
s390_assign_subch_ioeventfd(notifier, sch_id, n, assign);
|
||||
event_notifier_cleanup(notifier);
|
||||
}
|
||||
return r;
|
||||
|
@ -1081,7 +1081,8 @@ 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);
|
||||
int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch,
|
||||
int vq, bool assign);
|
||||
#else
|
||||
static inline void kvm_s390_io_interrupt(S390CPU *cpu,
|
||||
uint16_t subchannel_id,
|
||||
@ -1100,7 +1101,8 @@ 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,
|
||||
static inline int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier,
|
||||
uint32_t sch, int vq,
|
||||
bool assign)
|
||||
{
|
||||
return -ENOSYS;
|
||||
@ -1131,11 +1133,12 @@ static inline void s390_crw_mchk(S390CPU *cpu)
|
||||
}
|
||||
}
|
||||
|
||||
static inline int s390_assign_subch_ioeventfd(int fd, uint32_t sch_id, int vq,
|
||||
static inline int s390_assign_subch_ioeventfd(EventNotifier *notifier,
|
||||
uint32_t sch_id, int vq,
|
||||
bool assign)
|
||||
{
|
||||
if (kvm_enabled()) {
|
||||
return kvm_s390_assign_subch_ioeventfd(fd, sch_id, vq, assign);
|
||||
return kvm_s390_assign_subch_ioeventfd(notifier, sch_id, vq, assign);
|
||||
} else {
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
@ -934,12 +934,13 @@ void kvm_arch_init_irq_routing(KVMState *s)
|
||||
{
|
||||
}
|
||||
|
||||
int kvm_s390_assign_subch_ioeventfd(int fd, uint32_t sch, int vq, bool assign)
|
||||
int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch,
|
||||
int vq, bool assign)
|
||||
{
|
||||
struct kvm_ioeventfd kick = {
|
||||
.flags = KVM_IOEVENTFD_FLAG_VIRTIO_CCW_NOTIFY |
|
||||
KVM_IOEVENTFD_FLAG_DATAMATCH,
|
||||
.fd = fd,
|
||||
.fd = event_notifier_get_fd(notifier),
|
||||
.datamatch = vq,
|
||||
.addr = sch,
|
||||
.len = 8,
|
||||
|
Loading…
Reference in New Issue
Block a user