[tip: x86/urgent] x86/asm: Fix MWAITX C-state hint value

2019-10-08 Thread tip-bot2 for Janakarajan Natarajan
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 454de1e7d970d6bc567686052329e4814842867c Gitweb: https://git.kernel.org/tip/454de1e7d970d6bc567686052329e4814842867c Author:Janakarajan Natarajan AuthorDate:Mon, 07 Oct 2019 19:00:22

[tip: x86/urgent] x86/asm: Fix MWAITX C-state hint value

2019-10-08 Thread tip-bot2 for Janakarajan Natarajan
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 454de1e7d970d6bc567686052329e4814842867c Gitweb: https://git.kernel.org/tip/454de1e7d970d6bc567686052329e4814842867c Author:Janakarajan Natarajan AuthorDate:Mon, 07 Oct 2019 19:00:22

[tip: x86/urgent] x86/asm: Fix MWAITX C-state hint value

2019-10-08 Thread tip-bot2 for Janakarajan Natarajan
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 9b69cab42e5d14b8f0467566e3d97e682365db2d Gitweb: https://git.kernel.org/tip/9b69cab42e5d14b8f0467566e3d97e682365db2d Author:Janakarajan Natarajan AuthorDate:Mon, 07 Oct 2019 19:00:22

[tip: x86/urgent] x86/asm: Fix MWAITX C-state hint value

2019-10-08 Thread tip-bot2 for Janakarajan Natarajan
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 9b69cab42e5d14b8f0467566e3d97e682365db2d Gitweb: https://git.kernel.org/tip/9b69cab42e5d14b8f0467566e3d97e682365db2d Author:Janakarajan Natarajan AuthorDate:Mon, 07 Oct 2019 19:00:22

Re: [PATCHv3 6/6] drivers/cpufreq: Add a CPUFreq driver for AMD processors (Fam17h and later)

2019-07-12 Thread Janakarajan Natarajan
On 7/11/2019 10:10 PM, Viresh Kumar wrote: > On 11-07-19, 16:58, Janakarajan Natarajan wrote: >> On 7/11/2019 1:12 AM, Viresh Kumar wrote: >>> On 10-07-19, 18:37, Natarajan, Janakarajan wrote: >>>> +static int amd_cpufreq_cpu_init(struct cpufreq_policy *po

Re: [PATCHv3 6/6] drivers/cpufreq: Add a CPUFreq driver for AMD processors (Fam17h and later)

2019-07-11 Thread Janakarajan Natarajan
icitly enabled >> + */ >> +if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD || >> +boot_cpu_data.x86 < 0x17 || !cppc_enable) >> +return -ENODEV; >> + >> +ret = cpufreq_register_driver(_cpufreq_driver); >> +if (ret) { >> +pr_info("Failed to register driver\n"); >> +goto out; >> +} >> + >> +ret = amd_cpufreq_sysfs_expose_params(); >> +if (ret) { >> +pr_info("Could not create sysfs entries\n"); >> +cpufreq_unregister_driver(_cpufreq_driver); >> +goto out; >> +} >> + >> +pr_info("Using amd-cpufreq driver\n"); >> +return ret; >> + >> +out: >> +return ret; >> +} >> + >> +static void __exit amd_cpufreq_exit(void) >> +{ >> +amd_cpufreq_sysfs_delete_params(); >> +cpufreq_unregister_driver(_cpufreq_driver); >> +} >> + >> +static const struct acpi_device_id amd_acpi_ids[] __used = { >> +{ACPI_PROCESSOR_DEVICE_HID, }, >> +{} >> +}; >> + >> +device_initcall(amd_cpufreq_init); >> +module_exit(amd_cpufreq_exit); >> +MODULE_DEVICE_TABLE(acpi, amd_acpi_ids); > All three should be placed directly below the struct/function they > represent without any blank lines in between. As suggested in > kernel documentation. > >> + >> +MODULE_AUTHOR("Janakarajan Natarajan"); >> +MODULE_DESCRIPTION("AMD CPUFreq driver based on ACPI CPPC v6.1 spec"); >> +MODULE_LICENSE("GPL"); > Should this be "GPL v2" ? > >> -- >> 2.17.1

Re: [PATCH v2 0/7] CPPC optional registers AMD support

2019-04-15 Thread Janakarajan Natarajan
kernel. > > v1->v2: > * Add macro to ensure BUFFER only registers have BUFFER type. > * Add support macro to make the right check based on register type. > * Remove support checks for registers which are mandatory. Are there any concerns regarding this patchset? Thanks.

[tip:x86/cpu] x86/cpufeatures: Add WBNOINVD feature definition

2018-11-07 Thread tip-bot for Janakarajan Natarajan
Commit-ID: 08e823c2c5899ef2de3aa1727233f1f19e8c1cc1 Gitweb: https://git.kernel.org/tip/08e823c2c5899ef2de3aa1727233f1f19e8c1cc1 Author: Janakarajan Natarajan AuthorDate: Wed, 7 Nov 2018 20:59:07 + Committer: Borislav Petkov CommitDate: Wed, 7 Nov 2018 22:21:03 +0100 x86

[tip:x86/cpu] x86/cpufeatures: Add WBNOINVD feature definition

2018-11-07 Thread tip-bot for Janakarajan Natarajan
Commit-ID: 08e823c2c5899ef2de3aa1727233f1f19e8c1cc1 Gitweb: https://git.kernel.org/tip/08e823c2c5899ef2de3aa1727233f1f19e8c1cc1 Author: Janakarajan Natarajan AuthorDate: Wed, 7 Nov 2018 20:59:07 + Committer: Borislav Petkov CommitDate: Wed, 7 Nov 2018 22:21:03 +0100 x86

[PATCH] perf/x86/amd/uncore: Set ThreadMask and SliceMask for L3 Cache perf events

2018-08-13 Thread Janakarajan Natarajan
In Family 17h, some L3 Cache Performance events require the ThreadMask and SliceMask to be set. For other events, these fields do not affect the count either way. Set ThreadMask and SliceMask to 0xFF and 0xF respectively. Signed-off-by: Janakarajan Natarajan --- arch/x86/events/amd/uncore.c

[PATCH] perf/x86/amd/uncore: Set ThreadMask and SliceMask for L3 Cache perf events

2018-08-13 Thread Janakarajan Natarajan
In Family 17h, some L3 Cache Performance events require the ThreadMask and SliceMask to be set. For other events, these fields do not affect the count either way. Set ThreadMask and SliceMask to 0xFF and 0xF respectively. Signed-off-by: Janakarajan Natarajan --- arch/x86/events/amd/uncore.c

[PATCH v2] x86/kvm/Kconfig: Ensure CRYPTO_DEV_CCP_DD state at minimum matches KVM_AMD

2018-06-27 Thread Janakarajan Natarajan
"depends on" to "select" for SEV") Cc: # 4.16.x Signed-off-by: Janakarajan Natarajan --- arch/x86/kvm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 92fd433..1bbec38 100644 --- a/arch/x86/kvm/K

[PATCH v2] x86/kvm/Kconfig: Ensure CRYPTO_DEV_CCP_DD state at minimum matches KVM_AMD

2018-06-27 Thread Janakarajan Natarajan
"depends on" to "select" for SEV") Cc: # 4.16.x Signed-off-by: Janakarajan Natarajan --- arch/x86/kvm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 92fd433..1bbec38 100644 --- a/arch/x86/kvm/K

[PATCHv2 1/2] crypto: ccp: Add DOWNLOAD_FIRMWARE SEV command

2018-05-25 Thread Janakarajan Natarajan
compared to the existing firmware. For more information please refer to "Section 5.11 DOWNLOAD_FIRMWARE" of https://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- drivers/crypto/cc

[PATCHv2 1/2] crypto: ccp: Add DOWNLOAD_FIRMWARE SEV command

2018-05-25 Thread Janakarajan Natarajan
compared to the existing firmware. For more information please refer to "Section 5.11 DOWNLOAD_FIRMWARE" of https://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf Signed-off-by: Janakarajan Natarajan --- drivers/crypto/ccp/psp-

[PATCHv2 2/2] crypto: ccp: Add GET_ID SEV command

2018-05-25 Thread Janakarajan Natarajan
refer to "Section 5.12 GET_ID" of https://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- drivers/crypto/ccp/psp-dev.c | 44 include/linux/psp

[PATCHv2 2/2] crypto: ccp: Add GET_ID SEV command

2018-05-25 Thread Janakarajan Natarajan
refer to "Section 5.12 GET_ID" of https://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf Signed-off-by: Janakarajan Natarajan --- drivers/crypto/ccp/psp-dev.c | 44 include/linux/psp-sev.h | 11 +++ include/uapi

[PATCHv2 0/2] Add new SEV commands

2018-05-25 Thread Janakarajan Natarajan
the Chip Endorsment Key (CEK) public key signed by the AMD SEV Signing Key (ASK). v1->v2: * Added cover letter. * Misc changes based on Boris' feedback. Janakarajan Natarajan (2): crypto: ccp: Add DOWNLOAD_FIRMWARE SEV command crypto: ccp: Add GET_ID SEV command drivers/crypto/ccp/psp-de

[PATCHv2 0/2] Add new SEV commands

2018-05-25 Thread Janakarajan Natarajan
the Chip Endorsment Key (CEK) public key signed by the AMD SEV Signing Key (ASK). v1->v2: * Added cover letter. * Misc changes based on Boris' feedback. Janakarajan Natarajan (2): crypto: ccp: Add DOWNLOAD_FIRMWARE SEV command crypto: ccp: Add GET_ID SEV command drivers/crypto/ccp/psp-de

[PATCH] Use 'imply' with SEV Kconfig CRYPTO dependencies

2018-05-21 Thread Janakarajan Natarajan
quot;select" for SEV") Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/kvm/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 92fd433..d9b16b7 100644 --- a/arch/x86/kvm/Kconfig

[PATCH] Use 'imply' with SEV Kconfig CRYPTO dependencies

2018-05-21 Thread Janakarajan Natarajan
quot;select" for SEV") Signed-off-by: Janakarajan Natarajan --- arch/x86/kvm/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 92fd433..d9b16b7 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@ -85

[PATCH RESEND 2/2] Add GET_ID SEV command

2018-05-09 Thread Janakarajan Natarajan
refer to "Section 5.12 GET_ID" of https://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- drivers/crypto/ccp/psp-dev.c | 44 include/linux/psp

[PATCH RESEND 2/2] Add GET_ID SEV command

2018-05-09 Thread Janakarajan Natarajan
refer to "Section 5.12 GET_ID" of https://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf Signed-off-by: Janakarajan Natarajan --- drivers/crypto/ccp/psp-dev.c | 44 include/linux/psp-sev.h | 11 +++ include/uapi

[PATCH RESEND 1/2] Add DOWNLOAD_FIRMWARE SEV command

2018-05-09 Thread Janakarajan Natarajan
compared to the existing firmware. For more information please refer to "Section 5.11 DOWNLOAD_FIRMWARE" of https://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- drivers/crypto/cc

[PATCH RESEND 1/2] Add DOWNLOAD_FIRMWARE SEV command

2018-05-09 Thread Janakarajan Natarajan
compared to the existing firmware. For more information please refer to "Section 5.11 DOWNLOAD_FIRMWARE" of https://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf Signed-off-by: Janakarajan Natarajan --- drivers/crypto/ccp/psp-

[PATCH 2/2] Add GET_ID SEV command

2018-05-02 Thread Janakarajan Natarajan
refer to "Section 5.12 GET_ID" of https://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- drivers/crypto/ccp/psp-dev.c | 44 include/linux/psp

[PATCH 2/2] Add GET_ID SEV command

2018-05-02 Thread Janakarajan Natarajan
refer to "Section 5.12 GET_ID" of https://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf Signed-off-by: Janakarajan Natarajan --- drivers/crypto/ccp/psp-dev.c | 44 include/linux/psp-sev.h | 11 +++ include/uapi

[PATCH 1/2] Add DOWNLOAD_FIRMWARE SEV command

2018-05-02 Thread Janakarajan Natarajan
compared to the existing firmware. For more information please refer to "Section 5.11 DOWNLOAD_FIRMWARE" of https://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- drivers/crypto/cc

[PATCH 1/2] Add DOWNLOAD_FIRMWARE SEV command

2018-05-02 Thread Janakarajan Natarajan
compared to the existing firmware. For more information please refer to "Section 5.11 DOWNLOAD_FIRMWARE" of https://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf Signed-off-by: Janakarajan Natarajan --- drivers/crypto/ccp/psp-

[PATCH v5 2/3] x86/kvm: Add support for AMD Core Perf Extension in guest

2018-02-05 Thread Janakarajan Natarajan
[] is changed. New functions are added to check the validity of the get/set MSRs. If the guest has the X86_FEATURE_PERFCTR_CORE cpuid flag set, the number of counters available to the vcpu is set to 6. It the flag is not set then it is 4. Signed-off-by: Janakarajan Natarajan <janakarajan.nat

[PATCH v5 2/3] x86/kvm: Add support for AMD Core Perf Extension in guest

2018-02-05 Thread Janakarajan Natarajan
[] is changed. New functions are added to check the validity of the get/set MSRs. If the guest has the X86_FEATURE_PERFCTR_CORE cpuid flag set, the number of counters available to the vcpu is set to 6. It the flag is not set then it is 4. Signed-off-by: Janakarajan Natarajan --- arch/x86/kvm

[PATCH v5 3/3] x86/kvm: Expose AMD Core Perf Extension flag to guests

2018-02-05 Thread Janakarajan Natarajan
Expose the AMD Core Perf Extension flag to the guests. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 0099e10..de561d4

[PATCH v5 3/3] x86/kvm: Expose AMD Core Perf Extension flag to guests

2018-02-05 Thread Janakarajan Natarajan
Expose the AMD Core Perf Extension flag to the guests. Signed-off-by: Janakarajan Natarajan --- arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 0099e10..de561d4 100644 --- a/arch/x86/kvm/cpuid.c +++ b

[PATCH v5 0/3] Support Perf Extension on AMD KVM guests

2018-02-05 Thread Janakarajan Natarajan
* Rebased to latest KVM tree. v4->v5: * Removed conditional check when exposing Perf Extension flag to guests based on Radim's feedback. Janakarajan Natarajan (3): x86/msr: Add AMD Core Perf Extension MSRs x86/kvm: Add support for AMD Core Perf Extension in guest x86/kvm: Expose AMD Core Pe

[PATCH v5 1/3] x86/msr: Add AMD Core Perf Extension MSRs

2018-02-05 Thread Janakarajan Natarajan
Add the EventSelect and Counter MSRs for AMD Core Perf Extension. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/include/asm/msr-index.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/inclu

[PATCH v5 0/3] Support Perf Extension on AMD KVM guests

2018-02-05 Thread Janakarajan Natarajan
* Rebased to latest KVM tree. v4->v5: * Removed conditional check when exposing Perf Extension flag to guests based on Radim's feedback. Janakarajan Natarajan (3): x86/msr: Add AMD Core Perf Extension MSRs x86/kvm: Add support for AMD Core Perf Extension in guest x86/kvm: Expose AMD Core Pe

[PATCH v5 1/3] x86/msr: Add AMD Core Perf Extension MSRs

2018-02-05 Thread Janakarajan Natarajan
Add the EventSelect and Counter MSRs for AMD Core Perf Extension. Signed-off-by: Janakarajan Natarajan --- arch/x86/include/asm/msr-index.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index e7b983a

[PATCH v4 2/3] x86/kvm: Add support for AMD Core Perf Extension in guest

2018-01-30 Thread Janakarajan Natarajan
[] is changed. New functions are added to check the validity of the get/set MSRs. If the guest has the X86_FEATURE_PERFCTR_CORE cpuid flag set, the number of counters available to the vcpu is set to 6. It the flag is not set then it is 4. Signed-off-by: Janakarajan Natarajan <janakarajan.nat

[PATCH v4 2/3] x86/kvm: Add support for AMD Core Perf Extension in guest

2018-01-30 Thread Janakarajan Natarajan
[] is changed. New functions are added to check the validity of the get/set MSRs. If the guest has the X86_FEATURE_PERFCTR_CORE cpuid flag set, the number of counters available to the vcpu is set to 6. It the flag is not set then it is 4. Signed-off-by: Janakarajan Natarajan --- arch/x86/kvm

[PATCH v4 0/3] Support Perf Extensions on AMD KVM guests

2018-01-30 Thread Janakarajan Natarajan
* Rebased to latest KVM tree. Janakarajan Natarajan (3): x86/msr: Add AMD Core Perf Extension MSRs x86/kvm: Add support for AMD Core Perf Extension in guest x86/kvm: Expose AMD Core Perf Extension flag to guests arch/x86/include/asm/msr-index.h | 14 arch/x86/kvm/cpuid.c | 8

[PATCH v4 3/3] x86/kvm: Expose AMD Core Perf Extension flag to guests

2018-01-30 Thread Janakarajan Natarajan
Expose the AMD Core Perf Extension flag to the guests. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/kvm/cpuid.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 0099e10..8

[PATCH v4 0/3] Support Perf Extensions on AMD KVM guests

2018-01-30 Thread Janakarajan Natarajan
* Rebased to latest KVM tree. Janakarajan Natarajan (3): x86/msr: Add AMD Core Perf Extension MSRs x86/kvm: Add support for AMD Core Perf Extension in guest x86/kvm: Expose AMD Core Perf Extension flag to guests arch/x86/include/asm/msr-index.h | 14 arch/x86/kvm/cpuid.c | 8

[PATCH v4 3/3] x86/kvm: Expose AMD Core Perf Extension flag to guests

2018-01-30 Thread Janakarajan Natarajan
Expose the AMD Core Perf Extension flag to the guests. Signed-off-by: Janakarajan Natarajan --- arch/x86/kvm/cpuid.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 0099e10..8c95a7c 100644 --- a/arch/x86/kvm/cpuid.c

[PATCH v4 1/3] x86/msr: Add AMD Core Perf Extension MSRs

2018-01-30 Thread Janakarajan Natarajan
Add the EventSelect and Counter MSRs for AMD Core Perf Extension. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/include/asm/msr-index.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/inclu

[PATCH v4 1/3] x86/msr: Add AMD Core Perf Extension MSRs

2018-01-30 Thread Janakarajan Natarajan
Add the EventSelect and Counter MSRs for AMD Core Perf Extension. Signed-off-by: Janakarajan Natarajan --- arch/x86/include/asm/msr-index.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index e7b983a

[PATCH v3 2/3] x86/kvm: Add support for AMD Core Perf Extension in guest

2017-12-08 Thread Janakarajan Natarajan
[] is changed. New functions are added to check the validity of the get/set MSRs. If the guest has the X86_FEATURE_PERFCTR_CORE cpuid flag set, the number of counters available to the vcpu is set to 6. It the flag is not set then it is 4. Signed-off-by: Janakarajan Natarajan <janakarajan.nat

[PATCH v3 2/3] x86/kvm: Add support for AMD Core Perf Extension in guest

2017-12-08 Thread Janakarajan Natarajan
[] is changed. New functions are added to check the validity of the get/set MSRs. If the guest has the X86_FEATURE_PERFCTR_CORE cpuid flag set, the number of counters available to the vcpu is set to 6. It the flag is not set then it is 4. Signed-off-by: Janakarajan Natarajan --- arch/x86/kvm

[PATCH v3 0/3] Support Perf Extension on AMD KVM guests

2017-12-08 Thread Janakarajan Natarajan
. v1->v2: * Rearranged MSR #defines based on Boris's suggestion. v2->v3: * Changed the logic of mapping MSR to gp_counters[] index based on Boris's feedback. * Removed use of family checks based on Radim's feedback. * Removed KVM bugfix patch since it is already applied. Janakarajan Natara

[PATCH v3 1/3] x86/msr: Add AMD Core Perf Extension MSRs

2017-12-08 Thread Janakarajan Natarajan
Add the EventSelect and Counter MSRs for AMD Core Perf Extension. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/include/asm/msr-index.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/inclu

[PATCH v3 3/3] x86/kvm: Expose AMD Core Perf Extension flag to guests

2017-12-08 Thread Janakarajan Natarajan
Expose the AMD Core Perf Extension flag to the guests. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/kvm/cpuid.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 0099e10..8

[PATCH v3 0/3] Support Perf Extension on AMD KVM guests

2017-12-08 Thread Janakarajan Natarajan
. v1->v2: * Rearranged MSR #defines based on Boris's suggestion. v2->v3: * Changed the logic of mapping MSR to gp_counters[] index based on Boris's feedback. * Removed use of family checks based on Radim's feedback. * Removed KVM bugfix patch since it is already applied. Janakarajan Natara

[PATCH v3 1/3] x86/msr: Add AMD Core Perf Extension MSRs

2017-12-08 Thread Janakarajan Natarajan
Add the EventSelect and Counter MSRs for AMD Core Perf Extension. Signed-off-by: Janakarajan Natarajan --- arch/x86/include/asm/msr-index.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index 34c4922

[PATCH v3 3/3] x86/kvm: Expose AMD Core Perf Extension flag to guests

2017-12-08 Thread Janakarajan Natarajan
Expose the AMD Core Perf Extension flag to the guests. Signed-off-by: Janakarajan Natarajan --- arch/x86/kvm/cpuid.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 0099e10..8c95a7c 100644 --- a/arch/x86/kvm/cpuid.c

Re: [PATCH v2 1/4] x86/kvm/cpuid: Fix CPUID function for word 6 (80000001_ECX)

2017-11-06 Thread Janakarajan Natarajan
I forgot to add Boris's Reviewed-by Tag. If the patchset is acceptable, please let me know if I should send another version with the Tag or if the Tag can be added when it is merged. On 11/06/2017 11:44 AM, Janakarajan Natarajan wrote: The function for CPUID 8001 ECX is set to 0xc001

Re: [PATCH v2 1/4] x86/kvm/cpuid: Fix CPUID function for word 6 (80000001_ECX)

2017-11-06 Thread Janakarajan Natarajan
I forgot to add Boris's Reviewed-by Tag. If the patchset is acceptable, please let me know if I should send another version with the Tag or if the Tag can be added when it is merged. On 11/06/2017 11:44 AM, Janakarajan Natarajan wrote: The function for CPUID 8001 ECX is set to 0xc001

[PATCH v2 0/4] Support Perf Extension on AMD KVM guests

2017-11-06 Thread Janakarajan Natarajan
[] is changed. Additionally, a fix is provided for CPUID_8000_0001_ECX in reverse_cpuid[] to change the CPUID function from 0xc001 to 0x8001. This patchset has been tested with Family 17h and Opteron G1 guests. v1->v2: * Rearranged MSR #defines based on Boris's suggestion. Janakarajan Natara

[PATCH v2 0/4] Support Perf Extension on AMD KVM guests

2017-11-06 Thread Janakarajan Natarajan
[] is changed. Additionally, a fix is provided for CPUID_8000_0001_ECX in reverse_cpuid[] to change the CPUID function from 0xc001 to 0x8001. This patchset has been tested with Family 17h and Opteron G1 guests. v1->v2: * Rearranged MSR #defines based on Boris's suggestion. Janakarajan Natara

[PATCH v2 2/4] Add AMD Core Perf Extension MSRs

2017-11-06 Thread Janakarajan Natarajan
Add the EventSelect and Counter MSRs for AMD Core Perf Extension. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/include/asm/msr-index.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/inclu

[PATCH v2 2/4] Add AMD Core Perf Extension MSRs

2017-11-06 Thread Janakarajan Natarajan
Add the EventSelect and Counter MSRs for AMD Core Perf Extension. Signed-off-by: Janakarajan Natarajan --- arch/x86/include/asm/msr-index.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index 17f5c12

[PATCH v2 3/4] Add support for AMD Core Perf Extension in guest

2017-11-06 Thread Janakarajan Natarajan
off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/kvm/pmu_amd.c | 133 +++-- arch/x86/kvm/x86.c | 1 + 2 files changed, 120 insertions(+), 14 deletions(-) diff --git a/arch/x86/kvm/pmu_amd.c b/arch/x86/kvm/pmu_amd.c inde

[PATCH v2 3/4] Add support for AMD Core Perf Extension in guest

2017-11-06 Thread Janakarajan Natarajan
off-by: Janakarajan Natarajan --- arch/x86/kvm/pmu_amd.c | 133 +++-- arch/x86/kvm/x86.c | 1 + 2 files changed, 120 insertions(+), 14 deletions(-) diff --git a/arch/x86/kvm/pmu_amd.c b/arch/x86/kvm/pmu_amd.c index cd94443..2c694446 100644 --- a/a

[PATCH v2 1/4] x86/kvm/cpuid: Fix CPUID function for word 6 (80000001_ECX)

2017-11-06 Thread Janakarajan Natarajan
The function for CPUID 8001 ECX is set to 0xc001. Set it to 0x8001. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/kvm/cpuid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.h b/arch/x86/kvm/cpuid.h

[PATCH v2 1/4] x86/kvm/cpuid: Fix CPUID function for word 6 (80000001_ECX)

2017-11-06 Thread Janakarajan Natarajan
The function for CPUID 8001 ECX is set to 0xc001. Set it to 0x8001. Signed-off-by: Janakarajan Natarajan --- arch/x86/kvm/cpuid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.h b/arch/x86/kvm/cpuid.h index 0bc5c13..b21b1d2 100644 --- a/arch

[PATCH v2 4/4] Expose AMD Core Perf Extension flag to guests

2017-11-06 Thread Janakarajan Natarajan
Expose the AMD Core Perf Extension flag to the guests. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/kvm/cpuid.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 0099e10..8

[PATCH v2 4/4] Expose AMD Core Perf Extension flag to guests

2017-11-06 Thread Janakarajan Natarajan
Expose the AMD Core Perf Extension flag to the guests. Signed-off-by: Janakarajan Natarajan --- arch/x86/kvm/cpuid.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 0099e10..8c95a7c 100644 --- a/arch/x86/kvm/cpuid.c

[PATCH 2/4] Add AMD Core Perf Extension MSRs

2017-11-01 Thread Janakarajan Natarajan
Add the EventSelect and Counter MSRs for AMD Core Perf Extension. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/include/asm/msr-index.h | 12 1 file changed, 12 insertions(+) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/inclu

[PATCH 2/4] Add AMD Core Perf Extension MSRs

2017-11-01 Thread Janakarajan Natarajan
Add the EventSelect and Counter MSRs for AMD Core Perf Extension. Signed-off-by: Janakarajan Natarajan --- arch/x86/include/asm/msr-index.h | 12 1 file changed, 12 insertions(+) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index 17f5c12

[PATCH 0/4] Support Perf Extension on AMD KVM guests

2017-11-01 Thread Janakarajan Natarajan
[] is changed. Additionally, a fix is provided for CPUID_8000_0001_ECX in reverse_cpuid[] to change the CPUID function from 0xc001 to 0x8001. This patchset has been tested with Family 17h and Opteron G1 guests. Janakarajan Natarajan (4): x86/kvm/cpuid: Fix CPUID function for word 6

[PATCH 0/4] Support Perf Extension on AMD KVM guests

2017-11-01 Thread Janakarajan Natarajan
[] is changed. Additionally, a fix is provided for CPUID_8000_0001_ECX in reverse_cpuid[] to change the CPUID function from 0xc001 to 0x8001. This patchset has been tested with Family 17h and Opteron G1 guests. Janakarajan Natarajan (4): x86/kvm/cpuid: Fix CPUID function for word 6

[PATCH 4/4] Expose AMD Core Perf Extension flag to guests

2017-11-01 Thread Janakarajan Natarajan
Expose the AMD Core Perf Extension flag to the guests. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/kvm/cpuid.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 0099e10..8

[PATCH 3/4] Add support for AMD Core Perf Extension in guest

2017-11-01 Thread Janakarajan Natarajan
off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/kvm/pmu_amd.c | 133 +++-- arch/x86/kvm/x86.c | 1 + 2 files changed, 120 insertions(+), 14 deletions(-) diff --git a/arch/x86/kvm/pmu_amd.c b/arch/x86/kvm/pmu_amd.c inde

[PATCH 4/4] Expose AMD Core Perf Extension flag to guests

2017-11-01 Thread Janakarajan Natarajan
Expose the AMD Core Perf Extension flag to the guests. Signed-off-by: Janakarajan Natarajan --- arch/x86/kvm/cpuid.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 0099e10..8c95a7c 100644 --- a/arch/x86/kvm/cpuid.c

[PATCH 3/4] Add support for AMD Core Perf Extension in guest

2017-11-01 Thread Janakarajan Natarajan
off-by: Janakarajan Natarajan --- arch/x86/kvm/pmu_amd.c | 133 +++-- arch/x86/kvm/x86.c | 1 + 2 files changed, 120 insertions(+), 14 deletions(-) diff --git a/arch/x86/kvm/pmu_amd.c b/arch/x86/kvm/pmu_amd.c index cd94443..2c694446 100644 --- a/a

[PATCH 1/4] x86/kvm/cpuid: Fix CPUID function for word 6 (80000001_ECX)

2017-11-01 Thread Janakarajan Natarajan
The function for CPUID 8001 ECX is set to 0xc001. Set it to 0x8001. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/kvm/cpuid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.h b/arch/x86/kvm/cpuid.h

[PATCH 1/4] x86/kvm/cpuid: Fix CPUID function for word 6 (80000001_ECX)

2017-11-01 Thread Janakarajan Natarajan
The function for CPUID 8001 ECX is set to 0xc001. Set it to 0x8001. Signed-off-by: Janakarajan Natarajan --- arch/x86/kvm/cpuid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.h b/arch/x86/kvm/cpuid.h index 0bc5c13..b21b1d2 100644 --- a/arch

[PATCH v2 1/2] KVM: SVM: Add Virtual GIF feature definition

2017-08-23 Thread Janakarajan Natarajan
Add a new cpufeature definition for Virtual GIF. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index c

[PATCH v2 1/2] KVM: SVM: Add Virtual GIF feature definition

2017-08-23 Thread Janakarajan Natarajan
Add a new cpufeature definition for Virtual GIF. Signed-off-by: Janakarajan Natarajan --- arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index ca3c48c..0e25e7a 100644 --- a/arch/x86

[PATCH v2 2/2] KVM: SVM: Enable Virtual GIF feature

2017-08-23 Thread Janakarajan Natarajan
, the STGI intercept is set. This will assist in opening the window only when GIF=1. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/include/asm/svm.h | 6 + arch/x86/kvm/svm.c | 62 -- 2 files chang

[PATCH v2 2/2] KVM: SVM: Enable Virtual GIF feature

2017-08-23 Thread Janakarajan Natarajan
, the STGI intercept is set. This will assist in opening the window only when GIF=1. Signed-off-by: Janakarajan Natarajan --- arch/x86/include/asm/svm.h | 6 + arch/x86/kvm/svm.c | 62 -- 2 files changed, 61 insertions(+), 7 deletions(-) diff

[PATCH v2 0/2] KVM: SVM: Virtual GIF

2017-08-23 Thread Janakarajan Natarajan
er-V and KVM as the nested hypervisor. v1->v2: * Updated patch description and changed cpufeature definition to be similar to AMD documentation. * Updated NMI logic. STGI intercept added to assit in opening NMI window. Suggested by Radim. Janakarajan Natarajan (2): KVM: SVM: Add Virt

[PATCH v2 0/2] KVM: SVM: Virtual GIF

2017-08-23 Thread Janakarajan Natarajan
er-V and KVM as the nested hypervisor. v1->v2: * Updated patch description and changed cpufeature definition to be similar to AMD documentation. * Updated NMI logic. STGI intercept added to assit in opening NMI window. Suggested by Radim. Janakarajan Natarajan (2): KVM: SVM: Add Virt

[PATCH 1/2] KVM: SVM: Add Virtual GIF feature definition

2017-08-16 Thread Janakarajan Natarajan
Define a new cpufeature definition for Virtual GIF. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h

[PATCH 1/2] KVM: SVM: Add Virtual GIF feature definition

2017-08-16 Thread Janakarajan Natarajan
Define a new cpufeature definition for Virtual GIF. Signed-off-by: Janakarajan Natarajan --- arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index ca3c48c..58e7211 100644 --- a/arch

[PATCH 2/2] KVM: SVM: Enable Virtual GIF feature

2017-08-16 Thread Janakarajan Natarajan
. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/include/asm/svm.h | 6 ++ arch/x86/kvm/svm.c | 47 +++--- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/arch/x86/include/asm/svm.h b/arch/x86/i

[PATCH 2/2] KVM: SVM: Enable Virtual GIF feature

2017-08-16 Thread Janakarajan Natarajan
. Signed-off-by: Janakarajan Natarajan --- arch/x86/include/asm/svm.h | 6 ++ arch/x86/kvm/svm.c | 47 +++--- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h index 58fffe7

[PATCH 0/2] KVM: SVM: Virtual GIF

2017-08-16 Thread Janakarajan Natarajan
er-V and KVM as the nested hypervisor. Janakarajan Natarajan (2): KVM: SVM: Add Virtual GIF feature definition KVM: SVM: Enable Virtual GIF feature arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/svm.h | 6 + arch/x86/kvm/svm.c

[PATCH 0/2] KVM: SVM: Virtual GIF

2017-08-16 Thread Janakarajan Natarajan
er-V and KVM as the nested hypervisor. Janakarajan Natarajan (2): KVM: SVM: Add Virtual GIF feature definition KVM: SVM: Enable Virtual GIF feature arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/svm.h | 6 + arch/x86/kvm/svm.c

[tip:perf/core] perf/x86/amd/uncore: Rename cpufeatures macro for cache counters

2017-08-10 Thread tip-bot for Janakarajan Natarajan
Commit-ID: 910448bbed066ab1082b510eef1ae61bb792d854 Gitweb: http://git.kernel.org/tip/910448bbed066ab1082b510eef1ae61bb792d854 Author: Janakarajan Natarajan <janakarajan.natara...@amd.com> AuthorDate: Wed, 14 Jun 2017 11:26:57 -0500 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/core] perf/x86/amd/uncore: Rename cpufeatures macro for cache counters

2017-08-10 Thread tip-bot for Janakarajan Natarajan
Commit-ID: 910448bbed066ab1082b510eef1ae61bb792d854 Gitweb: http://git.kernel.org/tip/910448bbed066ab1082b510eef1ae61bb792d854 Author: Janakarajan Natarajan AuthorDate: Wed, 14 Jun 2017 11:26:57 -0500 Committer: Ingo Molnar CommitDate: Thu, 10 Aug 2017 12:08:38 +0200 perf/x86/amd

[tip:perf/core] perf/x86/amd/uncore: Get correct number of cores sharing last level cache

2017-08-10 Thread tip-bot for Janakarajan Natarajan
Commit-ID: ab027620e95987b5f0145013090a109b4152d23b Gitweb: http://git.kernel.org/tip/ab027620e95987b5f0145013090a109b4152d23b Author: Janakarajan Natarajan <janakarajan.natara...@amd.com> AuthorDate: Wed, 14 Jun 2017 11:26:58 -0500 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/core] perf/x86/amd/uncore: Get correct number of cores sharing last level cache

2017-08-10 Thread tip-bot for Janakarajan Natarajan
Commit-ID: ab027620e95987b5f0145013090a109b4152d23b Gitweb: http://git.kernel.org/tip/ab027620e95987b5f0145013090a109b4152d23b Author: Janakarajan Natarajan AuthorDate: Wed, 14 Jun 2017 11:26:58 -0500 Committer: Ingo Molnar CommitDate: Thu, 10 Aug 2017 12:08:39 +0200 perf/x86/amd

[PATCH v4 2/2] amd: uncore: Get correct number of cores sharing last level cache

2017-06-14 Thread Janakarajan Natarajan
over the cache levels using CPUID 0x801d. The last level cache is the last value to return a non-zero value in EAX. Signed-off-by: Janakarajan Natarajan <janakarajan.natara...@amd.com> --- arch/x86/events/amd/uncore.c | 19 --- 1 file changed, 16 insertions(+), 3 del

[PATCH v4 2/2] amd: uncore: Get correct number of cores sharing last level cache

2017-06-14 Thread Janakarajan Natarajan
over the cache levels using CPUID 0x801d. The last level cache is the last value to return a non-zero value in EAX. Signed-off-by: Janakarajan Natarajan --- arch/x86/events/amd/uncore.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/arch/x86/events

[PATCH v4 1/2] amd: uncore: Rename cpufeatures macro for cache counters

2017-06-14 Thread Janakarajan Natarajan
In Family 17h, L3 is the last level cache as opposed to L2 in previous families. Avoid this name confusion and rename X86_FEATURE_PERFCTR_L2 to X86_FEATURE_PERFCTR_LLC to indicate the performance counter on the last level of cache. Signed-off-by: Janakarajan Natarajan <janakarajan.nat

[PATCH v4 1/2] amd: uncore: Rename cpufeatures macro for cache counters

2017-06-14 Thread Janakarajan Natarajan
In Family 17h, L3 is the last level cache as opposed to L2 in previous families. Avoid this name confusion and rename X86_FEATURE_PERFCTR_L2 to X86_FEATURE_PERFCTR_LLC to indicate the performance counter on the last level of cache. Signed-off-by: Janakarajan Natarajan Reviewed-by: Borislav

[PATCH v4 0/2] amd: uncore: Fix for AMD Uncore driver

2017-06-14 Thread Janakarajan Natarajan
.pl and added Reviewed-by tag in patch description. v2->v3 * Updated patch description and cleaned up code based on feedback from Borislav Petkov. v1->v2 * Replaced while(1) with finite for loop based on feedback from Peter Zijlstra and Borislav Petkov. Janakarajan Natarajan (2): am

[PATCH v4 0/2] amd: uncore: Fix for AMD Uncore driver

2017-06-14 Thread Janakarajan Natarajan
.pl and added Reviewed-by tag in patch description. v2->v3 * Updated patch description and cleaned up code based on feedback from Borislav Petkov. v1->v2 * Replaced while(1) with finite for loop based on feedback from Peter Zijlstra and Borislav Petkov. Janakarajan Natarajan (2): am

[PATCH v3 1/2] amd: uncore: Rename cpufeatures macro for cache counters

2017-06-13 Thread Janakarajan Natarajan
In Family 17h, L3 is the last level cache as opposed to L2 in previous families. Avoid this name confusion and rename X86_FEATURE_PERFCTR_L2 to X86_FEATURE_PERFCTR_LLC to indicate the performance counter on the last level of cache. Signed-off-by: Janakarajan Natarajan <janakarajan.nat

[PATCH v3 1/2] amd: uncore: Rename cpufeatures macro for cache counters

2017-06-13 Thread Janakarajan Natarajan
In Family 17h, L3 is the last level cache as opposed to L2 in previous families. Avoid this name confusion and rename X86_FEATURE_PERFCTR_L2 to X86_FEATURE_PERFCTR_LLC to indicate the performance counter on the last level of cache. Signed-off-by: Janakarajan Natarajan --- arch/x86/events/amd

[PATCH v3 0/2] amd: uncore: Fix for AMD Uncore driver

2017-06-13 Thread Janakarajan Natarajan
ion and cleaned up code based on feedback from Borislav Petkov. v1->v2 * Replace while(1) with finite for loop based on feedback from Peter Zijlstra and Borislav Petkov. Janakarajan Natarajan (2): amd: uncore: Rename cpufeatures macro for cache counters amd: uncore: Get correct number of

  1   2   >