All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Cc: kvm@vger.kernel.org, avi@redhat.com, borntraeger@de.ibm.com,
	cotte@de.ibm.com, heiko.carstens@de.ibm.com,
	schwidefsky@de.ibm.com
Subject: Re: [PATCH 3/3] kvm-s390: streamline memslot handling - rebased
Date: Mon, 8 Jun 2009 21:56:32 -0300	[thread overview]
Message-ID: <20090609005632.GA21096@amt.cnet> (raw)
In-Reply-To: <4A2CED2E.6030904@linux.vnet.ibm.com>

On Mon, Jun 08, 2009 at 12:51:26PM +0200, Christian Ehrhardt wrote:
>>>  Index: kvm/virt/kvm/kvm_main.c
>>> ===================================================================
>>> --- kvm.orig/virt/kvm/kvm_main.c
>>> +++ kvm/virt/kvm/kvm_main.c
>>> @@ -1682,6 +1682,10 @@ static int kvm_vcpu_release(struct inode
>>>  {
>>>  	struct kvm_vcpu *vcpu = filp->private_data;
>>>  +	clear_bit(KVM_REQ_MMU_RELOAD, &vcpu->requests);
>>> +	smp_mb__after_clear_bit();
>>> +	wake_up_bit(&vcpu->requests, KVM_REQ_MMU_RELOAD);
>>> +
>>>     
>>
>> And this should be generic? Say if other architectures want to make use 
>> of a similar wait infrastructure. Talk is cheap.
>>   
> Clear bit and wake up on release doesn't hurt any architecture, but it  
> is at a good place fine for those using the mechanism to ensure cleaning  
> up outstanding things when closing a vcpu fd.
> I thought its not worth to add kvm_ARCH_vcpu_release for it while I  
> could do so if we want it separated.

Yeah, was frustated for lack of more useful comments so decided to
nitpick on something.

> (continued below)
>> Anyway, yeah, the set request / wait mechanism you implement here is
>> quite similar to the idea mentioned earlier that could be used for x86.
>>
>> Just get rid of this explicit KVM_REQ_MMU_RELOAD knowledge in
>> arch-independent code please (if you want to see this merged).
>>   
> I agree to lift the wait part to other archs later if needed, but as  
> mentioned above I could move this to arch code to the cost of one arch  
> hook more. But as also mentioned it doesn't really hurt. I agree that it  
> does not need to be KVM_REQ_MMU_RELOAD specific, we could just  
> walk/clear/wake all bits on that vcpu->requests variable.
> Would that be generic enough in your opinion ?

Don't know.

Avi?

>> Later it can all be lifted off to arch independent code.
>>   
> True for the wait part which can evolve in our arch code until it is 
> ripe to get cross arch merged.
>
> -- 
>
> Grüsse / regards, Christian Ehrhardt
> IBM Linux Technology Center, Open Virtualization 

  parent reply	other threads:[~2009-06-09  0:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-02 14:26 [PATCH 0/3] kvm-s390: revised version of kvm-s390 guest memory handling - rebased ehrhardt
2009-06-02 14:26 ` [PATCH 1/3] kvm-s390: infrastructure to kick vcpus out of guest state " ehrhardt
2009-06-02 14:26 ` [PATCH 2/3] kvm-s390: update vcpu->cpu " ehrhardt
2009-06-02 14:26 ` [PATCH 3/3] kvm-s390: streamline memslot handling " ehrhardt
2009-06-05 20:53   ` Marcelo Tosatti
2009-06-08 10:51     ` Christian Ehrhardt
2009-06-08 11:10       ` Avi Kivity
2009-06-08 12:05         ` Christian Ehrhardt
2009-06-08 12:09           ` Avi Kivity
2009-06-09  0:56       ` Marcelo Tosatti [this message]
2009-06-14 12:04         ` Avi Kivity
2009-06-15 13:47           ` Christian Ehrhardt

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=20090609005632.GA21096@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cotte@de.ibm.com \
    --cc=ehrhardt@linux.vnet.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=schwidefsky@de.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 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.