Hollis Blanchard wrote:
In addition to injecting debug interrupts, qemu should also be able to inject machine checks, for the case of undecoded MMIO accesses.

As long as qemu can access the complete register state (e.g. including "reason for machine check" registers), I don't think the injection interface *needs* to be more complicated than "exception number".

OTOH, I can see the argument for atomic injection operations, so to support that you'd end up with a sub-structure like kvm_exit, something like:

struct kvm_inject_arch {
        u32 exception_type;
        union {
                struct machine_check {
                        u32 mcsr;
                } mc;
                struct debug {
                } debug;
        };
}

This stuff is completely arch-specific, so making a common "inject" ioctl number that simply calls arch function (like GET_SREGS) would be appropriate.


In the mmio case, I think it makes more sense to have a 'mmio failed' flag, and kvm can generate and inject the exception.

We mostly try to keep cpu emulation outside userspace.

(of course, that depends on what happens on real hardware. Is there a machine check pin? or does the cpu generate the exception internally?)

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to