Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Remove QEMU TSS-hack from cpu.c #310

Open
leecher1337 opened this issue Aug 2, 2020 · 3 comments
Open

Remove QEMU TSS-hack from cpu.c #310

leecher1337 opened this issue Aug 2, 2020 · 3 comments

Comments

@leecher1337
Copy link
Contributor

When using QMEU, I found out that I always got crashes when using a 16bit TSS.
It took me quite some time to narrow it down to this ugly hack in cpu.c:

haxm/core/cpu.c

Line 379 in 7b7c1b3

/* sometimes, the TSS segment type from qemu is not right.

I now disabled it with an #ifdef in my branch:
leecher1337@45db4b0

I think it would be better to make some IOCTL for enabling/disabling this hack so that HAXM also stays usable for applications besides QEMU.

@nevilad
Copy link
Contributor

nevilad commented Aug 6, 2020

Without this code MacOS will not run, see #250. In MacOS the modified selector is not from QEMU, but from the guest itself.

HAXM also stays usable for applications besides QEMU.
You write you used it with QEMU, why do you mention other applications?

@leecher1337
Copy link
Contributor Author

And with this code, i.e. dosx DOS DPMI-extender will crash, as its 16bit TSS gets corrupted.

So the reason for the above mentioned behaviour i.e. by MacOS has to be found and fixed, a real CPU also doesn't tinker with the TSS, so this must be due to some bug that needs to be found instead of inserting a hack into the code.
As a last resort, this fix can be made optional via configuration settings, but I consider doing such a hack by default as a bad decision.

@jackkrong
Copy link

I want to subscaibe

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants