From: "Roedel, Joerg" <Joerg.Roedel@amd.com>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"stable@kernel.org" <stable@kernel.org>
Subject: Re: [PATCH] KVM: SVM: Fix fault-rip on vmsave/vmload emulation
Date: Wed, 6 Apr 2011 14:27:53 +0200 [thread overview]
Message-ID: <20110406122753.GM23633@amd.com> (raw)
In-Reply-To: <4D9C4E58.7020002@redhat.com>
On Wed, Apr 06, 2011 at 07:28:24AM -0400, Avi Kivity wrote:
> On 04/06/2011 02:21 PM, Avi Kivity wrote:
> > On 04/06/2011 01:30 PM, Joerg Roedel wrote:
> >> When the emulation of vmload or vmsave fails because the
> >> guest passed an unsupported physical address it gets an #GP
> >> with rip pointing to the instruction after vmsave/vmload.
> >> This is a bug and fixed by this patch.
> >>
> >
> > Applied, thanks.
> >
>
> btw, I think the actual address check is incorrect, need to check
> MAXPHYADDR and not hardcoded 0xffff000000000000.
There is a difference. MAX_PHYSADDR_BITS is the maximum Linux can
support while the mask above is the current limit the hardware
supports.
It is the same on real hardware, when rax is >= (1<<48) there is a #GP
(and no intercept if in guest-mode). Here is btw. a difference between
nested-svm and hardware-svm, if rax contains a physical address which is
supported but not backed by RAM the machine will just freeze on real
hardware where as in nested-svm it causes a #GP (should be fine because
the behavior in this case is undefined).
Joerg
--
AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
next prev parent reply other threads:[~2011-04-06 12:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-06 10:30 [PATCH] KVM: SVM: Fix fault-rip on vmsave/vmload emulation Joerg Roedel
2011-04-06 11:21 ` Avi Kivity
2011-04-06 11:28 ` Avi Kivity
2011-04-06 12:27 ` Roedel, Joerg [this message]
2011-04-06 12:43 ` Avi Kivity
2011-04-06 13:13 ` Roedel, Joerg
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=20110406122753.GM23633@amd.com \
--to=joerg.roedel@amd.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox