Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Bhushan Bharat-R65777 <R65777@freescale.com>
Cc: Alexander Graf <agraf@suse.de>,
	Wood Scott-B07421 <B07421@freescale.com>,
	"kvm-ppc@vger.kernel.org" <kvm-ppc@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH 2/2] KVM: PPC: booke: Add watchdog emulation
Date: Mon, 9 Jul 2012 09:28:29 -0500	[thread overview]
Message-ID: <4FFAEA8D.1030202@freescale.com> (raw)
In-Reply-To: <6A3DF150A5B70D4F9B66A25E3F7C888D03DBE920@039-SN2MPN1-023.039d.mgd.msft.net>

On 07/09/2012 12:13 AM, Bhushan Bharat-R65777 wrote:
> 
> 
>> -----Original Message-----
>> From: Alexander Graf [mailto:agraf@suse.de]
>> Sent: Saturday, July 07, 2012 1:21 PM
>> To: Wood Scott-B07421
>> Cc: Bhushan Bharat-R65777; kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; Bhushan
>> Bharat-R65777
>> Subject: Re: [PATCH 2/2] KVM: PPC: booke: Add watchdog emulation
>>
>>
>> Ah, being 2 bits wide, the above code suddenly makes more sense :). How about
>>
>> /* WRC is a 2-bit field that is supposed to preserve its value once written to
>> be non-zero */
>> spr_val &= ~TCR_WRC_MASK;
>> spr_val |= vcpu->arch.tcr & TCR_WRC_MASK;
>> kvmppc_set_tcr(vcpu, spr_val);
> 
> I think you mean:
> 
> if (TCR_WRC_MASK & vcpu->arch.tcr) {
>     spr_val &= ~TCR_WRC_MASK;
>     spr_val |= vcpu->arch.tcr & TCR_WRC_MASK;
> }
> kvmppc_set_tcr(vcpu, spr_val);

Actually I think he means:

if (vcpu->arch.tcr & TCR_WRC_MASK) {
	spr_val &= ~TCR_WRC_MASK;
	spr_val |= vcpu->arch.tcr & TCR_WRC_MASK;
}

kvmppc_set_tcr(vcpu, spr_val);

:-)

-Scott

  parent reply	other threads:[~2012-07-09 14:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-28  6:17 [PATCH 2/2] KVM: PPC: booke: Add watchdog emulation Bharat Bhushan
2012-07-06 13:17 ` Alexander Graf
2012-07-06 23:37   ` Scott Wood
2012-07-07  7:50     ` Alexander Graf
2012-07-09  5:13       ` Bhushan Bharat-R65777
2012-07-09  8:49         ` Alexander Graf
2012-07-09 14:28         ` Scott Wood [this message]
2012-07-09 14:36           ` Alexander Graf
2012-07-09 14:44             ` Bhushan Bharat-R65777
2012-07-09 17:09       ` Scott Wood
2012-07-09 17:29         ` Alexander Graf
2012-07-09  6:43   ` Bhushan Bharat-R65777
2012-07-09  9:11     ` Alexander Graf
  -- strict thread matches above, loose matches on Subject: below --
2012-07-20  4:59 Bharat Bhushan
2012-07-20  4:59 ` Bhushan Bharat-R65777

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=4FFAEA8D.1030202@freescale.com \
    --to=scottwood@freescale.com \
    --cc=B07421@freescale.com \
    --cc=R65777@freescale.com \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    /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