* [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest
@ 2013-05-07 11:06 Tiejun Chen
2013-05-07 23:40 ` Scott Wood
0 siblings, 1 reply; 8+ messages in thread
From: Tiejun Chen @ 2013-05-07 11:06 UTC (permalink / raw)
To: agraf, scottwood; +Cc: kvm-ppc, kvm, linuxppc-dev
We also can direct ISI exception to Guest like DSI.
Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
---
arch/powerpc/kvm/booke_emulate.c | 3 +++
arch/powerpc/kvm/e500mc.c | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kvm/booke_emulate.c b/arch/powerpc/kvm/booke_emulate.c
index 27a4b28..33b14e9 100644
--- a/arch/powerpc/kvm/booke_emulate.c
+++ b/arch/powerpc/kvm/booke_emulate.c
@@ -197,6 +197,9 @@ int kvmppc_booke_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, ulong spr_val)
break;
case SPRN_IVOR3:
vcpu->arch.ivor[BOOKE_IRQPRIO_INST_STORAGE] = spr_val;
+#ifdef CONFIG_KVM_BOOKE_HV
+ mtspr(SPRN_GIVOR3, spr_val);
+#endif
break;
case SPRN_IVOR4:
vcpu->arch.ivor[BOOKE_IRQPRIO_EXTERNAL] = spr_val;
diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c
index c3bdc0a..acf546a 100644
--- a/arch/powerpc/kvm/e500mc.c
+++ b/arch/powerpc/kvm/e500mc.c
@@ -123,6 +123,7 @@ void kvmppc_core_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
mtspr(SPRN_GIVPR, vcpu->arch.ivpr);
mtspr(SPRN_GIVOR2, vcpu->arch.ivor[BOOKE_IRQPRIO_DATA_STORAGE]);
+ mtspr(SPRN_GIVOR3, vcpu->arch.ivor[BOOKE_IRQPRIO_INST_STORAGE]);
mtspr(SPRN_GIVOR8, vcpu->arch.ivor[BOOKE_IRQPRIO_SYSCALL]);
mtspr(SPRN_GSPRG0, (unsigned long)vcpu->arch.shared->sprg0);
mtspr(SPRN_GSPRG1, (unsigned long)vcpu->arch.shared->sprg1);
@@ -185,7 +186,7 @@ int kvmppc_core_vcpu_setup(struct kvm_vcpu *vcpu)
struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu);
vcpu->arch.shadow_epcr = SPRN_EPCR_DSIGS | SPRN_EPCR_DGTMI | \
- SPRN_EPCR_DUVD;
+ SPRN_EPCR_DUVD | SPRN_EPCR_ISIGS;
#ifdef CONFIG_64BIT
vcpu->arch.shadow_epcr |= SPRN_EPCR_ICM;
#endif
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest
2013-05-07 11:06 [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest Tiejun Chen
@ 2013-05-07 23:40 ` Scott Wood
2013-05-08 1:53 ` tiejun.chen
0 siblings, 1 reply; 8+ messages in thread
From: Scott Wood @ 2013-05-07 23:40 UTC (permalink / raw)
To: Tiejun Chen; +Cc: agraf, kvm-ppc, kvm, linuxppc-dev
On 05/07/2013 06:06:30 AM, Tiejun Chen wrote:
> We also can direct ISI exception to Guest like DSI.
>
> Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
> ---
> arch/powerpc/kvm/booke_emulate.c | 3 +++
> arch/powerpc/kvm/e500mc.c | 3 ++-
> 2 files changed, 5 insertions(+), 1 deletion(-)
Are you seeing a real performance improvement from this? This will
interfere somewhat with using the VF bit, if we were to ever do so,
since VF only affects data accesses (and so the guest would see an ISI
storm rather than a machine check if it tries to execute from such an
address).
-Scott
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest
2013-05-07 23:40 ` Scott Wood
@ 2013-05-08 1:53 ` tiejun.chen
[not found] ` <300B73AA675FCE4A93EB4FC1D42459FF3EFA26@039-SN2MPN1-013.039d.mgd.msft.net>
0 siblings, 1 reply; 8+ messages in thread
From: tiejun.chen @ 2013-05-08 1:53 UTC (permalink / raw)
To: Scott Wood; +Cc: agraf, kvm-ppc, kvm, linuxppc-dev
On 05/08/2013 07:40 AM, Scott Wood wrote:
> On 05/07/2013 06:06:30 AM, Tiejun Chen wrote:
>> We also can direct ISI exception to Guest like DSI.
>>
>> Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
>> ---
>> arch/powerpc/kvm/booke_emulate.c | 3 +++
>> arch/powerpc/kvm/e500mc.c | 3 ++-
>> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> Are you seeing a real performance improvement from this? This will interfere
No. But after we reduce the exit to host, shouldn't this improve performance?
> somewhat with using the VF bit, if we were to ever do so, since VF only affects
Sorry, what is the VF you said?
Tiejun
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <1368213757.19683.10@snotra>]
* Re: [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest
[not found] <1368213757.19683.10@snotra>
@ 2013-05-10 19:39 ` Alexander Graf
2013-05-13 2:04 ` tiejun.chen
0 siblings, 1 reply; 8+ messages in thread
From: Alexander Graf @ 2013-05-10 19:39 UTC (permalink / raw)
To: Scott Wood
Cc: Caraman Mihai Claudiu-B02008, tiejun.chen, Wood Scott-B07421,
linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org,
kvm@vger.kernel.org
Am 10.05.2013 um 21:22 schrieb Scott Wood <scottwood@freescale.com>:
> On 05/10/2013 12:57:33 PM, Alexander Graf wrote:
>> Could you guys please collect performance data during the next weeks on both guest-directed ISIs as well as VF MMIOs (preferably with in-kernel MMIO), so that we can decide on the direction that's worth going towards?
>
> Collecting data on VF MMIO would require implementing it (or at least salvaging and fixing some old code), which is not a high priority at the moment. If we do implement VF in the future we could always undo the direct ISI change, but it would still be nice to know if there's any real benefit in the first place.
Mike sounded like he had an almost working poc, which is good enough to collect rough numbers.
And yes, changes like these should always get at least basic performance numbers along with them, regardless of drawbacks.
Alex
>
> FWIW, I doubt that the "more stress on HW TLB" will be significant.
>
> -Scott
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest
2013-05-10 19:39 ` Alexander Graf
@ 2013-05-13 2:04 ` tiejun.chen
0 siblings, 0 replies; 8+ messages in thread
From: tiejun.chen @ 2013-05-13 2:04 UTC (permalink / raw)
To: Alexander Graf, Caraman Mihai Claudiu-B02008
Cc: Scott Wood, Wood Scott-B07421, linuxppc-dev@lists.ozlabs.org,
kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
On 05/11/2013 03:39 AM, Alexander Graf wrote:
>
>
> Am 10.05.2013 um 21:22 schrieb Scott Wood <scottwood@freescale.com>:
>
>> On 05/10/2013 12:57:33 PM, Alexander Graf wrote:
>>> Could you guys please collect performance data during the next weeks on both guest-directed ISIs as well as VF MMIOs (preferably with in-kernel MMIO), so that we can decide on the direction that's worth going towards?
>>
>> Collecting data on VF MMIO would require implementing it (or at least salvaging and fixing some old code), which is not a high priority at the moment. If we do implement VF in the future we could always undo the direct ISI change, but it would still be nice to know if there's any real benefit in the first place.
>
> Mike sounded like he had an almost working poc, which is good enough to collect rough numbers.
Which can the test case be adopted?
Mike,
If you already have a good case for your poc, please share that with me. Then
I'd like to run that.
Tiejun
>
> And yes, changes like these should always get at least basic performance numbers along with them, regardless of drawbacks.
>
>
> Alex
>
>>
>> FWIW, I doubt that the "more stress on HW TLB" will be significant.
>>
>> -Scott
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-05-13 2:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-07 11:06 [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest Tiejun Chen
2013-05-07 23:40 ` Scott Wood
2013-05-08 1:53 ` tiejun.chen
[not found] ` <300B73AA675FCE4A93EB4FC1D42459FF3EFA26@039-SN2MPN1-013.039d.mgd.msft.net>
2013-05-08 9:28 ` tiejun.chen
2013-05-09 10:23 ` tiejun.chen
[not found] ` <300B73AA675FCE4A93EB4FC1D42459FF3F7FBE@039-SN2MPN1-012.039d.mgd.msft.net>
2013-05-09 11:40 ` tiejun.chen
[not found] <1368213757.19683.10@snotra>
2013-05-10 19:39 ` Alexander Graf
2013-05-13 2:04 ` tiejun.chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox