From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel@lists.xenproject.org, keir.xen@gmail.com
Subject: Re: [V1 PATCH] PVH: avoid call to handle_mmio
Date: Wed, 4 Jun 2014 16:52:21 -0700 [thread overview]
Message-ID: <20140604165221.1ccaa596@mantra.us.oracle.com> (raw)
In-Reply-To: <538EE5BF02000078000179E7@mail.emea.novell.com>
On Wed, 04 Jun 2014 08:24:15 +0100
"Jan Beulich" <JBeulich@suse.com> wrote:
> >>> On 04.06.14 at 00:00, <mukesh.rathor@oracle.com> wrote:
> > handle_mmio() is currently unsafe for pvh guests. A call to it would
> > result in call to vioapic_range that will crash xen since the
> > vioapic ptr in struct hvm_domain is not initialized for pvh guests.
> >
> > However, one path exists for such a call. If a pvh guest, dom0 or
> > domU, unintentionally touches non-existing memory, an EPT violation
> > would occur. This would result in unconditional call to
> > hvm_hap_nested_page_fault. In that function, because
> > get_gfn_type_access returns p2m_mmio_dm for non existing mfns by
> > default, handle_mmio() will get called. This would result in xen
> > crash instead of the guest crash. This patch addresses that.
>
> Yes, we definitely want this until being properly handled, no matter
> that crashing the guest here doesn't seem to be the right thing either
> (normal x86 behavior would be to drop writes and return all ones for
> reads).
How about doing the same we do for HVM which is inject GP. Then handle_mmio
would just return 0 for pvh, and hvm_hap_nested_page_fault would not need
to be modified.
Mukesh
next prev parent reply other threads:[~2014-06-04 23:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-03 22:00 [V1 PATCH] PVH: avoid call to handle_mmio Mukesh Rathor
2014-06-03 22:00 ` Mukesh Rathor
2014-06-04 7:24 ` Jan Beulich
2014-06-04 23:52 ` Mukesh Rathor [this message]
2014-06-05 6:28 ` Jan Beulich
2014-06-06 19:42 ` Mukesh Rathor
2014-06-10 7:09 ` Jan Beulich
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=20140604165221.1ccaa596@mantra.us.oracle.com \
--to=mukesh.rathor@oracle.com \
--cc=JBeulich@suse.com \
--cc=keir.xen@gmail.com \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).