kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Xudong Hao <xudong.hao@intel.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	takuya.yoshikawa@gmail.com, xiantao.zhang@intel.com,
	Haitao Shan <haitao.shan@intel.com>
Subject: Re: [PATCH v2 4/4] Enabling Access bit when doing memory swapping
Date: Mon, 21 May 2012 11:21:17 +0300	[thread overview]
Message-ID: <4FB9FAFD.80106@redhat.com> (raw)
In-Reply-To: <1337572443-22482-4-git-send-email-xudong.hao@intel.com>

On 05/21/2012 06:54 AM, Xudong Hao wrote:
> Enabling Access bit when doing memory swapping.
>
> @@ -1243,11 +1244,11 @@ static int kvm_age_rmapp(struct kvm *kvm, unsigned long *rmapp,
>  
>  	for (sptep = rmap_get_first(*rmapp, &iter); sptep;
>  	     sptep = rmap_get_next(&iter)) {
> -		BUG_ON(!(*sptep & PT_PRESENT_MASK));
> +		BUG_ON(!is_shadow_present_pte(*sptep));
>  
> -		if (*sptep & PT_ACCESSED_MASK) {
> +		if (*sptep & shadow_accessed_mask) {
>  			young = 1;
> -			clear_bit(PT_ACCESSED_SHIFT, (unsigned long *)sptep);
> +			*sptep &= ~shadow_accessed_mask;
>  		}
>  	}

As Marcelo already noted, this converts an atomic operation into a
non-atomic one.


-- 
error compiling committee.c: too many arguments to function

      reply	other threads:[~2012-05-21  8:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-21  3:54 [PATCH v2 1/4] Add EPT A/D bits definitions Xudong Hao
2012-05-21  3:54 ` [PATCH v2 2/4] Add parameter to control A/D bits support Xudong Hao
2012-05-21  3:54 ` [PATCH v2 3/4] Enable EPT A/D bits if supported by turning on relevant bit in EPTP Xudong Hao
2012-05-21  3:54 ` [PATCH v2 4/4] Enabling Access bit when doing memory swapping Xudong Hao
2012-05-21  8:21   ` Avi Kivity [this message]

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=4FB9FAFD.80106@redhat.com \
    --to=avi@redhat.com \
    --cc=haitao.shan@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=takuya.yoshikawa@gmail.com \
    --cc=xiantao.zhang@intel.com \
    --cc=xudong.hao@intel.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;
as well as URLs for NNTP newsgroup(s).