All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Avi Kivity <avi@redhat.com>
Cc: kvm-ppc@vger.kernel.org, KVM list <kvm@vger.kernel.org>
Subject: Re: [PATCH 1/2] KVM: PPC: 440: Implement mtdcrx
Date: Thu, 16 Aug 2012 12:50:47 +0200	[thread overview]
Message-ID: <EE17ABAB-C552-4387-94D0-69121A74B80B@suse.de> (raw)
In-Reply-To: <502CB946.1030906@redhat.com>


On 16.08.2012, at 11:11, Avi Kivity wrote:

> On 08/16/2012 01:42 AM, Alexander Graf wrote:
>> Signed-off-by: Alexander Graf <agraf@suse.de>
>> ---
>> arch/powerpc/kvm/44x_emulate.c |    3 +++
>> 1 files changed, 3 insertions(+), 0 deletions(-)
>> 
>> diff --git a/arch/powerpc/kvm/44x_emulate.c b/arch/powerpc/kvm/44x_emulate.c
>> index c8c6157..ea57631 100644
>> --- a/arch/powerpc/kvm/44x_emulate.c
>> +++ b/arch/powerpc/kvm/44x_emulate.c
>> @@ -28,6 +28,7 @@
>> #include "44x_tlb.h"
>> 
>> #define XOP_MFDCR   323
>> +#define XOP_MTDCRX  387
>> #define XOP_MTDCR   451
>> #define XOP_TLBSX   914
>> #define XOP_ICCCI   966
>> @@ -84,6 +85,8 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,
>> 
>> 			break;
>> 
>> +		case XOP_MTDCRX:
>> +			dcrn = kvmppc_get_gpr(vcpu, ra);
>> 		case XOP_MTDCR:
> 
> It's customary to put a /* fallthrough */ comment to shut down any
> alarms that may be firing off in readers' minds.

Yeah, I moved this over into function calls now. Makes the code easier to read :). And hopefully the compiler is smart enough to optimize it the same way.


Alex

WARNING: multiple messages have this Message-ID (diff)
From: Alexander Graf <agraf@suse.de>
To: Avi Kivity <avi@redhat.com>
Cc: kvm-ppc@vger.kernel.org, KVM list <kvm@vger.kernel.org>
Subject: Re: [PATCH 1/2] KVM: PPC: 440: Implement mtdcrx
Date: Thu, 16 Aug 2012 10:50:47 +0000	[thread overview]
Message-ID: <EE17ABAB-C552-4387-94D0-69121A74B80B@suse.de> (raw)
In-Reply-To: <502CB946.1030906@redhat.com>


On 16.08.2012, at 11:11, Avi Kivity wrote:

> On 08/16/2012 01:42 AM, Alexander Graf wrote:
>> Signed-off-by: Alexander Graf <agraf@suse.de>
>> ---
>> arch/powerpc/kvm/44x_emulate.c |    3 +++
>> 1 files changed, 3 insertions(+), 0 deletions(-)
>> 
>> diff --git a/arch/powerpc/kvm/44x_emulate.c b/arch/powerpc/kvm/44x_emulate.c
>> index c8c6157..ea57631 100644
>> --- a/arch/powerpc/kvm/44x_emulate.c
>> +++ b/arch/powerpc/kvm/44x_emulate.c
>> @@ -28,6 +28,7 @@
>> #include "44x_tlb.h"
>> 
>> #define XOP_MFDCR   323
>> +#define XOP_MTDCRX  387
>> #define XOP_MTDCR   451
>> #define XOP_TLBSX   914
>> #define XOP_ICCCI   966
>> @@ -84,6 +85,8 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,
>> 
>> 			break;
>> 
>> +		case XOP_MTDCRX:
>> +			dcrn = kvmppc_get_gpr(vcpu, ra);
>> 		case XOP_MTDCR:
> 
> It's customary to put a /* fallthrough */ comment to shut down any
> alarms that may be firing off in readers' minds.

Yeah, I moved this over into function calls now. Makes the code easier to read :). And hopefully the compiler is smart enough to optimize it the same way.


Alex


  reply	other threads:[~2012-08-16 10:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-15 22:42 [PATCH 1/2] KVM: PPC: 440: Implement mtdcrx Alexander Graf
2012-08-15 22:42 ` Alexander Graf
2012-08-15 22:42 ` [PATCH 2/2] KVM: PPC: 440: Implement mfdcrx Alexander Graf
2012-08-15 22:42   ` Alexander Graf
2012-08-16  9:11 ` [PATCH 1/2] KVM: PPC: 440: Implement mtdcrx Avi Kivity
2012-08-16  9:11   ` Avi Kivity
2012-08-16 10:50   ` Alexander Graf [this message]
2012-08-16 10:50     ` Alexander Graf

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=EE17ABAB-C552-4387-94D0-69121A74B80B@suse.de \
    --to=agraf@suse.de \
    --cc=avi@redhat.com \
    --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 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.