From: Paul Mackerras Date: Wed, 02 Sep 2020 02:01:24 +0000 Subject: Re: [PATCH 2/7] powerpc/watchpoint/kvm: Add infrastructure to support 2nd DAWR Message-Id: <20200902020124.GB272502@thinks.paulus.ozlabs.org> List-Id: References: <20200723102058.312282-1-ravi.bangoria@linux.ibm.com> <20200723102058.312282-3-ravi.bangoria@linux.ibm.com> In-Reply-To: <20200723102058.312282-3-ravi.bangoria@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Ravi Bangoria Cc: mpe@ellerman.id.au, mikey@neuling.org, npiggin@gmail.com, pbonzini@redhat.com, christophe.leroy@c-s.fr, jniethe5@gmail.com, pedromfc@br.ibm.com, rogealve@br.ibm.com, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kselftest@vger.kernel.org On Thu, Jul 23, 2020 at 03:50:53PM +0530, Ravi Bangoria wrote: > kvm code assumes single DAWR everywhere. Add code to support 2nd DAWR. > DAWR is a hypervisor resource and thus H_SET_MODE hcall is used to set/ > unset it. Introduce new case H_SET_MODE_RESOURCE_SET_DAWR1 for 2nd DAWR. Is this the same interface as will be defined in PAPR and available under PowerVM, or is it a new/different interface for KVM? > Also, kvm will support 2nd DAWR only if CPU_FTR_DAWR1 is set. In general QEMU wants to be able to control all aspects of the virtual machine presented to the guest, meaning that just because a host has a particular hardware capability does not mean we should automatically present that capability to the guest. In this case, QEMU will want a way to control whether the guest sees the availability of the second DAWR/X registers or not, i.e. whether a H_SET_MODE to set DAWR[X]1 will succeed or fail. Paul.