From: Greg Edwards <gedwards@ddn.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: <stable@vger.kernel.org>, <kai.huang@linux.intel.com>,
<pfeiner@google.com>
Subject: Re: [PATCH] KVM: VMX: Fix commit which broke PML
Date: Tue, 22 Nov 2016 13:54:58 -0700 [thread overview]
Message-ID: <20161122205458.GA6919@psuche> (raw)
In-Reply-To: <20161122154352.25784-1-pbonzini@redhat.com>
On Tue, Nov 22, 2016 at 04:43:51PM +0100, Paolo Bonzini wrote:
> From: Kai Huang <kai.huang@linux.intel.com>
>
> [ upstream commit feda805fe7c4ed9cf78158e73b1218752e3b4314, for 4.1.y only.
> The symptoms are not as bad as they were when the upstream patch went
> in, but it still fixes an ugly call trace on VM shutdown and prepares
> for the next patch. ]
>
> I found PML was broken since below commit:
>
> commit feda805fe7c4ed9cf78158e73b1218752e3b4314
> Author: Xiao Guangrong <guangrong.xiao@linux.intel.com>
> Date: Wed Sep 9 14:05:55 2015 +0800
>
> KVM: VMX: unify SECONDARY_VM_EXEC_CONTROL update
>
> Unify the update in vmx_cpuid_update()
>
> Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
> [Rewrite to use vmcs_set_secondary_exec_control. - Paolo]
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>
> The reason is in above commit vmx_cpuid_update calls vmx_secondary_exec_control,
> in which currently SECONDARY_EXEC_ENABLE_PML bit is cleared unconditionally (as
> PML is enabled in creating vcpu). Therefore if vcpu_cpuid_update is called after
> vcpu is created, PML will be disabled unexpectedly while log-dirty code still
> thinks PML is used.
>
> Fix this by clearing SECONDARY_EXEC_ENABLE_PML in vmx_secondary_exec_control
> only when PML is not supported or not enabled (!enable_pml). This is more
> reasonable as PML is currently either always enabled or disabled. With this
> explicit updating SECONDARY_EXEC_ENABLE_PML in vmx_enable{disable}_pml is not
> needed so also rename vmx_enable{disable}_pml to vmx_create{destroy}_pml_buffer.
>
> Fixes: feda805fe7c4ed9cf78158e73b1218752e3b4314
> Signed-off-by: Kai Huang <kai.huang@linux.intel.com>
> [While at it, change a wrong ASSERT to an "if". The condition can happen
> if creating the VCPU fails with ENOMEM. - Paolo]
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Greg Edwards <gedwards@ddn.com>
next prev parent reply other threads:[~2016-11-22 21:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-22 15:43 [PATCH] KVM: VMX: Fix commit which broke PML Paolo Bonzini
2016-11-22 20:54 ` Greg Edwards [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-11-03 5:49 Kai Huang
2015-11-03 9:59 ` Paolo Bonzini
2015-11-04 5:43 ` Kai Huang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161122205458.GA6919@psuche \
--to=gedwards@ddn.com \
--cc=kai.huang@linux.intel.com \
--cc=pbonzini@redhat.com \
--cc=pfeiner@google.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.