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

On 17/03/16 08:35, Jan Beulich wrote:
>>>> 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>
>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

      reply	other threads:[~2016-03-17 10:30 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
2016-03-17 10:30   ` Andrew Cooper [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=56EA8732.1000902@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=paul.durrant@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).