Skip to contentSkip to conversation

add e500 tlb implementation -- DCRs

PATCH Hollis Blanchard 2 participants 4 messages Aug 26, 2008 – Aug 28, 2008

lore
Share & tools
lore
#0 lore raw
Quoted 8 lines · Liu Yu
Quoted 4 lines
Quoted 2 lines

+#define mtdcr(rn, val)

define mtdcr to what ?

To null. I think it return void.
E500 doesn't support dcr.
Finally there is a place could be simpler than 44x. :-)

It would be better to ifdef or abstract the DCR code in emulate.c so that it's not compiled on e500. The same goes for emulation of e500-specific instructions (probably just SPRs like EPR) on 440 -- I think we should split kvmppc_emulate_instruction() somehow.

There's an open question about being able to run e.g. a 440 guest on an e500 host, but since nobody I've talked to seems interested in that I think it's OK not to allow that for now. (However, I do want to make sure our design/layering allows for that at some point in the future, if it becomes interesting.)

Signature · 2 lines
Hollis Blanchard
IBM Linux Technology Center
#1 lore raw
Quoted 24 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Hollis Blanchard
Sent: Tuesday, August 26, 2008 11:51 PM
To: Liu Yu
Cc: [email protected]
Subject: RE: [PATCH 2/4] add e500 tlb implementation -- DCRs

Quoted 8 lines · Liu Yu
Quoted 4 lines
Quoted 2 lines

+#define mtdcr(rn, val)

define mtdcr to what ?

To null. I think it return void.
E500 doesn't support dcr.
Finally there is a place could be simpler than 44x. :-)

It would be better to ifdef or abstract the DCR code in emulate.c so that it's not compiled on e500. The same goes for emulation of e500-specific instructions (probably just SPRs like EPR) on 440 -- I think we should split kvmppc_emulate_instruction() somehow.

Quoted 8 lines

There's an open question about being able to run e.g. a 440 guest on an
e500 host, but since nobody I've talked to seems interested in that I think it's OK not to allow that for now. (However, I do want to make sure our design/layering allows for that at some point in the future, if
it becomes interesting.)

In fact, this is one problem I want to discuss on list.
Do we have to split all core-specific things? Such as SPRs as you said, additional exceptions, core-specific instructions etc.
Do you mean it is helpful to find out potential errors or to debug sth.?

Except that I think It's not a big deal if they don't conflict with the normal behavior of KVM.
For example, although 44x and E500 have specific SPR, but they are defined different numbers.
Maybe it make guest somewhat confused,
but we could no more need ifdef which may make code more complicated and harder to read.
And kernel has some instructions emulation as well.

Anyway, both seem OK to me.

#2 lore raw
In reply to Hollis Blanchard
Quoted 37 lines · Liu Yu
Quoted 23 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Hollis Blanchard
Sent: Tuesday, August 26, 2008 11:51 PM
To: Liu Yu
Cc: [email protected]
Subject: RE: [PATCH 2/4] add e500 tlb implementation -- DCRs

Quoted 8 lines · Liu Yu
Quoted 4 lines
Quoted 2 lines

+#define mtdcr(rn, val)

define mtdcr to what ?

To null. I think it return void.
E500 doesn't support dcr.
Finally there is a place could be simpler than 44x. :-)

It would be better to ifdef or abstract the DCR code in emulate.c so that it's not compiled on e500. The same goes for emulation of e500-specific instructions (probably just SPRs like EPR) on 440 -- I think we should split kvmppc_emulate_instruction() somehow.

Quoted 8 lines

There's an open question about being able to run e.g. a 440 guest on an
e500 host, but since nobody I've talked to seems interested in that I think it's OK not to allow that for now. (However, I do want to make sure our design/layering allows for that at some point in the future, if
it becomes interesting.)

In fact, this is one problem I want to discuss on list.
Do we have to split all core-specific things? Such as SPRs as you said, additional exceptions, core-specific instructions etc.
Do you mean it is helpful to find out potential errors or to debug sth.?

Quoted 8 lines

Except that I think It's not a big deal if they don't conflict with the normal behavior of KVM.
For example, although 44x and E500 have specific SPR, but they are defined different numbers.
Maybe it make guest somewhat confused,
but we could no more need ifdef which may make code more complicated and harder to read.
And kernel has some instructions emulation as well.

OK, I think I agree that we can just leave the code for both cores active but unused. That includes adding fields to kvm_vcpu_arch. (There is probably some small performance penalty for that, but I don't think we're even close to that mattering.)

On the other hand, the "mtdcr" hack offends me, so I think that deserves an ifdef instead of stubbing it out. :)

Signature · 2 lines
Hollis Blanchard
IBM Linux Technology Center
#3 lore raw
In reply to Hollis Blanchard

Best Regards.

Yu

Quoted 69 lines

-----Original Message-----
From: Hollis Blanchard [mailto:[email protected]]
Sent: Thursday, August 28, 2008 4:19 AM
To: Liu Yu
Cc: [email protected]
Subject: RE: [PATCH 2/4] add e500 tlb implementation -- DCRs

Quoted 3 lines · Liu Yu
Quoted 3 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of

Hollis Blanchard

Quoted 9 lines
Quoted 9 lines

Sent: Tuesday, August 26, 2008 11:51 PM
To: Liu Yu
Cc: [email protected]
Subject: RE: [PATCH 2/4] add e500 tlb implementation -- DCRs

Quoted 3 lines · Liu Yu
Quoted 3 lines
Quoted 2 lines

+#define mtdcr(rn, val)

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 1 line

define mtdcr to what ?

To null. I think it return void.
E500 doesn't support dcr.
Finally there is a place could be simpler than 44x. :-)

It would be better to ifdef or abstract the DCR code in

emulate.c so

Quoted 2 lines
Quoted 2 lines

that it's not compiled on e500. The same goes for emulation of e500-specific instructions (probably just SPRs like EPR)

on 440 -- I

Quoted 5 lines
Quoted 5 lines

think we should split kvmppc_emulate_instruction() somehow.

There's an open question about being able to run e.g. a 440 guest on an
e500 host, but since nobody I've talked to seems

interested in that I

Quoted 1 line
Quoted 1 line

think it's OK not to allow that for now. (However, I do

want to make

Quoted 7 lines
Quoted 4 lines

sure our design/layering allows for that at some point in the future, if
it becomes interesting.)

In fact, this is one problem I want to discuss on list. Do we have to split all core-specific things? Such as SPRs

as you said,

Quoted 2 lines

additional exceptions, core-specific instructions etc. Do you mean it is helpful to find out potential errors or

to debug sth.?

Quoted 2 lines

Except that I think It's not a big deal if they don't

conflict with the

Quoted 5 lines

normal behavior of KVM.
For example, although 44x and E500 have specific SPR, but they are defined different numbers.
Maybe it make guest somewhat confused,
but we could no more need ifdef which may make code more

complicated and

Quoted 2 lines

harder to read.
And kernel has some instructions emulation as well.

OK, I think I agree that we can just leave the code for both cores active but unused. That includes adding fields to kvm_vcpu_arch. (There
is probably some small performance penalty for that, but I don't think we're even close to that mattering.)

Quoted 3 lines

On the other hand, the "mtdcr" hack offends me, so I think that deserves
an ifdef instead of stubbing it out. :)

Fixed.