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, 24 Oct 2023 11:28:28 +0200
From:   Maciej Wieczór-Retman 
        <maciej.wieczor-retman@...el.com>
To:     James Morse <james.morse@....com>
CC:     <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Reinette Chatre <reinette.chatre@...el.com>,
        "Thomas Gleixner" <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "Borislav Petkov" <bp@...en8.de>, H Peter Anvin <hpa@...or.com>,
        Babu Moger <Babu.Moger@....com>,
        <shameerali.kolothum.thodi@...wei.com>,
        "D Scott Phillips OS" <scott@...amperecomputing.com>,
        <carl@...amperecomputing.com>, <lcherian@...vell.com>,
        <bobo.shaobowang@...wei.com>, <tan.shaopeng@...itsu.com>,
        <xingxin.hx@...nanolis.org>, <baolin.wang@...ux.alibaba.com>,
        Jamie Iles <quic_jiles@...cinc.com>,
        Xin Hao <xhao@...ux.alibaba.com>, <peternewman@...gle.com>,
        <dfustini@...libre.com>, <amitsinght@...vell.com>
Subject: Re: [PATCH v6 06/24] x86/resctrl: Access per-rmid structures by index

On 2023-09-14 at 17:21:20 +0000, James Morse wrote:
>diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c b/arch/x86/kernel/cpu/resctrl/monitor.c
>index 42b9a694fe2f..be0b7cb6e1f5 100644
>--- a/arch/x86/kernel/cpu/resctrl/monitor.c
>+++ b/arch/x86/kernel/cpu/resctrl/monitor.c
>@@ -150,12 +150,29 @@ static inline u64 get_corrected_mbm_count(u32 rmid, unsigned long val)
> 	return val;
> }
> 
>-static inline struct rmid_entry *__rmid_entry(u32 closid, u32 rmid)
>+/*
>+ * x86 and arm64 differ in their handling of monitoring.
>+ * x86's RMID are an independent number, there is only one source of traffic

"are an independent number" -> "is an independent number"
or
"are an independent number" -> "are independent numbers"?

>+ * with an RMID value of '1'.
>+ * arm64's PMG extend the PARTID/CLOSID space, there are multiple sources of

"extend" -> "extends"?

>+ * traffic with a PMG value of '1', one for each CLOSID, meaning the RMID
>+ * value is no longer unique.
>+ * To account for this, resctrl uses an index. On x86 this is just the RMID,
>+ * on arm64 it encodes the CLOSID and RMID. This gives a unique number.
>+ *
>+ * The domain's rmid_busy_llc and rmid_ptrs[] are sized by index. The arch code
>+ * must accept an attempt to read every index.
>+ */
>+static inline struct rmid_entry *__rmid_entry(u32 idx)
> {
> 	struct rmid_entry *entry;

-- 
Kind regards
Maciej Wieczór-Retman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ