lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZcTWnDBfAtMriXqp@linux.dev>
Date: Thu, 8 Feb 2024 13:26:52 +0000
From: Oliver Upton <oliver.upton@...ux.dev>
To: ankita@...dia.com
Cc: jgg@...dia.com, maz@...nel.org, james.morse@....com,
	suzuki.poulose@....com, yuzenghui@...wei.com,
	reinette.chatre@...el.com, surenb@...gle.com, stefanha@...hat.com,
	brauner@...nel.org, catalin.marinas@....com, will@...nel.org,
	mark.rutland@....com, alex.williamson@...hat.com,
	kevin.tian@...el.com, yi.l.liu@...el.com, ardb@...nel.org,
	akpm@...ux-foundation.org, andreyknvl@...il.com,
	wangjinchao@...sion.com, gshan@...hat.com, ricarkol@...gle.com,
	linux-mm@...ck.org, lpieralisi@...nel.org, rananta@...gle.com,
	ryan.roberts@....com, aniketa@...dia.com, cjia@...dia.com,
	kwankhede@...dia.com, targupta@...dia.com, vsethi@...dia.com,
	acurrid@...dia.com, apopple@...dia.com, jhubbard@...dia.com,
	danw@...dia.com, kvmarm@...ts.linux.dev, mochs@...dia.com,
	zhiw@...dia.com, kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v6 3/4] kvm: arm64: set io memory s2 pte as normalnc for
 vfio pci device

On Thu, Feb 08, 2024 at 02:16:51AM +0530, ankita@...dia.com wrote:
> @@ -1557,10 +1559,18 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
>  	if (exec_fault)
>  		prot |= KVM_PGTABLE_PROT_X;
>  
> -	if (device)
> -		prot |= KVM_PGTABLE_PROT_DEVICE;
> -	else if (cpus_have_final_cap(ARM64_HAS_CACHE_DIC))
> +	if (device) {
> +		/*
> +		 * To provide VM with the ability to get device IO memory
> +		 * with NormalNC property, map device MMIO as NormalNC in S2.
> +		 */

nit: the comment doesn't provide anything of value, the logic is rather
straightforward here.

> +		if (vfio_allow_wc)
> +			prot |= KVM_PGTABLE_PROT_NORMAL_NC;
> +		else
> +			prot |= KVM_PGTABLE_PROT_DEVICE;
> +	} else if (cpus_have_final_cap(ARM64_HAS_CACHE_DIC)) {
>  		prot |= KVM_PGTABLE_PROT_X;
> +	}
>  
>  	/*
>  	 * Under the premise of getting a FSC_PERM fault, we just need to relax
> -- 
> 2.34.1
>

-- 
Thanks,
Oliver

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ