From: Avi Kivity <avi@redhat.com>
To: Huang Ying <ying.huang@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
Andi Kleen <andi@firstfloor.org>
Subject: Re: [PATCH -v4] KVM: Add VT-x machine check support
Date: Mon, 08 Jun 2009 12:49:57 +0300 [thread overview]
Message-ID: <4A2CDEC5.2070900@redhat.com> (raw)
In-Reply-To: <1244453829.8361.602.camel@yhuang-dev.sh.intel.com>
Huang Ying wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> VT-x needs an explicit MC vector intercept to handle machine checks in the
> hyper visor.
>
> It also has a special option to catch machine checks that happen
> during VT entry.
>
> Do these interceptions and forward them to the Linux machine check
> handler. Make it always look like user space is interrupted because
> the machine check handler treats kernel/user space differently.
>
> Thanks to Jiang Yunhong for help and testing.
>
> v4: move exit_reason to struct vcpu_vmx, add is_machine_check()
>
> v3: Rebased on kvm.git
>
> v2: Handle machine checks still in interrupt off context
> to avoid problems on preemptible kernels.
>
>
Applied, thanks.
>
> + vmx->exit_reason = vmcs_read32(VM_EXIT_REASON);
> +
> + /* Handle machine checks before interrupts are enabled */
> + if ((vmx->exit_reason == EXIT_REASON_MCE_DURING_VMENTRY) ||
> + is_machine_check(exit_intr_info))
> + kvm_machine_check();
> +
>
I added a check here for exit_reason == EXCEPTION_NMI. I don't think
exit_intr_info can be trusted otherwise.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2009-06-08 9:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-08 9:37 [PATCH -v4] KVM: Add VT-x machine check support Huang Ying
2009-06-08 9:49 ` 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=4A2CDEC5.2070900@redhat.com \
--to=avi@redhat.com \
--cc=andi@firstfloor.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ying.huang@intel.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