Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 106858 Details for
Bug 161963
app-emulation/qemu-softmmu-0.8.2 CPU won't run solaris guest with a 64 bit ABI
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch with the changes needed pulled from CVS
qemu-0.8.2-amd64_solaris.patch (text/plain), 4.80 KB, created by
Carlo Marcelo Arenas Belon
on 2007-01-13 22:21:08 UTC
(
hide
)
Description:
patch with the changes needed pulled from CVS
Filename:
MIME Type:
Creator:
Carlo Marcelo Arenas Belon
Created:
2007-01-13 22:21:08 UTC
Size:
4.80 KB
patch
obsolete
>Index: target-i386/cpu.h >=================================================================== >RCS file: /sources/qemu/qemu/target-i386/cpu.h,v >--- target-i386/cpu.h 24 Sep 2006 18:40:46 -0000 1.37 >+++ target-i386/cpu.h 27 Sep 2006 19:54:02 -0000 1.38 >@@ -260,6 +260,7 @@ > #define CPUID_MCA (1 << 14) > #define CPUID_CMOV (1 << 15) > #define CPUID_PAT (1 << 16) >+#define CPUID_PSE36 (1 << 17) > #define CPUID_CLFLUSH (1 << 19) > /* ... */ > #define CPUID_MMX (1 << 23) >@@ -543,7 +544,8 @@ > cache: it synchronizes the hflags with the segment cache values */ > static inline void cpu_x86_load_seg_cache(CPUX86State *env, > int seg_reg, unsigned int selector, >- uint32_t base, unsigned int limit, >+ target_ulong base, >+ unsigned int limit, > unsigned int flags) > { > SegmentCache *sc; >Index: target-i386/helper.c >=================================================================== >RCS file: /sources/qemu/qemu/target-i386/helper.c,v >--- target-i386/helper.c 27 Sep 2006 21:31:59 -0000 1.72 >+++ target-i386/helper.c 29 Sep 2006 20:01:17 -0000 1.73 >@@ -553,6 +553,20 @@ > return 0xffff; > } > >+#ifdef TARGET_X86_64 >+#define SET_ESP(val, sp_mask)\ >+do {\ >+ if ((sp_mask) == 0xffff)\ >+ ESP = (ESP & ~0xffff) | ((val) & 0xffff);\ >+ else if ((sp_mask) == 0xffffffffLL)\ >+ ESP = (uint32_t)(val);\ >+ else\ >+ ESP = (val);\ >+} while (0) >+#else >+#define SET_ESP(val, sp_mask) ESP = (ESP & ~(sp_mask)) | ((val) & (sp_mask)) >+#endif >+ > /* XXX: add a is_user flag to have proper security support */ > #define PUSHW(ssp, sp, sp_mask, val)\ > {\ >@@ -584,10 +598,10 @@ > { > SegmentCache *dt; > target_ulong ptr, ssp; >- int type, dpl, selector, ss_dpl, cpl, sp_mask; >+ int type, dpl, selector, ss_dpl, cpl; > int has_error_code, new_stack, shift; > uint32_t e1, e2, offset, ss, esp, ss_e1, ss_e2; >- uint32_t old_eip; >+ uint32_t old_eip, sp_mask; > > has_error_code = 0; > if (!is_int && !is_hw) { >@@ -623,7 +637,8 @@ > raise_exception_err(EXCP0B_NOSEG, intno * 8 + 2); > switch_tss(intno * 8, e1, e2, SWITCH_TSS_CALL, old_eip); > if (has_error_code) { >- int mask, type; >+ int type; >+ uint32_t mask; > /* push the error code */ > type = (env->tr.flags >> DESC_TYPE_SHIFT) & 0xf; > shift = type >> 3; >@@ -637,7 +652,7 @@ > stl_kernel(ssp, error_code); > else > stw_kernel(ssp, error_code); >- ESP = (esp & mask) | (ESP & ~mask); >+ SET_ESP(esp, mask); > } > return; > case 6: /* 286 interrupt gate */ >@@ -765,7 +780,7 @@ > cpu_x86_load_seg_cache(env, R_SS, ss, > ssp, get_seg_limit(ss_e1, ss_e2), ss_e2); > } >- ESP = (ESP & ~sp_mask) | (esp & sp_mask); >+ SET_ESP(esp, sp_mask); > > selector = (selector & ~3) | dpl; > cpu_x86_load_seg_cache(env, R_CS, selector, >@@ -2015,7 +2030,7 @@ > PUSHW(ssp, esp, esp_mask, next_eip); > } > >- ESP = (ESP & ~esp_mask) | (esp & esp_mask); >+ SET_ESP(esp, esp_mask); > env->eip = new_eip; > env->segs[R_CS].selector = new_cs; > env->segs[R_CS].base = (new_cs << 4); >@@ -2101,7 +2116,7 @@ > if (new_eip > limit) > raise_exception_err(EXCP0D_GPF, new_cs & 0xfffc); > /* from this point, not restartable */ >- ESP = (ESP & ~sp_mask) | (sp & sp_mask); >+ SET_ESP(sp, sp_mask); > cpu_x86_load_seg_cache(env, R_CS, (new_cs & 0xfffc) | cpl, > get_seg_base(e1, e2), limit, e2); > EIP = new_eip; >@@ -2230,7 +2245,7 @@ > get_seg_limit(e1, e2), > e2); > cpu_x86_set_cpl(env, dpl); >- ESP = (ESP & ~sp_mask) | (sp & sp_mask); >+ SET_ESP(sp, sp_mask); > EIP = offset; > } > #ifdef USE_KQEMU >@@ -2459,7 +2474,7 @@ > > sp += addend; > } >- ESP = (ESP & ~sp_mask) | (sp & sp_mask); >+ SET_ESP(sp, sp_mask); > env->eip = new_eip; > if (is_iret) { > /* NOTE: 'cpl' is the _old_ CPL */ >Index: target-i386/helper2.c >=================================================================== >RCS file: /sources/qemu/qemu/target-i386/helper2.c,v >--- target-i386/helper2.c 24 Sep 2006 18:40:46 -0000 1.44 >+++ target-i386/helper2.c 27 Sep 2006 19:52:41 -0000 1.45 >@@ -135,6 +135,8 @@ > > /* these features are needed for Win64 and aren't fully implemented */ > env->cpuid_features |= CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA; >+ /* this feature is needed for Solaris and isn't fully implemented */ >+ env->cpuid_features |= CPUID_PSE36; > #endif > } > cpu_reset(env);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 161963
: 106858