All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: gleb@kernel.org, pbonzini@redhat.com, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses
Date: Tue, 25 Aug 2015 15:36:26 +0800	[thread overview]
Message-ID: <55DC1AFA.7090100@redhat.com> (raw)
In-Reply-To: <55DBDB48.6060502@redhat.com>



On 08/25/2015 11:04 AM, Jason Wang wrote:
[...]
>>>>> @@ -900,10 +899,11 @@ kvm_deassign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args)
>>>>> >>>>  		if (!p->wildcard && p->datamatch != args->datamatch)
>>>>> >>>>  			continue;
>>>>> >>>>  
>>>>> >>>> -		kvm_io_bus_unregister_dev(kvm, bus_idx, &p->dev);
>>>>> >>>>  		if (!p->length) {
>>>>> >>>>  			kvm_io_bus_unregister_dev(kvm, KVM_FAST_MMIO_BUS,
>>>>> >>>>  						  &p->dev);
>>>>> >>>> +		} else {
>>>>> >>>> +			kvm_io_bus_unregister_dev(kvm, bus_idx, &p->dev);
>>>>> >>>>  		}
>>>> >>> Similar comments here... do you want to check for bus_idx ==
>>>> >>> KVM_MMIO_BUS as well?
>>> >> Good catch. I think keep the original code as is will be also ok to
>>> >> solve this. (with changing the bus_idx to KVM_FAST_MMIO_BUS during
>>> >> registering if it was an wildcard mmio).
>> > Do you need to handle the ioeventfd_count changes on the fast mmio bus
>> > as well?
> Yes. So actually, it needs some changes: checking the return value of
> kvm_io_bus_unregister_dev() and decide which bus does the device belongs to.
>

Looks like it will be more cleaner by just changing
ioeventfd_bus_from_flags() to return KVM_FAST_MMIO_BUS accordingly. Will
post V2 soon.

  reply	other threads:[~2015-08-25  7:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-21  8:03 [PATCH 1/3] kvm: use kmalloc() instead of kzalloc() during iodev register/unregister Jason Wang
2015-08-21  8:03 ` [PATCH 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses Jason Wang
2015-08-21  9:29   ` Cornelia Huck
2015-08-24  3:29     ` Jason Wang
2015-08-24 14:05       ` Cornelia Huck
2015-08-25  3:04         ` Jason Wang
2015-08-25  7:36           ` Jason Wang [this message]
2015-08-21  8:03 ` [PATCH 3/3] kvm: add tracepoint for fast mmio Jason Wang

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=55DC1AFA.7090100@redhat.com \
    --to=jasowang@redhat.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=gleb@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@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 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.