Message ID | 1398329494-33114-4-git-send-email-jfrei@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
On 04/24/2014 03:40 PM, Alexander Graf wrote: > > On 24.04.14 10:51, Jens Freimann wrote: >> From: Thomas Huth <thuth@linux.vnet.ibm.com> >> >> With the EDAT-1 facility, the MMU translation can stop at the >> segment table already, pointing to a 1 MB block. >> >> Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> >> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> >> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> >> --- >> target-s390x/helper.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/target-s390x/helper.c b/target-s390x/helper.c >> index ddf268e..4f2279f 100644 >> --- a/target-s390x/helper.c >> +++ b/target-s390x/helper.c >> @@ -231,6 +231,10 @@ static int mmu_translate_asce(CPUS390XState >> *env, target_ulong vaddr, >> offs = (vaddr >> 17) & 0x3ff8; >> break; >> case _ASCE_TYPE_SEGMENT: >> + if (env && (env->cregs[0] & 0x800000) && (asce & 0x400)) { >> /* FC? */ > > Please convert these into #defines. > ok, we'll change that. Thanks for the review! Jens > > Alex > >> + *raddr = (asce & 0xfffffffffff00000ULL) | (vaddr & >> 0xfffff); >> + return 0; >> + } >> offs = (vaddr >> 9) & 0x07f8; >> origin = asce & _SEGMENT_ENTRY_ORIGIN; >> break; >
diff --git a/target-s390x/helper.c b/target-s390x/helper.c index ddf268e..4f2279f 100644 --- a/target-s390x/helper.c +++ b/target-s390x/helper.c @@ -231,6 +231,10 @@ static int mmu_translate_asce(CPUS390XState *env, target_ulong vaddr, offs = (vaddr >> 17) & 0x3ff8; break; case _ASCE_TYPE_SEGMENT: + if (env && (env->cregs[0] & 0x800000) && (asce & 0x400)) { /* FC? */ + *raddr = (asce & 0xfffffffffff00000ULL) | (vaddr & 0xfffff); + return 0; + } offs = (vaddr >> 9) & 0x07f8; origin = asce & _SEGMENT_ENTRY_ORIGIN; break;