[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V5 2/4] target-i386:add coalesced_pio API
From: |
peng.hao2 |
Subject: |
Re: [Qemu-devel] [PATCH V5 2/4] target-i386:add coalesced_pio API |
Date: |
Fri, 31 Aug 2018 15:58:12 +0800 (CST) |
>> +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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH V5 2/4] target-i386:add coalesced_pio API,
peng.hao2 <=