All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: 'Jan Beulich' <JBeulich@suse.com>
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: possible I/O emulation state machine issue
Date: Thu, 29 Mar 2018 08:42:41 +0000	[thread overview]
Message-ID: <af290bdd375748d89b1c7d49c25ef922@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <5ABCA36E02000078001B6FF0@prv1-mh.provo.novell.com>

> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 29 March 2018 07:27
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>; xen-devel <xen-
> devel@lists.xenproject.org>
> Subject: RE: possible I/O emulation state machine issue
> 
> >>> On 28.03.18 at 18:22, <Paul.Durrant@citrix.com> wrote:
> >> From: Jan Beulich [mailto:JBeulich@suse.com]
> >> Sent: 28 March 2018 16:59
> >>
> >> Simply timing, perhaps. In any event, newest logs suggest we have
> >> an issue with Windows paging out the page the data for the
> >> REP OUTSW is coming from while the port I/O part of the operation
> >> is pending qemu's completion. Upon retry the linear->physical
> >> translation fails, and we leave incorrect state in place.
> >>
> >> I thought we cache the translation result, thus avoiding the need
> >> for a translation during the retry cycle, so either I'm misremembering
> >> or this doesn't work as intended. And in fact doing the translation a
> >> second time (with the potential of it failing) is wrong here - when the
> >> port access has occurred, we must not fail the emulation anymore
> >> (repeating the port write would probably be fine for the VGA, but
> >> would hardly be fine for e.g. an IDE interface).
> >
> > Yes, I thought we made sure all reps were completed using cached
> > translations before returning to guest.
> 
> We do this only for actual MMIO accesses, not for RAM ones,
> afaics.
> 
> I think I see a way to deal with the specific case here, but we'll
> certainly need to make things work properly in the general case.
> That's not something reasonable to be done for 4.11 though.
> 

Page table modification racing with an emulation sounds pretty bad though. I guess that if the damage is only limited to the guest though it's not something that requires immediate fix.

> Suppressing the stdvga port intercepts has, btw, not helped the
> situation.
> 

That surprises me. The whole string emulation should go out to QEMU without being broken up in that case, and since it's an outsw I don't see why there would be any retry of the linear->physical translation during completion.

  Paul

> Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-03-29  8:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-22 15:12 possible I/O emulation state machine issue Jan Beulich
2018-03-22 15:29 ` Andrew Cooper
2018-03-23  7:30   ` Jan Beulich
2018-03-23 10:43     ` Paul Durrant
2018-03-23 11:19       ` Jan Beulich
2018-03-23 11:35       ` Jan Beulich
2018-03-23 13:41         ` Paul Durrant
2018-03-23 15:09           ` Jan Beulich
2018-03-26  8:42           ` Jan Beulich
2018-03-28 13:48             ` Paul Durrant
2018-03-28 14:08               ` Jan Beulich
2018-03-28 14:20                 ` Paul Durrant
2018-03-28 15:32                   ` Jan Beulich
2018-03-28 15:59               ` Jan Beulich
2018-03-28 16:22                 ` Paul Durrant
2018-03-28 16:35                   ` Andrew Cooper
2018-03-29  6:31                     ` Jan Beulich
2018-04-12 14:13                     ` Jan Beulich
2018-03-29  6:27                   ` Jan Beulich
2018-03-29  8:42                     ` Paul Durrant [this message]
2018-03-29  8:51                       ` 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=af290bdd375748d89b1c7d49c25ef922@AMSPEX02CL03.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=JBeulich@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.