public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org, mtosatti@redhat.com, mst@redhat.com
Subject: Re: [PATCH] Introduce bitmask for apic attention reasons.
Date: Thu, 19 Apr 2012 13:26:27 +0300	[thread overview]
Message-ID: <20120419102627.GA12768@redhat.com> (raw)
In-Reply-To: <4F8FE088.20606@redhat.com>

On Thu, Apr 19, 2012 at 12:53:12PM +0300, Avi Kivity wrote:
> On 04/19/2012 12:33 PM, Gleb Natapov wrote:
> > The patch introduces a bitmap that will hold reasons apic should be
> > checked during vmexit. This is in a preparation for vp eoi patch
> > that will add one more check on vmexit. With the bitmap we can do
> > if(apic_attention) to check everything simultaneously which will
> > add zero overhead on the fast path.
> >
> 
> Good idea.
> 
> >  
> > +#define KVM_APIC_CHECK_VAPIC	0
> 
> Comment above relating this to apic_attention.
> 
OK.

> >  	vcpu->arch.apic->vapic_addr = vapic_addr;
> > +	if (vapic_addr)
> > +		__set_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention);
> > +	else
> > +		__clear_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention);
> >  }
> >
> 
> Unrelated: this pattern is probably common.  Would be nice to have a
> __deposit_bit() function.
> 
What semantics should it have? Set bit A in bitmap B if value C is
non-zero?

--
			Gleb.

  reply	other threads:[~2012-04-19 11:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19  9:33 [PATCH] Introduce bitmask for apic attention reasons Gleb Natapov
2012-04-19  9:53 ` Avi Kivity
2012-04-19 10:26   ` Gleb Natapov [this message]
2012-04-19 10:35     ` Avi Kivity
2012-04-19 10:45       ` Avi Kivity
2012-04-19 10:05 ` Michael S. Tsirkin

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=20120419102627.GA12768@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=mtosatti@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