Re: [PATCH] x86/kconfig/32: Mark CONFIG_VM86 as BROKEN
From: Paolo Bonzini
Date: Fri Jul 10 2015 - 10:24:26 EST
On 10/07/2015 16:13, Ingo Molnar wrote:
> > This isn't hard, at least for Intel: make emulation_required() return true
> > always (and fix the fallout). However, it's not necessary. The emulator is
> > designed to be independent from the rest of KVM. At some point I think Avi was
> > testing it in userspace (or planning to do so). So you would just move it from
> > arch/x86/kvm to arch/x86/emulate.
>
> Very nice!
Thanks. :) Mostly on behalf of the former maintainers---and the Xen
folks too, the emulator has its roots there.
So, the starting point for hooking into the emulator is struct
x86_emulate_ops (in asm/kvm_emulate.h) and the function that calls into
it in KVM is x86_emulate_instruction. You can look there to see how the
emulator can be used. If it doesn't compile straight away in userspace,
I'll gladly accept patches.
There are parts of emulation that are actually done (for simplicity and
laziness) in x86_emulate_instruction rather than emulate.c, most notably
hardware debugging support, but these aren't really needed for an
initial prototype of vm86.
A lot of the stuff in x86_emulate_instruction isn't necessary for vm86
and can be WARN()ed away, because for example IN/OUT always cause a #GP
in vm86 mode.
Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/