[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <51ADF44E.40100@redhat.com>
Date: Tue, 04 Jun 2013 16:06:06 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Gleb Natapov <gleb@...hat.com>
CC: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
jan.kiszka@...mens.com
Subject: Re: [PATCH 1/2] KVM: x86: handle hardware breakpoints during emulation
Il 04/06/2013 14:53, Gleb Natapov ha scritto:
>> >
> Yeah. What about:
> if ((dr6 = guest_debug()))
> return handle_gues_debug();
> else if ((dr6 = check_bp()))
> return handle_bp(dr6);
I'll try either this...
>>>> > >> If you do not want EMULATE_PROCEED, I can just use -1 instead in
>>>> > >> kvm_vcpu_check_breakpoint, and return if r < 0.
>>>> > >>
>>> > > But you need to know what to return EMULATE_DONE or EMULATE_USER_EXIT.
>> >
>> > Sorry, _not_ return if r < 0.
>> >
> Function that returns enum or -1? This is worse IMO. Return
> EMULATE_DONE/EMULATE_USER_EXIT via a pointer will be better.
... or this, and see what looks nicer. But I like
if (check_bp(&r))
return r;
Thanks for the review.
Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists