From: Cornelia Huck <cohuck@kernel.org>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: QingFeng Hao <haoqf@linux.vnet.ibm.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org, kwolf@redhat.com,
Halil Pasic <pasic@linux.vnet.ibm.com>,
zyimin@linux.vnet.ibm.com, famz@redhat.com, peterx@redhat.com,
stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 1/1] virtio-scsi-ccw: use ioeventfd even when KVM is disabled
Date: Mon, 3 Jul 2017 13:56:04 +0200 [thread overview]
Message-ID: <20170703135604.311ad10d@dhcp-192-215.str.redhat.com> (raw)
In-Reply-To: <fee6eaa0-8132-b3ce-bb3e-0a716eb72064@de.ibm.com>
On Mon, 3 Jul 2017 12:20:03 +0200
Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> On 07/03/2017 10:51 AM, QingFeng Hao wrote:
>
> > diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
> > index a3d00196f4..c37f9c3b9e 100644
> > --- a/target/s390x/kvm.c
> > +++ b/target/s390x/kvm.c
> > @@ -2220,6 +2220,9 @@ int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch,
> > .addr = sch,
> > .len = 8,
> > };
> > + if (!kvm_enabled()) {
> > + return 0;
> > + }
>
> thinking more about it. wouldnt it be better to do something like this instead
>
> diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
> index 058ddad..cc47831 100644
> --- a/target/s390x/cpu.h
> +++ b/target/s390x/cpu.h
> @@ -1240,7 +1240,11 @@ static inline int s390_assign_subch_ioeventfd(EventNotifier *notifier,
> uint32_t sch_id, int vq,
> bool assign)
> {
> - return kvm_s390_assign_subch_ioeventfd(notifier, sch_id, vq, assign);
> + if (kvm_enabled()) {
> + return kvm_s390_assign_subch_ioeventfd(notifier, sch_id, vq, assign);
> + } else {
> + return 0;
> + }
> }
>
> static inline void s390_crypto_reset(void)
Agreed.
>
>
> FWIW, it seems that we (s390) do not have a functional equivalent function as commit
> 8c56c1a592b5092d91da8d8943c17777d6462a6f ("memory: emulate ioeventfd") , so we will
> not use the iothreads.
Should not be a problem, I think. We may want to cook up an equivalent,
though.
>
>
> > if (!kvm_check_extension(kvm_state, KVM_CAP_IOEVENTFD)) {
> > return -ENOSYS;
> > }
> >
>
>
next prev parent reply other threads:[~2017-07-03 11:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-03 8:51 [Qemu-devel] [PATCH v2 0/1] virtio-scsi-ccw: fix iotest 068 for s390x QingFeng Hao
2017-07-03 8:51 ` [Qemu-devel] [PATCH v2 1/1] virtio-scsi-ccw: use ioeventfd even when KVM is disabled QingFeng Hao
2017-07-03 10:20 ` Christian Borntraeger
2017-07-03 11:56 ` Cornelia Huck [this message]
2017-07-04 3:41 ` QingFeng Hao
2017-07-04 7:06 ` Christian Borntraeger
2017-07-04 7:53 ` QingFeng Hao
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=20170703135604.311ad10d@dhcp-192-215.str.redhat.com \
--to=cohuck@kernel.org \
--cc=borntraeger@de.ibm.com \
--cc=famz@redhat.com \
--cc=haoqf@linux.vnet.ibm.com \
--cc=kwolf@redhat.com \
--cc=pasic@linux.vnet.ibm.com \
--cc=peterx@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=zyimin@linux.vnet.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).