public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Nitesh Narayan Lal <nilal@redhat.com>
Cc: 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: Thu, 17 Aug 2017 18:48:24 +0300	[thread overview]
Message-ID: <20170817184536-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <e9e24bb6-686e-0a33-9bbf-4650863bbae0@redhat.com>

On Fri, Aug 11, 2017 at 05:00:15PM -0400, Nitesh Narayan Lal wrote:
> Hi,
> 
> In my project of "Guest Page Hinting"[1], I have a list of pages which
> are supposed to be passed to the host. Now I am trying to figure out the
> changes which I should make in QEMU in order to pass this request to the
> host.
> 
> Unlike virtio balloon where the request to deflate/inflate is derived
> from the host, in my case, I need to figure out how the request which is
> generated in the guest could be received in QEMU. 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).
>
> Another way could be to make changes in the existing
> "virtio_balloon_handle_output" and may add another flag in the virtqueue
> structure using which I could distinguish if it's a guest page hinting
> request. But even in this case, I am not sure how will it work because
> from what I understood when a user sends a deflate request then this
> function gets invoked and after all the processing it notifies the
> guest. (Which is opposite of what I am trying to achieve).
> 
> Any suggestion what should be the right way to go forward?
> 
> [1] https://www.spinics.net/lists/kvm/msg153666.html


I would just create a new vq for this, at least initially.


> -- 
> 
> Regards
> Nitesh
> 

  parent reply	other threads:[~2017-08-17 15:48 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 [this message]
2017-08-17 16:53 ` Paolo Bonzini
2017-08-18  1:32   ` Michael S. Tsirkin

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=20170817184536-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=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