public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Nitesh Narayan Lal <nilal@redhat.com>,
	kvm@vger.kernel.org, pagupta@redhat.com, wei.w.wang@intel.com,
	yang.zhang.wz@gmail.com, riel@redhat.com, david@redhat.com
Subject: Re: [Query] [GUEST PAGE HINTING] How to handle virtqueue_kick from the guest in QEMU
Date: Fri, 18 Aug 2017 04:32:23 +0300	[thread overview]
Message-ID: <20170818043043-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <adfd1c28-3f14-9cbb-572e-c5587db808f9@redhat.com>

On Thu, Aug 17, 2017 at 06:53:31PM +0200, Paolo Bonzini wrote:
> On 11/08/2017 23:00, Nitesh Narayan Lal wrote:
> > One way to go about
> > this is to have my own function pointer pointing a to a function
> > qemu_page_hinting() in virtio-balloon.c under QEMU. Now the part where I
> > am not sure is how exactly I will ensure that when virtqueue_kick
> > arrives in QEMU this function is invoked. (I am planning to use the same
> > deflate_vq for my use-case).
> 
> You can use a separate virtq as Michael mentioned.
> 
> Another possibility is to extend virtio-balloon to support 64-bit values
> in the virtqueues.  Then when shifting PFNs right you have bits 52-63
> free, and you can put flags in there (e.g. bit 52=0 means deflate, bit
> 52=1 means page hint).
>
> Of course, if your action is going to be MADV_DONTNEED, you don't need
> to do anything special.
> 
> Paolo

Forgot to say: when you discuss virtio host/guest interface changes,
please copy virtio-dev@lists.oasis-open.org. (Subscriber only, sorry
about that).

-- 
MST

      reply	other threads:[~2017-08-18  1:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-11 21:00 [Query] [GUEST PAGE HINTING] How to handle virtqueue_kick from the guest in QEMU Nitesh Narayan Lal
2017-08-17 10:38 ` David Hildenbrand
2017-08-17 15:48 ` Michael S. Tsirkin
2017-08-17 16:53 ` Paolo Bonzini
2017-08-18  1:32   ` Michael S. Tsirkin [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=20170818043043-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=david@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=nilal@redhat.com \
    --cc=pagupta@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=riel@redhat.com \
    --cc=wei.w.wang@intel.com \
    --cc=yang.zhang.wz@gmail.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