From: Suravee Suthikulanit <suravee.suthikulpanit@amd.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: chegger@amazon.de, Tim Deegan <tim@xen.org>, xen-devel@lists.xen.org
Subject: Re: [PATCH 1/1 V3] x86/AMD: Fix nested svm crash due to assertion in __virt_to_maddr
Date: Mon, 15 Jul 2013 16:17:04 -0500 [thread overview]
Message-ID: <51E466D0.7090504@amd.com> (raw)
In-Reply-To: <51DFD3EC02000078000E45BB@nat28.tlf.novell.com>
On 7/12/2013 3:01 AM, Jan Beulich wrote:
>>>> On 11.07.13 at 19:34, <suravee.suthikulpanit@amd.com> wrote:
>> --- a/xen/arch/x86/mm/hap/nested_hap.c
>> +++ b/xen/arch/x86/mm/hap/nested_hap.c
>> @@ -191,6 +191,19 @@ out:
>> return rc;
>> }
>>
>> +int
>> +nestedhvm_walk_L0_p2m(struct vcpu *v, paddr_t L1_gpa, paddr_t *L0_gpa)
>> +{
>> + p2m_type_t p2mt_10;
>> + unsigned int page_order_10;
>> + p2m_access_t p2ma_10 = p2m_access_rwx;
> Pointless initializer?
These are mostly part of the required function prototype. However, I
noticed that I don't need to specify page order.
>
>> +
>> + return nestedhap_walk_L0_p2m ( p2m_get_hostp2m(v->domain),
> Extra spaces around "(".
Ah, thanks.
>
>> + L1_gpa, L0_gpa,
>> + &p2mt_10, &p2ma_10, &page_order_10,
>> + 0, 0, 0);
> Wouldn't the caller's use of the GPA imply that you want read and
> write access here?
Actually, access_r and access_x is not used in the
"nestedhap_walk_L0_p2m" function.
Since we are not writing to this GPA, would we need the write access?
>
>> +}
> I'm not clear about the need for this new wrapper: Is it really
> benign to the caller what type, access, and order get returned
> here? Is it really too much of a burden to have the two call
> sites do the call here directly? The more that (see above) you'd
> really need to give the caller control over the access requested?
Ok, I will just making the nestedhap_walk_L0_p2m not static and add the
prototype in the svm.h then.
> Finally, considering that now you change a file under
> xen/arch/x86/mm/, you should have Cc'ed Tim on the patch
> submission.
Thanks for pointing out.
Suravee
next prev parent reply other threads:[~2013-07-15 21:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-11 17:34 [PATCH 1/1 V3] x86/AMD: Fix nested svm crash due to assertion in __virt_to_maddr suravee.suthikulpanit
2013-07-12 8:01 ` Jan Beulich
2013-07-15 21:17 ` Suravee Suthikulanit [this message]
2013-07-16 6:55 ` Jan Beulich
2013-07-17 19:43 ` Tim Deegan
2013-07-18 8:14 ` Egger, Christoph
2013-07-18 8:24 ` Egger, Christoph
2013-07-18 16:41 ` Tim Deegan
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=51E466D0.7090504@amd.com \
--to=suravee.suthikulpanit@amd.com \
--cc=JBeulich@suse.com \
--cc=chegger@amazon.de \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.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).