Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1726874 > unrolled thread
| Started by | Borislav Petkov <bp@alien8.de> |
|---|---|
| First post | 2017-09-05 19:10 +0200 |
| Last post | 2017-09-06 17:30 +0200 |
| Articles | 5 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] KVM: SVM: Do not issue virtual VMLOAD/VMSAVE supported-message Borislav Petkov <bp@alien8.de> - 2017-09-05 19:10 +0200
Re: [PATCH] KVM: SVM: Do not issue virtual VMLOAD/VMSAVE supported-message David Hildenbrand <david@redhat.com> - 2017-09-06 15:00 +0200
Re: [PATCH] KVM: SVM: Do not issue virtual VMLOAD/VMSAVE supported-message Borislav Petkov <bp@alien8.de> - 2017-09-06 15:20 +0200
Re: [PATCH] KVM: SVM: Do not issue virtual VMLOAD/VMSAVE supported-message David Hildenbrand <david@redhat.com> - 2017-09-06 16:10 +0200
Re: [PATCH] KVM: SVM: Do not issue virtual VMLOAD/VMSAVE supported-message Borislav Petkov <bp@alien8.de> - 2017-09-06 17:30 +0200
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2017-09-05 19:10 +0200 |
| Subject | [PATCH] KVM: SVM: Do not issue virtual VMLOAD/VMSAVE supported-message |
| Message-ID | <umpwl-5Ck-1@gated-at.bofh.it> |
From: Borislav Petkov <bp@suse.de>
There's no need to issue that everytime during boot - we have the
/proc/cpuinfo flag for people and software to query.
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
---
arch/x86/kvm/svm.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 8dbd8dbc83eb..f25e5b930932 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1101,11 +1101,8 @@ static __init int svm_hardware_setup(void)
if (vls) {
if (!npt_enabled ||
!boot_cpu_has(X86_FEATURE_V_VMSAVE_VMLOAD) ||
- !IS_ENABLED(CONFIG_X86_64)) {
+ !IS_ENABLED(CONFIG_X86_64))
vls = false;
- } else {
- pr_info("Virtual VMLOAD VMSAVE supported\n");
- }
}
return 0;
--
2.13.0
[toc] | [next] | [standalone]
| From | David Hildenbrand <david@redhat.com> |
|---|---|
| Date | 2017-09-06 15:00 +0200 |
| Subject | Re: [PATCH] KVM: SVM: Do not issue virtual VMLOAD/VMSAVE supported-message |
| Message-ID | <umI5X-1TZ-5@gated-at.bofh.it> |
| In reply to | #1726874 |
On 05.09.2017 19:06, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
>
> There's no need to issue that everytime during boot - we have the
> /proc/cpuinfo flag for people and software to query.
>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Radim Krčmář <rkrcmar@redhat.com>
> ---
> arch/x86/kvm/svm.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index 8dbd8dbc83eb..f25e5b930932 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -1101,11 +1101,8 @@ static __init int svm_hardware_setup(void)
> if (vls) {
> if (!npt_enabled ||
> !boot_cpu_has(X86_FEATURE_V_VMSAVE_VMLOAD) ||
> - !IS_ENABLED(CONFIG_X86_64)) {
> + !IS_ENABLED(CONFIG_X86_64))
> vls = false;
> - } else {
> - pr_info("Virtual VMLOAD VMSAVE supported\n");
> - }
> }
>
> return 0;
>
Maybe go one step further and incorporate everything (+vls) into a
single if statement?
--
Thanks,
David
[toc] | [prev] | [next] | [standalone]
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2017-09-06 15:20 +0200 |
| Subject | Re: [PATCH] KVM: SVM: Do not issue virtual VMLOAD/VMSAVE supported-message |
| Message-ID | <umIpj-2iw-1@gated-at.bofh.it> |
| In reply to | #1727417 |
On Wed, Sep 06, 2017 at 02:54:05PM +0200, David Hildenbrand wrote:
> Maybe go one step further and incorporate everything (+vls) into a
> single if statement?
Or maybe simplify it even more by not even looking at vls. If the user
disables it, fine, if she enables it but the hw doesn't support it, it
will be set to false automatically.
Or am I missing a case?
---
From: Borislav Petkov <bp@suse.de>
Date: Tue, 5 Sep 2017 18:59:55 +0200
Subject: [PATCH] KVM: SVM: Do not issue virtual VMLOAD/VMSAVE
supported-message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
There's no need to issue that everytime during boot - we have the
/proc/cpuinfo flag for people and software to query.
Also, simplify logic which verifies the vls chicken bit setting.
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: David Hildenbrand <david@redhat.com>
Cc: Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
---
arch/x86/kvm/svm.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 8dbd8dbc83eb..d3c481778d9c 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1098,15 +1098,10 @@ static __init int svm_hardware_setup(void)
}
}
- if (vls) {
- if (!npt_enabled ||
- !boot_cpu_has(X86_FEATURE_V_VMSAVE_VMLOAD) ||
- !IS_ENABLED(CONFIG_X86_64)) {
- vls = false;
- } else {
- pr_info("Virtual VMLOAD VMSAVE supported\n");
- }
- }
+ if (!npt_enabled ||
+ !boot_cpu_has(X86_FEATURE_V_VMSAVE_VMLOAD) ||
+ !IS_ENABLED(CONFIG_X86_64))
+ vls = false;
return 0;
--
2.13.0
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
[toc] | [prev] | [next] | [standalone]
| From | David Hildenbrand <david@redhat.com> |
|---|---|
| Date | 2017-09-06 16:10 +0200 |
| Subject | Re: [PATCH] KVM: SVM: Do not issue virtual VMLOAD/VMSAVE supported-message |
| Message-ID | <umJbI-2R0-13@gated-at.bofh.it> |
| In reply to | #1727442 |
On 06.09.2017 15:17, Borislav Petkov wrote:
> On Wed, Sep 06, 2017 at 02:54:05PM +0200, David Hildenbrand wrote:
>> Maybe go one step further and incorporate everything (+vls) into a
>> single if statement?
>
> Or maybe simplify it even more by not even looking at vls. If the user
> disables it, fine, if she enables it but the hw doesn't support it, it
> will be set to false automatically.
>
> Or am I missing a case?
>
> ---
> From: Borislav Petkov <bp@suse.de>
> Date: Tue, 5 Sep 2017 18:59:55 +0200
> Subject: [PATCH] KVM: SVM: Do not issue virtual VMLOAD/VMSAVE
> supported-message
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> There's no need to issue that everytime during boot - we have the
> /proc/cpuinfo flag for people and software to query.
>
> Also, simplify logic which verifies the vls chicken bit setting.
>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Radim Krčmář <rkrcmar@redhat.com>
> ---
> arch/x86/kvm/svm.c | 13 ++++---------
> 1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index 8dbd8dbc83eb..d3c481778d9c 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -1098,15 +1098,10 @@ static __init int svm_hardware_setup(void)
> }
> }
>
> - if (vls) {
> - if (!npt_enabled ||
> - !boot_cpu_has(X86_FEATURE_V_VMSAVE_VMLOAD) ||
> - !IS_ENABLED(CONFIG_X86_64)) {
> - vls = false;
> - } else {
> - pr_info("Virtual VMLOAD VMSAVE supported\n");
> - }
> - }
> + if (!npt_enabled ||
> + !boot_cpu_has(X86_FEATURE_V_VMSAVE_VMLOAD) ||
> + !IS_ENABLED(CONFIG_X86_64))
> + vls = false;
>
> return 0;
>
>
had the same idea but was worried about runtime. but this is really
only executed once, so
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David
[toc] | [prev] | [next] | [standalone]
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2017-09-06 17:30 +0200 |
| Subject | Re: [PATCH] KVM: SVM: Do not issue virtual VMLOAD/VMSAVE supported-message |
| Message-ID | <umKr8-3Dj-19@gated-at.bofh.it> |
| In reply to | #1727524 |
On Wed, Sep 06, 2017 at 04:00:04PM +0200, David Hildenbrand wrote:
> had the same idea but was worried about runtime. but this is really
> only executed once, so
Yap, exactly. Forgot to say ... but I was thinking of saying it. :)
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web