From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mihai =?UTF-8?Q?Don=C8=9Bu?= Subject: Re: [RFC PATCH 11/19] kvm: x86: Hook in kvmi_breakpoint_event() Date: Wed, 21 Jun 2017 15:37:21 +0300 Message-ID: <1498048641.24580.30.camel@bitdefender.com> References: <20170616134348.17725-1-alazar@bitdefender.com> <20170616134348.17725-12-alazar@bitdefender.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Cc: Radim =?UTF-8?Q?Kr=C4=8Dm=C3=A1=C5=99?= , Adalbert Lazar , kvm@vger.kernel.org To: Paolo Bonzini Return-path: Received: from mx01.bbu.dsd.mx.bitdefender.com ([91.199.104.161]:41338 "EHLO mx01.bbu.dsd.mx.bitdefender.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750823AbdFUMh3 (ORCPT ); Wed, 21 Jun 2017 08:37:29 -0400 Received: from smtp02.buh.bitdefender.net (smtp.bitdefender.biz [10.17.80.76]) by mx-sr.buh.bitdefender.com (Postfix) with ESMTP id 2C7AC7FC04 for ; Wed, 21 Jun 2017 15:37:27 +0300 (EEST) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 2017-06-21 at 13:48 +0200, Paolo Bonzini wrote: > On 16/06/2017 15:43, Adalbert Lazar wrote: > > +int kvm_breakpoint(struct kvm_vcpu *vcpu) > > +{ > > + gpa_t gpa; > > + struct kvm_segment cs; > > + > > + kvm_get_segment(vcpu, &cs, VCPU_SREG_CS); > > + gpa = kvm_mmu_gva_to_gpa_read(vcpu, cs.base + > > kvm_rip_read(vcpu), NULL); > > + if (kvmi_breakpoint_event(vcpu, gpa)) > > + return 0; > > + return 1; > > +} > > +EXPORT_SYMBOL_GPL(kvm_breakpoint); > > + > > Please create a separate file with all these functions. > x86.c/vmx.c/svm.c are already too big, let's not make it worse. Noted. Thank you! -- Mihai Donțu