From: Paul Durrant <Paul.Durrant@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
Wei Liu <wei.liu2@citrix.com>, "Tim (Xen.org)" <tim@xen.org>
Subject: Re: [PATCH] x86/shadow: account for ioreq server pages before complaining about not found mapping
Date: Fri, 29 Apr 2016 09:35:16 +0000 [thread overview]
Message-ID: <99a269dc82424253b7bcd246061d0a07@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <572343D702000078000E7201@prv-mh.provo.novell.com>
> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 29 April 2016 10:22
> To: Paul Durrant
> Cc: Wei Liu; xen-devel; Tim (Xen.org)
> Subject: RE: [PATCH] x86/shadow: account for ioreq server pages before
> complaining about not found mapping
>
> >>> On 29.04.16 at 10:29, <Paul.Durrant@citrix.com> wrote:
> >> -----Original Message-----
> >> From: Jan Beulich [mailto:JBeulich@suse.com]
> >> Sent: 29 April 2016 09:14
> >> To: xen-devel
> >> Cc: Paul Durrant; Wei Liu; Tim (Xen.org)
> >> Subject: [PATCH] x86/shadow: account for ioreq server pages before
> >> complaining about not found mapping
> >>
> >> prepare_ring_for_helper(), just like share_xen_page_with_guest(),
> >> takes a write reference on the page, and hence should similarly be
> >> accounted for when determining whether to log a complaint.
> >>
> >> This requires using recursive locking for the ioreq server lock, as the
> >> offending invocation of sh_remove_all_mappings() is down the call stack
> >> from hvm_set_ioreq_server_state(). (While not strictly needed to be
> >> done in all other instances too, convert all of them for consistency.)
> >
> > Do you have an example of a call stack?
>
> (XEN) Xen call trace:
> (XEN) [<ffff82d08021ca61>]
> common.c#sh_remove_all_mappings+0x1fb/0x27d
> (XEN) [<ffff82d08021ea2a>]
> common.c#sh_unshadow_for_p2m_change+0xc9/0x2a8
> (XEN) [<ffff82d08021ed06>] shadow_write_p2m_entry+0xfd/0x168
> (XEN) [<ffff82d0801ffe64>] paging_write_p2m_entry+0x44/0x51
> (XEN) [<ffff82d08020c706>] p2m-pt.c#p2m_pt_set_entry+0x539/0x846
> (XEN) [<ffff82d080201e57>] p2m_set_entry+0xd2/0x113
> (XEN) [<ffff82d080202423>] p2m.c#p2m_remove_page+0x20a/0x220
> (XEN) [<ffff82d0802069c5>] guest_physmap_remove_page+0x19b/0x207
> (XEN) [<ffff82d0801db0b0>] ioreq.c#hvm_remove_ioreq_gmfn+0x4e/0x5e
> (XEN) [<ffff82d0801db123>] ioreq.c#hvm_ioreq_server_enable+0x63/0xaf
> (XEN) [<ffff82d0801db1d8>] hvm_set_ioreq_server_state+0x69/0xb3
> (XEN) [<ffff82d0801d5495>] do_hvm_op+0x56a/0x1c85
> (XEN) [<ffff82d080243f5d>] lstar_enter+0xdd/0x137
>
> > Is the recursion due to the
> > domain_pause() being done with the ioreq server spinlock held?
>
> I don't think the domain_pause() matters here.
Thanks for the stack. Yes the domain_pause() is clearly irrelevant and there's no trivial way to avoid the need for the recursive lock so
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
>
> Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-04-29 9:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-29 8:13 [PATCH] x86/shadow: account for ioreq server pages before complaining about not found mapping Jan Beulich
2016-04-29 8:29 ` Paul Durrant
2016-04-29 9:21 ` Jan Beulich
2016-04-29 9:35 ` Paul Durrant [this message]
2016-04-29 12:28 ` Andrew Cooper
2016-04-29 12:39 ` Jan Beulich
2016-04-29 13:12 ` Wei Liu
[not found] <20160429171022.GB97240@deinos.phlegethon.org>
2016-04-29 17:21 ` Andrew Cooper
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=99a269dc82424253b7bcd246061d0a07@AMSPEX02CL03.citrite.net \
--to=paul.durrant@citrix.com \
--cc=JBeulich@suse.com \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.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).