mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Manuel Andreas <manuel.andreas@tum.de>
To: Sean Christopherson <seanjc@google.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>, pbonzini@redhat.com
Subject: Re: [PATCH] x86/hyper-v: Filter non-canonical addresses passed via HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST(_EX)
Date: Thu, 26 Jun 2025 15:49:02 +0200	[thread overview]
Message-ID: <15fa8a27-958f-42d2-ac1f-0fce248cfc1f@tum.de> (raw)
In-Reply-To: <175088956523.720749.10160134537876951534.b4-ty@google.com>

On 6/26/25 12:25 AM, Sean Christopherson wrote:
> On Wed, 25 Jun 2025 15:53:19 +0200, Manuel Andreas wrote:
>> In KVM guests with Hyper-V hypercalls enabled, the hypercalls
>> HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST and HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST_EX
>> allow a guest to request invalidation of portions of a virtual TLB.
>> For this, the hypercall parameter includes a list of GVAs that are supposed
>> to be invalidated.
>>
>> However, when non-canonical GVAs are passed, there is currently no
>> filtering in place and they are eventually passed to checked invocations of
>> INVVPID on Intel / INVLPGA on AMD.
>> While the AMD variant (INVLPGA) will silently ignore the non-canonical
>> address and perform a no-op, the Intel variant (INVVPID) will fail and end
>> up in invvpid_error, where a WARN_ONCE is triggered:
>>
>> [...]
> 
> Applied to kvm-x86 fixes, with a massaged changelog, e.g. to call out that
> "real" Hyper-V behaves this way.  Thanks!
> 
> [1/1] x86/hyper-v: Filter non-canonical addresses passed via HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST(_EX)
>        https://github.com/kvm-x86/linux/commit/fa787ac07b3c

Thanks for the quick approval and Vitaly for the Hyper-V testing!

      reply	other threads:[~2025-06-26 13:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-25 13:53 Manuel Andreas
2025-06-25 16:00 ` Vitaly Kuznetsov
2025-06-25 22:25 ` Sean Christopherson
2025-06-26 13:49   ` Manuel Andreas [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=15fa8a27-958f-42d2-ac1f-0fce248cfc1f@tum.de \
    --to=manuel.andreas@tum.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=vkuznets@redhat.com \
    /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

all inboxes | Powered by JetHome®