* [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro @ 2012-09-12 13:18 ` Mihai Caraman 0 siblings, 0 replies; 20+ messages in thread From: Mihai Caraman @ 2012-09-12 13:18 UTC (permalink / raw) To: kvm-ppc; +Cc: linuxppc-dev, kvm, Mihai Caraman The current form of DO_KVM macro restricts its use to one call per input parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol definition. Duplicate calls of DO_KVM are required by distinct implementations of exeption handlers which are delegated at runtime. Use a rare label number to avoid conflicts with the calling contexts. Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com> --- arch/powerpc/include/asm/kvm_booke_hv_asm.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/kvm_booke_hv_asm.h b/arch/powerpc/include/asm/kvm_booke_hv_asm.h index 30a600f..a37a12a 100644 --- a/arch/powerpc/include/asm/kvm_booke_hv_asm.h +++ b/arch/powerpc/include/asm/kvm_booke_hv_asm.h @@ -38,9 +38,9 @@ #ifdef CONFIG_KVM_BOOKE_HV BEGIN_FTR_SECTION mtocrf 0x80, r11 /* check MSR[GS] without clobbering reg */ - bf 3, kvmppc_resume_\intno\()_\srr1 + bf 3, 1975f b kvmppc_handler_\intno\()_\srr1 -kvmppc_resume_\intno\()_\srr1: +1975: END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV) #endif .endm -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro @ 2012-09-12 13:18 ` Mihai Caraman 0 siblings, 0 replies; 20+ messages in thread From: Mihai Caraman @ 2012-09-12 13:18 UTC (permalink / raw) To: kvm-ppc; +Cc: linuxppc-dev, kvm, Mihai Caraman The current form of DO_KVM macro restricts its use to one call per input parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol definition. Duplicate calls of DO_KVM are required by distinct implementations of exeption handlers which are delegated at runtime. Use a rare label number to avoid conflicts with the calling contexts. Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com> --- arch/powerpc/include/asm/kvm_booke_hv_asm.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/kvm_booke_hv_asm.h b/arch/powerpc/include/asm/kvm_booke_hv_asm.h index 30a600f..a37a12a 100644 --- a/arch/powerpc/include/asm/kvm_booke_hv_asm.h +++ b/arch/powerpc/include/asm/kvm_booke_hv_asm.h @@ -38,9 +38,9 @@ #ifdef CONFIG_KVM_BOOKE_HV BEGIN_FTR_SECTION mtocrf 0x80, r11 /* check MSR[GS] without clobbering reg */ - bf 3, kvmppc_resume_\intno\()_\srr1 + bf 3, 1975f b kvmppc_handler_\intno\()_\srr1 -kvmppc_resume_\intno\()_\srr1: +1975: END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV) #endif .endm -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro @ 2012-09-12 13:18 ` Mihai Caraman 0 siblings, 0 replies; 20+ messages in thread From: Mihai Caraman @ 2012-09-12 13:18 UTC (permalink / raw) To: kvm-ppc; +Cc: Mihai Caraman, linuxppc-dev, kvm The current form of DO_KVM macro restricts its use to one call per input parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol definition. Duplicate calls of DO_KVM are required by distinct implementations of exeption handlers which are delegated at runtime. Use a rare label number to avoid conflicts with the calling contexts. Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com> --- arch/powerpc/include/asm/kvm_booke_hv_asm.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/kvm_booke_hv_asm.h b/arch/powerpc/include/asm/kvm_booke_hv_asm.h index 30a600f..a37a12a 100644 --- a/arch/powerpc/include/asm/kvm_booke_hv_asm.h +++ b/arch/powerpc/include/asm/kvm_booke_hv_asm.h @@ -38,9 +38,9 @@ #ifdef CONFIG_KVM_BOOKE_HV BEGIN_FTR_SECTION mtocrf 0x80, r11 /* check MSR[GS] without clobbering reg */ - bf 3, kvmppc_resume_\intno\()_\srr1 + bf 3, 1975f b kvmppc_handler_\intno\()_\srr1 -kvmppc_resume_\intno\()_\srr1: +1975: END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV) #endif .endm -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro 2012-09-12 13:18 ` Mihai Caraman (?) @ 2012-09-12 18:56 ` Alexander Graf -1 siblings, 0 replies; 20+ messages in thread From: Alexander Graf @ 2012-09-12 18:56 UTC (permalink / raw) To: Mihai Caraman Cc: <kvm-ppc@vger.kernel.org>, <linuxppc-dev@lists.ozlabs.org>, <kvm@vger.kernel.org>, Mihai Caraman On 12.09.2012, at 15:18, Mihai Caraman <mihai.caraman@freescale.com> wrote: > The current form of DO_KVM macro restricts its use to one call per input > parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol > definition. > Duplicate calls of DO_KVM are required by distinct implementations of > exeption handlers which are delegated at runtime. Not sure I understand what you're trying to achieve here. Please elaborate ;) Alex > Use a rare label number > to avoid conflicts with the calling contexts. > > Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com> > --- > arch/powerpc/include/asm/kvm_booke_hv_asm.h | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/include/asm/kvm_booke_hv_asm.h b/arch/powerpc/include/asm/kvm_booke_hv_asm.h > index 30a600f..a37a12a 100644 > --- a/arch/powerpc/include/asm/kvm_booke_hv_asm.h > +++ b/arch/powerpc/include/asm/kvm_booke_hv_asm.h > @@ -38,9 +38,9 @@ > #ifdef CONFIG_KVM_BOOKE_HV > BEGIN_FTR_SECTION > mtocrf 0x80, r11 /* check MSR[GS] without clobbering reg */ > - bf 3, kvmppc_resume_\intno\()_\srr1 > + bf 3, 1975f > b kvmppc_handler_\intno\()_\srr1 > -kvmppc_resume_\intno\()_\srr1: > +1975: > END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV) > #endif > .endm > -- > 1.7.4.1 > > > -- > To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro @ 2012-09-12 18:56 ` Alexander Graf 0 siblings, 0 replies; 20+ messages in thread From: Alexander Graf @ 2012-09-12 18:56 UTC (permalink / raw) To: Mihai Caraman Cc: <kvm-ppc@vger.kernel.org>, <linuxppc-dev@lists.ozlabs.org>, <kvm@vger.kernel.org>, Mihai Caraman On 12.09.2012, at 15:18, Mihai Caraman <mihai.caraman@freescale.com> wrote: > The current form of DO_KVM macro restricts its use to one call per input > parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol > definition. > Duplicate calls of DO_KVM are required by distinct implementations of > exeption handlers which are delegated at runtime. Not sure I understand what you're trying to achieve here. Please elaborate ;) Alex > Use a rare label number > to avoid conflicts with the calling contexts. > > Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com> > --- > arch/powerpc/include/asm/kvm_booke_hv_asm.h | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/include/asm/kvm_booke_hv_asm.h b/arch/powerpc/include/asm/kvm_booke_hv_asm.h > index 30a600f..a37a12a 100644 > --- a/arch/powerpc/include/asm/kvm_booke_hv_asm.h > +++ b/arch/powerpc/include/asm/kvm_booke_hv_asm.h > @@ -38,9 +38,9 @@ > #ifdef CONFIG_KVM_BOOKE_HV > BEGIN_FTR_SECTION > mtocrf 0x80, r11 /* check MSR[GS] without clobbering reg */ > - bf 3, kvmppc_resume_\intno\()_\srr1 > + bf 3, 1975f > b kvmppc_handler_\intno\()_\srr1 > -kvmppc_resume_\intno\()_\srr1: > +1975: > END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV) > #endif > .endm > -- > 1.7.4.1 > > > -- > To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro @ 2012-09-12 18:56 ` Alexander Graf 0 siblings, 0 replies; 20+ messages in thread From: Alexander Graf @ 2012-09-12 18:56 UTC (permalink / raw) To: Mihai Caraman Cc: Mihai Caraman, <linuxppc-dev@lists.ozlabs.org>, <kvm@vger.kernel.org>, <kvm-ppc@vger.kernel.org> On 12.09.2012, at 15:18, Mihai Caraman <mihai.caraman@freescale.com> wrote: > The current form of DO_KVM macro restricts its use to one call per input > parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol > definition. > Duplicate calls of DO_KVM are required by distinct implementations of > exeption handlers which are delegated at runtime. Not sure I understand what you're trying to achieve here. Please elaborate ;= ) Alex > Use a rare label number > to avoid conflicts with the calling contexts. >=20 > Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com> > --- > arch/powerpc/include/asm/kvm_booke_hv_asm.h | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/arch/powerpc/include/asm/kvm_booke_hv_asm.h b/arch/powerpc/in= clude/asm/kvm_booke_hv_asm.h > index 30a600f..a37a12a 100644 > --- a/arch/powerpc/include/asm/kvm_booke_hv_asm.h > +++ b/arch/powerpc/include/asm/kvm_booke_hv_asm.h > @@ -38,9 +38,9 @@ > #ifdef CONFIG_KVM_BOOKE_HV > BEGIN_FTR_SECTION > mtocrf 0x80, r11 /* check MSR[GS] without clobbering reg */ > - bf 3, kvmppc_resume_\intno\()_\srr1 > + bf 3, 1975f > b kvmppc_handler_\intno\()_\srr1 > -kvmppc_resume_\intno\()_\srr1: > +1975: > END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV) > #endif > .endm > --=20 > 1.7.4.1 >=20 >=20 > -- > To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro 2012-09-12 18:56 ` Alexander Graf @ 2012-09-12 21:38 ` Scott Wood -1 siblings, 0 replies; 20+ messages in thread From: Scott Wood @ 2012-09-12 21:38 UTC (permalink / raw) To: Alexander Graf Cc: Mihai Caraman, <linuxppc-dev@lists.ozlabs.org>, <kvm@vger.kernel.org>, <kvm-ppc@vger.kernel.org> On 09/12/2012 01:56 PM, Alexander Graf wrote: > > > On 12.09.2012, at 15:18, Mihai Caraman <mihai.caraman@freescale.com> wrote: > >> The current form of DO_KVM macro restricts its use to one call per input >> parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol >> definition. >> Duplicate calls of DO_KVM are required by distinct implementations of >> exeption handlers which are delegated at runtime. > > Not sure I understand what you're trying to achieve here. Please elaborate ;) On 64-bit book3e we compile multiple versions of the TLB miss handlers, and choose from them at runtime. Without this patch, we get duplicate label errors if more than one variant of the same exception uses DO_KVM. -Scott ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro @ 2012-09-12 21:38 ` Scott Wood 0 siblings, 0 replies; 20+ messages in thread From: Scott Wood @ 2012-09-12 21:38 UTC (permalink / raw) To: Alexander Graf Cc: Mihai Caraman, <linuxppc-dev@lists.ozlabs.org>, <kvm@vger.kernel.org>, <kvm-ppc@vger.kernel.org> On 09/12/2012 01:56 PM, Alexander Graf wrote: > > > On 12.09.2012, at 15:18, Mihai Caraman <mihai.caraman@freescale.com> wrote: > >> The current form of DO_KVM macro restricts its use to one call per input >> parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol >> definition. >> Duplicate calls of DO_KVM are required by distinct implementations of >> exeption handlers which are delegated at runtime. > > Not sure I understand what you're trying to achieve here. Please elaborate ;) On 64-bit book3e we compile multiple versions of the TLB miss handlers, and choose from them at runtime. Without this patch, we get duplicate label errors if more than one variant of the same exception uses DO_KVM. -Scott ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro 2012-09-12 21:38 ` Scott Wood (?) @ 2012-09-12 21:45 ` Alexander Graf -1 siblings, 0 replies; 20+ messages in thread From: Alexander Graf @ 2012-09-12 21:45 UTC (permalink / raw) To: Scott Wood Cc: Mihai Caraman, <kvm-ppc@vger.kernel.org>, <linuxppc-dev@lists.ozlabs.org>, <kvm@vger.kernel.org> On 12.09.2012, at 23:38, Scott Wood <scottwood@freescale.com> wrote: > On 09/12/2012 01:56 PM, Alexander Graf wrote: >> >> >> On 12.09.2012, at 15:18, Mihai Caraman <mihai.caraman@freescale.com> wrote: >> >>> The current form of DO_KVM macro restricts its use to one call per input >>> parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol >>> definition. >>> Duplicate calls of DO_KVM are required by distinct implementations of >>> exeption handlers which are delegated at runtime. >> >> Not sure I understand what you're trying to achieve here. Please elaborate ;) > > On 64-bit book3e we compile multiple versions of the TLB miss handlers, > and choose from them at runtime. Why? > Without this patch, we get duplicate > label errors if more than one variant of the same exception uses DO_KVM. Makes sense. The proposed solution also looks good. Just quickly walk me through the reasoning for the runtime check again please. Alex > > -Scott > > > -- > To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro @ 2012-09-12 21:45 ` Alexander Graf 0 siblings, 0 replies; 20+ messages in thread From: Alexander Graf @ 2012-09-12 21:45 UTC (permalink / raw) To: Scott Wood Cc: Mihai Caraman, <kvm-ppc@vger.kernel.org>, <linuxppc-dev@lists.ozlabs.org>, <kvm@vger.kernel.org> On 12.09.2012, at 23:38, Scott Wood <scottwood@freescale.com> wrote: > On 09/12/2012 01:56 PM, Alexander Graf wrote: >> >> >> On 12.09.2012, at 15:18, Mihai Caraman <mihai.caraman@freescale.com> wrote: >> >>> The current form of DO_KVM macro restricts its use to one call per input >>> parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol >>> definition. >>> Duplicate calls of DO_KVM are required by distinct implementations of >>> exeption handlers which are delegated at runtime. >> >> Not sure I understand what you're trying to achieve here. Please elaborate ;) > > On 64-bit book3e we compile multiple versions of the TLB miss handlers, > and choose from them at runtime. Why? > Without this patch, we get duplicate > label errors if more than one variant of the same exception uses DO_KVM. Makes sense. The proposed solution also looks good. Just quickly walk me through the reasoning for the runtime check again please. Alex > > -Scott > > > -- > To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro @ 2012-09-12 21:45 ` Alexander Graf 0 siblings, 0 replies; 20+ messages in thread From: Alexander Graf @ 2012-09-12 21:45 UTC (permalink / raw) To: Scott Wood Cc: Mihai Caraman, <linuxppc-dev@lists.ozlabs.org>, <kvm@vger.kernel.org>, <kvm-ppc@vger.kernel.org> On 12.09.2012, at 23:38, Scott Wood <scottwood@freescale.com> wrote: > On 09/12/2012 01:56 PM, Alexander Graf wrote: >>=20 >>=20 >> On 12.09.2012, at 15:18, Mihai Caraman <mihai.caraman@freescale.com> wrot= e: >>=20 >>> The current form of DO_KVM macro restricts its use to one call per input= >>> parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol >>> definition. >>> Duplicate calls of DO_KVM are required by distinct implementations of >>> exeption handlers which are delegated at runtime. >>=20 >> Not sure I understand what you're trying to achieve here. Please elaborat= e ;) >=20 > On 64-bit book3e we compile multiple versions of the TLB miss handlers, > and choose from them at runtime. =20 Why? > Without this patch, we get duplicate > label errors if more than one variant of the same exception uses DO_KVM. Makes sense. The proposed solution also looks good. Just quickly walk me thr= ough the reasoning for the runtime check again please. Alex >=20 > -Scott >=20 >=20 > -- > To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro 2012-09-12 21:45 ` Alexander Graf (?) @ 2012-09-12 21:54 ` Scott Wood -1 siblings, 0 replies; 20+ messages in thread From: Scott Wood @ 2012-09-12 21:54 UTC (permalink / raw) To: Alexander Graf Cc: Mihai Caraman, <kvm-ppc@vger.kernel.org>, <linuxppc-dev@lists.ozlabs.org>, <kvm@vger.kernel.org> On 09/12/2012 04:45 PM, Alexander Graf wrote: > > > On 12.09.2012, at 23:38, Scott Wood <scottwood@freescale.com> wrote: > >> On 09/12/2012 01:56 PM, Alexander Graf wrote: >>> >>> >>> On 12.09.2012, at 15:18, Mihai Caraman <mihai.caraman@freescale.com> wrote: >>> >>>> The current form of DO_KVM macro restricts its use to one call per input >>>> parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol >>>> definition. >>>> Duplicate calls of DO_KVM are required by distinct implementations of >>>> exeption handlers which are delegated at runtime. >>> >>> Not sure I understand what you're trying to achieve here. Please elaborate ;) >> >> On 64-bit book3e we compile multiple versions of the TLB miss handlers, >> and choose from them at runtime. > > Why? Because one size does not fit all, and we try to not force a separate kernel build based on what sort of TLB miss handler a piece of hardware wants. Some of the differences are too large to be sanely handled by feature fixups. >> Without this patch, we get duplicate >> label errors if more than one variant of the same exception uses DO_KVM. > > Makes sense. The proposed solution also looks good. Just quickly walk me through the reasoning for the runtime check again please. To start with, you have a TLB miss handler for when partial hardware tablewalk is used (only the final page table level is looked up in hardware, so we still need a TLB miss handler to load indirect entries), and one where that feature is not available. Then you have the "bolted" variant used by e5500, which is faster than the generic version because it doesn't have to deal with recursive faults. So far the bolted version is the only one with DO_KVM. I posted a patch to add another variant, for e6500-style hardware tablewalk, which shares the bolted prolog/epilog (besides prolog/epilog performance, e6500 is incompatible with the IBM tablewalk code for various reasons). That caused us to have two DO_KVMs for the same exception type. -Scott ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro @ 2012-09-12 21:54 ` Scott Wood 0 siblings, 0 replies; 20+ messages in thread From: Scott Wood @ 2012-09-12 21:54 UTC (permalink / raw) To: Alexander Graf Cc: Mihai Caraman, <kvm-ppc@vger.kernel.org>, <linuxppc-dev@lists.ozlabs.org>, <kvm@vger.kernel.org> On 09/12/2012 04:45 PM, Alexander Graf wrote: > > > On 12.09.2012, at 23:38, Scott Wood <scottwood@freescale.com> wrote: > >> On 09/12/2012 01:56 PM, Alexander Graf wrote: >>> >>> >>> On 12.09.2012, at 15:18, Mihai Caraman <mihai.caraman@freescale.com> wrote: >>> >>>> The current form of DO_KVM macro restricts its use to one call per input >>>> parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol >>>> definition. >>>> Duplicate calls of DO_KVM are required by distinct implementations of >>>> exeption handlers which are delegated at runtime. >>> >>> Not sure I understand what you're trying to achieve here. Please elaborate ;) >> >> On 64-bit book3e we compile multiple versions of the TLB miss handlers, >> and choose from them at runtime. > > Why? Because one size does not fit all, and we try to not force a separate kernel build based on what sort of TLB miss handler a piece of hardware wants. Some of the differences are too large to be sanely handled by feature fixups. >> Without this patch, we get duplicate >> label errors if more than one variant of the same exception uses DO_KVM. > > Makes sense. The proposed solution also looks good. Just quickly walk me through the reasoning for the runtime check again please. To start with, you have a TLB miss handler for when partial hardware tablewalk is used (only the final page table level is looked up in hardware, so we still need a TLB miss handler to load indirect entries), and one where that feature is not available. Then you have the "bolted" variant used by e5500, which is faster than the generic version because it doesn't have to deal with recursive faults. So far the bolted version is the only one with DO_KVM. I posted a patch to add another variant, for e6500-style hardware tablewalk, which shares the bolted prolog/epilog (besides prolog/epilog performance, e6500 is incompatible with the IBM tablewalk code for various reasons). That caused us to have two DO_KVMs for the same exception type. -Scott ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro @ 2012-09-12 21:54 ` Scott Wood 0 siblings, 0 replies; 20+ messages in thread From: Scott Wood @ 2012-09-12 21:54 UTC (permalink / raw) To: Alexander Graf Cc: Mihai Caraman, <linuxppc-dev@lists.ozlabs.org>, <kvm@vger.kernel.org>, <kvm-ppc@vger.kernel.org> On 09/12/2012 04:45 PM, Alexander Graf wrote: > > > On 12.09.2012, at 23:38, Scott Wood <scottwood@freescale.com> wrote: > >> On 09/12/2012 01:56 PM, Alexander Graf wrote: >>> >>> >>> On 12.09.2012, at 15:18, Mihai Caraman <mihai.caraman@freescale.com> wrote: >>> >>>> The current form of DO_KVM macro restricts its use to one call per input >>>> parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol >>>> definition. >>>> Duplicate calls of DO_KVM are required by distinct implementations of >>>> exeption handlers which are delegated at runtime. >>> >>> Not sure I understand what you're trying to achieve here. Please elaborate ;) >> >> On 64-bit book3e we compile multiple versions of the TLB miss handlers, >> and choose from them at runtime. > > Why? Because one size does not fit all, and we try to not force a separate kernel build based on what sort of TLB miss handler a piece of hardware wants. Some of the differences are too large to be sanely handled by feature fixups. >> Without this patch, we get duplicate >> label errors if more than one variant of the same exception uses DO_KVM. > > Makes sense. The proposed solution also looks good. Just quickly walk me through the reasoning for the runtime check again please. To start with, you have a TLB miss handler for when partial hardware tablewalk is used (only the final page table level is looked up in hardware, so we still need a TLB miss handler to load indirect entries), and one where that feature is not available. Then you have the "bolted" variant used by e5500, which is faster than the generic version because it doesn't have to deal with recursive faults. So far the bolted version is the only one with DO_KVM. I posted a patch to add another variant, for e6500-style hardware tablewalk, which shares the bolted prolog/epilog (besides prolog/epilog performance, e6500 is incompatible with the IBM tablewalk code for various reasons). That caused us to have two DO_KVMs for the same exception type. -Scott ^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro 2012-09-12 21:54 ` Scott Wood (?) @ 2012-09-13 12:50 ` Caraman Mihai Claudiu-B02008 -1 siblings, 0 replies; 20+ messages in thread From: Caraman Mihai Claudiu-B02008 @ 2012-09-13 12:50 UTC (permalink / raw) To: Wood Scott-B07421, Alexander Graf Cc: <kvm-ppc@vger.kernel.org>, <linuxppc-dev@lists.ozlabs.org>, <kvm@vger.kernel.org> PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBXb29kIFNjb3R0LUIwNzQyMQ0K PiBTZW50OiBUaHVyc2RheSwgU2VwdGVtYmVyIDEzLCAyMDEyIDEyOjU0IEFNDQo+IFRvOiBBbGV4 YW5kZXIgR3JhZg0KPiBDYzogQ2FyYW1hbiBNaWhhaSBDbGF1ZGl1LUIwMjAwODsgPGt2bS1wcGNA dmdlci5rZXJuZWwub3JnPjsgPGxpbnV4cHBjLQ0KPiBkZXZAbGlzdHMub3psYWJzLm9yZz47IDxr dm1Admdlci5rZXJuZWwub3JnPg0KPiBTdWJqZWN0OiBSZTogW1BBVENIXSBLVk06IFBQQzogYm9v a2VodjogQWxsb3cgZHVwbGljYXRlIGNhbGxzIG9mIERPX0tWTQ0KPiBtYWNybw0KPiANCj4gT24g MDkvMTIvMjAxMiAwNDo0NSBQTSwgQWxleGFuZGVyIEdyYWYgd3JvdGU6DQo+ID4NCj4gPg0KPiA+ IE9uIDEyLjA5LjIwMTIsIGF0IDIzOjM4LCBTY290dCBXb29kIDxzY290dHdvb2RAZnJlZXNjYWxl LmNvbT4gd3JvdGU6DQo+ID4NCj4gPj4gT24gMDkvMTIvMjAxMiAwMTo1NiBQTSwgQWxleGFuZGVy IEdyYWYgd3JvdGU6DQo+ID4+Pg0KPiA+P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gZXhjZXB0aW9ucw0KdGhlcmUgYXJlIHRocmVlIGhhbmRsZXIgdmVyc2lvbnM6IHN0YW5kYXJk LCBIVyB0YWJsZXdhbGsgYW5kIGJvbHRlZC4NCg0KPiBJIHBvc3RlZCBhIHBhdGNoIHRvIGFkZCBh bm90aGVyIHZhcmlhbnQsIGZvciBlNjUwMC1zdHlsZSBoYXJkd2FyZQ0KPiB0YWJsZXdhbGssIHdo aWNoIHNoYXJlcyB0aGUgYm9sdGVkIHByb2xvZy9lcGlsb2cgKGJlc2lkZXMgcHJvbG9nL2VwaWxv Zw0KPiBwZXJmb3JtYW5jZSwgZTY1MDAgaXMgaW5jb21wYXRpYmxlIHdpdGggdGhlIElCTSB0YWJs ZXdhbGsgY29kZSBmb3INCj4gdmFyaW91cyByZWFzb25zKS4gIFRoYXQgY2F1c2VkIHVzIHRvIGhh dmUgdHdvIERPX0tWTXMgZm9yIHRoZSBzYW1lDQo+IGV4Y2VwdGlvbiB0eXBlLg0KDQpTb3JyeSwg SSBtaXNzZWQgdG8gY2Mga3ZtLXBwYyBtYWlsaXN0IHdoZW4gSSByZXBsYXllZCB0byB0aGF0IGRp c2N1c3Npb24NCnRocmVhZC4NCg0KLU1pa2UNCg= ^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro @ 2012-09-13 12:50 ` Caraman Mihai Claudiu-B02008 0 siblings, 0 replies; 20+ messages in thread From: Caraman Mihai Claudiu-B02008 @ 2012-09-13 12:50 UTC (permalink / raw) To: Wood Scott-B07421, Alexander Graf Cc: <kvm-ppc@vger.kernel.org>, <linuxppc-dev@lists.ozlabs.org>, <kvm@vger.kernel.org> > -----Original Message----- > From: Wood Scott-B07421 > Sent: Thursday, September 13, 2012 12:54 AM > To: Alexander Graf > Cc: Caraman Mihai Claudiu-B02008; <kvm-ppc@vger.kernel.org>; <linuxppc- > dev@lists.ozlabs.org>; <kvm@vger.kernel.org> > Subject: Re: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM > macro > > On 09/12/2012 04:45 PM, Alexander Graf wrote: > > > > > > On 12.09.2012, at 23:38, Scott Wood <scottwood@freescale.com> wrote: > > > >> On 09/12/2012 01:56 PM, Alexander Graf wrote: > >>> > >>> > >>> On 12.09.2012, at 15:18, Mihai Caraman <mihai.caraman@freescale.com> > wrote: > >>> > >>>> The current form of DO_KVM macro restricts its use to one call per > input > >>>> parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 > symbol > >>>> definition. > >>>> Duplicate calls of DO_KVM are required by distinct implementations > of > >>>> exeption handlers which are delegated at runtime. > >>> > >>> Not sure I understand what you're trying to achieve here. Please > elaborate ;) > >> > >> On 64-bit book3e we compile multiple versions of the TLB miss > handlers, > >> and choose from them at runtime. The exception handler patching is active in __early_init_mmu() function powerpc/mm/tlb_nohash.c for quite a few years. For tlb miss exceptions there are three handler versions: standard, HW tablewalk and bolted. > I posted a patch to add another variant, for e6500-style hardware > tablewalk, which shares the bolted prolog/epilog (besides prolog/epilog > performance, e6500 is incompatible with the IBM tablewalk code for > various reasons). That caused us to have two DO_KVMs for the same > exception type. Sorry, I missed to cc kvm-ppc mailist when I replayed to that discussion thread. -Mike ^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro @ 2012-09-13 12:50 ` Caraman Mihai Claudiu-B02008 0 siblings, 0 replies; 20+ messages in thread From: Caraman Mihai Claudiu-B02008 @ 2012-09-13 12:50 UTC (permalink / raw) To: Wood Scott-B07421, Alexander Graf Cc: <linuxppc-dev@lists.ozlabs.org>, <kvm@vger.kernel.org>, <kvm-ppc@vger.kernel.org> PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBXb29kIFNjb3R0LUIwNzQyMQ0K PiBTZW50OiBUaHVyc2RheSwgU2VwdGVtYmVyIDEzLCAyMDEyIDEyOjU0IEFNDQo+IFRvOiBB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1lDQo+IGV4Y2VwdGlvbiB0eXBlLg0KDQpTb3JyeSwg SSBtaXNzZWQgdG8gY2Mga3ZtLXBwYyBtYWlsaXN0IHdoZW4gSSByZXBsYXllZCB0byB0aGF0IGRp c2N1c3Npb24NCnRocmVhZC4NCg0KLU1pa2UNCg== ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro 2012-09-12 13:18 ` Mihai Caraman (?) @ 2012-09-13 15:02 ` Alexander Graf -1 siblings, 0 replies; 20+ messages in thread From: Alexander Graf @ 2012-09-13 15:02 UTC (permalink / raw) To: Mihai Caraman; +Cc: kvm-ppc, linuxppc-dev, kvm On 09/12/2012 03:18 PM, Mihai Caraman wrote: > The current form of DO_KVM macro restricts its use to one call per input > parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol > definition. > Duplicate calls of DO_KVM are required by distinct implementations of > exeption handlers which are delegated at runtime. Use a rare label number > to avoid conflicts with the calling contexts. > > Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com> Thanks, applied to kvm-ppc-next. Alex ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro @ 2012-09-13 15:02 ` Alexander Graf 0 siblings, 0 replies; 20+ messages in thread From: Alexander Graf @ 2012-09-13 15:02 UTC (permalink / raw) To: Mihai Caraman; +Cc: kvm-ppc, linuxppc-dev, kvm On 09/12/2012 03:18 PM, Mihai Caraman wrote: > The current form of DO_KVM macro restricts its use to one call per input > parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol > definition. > Duplicate calls of DO_KVM are required by distinct implementations of > exeption handlers which are delegated at runtime. Use a rare label number > to avoid conflicts with the calling contexts. > > Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com> Thanks, applied to kvm-ppc-next. Alex ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro @ 2012-09-13 15:02 ` Alexander Graf 0 siblings, 0 replies; 20+ messages in thread From: Alexander Graf @ 2012-09-13 15:02 UTC (permalink / raw) To: Mihai Caraman; +Cc: linuxppc-dev, kvm, kvm-ppc On 09/12/2012 03:18 PM, Mihai Caraman wrote: > The current form of DO_KVM macro restricts its use to one call per input > parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol > definition. > Duplicate calls of DO_KVM are required by distinct implementations of > exeption handlers which are delegated at runtime. Use a rare label number > to avoid conflicts with the calling contexts. > > Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com> Thanks, applied to kvm-ppc-next. Alex ^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2012-09-13 15:02 UTC | newest] Thread overview: 20+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-09-12 13:18 [PATCH] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro Mihai Caraman 2012-09-12 13:18 ` Mihai Caraman 2012-09-12 13:18 ` Mihai Caraman 2012-09-12 18:56 ` Alexander Graf 2012-09-12 18:56 ` Alexander Graf 2012-09-12 18:56 ` Alexander Graf 2012-09-12 21:38 ` Scott Wood 2012-09-12 21:38 ` Scott Wood 2012-09-12 21:45 ` Alexander Graf 2012-09-12 21:45 ` Alexander Graf 2012-09-12 21:45 ` Alexander Graf 2012-09-12 21:54 ` Scott Wood 2012-09-12 21:54 ` Scott Wood 2012-09-12 21:54 ` Scott Wood 2012-09-13 12:50 ` Caraman Mihai Claudiu-B02008 2012-09-13 12:50 ` Caraman Mihai Claudiu-B02008 2012-09-13 12:50 ` Caraman Mihai Claudiu-B02008 2012-09-13 15:02 ` Alexander Graf 2012-09-13 15:02 ` Alexander Graf 2012-09-13 15:02 ` Alexander Graf
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.