KVM Archive mirror
 help / color / mirror / Atom feed
From: Kele Huang <kele@cs.columbia.edu>
To: Sean Christopherson <seanjc@google.com>
Cc: Zide Chen <zide.chen@intel.com>,
	pbonzini@redhat.com, kvm@vger.kernel.org
Subject: Re: [1/1] KVM: restrict kvm_gfn_to_hva_cache_init() to only accept address ranges within one page
Date: Tue, 30 Apr 2024 15:29:26 -0400	[thread overview]
Message-ID: <CAOfLF_+GHrvqWK48YSwbJciM9n=QA9bHn-PjZSd9uo37Gx0ZMQ@mail.gmail.com> (raw)
In-Reply-To: <Zi__ZF5SY2k7BtTE@google.com>

On Mon, Apr 29, 2024 at 4:13 PM Sean Christopherson <seanjc@google.com> wrote:

> Oh, don't get me wrong, I completely agree that the code isn't straightforward.
> But I don't think this is a problem that can be reasonably solved in the caching
> code, at least not easily, as a lot of the oddities stem from KVM's memslots, and
> KVM's contracts with userspace and the guest.

Thanks!  I agree with you.  It seems using flags to indicate that
cross-page cache
initialization failed and checking flags on following guest memory
read and write also
would mess up the code.  On the other hand, simply refusing to set up the
cross-page cache initialization also would confuse users.  I think it
is good to check
the validity of asserts before using it.  Not sure if a brief comment
is helpful to it.

  reply	other threads:[~2024-04-30 19:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23  2:49 [1/1] KVM: restrict kvm_gfn_to_hva_cache_init() to only accept address ranges within one page Kele Huang
2024-04-26  1:16 ` Chen, Zide
     [not found]   ` <CAOfLF_L2UgSUyUsbiBDhLPskt2xLWujy1GBAhpcWzi2i3brAww@mail.gmail.com>
2024-04-26  4:18     ` Kele Huang
2024-04-26 16:17       ` Sean Christopherson
2024-04-27  4:27         ` Kele Huang
2024-04-29 20:13           ` Sean Christopherson
2024-04-30 19:29             ` Kele Huang [this message]
2024-04-26  6:25 ` Christoph Hellwig
2024-04-27  3:50   ` Kele Huang

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='CAOfLF_+GHrvqWK48YSwbJciM9n=QA9bHn-PjZSd9uo37Gx0ZMQ@mail.gmail.com' \
    --to=kele@cs.columbia.edu \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=zide.chen@intel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).