From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 3/5] kvm/svm: enhance mov DR intercept handler Date: Thu, 16 Dec 2010 14:48:17 +0200 Message-ID: <4D0A0A91.8060709@redhat.com> References: <1291989088-1380-1-git-send-email-andre.przywara@amd.com> <1291989088-1380-4-git-send-email-andre.przywara@amd.com> <4D060E40.60308@redhat.com> <4D0A0106.5080005@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "mtosatti@redhat.com" , "kvm@vger.kernel.org" To: Andre Przywara Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46512 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753230Ab0LPMsW (ORCPT ); Thu, 16 Dec 2010 07:48:22 -0500 In-Reply-To: <4D0A0106.5080005@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/16/2010 02:07 PM, Andre Przywara wrote: > Avi Kivity wrote: >> On 12/10/2010 03:51 PM, Andre Przywara wrote: >>> Newer SVM implementations provide the GPR number in the VMCB, so >>> that the emulation path is no longer necesarry to handle debug >>> register access intercepts. Implement the handling in svm.c and >>> use it when the info is provided. >>> >>> + >>> + if (!err) >>> + skip_emulated_instruction(&svm->vcpu); >>> + else >>> + kvm_inject_gp(&svm->vcpu, 0); >>> + >> >> This repeats, how about using complete_insn_gp()? > Do you want this to be in x86.c? Yes. > We could use kvm_x86_ops->skip_emulated_instruction. > Also shall I look for more similarities in the [CD]R intercept > handling code between VMX and SVM? The switch responsible for actually > reading and writing the regs is very similar. I could also try to > merge this with the functionality in the emulator (if that works, > haven't checked) > Let's get DecodeAssist merged first, and do more unification afterwards. -- error compiling committee.c: too many arguments to function