From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [kvm-devel] [RFC][PATCH 2/4] kvm: Arch-specifc KVM_EXIT_DEBUG payload Date: Wed, 21 May 2008 19:04:48 +0300 Message-ID: <48344820.60103@qumranet.com> References: <482D9198.7040801@web.de> <482DAFF6.3050403@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm-devel , Hollis Blanchard To: Jan Kiszka Return-path: In-Reply-To: <482DAFF6.3050403@web.de> Sender: kvm-owner@vger.kernel.org List-ID: Jan Kiszka wrote: > This adds an arch field to kvm_run.debug, the payload that is returned > to user space on KVM_EXIT_DEBUG guest exits. For x86, this field is now > supposed to report the precise debug exception (#DB or #BP) and the > current state of the debug registers (the latter is not yet > implemented). > > +struct kvm_debug_exit_arch { > + __u32 exception; > Need padding here. > + __u64 dr[8]; > +}; > + > In general I prefer decoding bitfields into something more usable (see for example the segment registers), but in this case, I guess the raw registers are better. We need to handle branch tracing and last branch recording as well. It doesn't have to be in this patchset, though. -- error compiling committee.c: too many arguments to function