xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Paul Durrant <paul.durrant@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Keir Fraser <keir@xen.org>,
Subject: Re: [PATCH v2] x86/hvm/viridian: fix the TLB flush hypercall
Date: Thu, 17 Mar 2016 02:35:17 -0600	[thread overview]
Message-ID: <56EA7A5502000078000DD9EF@prv-mh.provo.novell.com> (raw)
In-Reply-To: <1458138101-1466-1-git-send-email-paul.durrant@citrix.com>

>>> On 16.03.16 at 15:21, <paul.durrant@citrix.com> wrote:
> Commit b38d426a "flush remote tlbs by hypercall" add support to allow
> Windows to request flush of remote TLB via hypercall rather than IPI.
> Unfortunately it seems that this code was broken in a couple of ways:
> 1) The allocation of the per-vcpu ipi mask is gated on whether the
>    domain has viridian features enabled but the call to allocate is
>    made before the toolstack has enabled those features. This results
>    in a NULL pointer dereference.
> 2) One of the flush hypercall variants is a rep op, but the code
>    does not update the output data with the reps completed. Hence the
>    guest will spin repeatedly making the hypercall because it believes
>    it has uncompleted reps.
> This patch fixes both of these issues as follows:
> 1) The ipi mask need only be per-pcpu so it is made a per-pcpu static
>    to avoid the need for allocation.
> 2) The rep complete count is updated to the rep count since the single
>    flush that Xen does covers all reps anyway.
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>

Xen-devel mailing list

  parent reply	other threads:[~2016-03-17  8:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 14:21 [PATCH v2] x86/hvm/viridian: fix the TLB flush hypercall Paul Durrant
2016-03-16 15:35 ` Jan Beulich
2016-03-16 17:35   ` Paul Durrant
2016-03-17  8:11     ` Jan Beulich
2016-03-17  8:14       ` Paul Durrant
2016-03-17  8:35 ` Jan Beulich [this message]
2016-03-17 10:30   ` 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56EA7A5502000078000DD9EF@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=keir@xen.org \
    --cc=paul.durrant@citrix.com \
    --cc=xen-devel@lists.xenproject.org \


* 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).