[PATCH v1 6/9] Add CPUID enumeration for RDT

2024-07-19 Thread Hendrik Wuethrich
From: ‪Hendrik Wüthrich Add CPUID enumeration for intel RDT monitoring and allocation, as well as the flags used in the enumeration code. Signed-off-by: Hendrik Wüthrich --- hw/i386/rdt.c | 29 ++ include/hw/i386/rdt.h | 29 ++ target/i386/cpu.c | 91

[PATCH v1 7/9] Add RDT feature flags.

2024-07-19 Thread Hendrik Wuethrich
From: ‪Hendrik Wüthrich Add RDT features to feature word / TCG. Signed-off-by: Hendrik Wüthrich --- target/i386/cpu.c | 30 -- target/i386/cpu.h | 2 ++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index

[PATCH v1 4/9] Add RDT functionality

2024-07-19 Thread Hendrik Wuethrich
From: ‪Hendrik Wüthrich Add RDT code to Associate CLOSID with RMID / set RMID for monitoring, write COS, and read monitoring data. This patch does not add code for the guest to interact through these things with MSRs, only the actual ability for the RDT device to do them. Signed-off-by: Hendrik

[PATCH v1 8/9] Adjust CPUID level for RDT features

2024-07-19 Thread Hendrik Wuethrich
From: ‪Hendrik Wüthrich Adjust minimum CPUID level if RDT monitoring or allocation features are enabled to ensure that CPUID will return them. Signed-off-by: Hendrik Wüthrich --- target/i386/cpu.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/target/i386/cpu.c

[PATCH v1 9/9] Adjust level for RDT on full_cpuid_auto_level

2024-07-19 Thread Hendrik Wuethrich
From: ‪Hendrik Wüthrich Make sure that RDT monitoring and allocation features are included in in full_cpuid_auto_level. Signed-off-by: Hendrik Wüthrich --- target/i386/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index

[PATCH v1 2/9] Add state for RDT device.

2024-07-19 Thread Hendrik Wuethrich
From: ‪Hendrik Wüthrich Add structures and variables needed to emulate Intel RDT, including module-internal sturctures and state in ArchCPU. No functionality yet. Signed-off-by: Hendrik Wüthrich --- hw/i386/rdt.c | 33 + target/i386/cpu.h | 5 + 2

[PATCH v1 0/9] target:386/ Emulate Intel RDT features needed to mount ResCtrl in Linux

2024-07-19 Thread Hendrik Wuethrich
From: Hendrik Wüthrich The aim of this patch series is to emulate Intel RDT features in order to make testing of the linux Resctrl subsystem possible with Qemu. A branch with the patches applied can be found at: https://github.com/Gray-Colors/Intel_RDT_patches_applied The changes made

[PATCH v1 1/9] Add Intel RDT device to config.

2024-07-19 Thread Hendrik Wuethrich
From: ‪Hendrik Wüthrich Change config to show RDT, add minimal code to the rdt.c module to make sure things still compile. Signed-off-by: Hendrik Wüthrich --- hw/i386/Kconfig | 4 hw/i386/meson.build | 1 + hw/i386/rdt.c | 49 +++

[PATCH v1 3/9] Add init and realize funciontality for RDT device.

2024-07-19 Thread Hendrik Wuethrich
From: ‪Hendrik Wüthrich Add code to initialize all necessary state for the RDT device. Signed-off-by: Hendrik Wüthrich --- hw/i386/rdt.c | 28 1 file changed, 28 insertions(+) diff --git a/hw/i386/rdt.c b/hw/i386/rdt.c index cf246ab835..259dafc963 100644 ---

[PATCH v1 5/9] Add RDT device interface through MSRs

2024-07-19 Thread Hendrik Wuethrich
From: ‪Hendrik Wüthrich Implement rdmsr and wrmsr for the following MSRs: * MSR_IA32_PQR_ASSOC * MSR_IA32_QM_EVTSEL * MSR_IA32_QM_CTR * IA32_L3_QOS_Mask_n * IA32_L2_QOS_Mask_n * IA32_L2_QoS_Ext_BW_Thrtl_n This allows for the guest to call RDT-internal functions to associate an RMID with a