From: Suravee Suthikulanit <suravee.suthikulpanit@amd.com>
To: Tim Deegan <tim@xen.org>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
chegger@amazon.de, Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH 1/1 V5] x86/AMD: Fix nested svm crash due to assertion in __virt_to_maddr
Date: Thu, 8 Aug 2013 11:42:16 -0500 [thread overview]
Message-ID: <5203CA68.50005@amd.com> (raw)
In-Reply-To: <20130808093824.GA68503@ocelot.phlegethon.org>
[-- Attachment #1.1: Type: text/plain, Size: 1702 bytes --]
On 8/8/2013 4:38 AM, Tim Deegan wrote:
> At 14:17 +0100 on 07 Aug (1375885025), Jan Beulich wrote:
>>>>> On 05.08.13 at 10:31, <suravee.suthikulpanit@amd.com> wrote:
>>> From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
>>>
>>> Fix assertion in __virt_to_maddr when starting nested SVM guest
>>> in debug mode. Investigation has shown that svm_vmsave/svm_vmload
>>> make use of __pa() with invalid address.
>>>
>>> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
>> Tim - have all your earlier comments been addressed in this version?
> Yes, I'm happy with this one.
>
> Reviewed-by: Tim Deegan <tim@xen.org>
>
>>> - if (!nestedhvm_enabled(v->domain)) {
>>> + if ( !nestedhvm_enabled(v->domain) || !hvm_svm_enabled(v) ) {
>> Suravee, why is this change needed (here and further down)?
>> Can we really get here when hvm_svm_enabled(v) returns false?
>> I don't recall this having been there in earlier versions.
> This came from discussion of what fault to inject -- we always intercept
> VM{RUN,LOAD,SAVE} so I think we can get here. The AMD docs for those say:
> "Checks exceptions (#GP) before the intercept."
> but nothing about checking guest_efer.SVME so AFAICT we have to do that
> in Xen.
>
> Arguably this fix could could be a separate patch. Certainly the same
> check ought to go into svm_exit_do_vmrun().
>
> Tim.
>
Here, the "nestedhvm_enabled(v->domain)" is implemented as
/* Nested HVM on/off per domain */
bool_t
nestedhvm_enabled(struct domain *d)
{
return is_hvm_domain(d) &&
d->arch.hvm_domain.params[HVM_PARAM_NESTEDHVM];
}
I'm not familiar with this, but I believe this is the option in the HVM
config file"nestedhvm=1".
Suravee
[-- Attachment #1.2: Type: text/html, Size: 3704 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2013-08-08 16:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 8:31 [PATCH 1/1 V5] x86/AMD: Fix nested svm crash due to assertion in __virt_to_maddr suravee.suthikulpanit
2013-08-07 13:17 ` Jan Beulich
2013-08-07 22:18 ` Suravee Suthikulanit
2013-08-08 6:47 ` Jan Beulich
2013-08-08 15:55 ` Suravee Suthikulanit
2013-08-12 8:57 ` Egger, Christoph
2013-08-12 9:01 ` Jan Beulich
2013-08-12 11:13 ` Egger, Christoph
2013-08-12 13:18 ` Jan Beulich
2013-08-12 14:04 ` Suravee Suthikulpanit
2013-08-12 14:26 ` Jan Beulich
2013-08-12 14:40 ` Egger, Christoph
2013-08-12 15:26 ` Jan Beulich
2013-08-08 9:38 ` Tim Deegan
2013-08-08 16:42 ` Suravee Suthikulanit [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=5203CA68.50005@amd.com \
--to=suravee.suthikulpanit@amd.com \
--cc=JBeulich@suse.com \
--cc=chegger@amazon.de \
--cc=tim@xen.org \
--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).