Re: [PATCH v2] hw/arm/virt: KVM: Enable PAuth when supported by the host

2022-01-06 Thread Marc Zyngier
Hi Richard, On Wed, 05 Jan 2022 21:36:55 +, Richard Henderson wrote: > > On 1/3/22 10:05 AM, Marc Zyngier wrote: > > -/* > > - * KVM does not support modifications to this feature. > > - * We have not registered the cpu properties when KVM > > - * is in use, s

Re: [PATCH v5 4/4] KVM: mmu: remove over-aggressive warnings

2022-01-06 Thread David Stevens
On Thu, Jan 6, 2022 at 4:19 AM Sean Christopherson wrote: > > On Wed, Jan 05, 2022, Sean Christopherson wrote: > > Ah, I got royally confused by ensure_pfn_ref()'s comment > > > > * Certain IO or PFNMAP mappings can be backed with valid > > * struct pages, but be allocated without refcounting

Re: [PATCH v3 2/4] KVM: arm64: Keep a list of probed PMUs

2022-01-06 Thread Alexandru Elisei
Hi Marc, Sorry for the long silence, I didn't manage to get to your comments before going on holiday. On Tue, Dec 14, 2021 at 12:30:30PM +, Marc Zyngier wrote: > On Mon, 13 Dec 2021 15:23:07 +, > Alexandru Elisei wrote: > > > > The ARM PMU driver calls kvm_host_pmu_init() after probing

Re: [PATCH v3 3/4] KVM: arm64: Add KVM_ARM_VCPU_PMU_V3_SET_PMU attribute

2022-01-06 Thread Alexandru Elisei
Hi Marc, On Tue, Dec 14, 2021 at 12:28:15PM +, Marc Zyngier wrote: > On Mon, 13 Dec 2021 15:23:08 +, > Alexandru Elisei wrote: > > > > When KVM creates an event and there are more than one PMUs present on the > > system, perf_init_event() will go through the list of available PMUs and >

Re: [PATCH v3 0/4] KVM: arm64: Improve PMU support on heterogeneous systems

2022-01-06 Thread Alexandru Elisei
Hi Marc, On Thu, Dec 30, 2021 at 08:01:10PM +, Marc Zyngier wrote: > Alex, > > On Mon, 13 Dec 2021 15:23:05 +, > Alexandru Elisei wrote: > > > > (CC'ing Peter Maydell in case this might be of interest to qemu) > > > > The series can be found on a branch at [1], and the kvmtool support

Re: [PATCH v2] hw/arm/virt: KVM: Enable PAuth when supported by the host

2022-01-06 Thread Richard Henderson
On 1/6/22 1:16 AM, Marc Zyngier wrote: +static bool kvm_arm_pauth_supported(void) +{ +return (kvm_check_extension(kvm_state, KVM_CAP_ARM_PTRAUTH_ADDRESS) && +kvm_check_extension(kvm_state, KVM_CAP_ARM_PTRAUTH_GENERIC)); +} Do we really need to have them both set to play the game

Re: [PATCH v2] hw/arm/virt: KVM: Enable PAuth when supported by the host

2022-01-06 Thread Marc Zyngier
On Thu, 06 Jan 2022 17:20:33 +, Richard Henderson wrote: > > On 1/6/22 1:16 AM, Marc Zyngier wrote: > >>> +static bool kvm_arm_pauth_supported(void) > >>> +{ > >>> +return (kvm_check_extension(kvm_state, KVM_CAP_ARM_PTRAUTH_ADDRESS) > >>> && > >>> +kvm_check_extension(kvm_sta

Re: [PATCH v3 3/4] KVM: arm64: Add KVM_ARM_VCPU_PMU_V3_SET_PMU attribute

2022-01-06 Thread Marc Zyngier
On Thu, 06 Jan 2022 11:54:11 +, Alexandru Elisei wrote: > > Hi Marc, > > On Tue, Dec 14, 2021 at 12:28:15PM +, Marc Zyngier wrote: > > On Mon, 13 Dec 2021 15:23:08 +, > > Alexandru Elisei wrote: > > > > > > When KVM creates an event and there are more than one PMUs present on the >

Re: [PATCH v3 0/4] KVM: arm64: Improve PMU support on heterogeneous systems

2022-01-06 Thread Marc Zyngier
On Thu, 06 Jan 2022 12:07:38 +, Alexandru Elisei wrote: > > Hi Marc, > > On Thu, Dec 30, 2021 at 08:01:10PM +, Marc Zyngier wrote: > > Alex, > > > > On Mon, 13 Dec 2021 15:23:05 +, > > Alexandru Elisei wrote: > > > > > > (CC'ing Peter Maydell in case this might be of interest to q

Re: [PATCH v2] hw/arm/virt: KVM: Enable PAuth when supported by the host

2022-01-06 Thread Richard Henderson
On 1/6/22 9:29 AM, Marc Zyngier wrote: On Thu, 06 Jan 2022 17:20:33 +, Richard Henderson wrote: On 1/6/22 1:16 AM, Marc Zyngier wrote: +static bool kvm_arm_pauth_supported(void) +{ +return (kvm_check_extension(kvm_state, KVM_CAP_ARM_PTRAUTH_ADDRESS) && +kvm_check_extension

Re: [PATCH v2] hw/arm/virt: KVM: Enable PAuth when supported by the host

2022-01-06 Thread Marc Zyngier
On Thu, 06 Jan 2022 18:26:29 +, Richard Henderson wrote: > > Mm. It does beg the question of why KVM exposes multiple bits. If > they must be tied, then it only serves to make the interface more > complicated than necessary. We would be better served to have a > single bit to control all o

Re: [PATCH v2 1/5] hw/arm/virt: Key enablement of highmem PCIe on highmem_ecam

2022-01-06 Thread Marc Zyngier
Hi Eric, On Wed, 05 Jan 2022 09:41:19 +, Eric Auger wrote: > > couldn't you simply introduce highmem_redist which is truly missing. You > could set it in virt_set_memmap() in case you skip extended_map overlay > and use it in virt_gicv3_redist_region_count() as you did? > In addition to the

Re: [PATCH v3 3/5] hw/arm/virt: Honor highmem setting when computing the memory map

2022-01-06 Thread Marc Zyngier
On Wed, 05 Jan 2022 09:22:39 +, Eric Auger wrote: > > Hi Marc, > > On 12/27/21 10:16 PM, Marc Zyngier wrote: > > Even when the VM is configured with highmem=off, the highest_gpa > > field includes devices that are above the 4GiB limit. > > Similarily, nothing seem to check that the memory is