From: Anthony Liguori <aliguori@us.ibm.com>
To: Huang Ying <ying.huang@intel.com>
Cc: Avi Kivity <avi@redhat.com>, Andi Kleen <andi@firstfloor.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH] QEMU-KVM: MCE: Relay UCR MCE to guest
Date: Tue, 08 Sep 2009 08:07:57 -0500 [thread overview]
Message-ID: <4AA6572D.50203@us.ibm.com> (raw)
In-Reply-To: <1252388463.14648.975.camel@yhuang-dev.sh.intel.com>
Huang Ying wrote:
> I find there is already a function named qemu_ram_addr_from_host which
> translate from user space virtual address into qemu RAM address. But I
> need function to return a error code instead of abort in case of no RAM
> address corresponding specified user space virtual address. So I plan to
> use following code to deal with that.
>
> int do_qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr);
> ram_addr_t qemu_ram_addr_from_host(void *ptr);
>
> Does this follow the coding style of qemu?
>
I don't like the do_ prefix much but I don't have a better suggestion.
>> If the instruction gets skipped, we may be leaking host memory because
>> the access never happened.
>>
>
> There are two kinds of recoverable MCE named SRAO (Software Recoverable
> Action Optional) and SRAR (Software Recoverable Action Required). For
> your example, it is a SRAR error. Where kernel will munmap the error
> page and send SIGBUS to qemu via force_sig_info, which will unblock
> SIGBUS and reset its action to SIG_DFL, so qemu will be terminated.
>
> If the guest mode is interrupted, because signal mask processing of KVM
> kernel part, SIGBUS can be captured by qemu.
>
Ah, I didn't realize this path just worked.
--
Regards,
Anthony Liguori
next prev parent reply other threads:[~2009-09-08 13:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-07 8:32 [PATCH] QEMU-KVM: MCE: Relay UCR MCE to guest Huang Ying
2009-09-07 20:48 ` Anthony Liguori
2009-09-08 5:41 ` Huang Ying
2009-09-08 13:07 ` Anthony Liguori [this message]
2009-09-08 6:41 ` Avi Kivity
2009-09-08 6:46 ` Huang Ying
2009-09-08 8:11 ` Andi Kleen
2009-09-09 12:10 ` Avi Kivity
2009-09-10 2:50 ` Huang Ying
2009-09-08 6:44 ` Avi Kivity
2009-09-08 6:43 ` Huang Ying
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=4AA6572D.50203@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=andi@firstfloor.org \
--cc=avi@redhat.com \
--cc=kvm@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