* [PATCH 1/2] KVM: PPC: 440: Implement mtdcrx
@ 2012-08-15 22:42 Alexander Graf
2012-08-15 22:42 ` [PATCH 2/2] KVM: PPC: 440: Implement mfdcrx Alexander Graf
2012-08-16 9:11 ` [PATCH 1/2] KVM: PPC: 440: Implement mtdcrx Avi Kivity
0 siblings, 2 replies; 4+ messages in thread
From: Alexander Graf @ 2012-08-15 22:42 UTC (permalink / raw)
To: kvm-ppc; +Cc: KVM list
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:
/* emulate some access in kernel */
switch (dcrn) {
--
1.6.0.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] KVM: PPC: 440: Implement mfdcrx
2012-08-15 22:42 [PATCH 1/2] KVM: PPC: 440: Implement mtdcrx Alexander Graf
@ 2012-08-15 22:42 ` Alexander Graf
2012-08-16 9:11 ` [PATCH 1/2] KVM: PPC: 440: Implement mtdcrx Avi Kivity
1 sibling, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2012-08-15 22:42 UTC (permalink / raw)
To: kvm-ppc; +Cc: KVM list
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 ea57631..30ea3a7 100644
--- a/arch/powerpc/kvm/44x_emulate.c
+++ b/arch/powerpc/kvm/44x_emulate.c
@@ -27,6 +27,7 @@
#include "booke.h"
#include "44x_tlb.h"
+#define XOP_MFDCRX 259
#define XOP_MFDCR 323
#define XOP_MTDCRX 387
#define XOP_MTDCR 451
@@ -50,6 +51,8 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,
case 31:
switch (get_xop(inst)) {
+ case XOP_MFDCRX:
+ dcrn = kvmppc_get_gpr(vcpu, ra);
case XOP_MFDCR:
/* The guest may access CPR0 registers to determine the timebase
* frequency, and it must know the real host frequency because it
--
1.6.0.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] KVM: PPC: 440: Implement mtdcrx
2012-08-15 22:42 [PATCH 1/2] KVM: PPC: 440: Implement mtdcrx Alexander Graf
2012-08-15 22:42 ` [PATCH 2/2] KVM: PPC: 440: Implement mfdcrx Alexander Graf
@ 2012-08-16 9:11 ` Avi Kivity
2012-08-16 10:50 ` Alexander Graf
1 sibling, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2012-08-16 9:11 UTC (permalink / raw)
To: Alexander Graf; +Cc: kvm-ppc, KVM list
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.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] KVM: PPC: 440: Implement mtdcrx
2012-08-16 9:11 ` [PATCH 1/2] KVM: PPC: 440: Implement mtdcrx Avi Kivity
@ 2012-08-16 10:50 ` Alexander Graf
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2012-08-16 10:50 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm-ppc, KVM list
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-08-16 10:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-15 22:42 [PATCH 1/2] KVM: PPC: 440: Implement mtdcrx Alexander Graf
2012-08-15 22:42 ` [PATCH 2/2] KVM: PPC: 440: Implement mfdcrx Alexander Graf
2012-08-16 9:11 ` [PATCH 1/2] KVM: PPC: 440: Implement mtdcrx Avi Kivity
2012-08-16 10:50 ` Alexander Graf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox