From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Paul Durrant <paul.durrant@citrix.com>, xen-devel@lists.xenproject.org
Cc: Keir Fraser <keir@xen.org>, Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH] x86/hvm/viridian: fix the TLB flush hypercall
Date: Wed, 16 Mar 2016 13:20:15 +0000 [thread overview]
Message-ID: <56E95D8F.7050709@citrix.com> (raw)
In-Reply-To: <1458133226-1808-1-git-send-email-paul.durrant@citrix.com>
On 16/03/16 13:00, Paul Durrant 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 flush 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 and also adds a check to make
> sure the current vCPU is not included in the flush mask (since there's
> clearly no need for the CPU to IPI itself).
Thinking more about this, the asid flush does serve properly for TLB
flushing. Why do we then subsequently use flush_tlb_mask(), as opposed
to a less heavyweight alternative like smp_send_event_check_mask() ?
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-03-16 13:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-16 13:00 [PATCH] x86/hvm/viridian: fix the TLB flush hypercall Paul Durrant
2016-03-16 13:20 ` Andrew Cooper [this message]
2016-03-16 13:25 ` Paul Durrant
2016-03-16 13:31 ` Jan Beulich
2016-03-16 13:37 ` Andrew Cooper
2016-03-16 13:39 ` Paul Durrant
2016-03-16 13:38 ` Paul Durrant
-- strict thread matches above, loose matches on Subject: below --
2016-03-16 12:57 Paul Durrant
2016-03-16 13:09 ` Paul Durrant
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=56E95D8F.7050709@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 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.