All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: "Blue Swirl" <blauwirbel@gmail.com>,
	"Stefan Weil" <sw@weilnetz.de>,
	"Anthony Liguori" <aliguori@us.ibm.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Aurélien Jarno" <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH] virtio-ccw: fix build breakage on windows
Date: Fri, 28 Jun 2013 09:55:49 +0200	[thread overview]
Message-ID: <51CD4185.7010706@redhat.com> (raw)
In-Reply-To: <1372405652-23244-1-git-send-email-cornelia.huck@de.ibm.com>

Il 28/06/2013 09:47, Cornelia Huck ha scritto:
> event_notifier_get_fd() is not available on windows hosts. Fix this by
> moving the calls to event_notifier_get_fd() to the kvm code.
> 
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
> ---
>  hw/s390x/virtio-ccw.c |    6 ++----
>  target-s390x/cpu.h    |   11 +++++++----
>  target-s390x/kvm.c    |    5 +++--
>  3 files changed, 12 insertions(+), 10 deletions(-)
> 
> diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
> index faef5dd..e744957 100644
> --- a/hw/s390x/virtio-ccw.c
> +++ b/hw/s390x/virtio-ccw.c
> @@ -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;
> diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h
> index 918c819..741c4e4 100644
> --- a/target-s390x/cpu.h
> +++ b/target-s390x/cpu.h
> @@ -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;
>      }
> diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
> index 650d3a5..d8e5c6f 100644
> --- a/target-s390x/kvm.c
> +++ b/target-s390x/kvm.c
> @@ -933,12 +933,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,
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

  reply	other threads:[~2013-06-28  7:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25 16:25 [Qemu-devel] [PULL 0/3] virtio-ccw: fix + notifiers Cornelia Huck
2013-06-25 16:25 ` [Qemu-devel] [PULL 1/3] s390/virtio-ccw: Fix virtio reset Cornelia Huck
2013-06-25 16:25 ` [Qemu-devel] [PULL 2/3] virtio-ccw: Wire up ioeventfd Cornelia Huck
2013-06-27 18:28   ` Stefan Weil
2013-06-28  6:54     ` Paolo Bonzini
2013-06-28  7:47       ` [Qemu-devel] [PATCH] virtio-ccw: fix build breakage on windows Cornelia Huck
2013-06-28  7:55         ` Paolo Bonzini [this message]
2013-06-25 16:25 ` [Qemu-devel] [PULL 3/3] virtio-ccw: Wire up guest and host notifies Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51CD4185.7010706@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.