Re: [PATCH v2 2/2] KVM: arm64: Don't access PMSELR_EL0/PMUSERENR_EL0 when no PMU is available

2021-02-18 Thread Alexandru Elisei
Hi Marc, On 2/9/21 11:48 AM, Marc Zyngier wrote: > When running under a nesting hypervisor, it isn't guaranteed that > the virtual HW will include a PMU. In which case, let's not try > to access the PMU registers in the world switch, as that'd be > deadly. > > Reported-by: Andre Przywara >

Re: [PATCH v2 1/2] KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key

2021-02-18 Thread Alexandru Elisei
Hi Marc, On 2/9/21 11:48 AM, Marc Zyngier wrote: > We currently find out about the presence of a HW PMU (or the handling > of that PMU by perf, which amounts to the same thing) in a fairly > roundabout way, by checking the number of counters available to perf. > That's good enough for now, but we

Re: [PATCH kvmtool 21/21] hw/rtc: ARM/arm64: Use MMIO at higher addresses

2021-02-18 Thread Andre Przywara
On Thu, 18 Feb 2021 13:33:15 + Alexandru Elisei wrote: > Hi Andre, > > On 12/10/20 2:29 PM, Andre Przywara wrote: > > Using the RTC device at its legacy I/O address as set by IBM in 1981 > > was a kludge we used for simplicity on ARM platforms as well. > > However this imposes problems due

Re: [PATCH kvmtool 20/21] hw/serial: ARM/arm64: Use MMIO at higher addresses

2021-02-18 Thread Andre Przywara
On Thu, 18 Feb 2021 12:18:38 + Alexandru Elisei wrote: > Hi Andre, > > On 2/17/21 4:48 PM, Alexandru Elisei wrote: > > Hi Andre, > > > > On 12/10/20 2:29 PM, Andre Przywara wrote: > >> Using the UART devices at their legacy I/O addresses as set by IBM in > >> 1981 was a kludge we used for

Re: [PATCH kvmtool 19/21] Remove ioport specific routines

2021-02-18 Thread Andre Przywara
On Wed, 17 Feb 2021 16:11:51 + Alexandru Elisei wrote: > Hi Andre, > > On 2/17/21 3:49 PM, Alexandru Elisei wrote: > > Hi Andre, > > > > On 12/10/20 2:29 PM, Andre Przywara wrote: > >> Now that all users of the dedicated ioport trap handler interface are > >> gone, we can retire the code

Re: [PATCH kvmtool 17/21] virtio: Switch trap handling to use MMIO handler

2021-02-18 Thread Andre Przywara
On Tue, 16 Feb 2021 17:03:04 + Alexandru Elisei wrote: > Hi Andre, > > Nitpick below, otherwise looks good. > > On 12/10/20 2:29 PM, Andre Przywara wrote: > > With the planned retirement of the special ioport emulation code, we > > need to provide an emulation function compatible with the

Re: [PATCH kvmtool 15/21] vfio: Refactor ioport trap handler

2021-02-18 Thread Andre Przywara
On Tue, 16 Feb 2021 14:47:31 + Alexandru Elisei wrote: > Hi Andre, > > Looks good, one nitpick below. > > On 12/10/20 2:29 PM, Andre Przywara wrote: > > With the planned retirement of the special ioport emulation code, we > > need to provide an emulation function compatible with the MMIO

Re: [PATCH kvmtool 13/21] hw/serial: Refactor trap handler

2021-02-18 Thread Andre Przywara
On Tue, 16 Feb 2021 14:22:05 + Alexandru Elisei wrote: > Hi Andre, > > Patch looks good, nitpicks below. > > On 12/10/20 2:29 PM, Andre Przywara wrote: > > With the planned retirement of the special ioport emulation code, we > > need to provide an emulation function compatible with the

Re: [PATCH kvmtool 09/21] x86/ioport: Switch to new trap handlers

2021-02-18 Thread Andre Przywara
On Fri, 12 Feb 2021 11:27:59 + Alexandru Elisei wrote: Hi Alex, > On 12/10/20 2:28 PM, Andre Przywara wrote: > > Now that the x86 I/O ports have trap handlers adhering to the MMIO fault > > handler prototype, let's switch over to the joint registration routine. > > > > This allows us to get

Re: [PATCH kvmtool 21/21] hw/rtc: ARM/arm64: Use MMIO at higher addresses

2021-02-18 Thread Alexandru Elisei
Hi Andre, On 12/10/20 2:29 PM, Andre Przywara wrote: > Using the RTC device at its legacy I/O address as set by IBM in 1981 > was a kludge we used for simplicity on ARM platforms as well. > However this imposes problems due to their missing alignment and overlap > with the PCI I/O address space.

Re: [PATCH kvmtool 20/21] hw/serial: ARM/arm64: Use MMIO at higher addresses

2021-02-18 Thread Alexandru Elisei
Hi Andre, On 2/17/21 4:48 PM, Alexandru Elisei wrote: > Hi Andre, > > On 12/10/20 2:29 PM, Andre Przywara wrote: >> Using the UART devices at their legacy I/O addresses as set by IBM in >> 1981 was a kludge we used for simplicity on ARM platforms as well. >> However this imposes problems due to

Re: [PATCH kvmtool 07/21] hw/i8042: Switch to new trap handlers

2021-02-18 Thread Andre Przywara
On Fri, 12 Feb 2021 10:41:20 + Alexandru Elisei wrote: Hi, > On 12/10/20 2:28 PM, Andre Przywara wrote: > > Now that the PC keyboard has a trap handler adhering to the MMIO fault > > handler prototype, let's switch over to the joint registration routine. > > > > This allows us to get rid of

Re: [PATCH kvmtool 06/21] hw/i8042: Refactor trap handler

2021-02-18 Thread Andre Przywara
On Thu, 18 Feb 2021 11:17:58 + Alexandru Elisei wrote: > Hi Andre, > > On 2/18/21 10:34 AM, Andre Przywara wrote: > > On Thu, 11 Feb 2021 17:23:13 + > > Alexandru Elisei wrote: > > > >> Hi Andre, > >> > >> On 12/10/20 2:28 PM, Andre Przywara wrote: > >>> With the planned retirement

Re: [PATCH kvmtool 06/21] hw/i8042: Refactor trap handler

2021-02-18 Thread Alexandru Elisei
Hi Andre, On 2/18/21 10:34 AM, Andre Przywara wrote: > On Thu, 11 Feb 2021 17:23:13 + > Alexandru Elisei wrote: > >> Hi Andre, >> >> On 12/10/20 2:28 PM, Andre Przywara wrote: >>> With the planned retirement of the special ioport emulation code, we >>> need to provide an emulation function

Re: [PATCH v11 12/13] vfio/pci: Register a DMA fault response region

2021-02-18 Thread Auger Eric
Hi Shameer, On 2/18/21 11:36 AM, Shameerali Kolothum Thodi wrote: > Hi Eric, > >>> -Original Message- >>> From: Eric Auger [mailto:eric.au...@redhat.com] >>> Sent: 16 November 2020 11:00 >>> To: eric.auger@gmail.com; eric.au...@redhat.com; >>> io...@lists.linux-foundation.org;

RE: [PATCH v11 12/13] vfio/pci: Register a DMA fault response region

2021-02-18 Thread Shameerali Kolothum Thodi
Hi Eric, > > -Original Message- > > From: Eric Auger [mailto:eric.au...@redhat.com] > > Sent: 16 November 2020 11:00 > > To: eric.auger@gmail.com; eric.au...@redhat.com; > > io...@lists.linux-foundation.org; linux-ker...@vger.kernel.org; > > k...@vger.kernel.org;

Re: [PATCH v13 02/15] iommu: Introduce bind/unbind_guest_msi

2021-02-18 Thread Auger Eric
Hi Keqian, On 2/18/21 9:43 AM, Keqian Zhu wrote: > Hi Eric, > > On 2021/2/12 16:55, Auger Eric wrote: >> Hi Keqian, >> >> On 2/1/21 12:52 PM, Keqian Zhu wrote: >>> Hi Eric, >>> >>> On 2020/11/18 19:21, Eric Auger wrote: On ARM, MSI are translated by the SMMU. An IOVA is allocated for

Re: [PATCH kvmtool 06/21] hw/i8042: Refactor trap handler

2021-02-18 Thread Andre Przywara
On Thu, 11 Feb 2021 17:23:13 + Alexandru Elisei wrote: > Hi Andre, > > On 12/10/20 2:28 PM, Andre Przywara wrote: > > With the planned retirement of the special ioport emulation code, we > > need to provide an emulation function compatible with the MMIO > > prototype. > > > > Adjust the

Re: [PATCH v13 02/15] iommu: Introduce bind/unbind_guest_msi

2021-02-18 Thread Keqian Zhu
Hi Eric, On 2021/2/12 16:55, Auger Eric wrote: > Hi Keqian, > > On 2/1/21 12:52 PM, Keqian Zhu wrote: >> Hi Eric, >> >> On 2020/11/18 19:21, Eric Auger wrote: >>> On ARM, MSI are translated by the SMMU. An IOVA is allocated >>> for each MSI doorbell. If both the host and the guest are exposed