-
Notifications
You must be signed in to change notification settings - Fork 884
Exception interface for supervisor #199
base: master
Are you sure you want to change the base?
Conversation
…TER_GS, is it VMX_EXIT_TRIPLE_FAULT? We want to know!
… to supervisor. This is i.e. needed for BOPping in NTVDM (VECTOR_UD) or for Interrupt hooking (VERTOR_NP). So this generic call could be useful for hypervisors.
Sorry, but a lot of whitespace issues (tabs vs spaces). |
core/memslot.c
Outdated
memslot_init(dest, src); | ||
dest->entry = entry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for @leecher1337 shooting the root cause! For performance reasons, it is recommended to get rid of memslot_init() invocation to avoid assigning dest->entry 3 times within this function. I drafted the commit message for your reference. The following code should be equivalent for your reference. Thanks again.
Fix a bug of memslot_move()
Invoking memslot_init() in memslot_move() will result in losing the
linked list information of the original memory slot node. Reimplement
memslot_move() to resolve some exceptional issues during mapping memory
slots.
static inline void memslot_move(hax_memslot *dest, hax_memslot *src)
{
ramblock_deref(dest->block);
src->entry = dest->entry;
*dest = *src;
ramblock_ref(dest->block);
}
…sign considerations for calling memslot_init
core/memslot.c
Outdated
dest->entry = entry; | ||
static inline void memslot_move(hax_memslot *dest, hax_memslot *src) | ||
{ | ||
ramblock_deref(dest->block); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the current coding style, it is recommended to use 4 spaces as indent.
Bugfix description: Invoking memslot_init() in memslot_move() will result in losing the linked list information of the original memory slot node. Reimplement memslot_move() to resolve some exceptional issues during mapping memory slots.
core/cpu.c
Outdated
@@ -222,6 +222,7 @@ bool vcpu_is_panic(struct vcpu_t *vcpu) | |||
if (vcpu->panicked) { | |||
hax_error("vcpu has panicked, id:%d\n", vcpu->vcpu_id); | |||
hax_panic_log(vcpu); | |||
htun->_exit_reason = vmx(vcpu, exit_reason).basic_reason; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use spaces
htun->_exit_reason = vmx(vcpu, exit_reason).basic_reason; | |
htun->_exit_reason = vmx(vcpu, exit_reason).basic_reason; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, hopefully this was the last tab vs. space issue, I did a grep on \t now and didn't find any more areas
@leecher1337, we are preparing a new release and this pull request #199 needs more time to review from my colleagues. Do you agree to submit a separate pull request for memslot.c to fix the memslot_move() bug? We would like to merge this patch first in this release. The below title and content of commit message are for your reference. And remember to add 'Signed-off-by' signature in commit message. Thanks. memslot: Fix a bug of memslot_move() Invoking memslot_init() in memslot_move() will result in losing the |
@leecher1337 I just found your amazing project https://github.com/leecher1337/ntvdmx64 . Can I assume that you are adding VT support using HAXM? Besides the README in the project, is there any additional step I should take to test you HAXM implementation? I'd like to test NTVDMx64 and check the HAXM issue you mentioned. |
core/vcpu.c
Outdated
void vcpu_setexcbmp(struct vcpu_t *vcpu, uint32_t excbmp) | ||
{ | ||
vcpu->user_excbmp = excbmp; | ||
hax_log(HAX_LOGE, "set user_excbmp = %08X", vcpu->user_excbmp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tab -> spaces
…e spaces instead of tabs on a PER-PROJECT basis? (EditorConfig possibly?)
@coxuintel
|
For the rendering performance issue, XPDM or WDDM may not be the root cause from my point of view. In Vista or Win7, WDDM is the default graphics driver model. Unless you force install a XPDM driver onto the graphics adapter, the GPU works in WDDM model. So it may be due to the removed support of video BIOS INT call or something else, but not the XPDM or WDDM difference. I'm thinking, if it's possible to "translate" the real mode drawing to simply memory write, then use Direct2D or Direct3D to blit the content to expected place so that you can leverage GPU HW acceleration. |
The removal of the ability to pass through the MMIO area to the real video adapter (possibly, because all rendering is now done via the GPU und therefore switch to VGA mode isn't supported) removed the drawing possibilities of NTVDM.
Yes, it's completely unusable in this regard as soon as QEMU uses HAXM. Without HAXM with the emulated CPU, it's OK. |
@coxuintel HAXM-build of NTVDMx64 is now available. Just check doc\haxm.txt for details. |
@coxuintel Compilation process has now been simplified, maybe this facilitates testing for you? |
Needs rebase. |
I'll leave that as an excercise to the maintainer, as it is a lot of work (we have conflicting files now) and I have no idea when maintainer will apply the pull request (maybe it takes another year?), so it's not worth the effort. |
563eb1b
to
6b942e3
Compare
b73a231
to
da1b8ec
Compare
When implementing HAXM into NTVDMx64, I experienced the need to tell HAXM some exit NMI vectors that I needed to handle (for instance, handle an invalid exception to be able to handle BOPs by client code).
Therefore I would consider it useful to have such an interface.