From: Paolo Bonzini Subject: Re: [RFC PATCH 11/19] kvm: x86: Hook in kvmi_breakpoint_event() Date: Wed, 21 Jun 2017 13:48:01 +0200 Message-ID: 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: 7bit Cc: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , mdontu@bitdefender.com To: Adalbert Lazar , kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:47102 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750823AbdFULsE (ORCPT ); Wed, 21 Jun 2017 07:48:04 -0400 In-Reply-To: <20170616134348.17725-12-alazar@bitdefender.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: 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. Paolo