From: <peng.hao2@zte.com.cn>
To: <mst@redhat.com>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com, ehabkost@redhat.com,
kvm@vger.kernel.org, rkrcmar@redhat.com
Subject: Re: [PATCH V5 2/4] target-i386:add coalesced_pio API
Date: Fri, 31 Aug 2018 15:58:12 +0800 (CST) [thread overview]
Message-ID: <201808311558126719067@zte.com.cn> (raw)
>> +static void kvm_coalesce_pio_add(MemoryListener *listener,
>> + MemoryRegionSection *section,
>> + hwaddr start, hwaddr size)
>> +{
>> + KVMState *s = kvm_state;
>> +
>> + if (s->coalesced_pio) {
>> + struct kvm_coalesced_mmio_zone zone;
>> +
>> + zone.addr = start;
>> + zone.size = size;
>> + zone.pio = 1;
>> +
>> + (void)kvm_vm_ioctl(s, KVM_REGISTER_COALESCED_MMIO, &zone);
>> + }
>> +}
>> +
>> +static void kvm_coalesce_pio_del(MemoryListener *listener,
>> + MemoryRegionSection *section,
>> + hwaddr start, hwaddr size)
>> +{
>> + KVMState *s = kvm_state;
>> +
>> + if (s->coalesced_pio) {
>> + struct kvm_coalesced_mmio_zone zone;
>> +
>> + zone.addr = start;
>> + zone.size = size;
>> + zone.pio = 1;
>> +
>> + (void)kvm_vm_ioctl(s, KVM_UNREGISTER_COALESCED_MMIO, &zone);
>> + }
>> +}
>assert rather than (void)?
I think (void) is better. qemu can work well even if coalesced mmio/pio regiser operation failed.
next reply other threads:[~2018-08-31 7:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-31 7:58 peng.hao2 [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-08-31 9:05 [PATCH V5 0/4] introduce coalesced pio support Peng Hao
2018-08-31 9:05 ` [PATCH V5 2/4] target-i386:add coalesced_pio API Peng Hao
2018-08-31 3:35 ` Michael S. Tsirkin
2018-08-30 15:50 [PATCH V5 0/4] introduce coalesced pio support Peng Hao
2018-08-30 15:50 ` [PATCH V5 2/4] target-i386:add coalesced_pio API Peng 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=201808311558126719067@zte.com.cn \
--to=peng.hao2@zte.com.cn \
--cc=ehabkost@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rkrcmar@redhat.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