From: Avi Kivity <avi@redhat.com>
To: Manish Regmi <regmi.manish@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 1/1] correctly handle VM Entry Exit reasons and also show them in trace.
Date: Mon, 19 Apr 2010 12:24:41 +0300 [thread overview]
Message-ID: <4BCC2159.2090605@redhat.com> (raw)
In-Reply-To: <r2r652016d31004172335gb2f57dfaxef74b8aee03cc30@mail.gmail.com>
On 04/18/2010 09:35 AM, Manish Regmi wrote:
> Hi,
> When the vm exit reason is VM Entry failures it has leftmost bit set.
> This patch
> - clears the leftmost bit when copying to vmx->exit_reason. This will
> make the checks like if ((vmx->exit_reason ==
> EXIT_REASON_MCE_DURING_VMENTRY) valid in vmx_complete_interrupts.
> - adds two more EXIT_REASONS 33 and 34 in vmx.h
> - also adds them to exit reason strings.
>
> Please let me know if there is anything missing or wrong. Thank you.
>
>
The patch is wordwrapped. Please use git send-email or equivalent.
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 7e2f8d5..e93be6f 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -3641,7 +3641,7 @@ static void vmx_complete_interrupts(struct vcpu_vmx *vmx)
>
> exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
>
> - vmx->exit_reason = vmcs_read32(VM_EXIT_REASON);
> + vmx->exit_reason = vmcs_read32(VM_EXIT_REASON)&
> ~VMX_EXIT_REASONS_FAILED_VMENTRY;
>
(here for example)
> /* Handle machine checks before interrupts are enabled */
> if ((vmx->exit_reason == EXIT_REASON_MCE_DURING_VMENTRY)
> @@ -4057,6 +4057,8 @@ static const struct trace_print_flags
> vmx_exit_reasons_str[] = {
> _ER(IO_INSTRUCTION),
> _ER(MSR_READ),
> _ER(MSR_WRITE),
> + _ER(INVALID_GUEST_STATE),
> + _ER(MSR_LOADING),
> _ER(MWAIT_INSTRUCTION),
> _ER(MONITOR_INSTRUCTION),
> _ER(PAUSE_INSTRUCTION),
>
Please split the new exit codes into a separate patch.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2010-04-19 9:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-18 6:35 [PATCH 1/1] correctly handle VM Entry Exit reasons and also show them in trace Manish Regmi
2010-04-19 9:24 ` Avi Kivity [this message]
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=4BCC2159.2090605@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=regmi.manish@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox