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]
Date:	Tue, 14 May 2013 09:09:24 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	steven.kinney@....com
Cc:	linux-kernel@...r.kernel.org, mingo@...hat.com,
	iommu@...ts.linux-foundation.org, joro@...tes.org,
	Suravee Suthikulpanit <suravee.suthikulpanit@....com>
Subject: Re: [PATCH 1/2] IOMMU/AMD: Adding IOMMU PC resource management

On Mon, May 13, 2013 at 04:43:44PM -0500, steven.kinney@....com wrote:
> +static void init_iommu_perf_ctr(struct amd_iommu *iommu)
> +{
> +	u32 val = 0xabcd, val2 = 0;
> +
> +	if (!iommu_feature(iommu, FEATURE_PC))
> +		return;
> +
> +	amd_iommu_pc_present = true;
> +
> +	/* Check if the performance counters can be written to */
> +	if ((0 != amd_iommu_pc_get_set_reg_val(0, 0, 0, 0, &val, true)) ||
> +	    (0 != amd_iommu_pc_get_set_reg_val(0, 0, 0, 0, &val2, false)) ||
> +	    (val != val2)) {
> +		pr_err("AMD-Vi: Unable to write to IOMMU perf counter.\n");

Would it make sense to clear amd_iommu_pc_present here?

> +		return;
> +	}
> +
> +	pr_info("AMD-Vi: IOMMU performance counters " "supported\n");
> +
> +	val = readl(iommu->mmio_base + MMIO_CNTR_CONF_OFFSET);
> +	iommu->max_banks = (u8) ((val >> 12) & 0x3f);
> +	iommu->max_counters = (u8) ((val >> 7) & 0xf);
> +}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ