From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: linux-s390@vger.kernel.org, kvm@vger.kernel.org, gleb@kernel.org,
qemu-devel@nongnu.org, agraf@suse.de, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH 4/6] s390x: Add I/O adapter registration.
Date: Wed, 26 Feb 2014 09:37:05 +0100 [thread overview]
Message-ID: <20140226093705.3d111f2f.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <530DA5D8.6040909@de.ibm.com>
On Wed, 26 Feb 2014 09:29:12 +0100
Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> On 25/02/14 18:25, Cornelia Huck wrote:
>
> > +int kvm_s390_io_adapter_map(uint32_t id, uint64_t map_addr, bool do_map)
> > +{
> > + struct kvm_s390_io_adapter_req req = {
> > + .id = id,
> > + .type = do_map ? KVM_S390_IO_ADAPTER_MAP : KVM_S390_IO_ADAPTER_UNMAP,
> > + .addr = map_addr,
> > + };
> > + KVMS390FLICState *flic = s390_get_flic();
> > + struct kvm_device_attr attr;
>
> Can we use designated initializer for attr, e.g.
> struct kvm_device_attr attr = {
> .group = KVM_DEV_FLIC_ADAPTER_MODIFY,
> .addr = (uint64_t)&req,
> }
>
> > + int r;
> > +
> > + if (!flic) {
> > + return -ENOSYS;
> > + }
> > + if (!kvm_check_extension(kvm_state, KVM_CAP_IRQ_ROUTING)) {
> > + return -ENOSYS;
> > + }
> > +
> > + attr.group = KVM_DEV_FLIC_ADAPTER_MODIFY;
> > + attr.addr = (uint64_t)&req;
>
> and not do it here. That will zero out the other fields of attr.
>
> Same for the register code.
>
Hm, yes, I missed that. I'll change it for the next version.
next prev parent reply other threads:[~2014-02-26 8:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-25 17:25 [Qemu-devel] [PATCH 0/6] qemu: irqfds for s390x Cornelia Huck
2014-02-25 17:25 ` [Qemu-devel] [PATCH 1/6] s390x/virtio-ccw: Adapter interrupt support Cornelia Huck
2014-03-04 9:05 ` Cornelia Huck
2014-03-04 9:20 ` Christian Borntraeger
2014-02-25 17:25 ` [Qemu-devel] [PATCH 2/6] linux-headers: add new interfaces Cornelia Huck
2014-02-25 17:25 ` [Qemu-devel] [PATCH 3/6] kvm: add kvm_enable_cap_{vm,vcpu} Cornelia Huck
2014-02-25 17:25 ` [Qemu-devel] [PATCH 4/6] s390x: Add I/O adapter registration Cornelia Huck
2014-02-26 8:29 ` Christian Borntraeger
2014-02-26 8:37 ` Cornelia Huck [this message]
2014-02-25 17:25 ` [Qemu-devel] [PATCH 5/6] s390x/virtio-ccw: reference-counted indicators Cornelia Huck
2014-02-25 17:25 ` [Qemu-devel] [PATCH 6/6] s390x/virtio-ccw: Wire up irq routing and irqfds 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=20140226093705.3d111f2f.cornelia.huck@de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=gleb@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).