Re: [patch 1/4] KVM: MMU audit: update count_writable_mappings / count_rmaps

Avi Kivity
2009-06-09T12:40:59Z

Marcelo Tosatti wrote:
>> Semi-related: we should set up a new exit code to halt the VM so it can
>> be inspected, otherwise all those printks and dump_stack()s will quickly
>> overwhelm the logging facilities.
>>
>
> Can you clarify on the halt exit code?
>

set a bit that tells KVM_RUN to quit (like KVM_EXIT_UNKNOWN), when
userspace sees it it vm_stop()s, waiting for someone to dig in.

Clean logs, clean state.

> Because for other exit codes which similar behaviour is wanted, say,
> unhandled vm exit, the policy can be handled in userspace (and the
> decision to halt or not seems better suited to happen there). So perhaps
> KVM_EXIT_MMU_AUDIT_FAILED?
>

Yes, the name was bad. We can do KVM_EXIT_INTERNAL_ERROR and have a
maintainer_name field in the union to choose who will handle it.

> I wondered before whether it would be good to stop auditing on the first
> error, but gave up on the idea.
>

It's harder without exceptions.

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