qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Christian Borntraeger <christian@borntraeger.net>
Cc: KVM list <kvm@vger.kernel.org>, Gleb Natapov <gleb@redhat.com>,
	Valgrind Developers <valgrind-developers@lists.sourceforge.net>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Alexander Graf <agraf@suse.de>,
	Jens Freimann <jfrei@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] RFC: KVM _CREATE_DEVICE considered harmful?
Date: Wed, 16 Oct 2013 15:06:27 +0200	[thread overview]
Message-ID: <525E8F53.3090603@redhat.com> (raw)
In-Reply-To: <525E8DC3.70409@borntraeger.net>

Il 16/10/2013 14:59, Christian Borntraeger ha scritto:
> 
> Now, newer KVMs have the ability to create subdevices of a KVM guest (e.g. an in kernel
> kvm interrupt controller) with the following ioctl:
> 
> #define KVM_CREATE_DEVICE         _IOWR(KVMIO,  0xe0, struct kvm_create_device)
> 
> qemu can then work on these devices with the ioctls 
> 
> /* ioctls for fds returned by KVM_CREATE_DEVICE */
> #define KVM_SET_DEVICE_ATTR       _IOW(KVMIO,  0xe1, struct kvm_device_attr)
> #define KVM_GET_DEVICE_ATTR       _IOW(KVMIO,  0xe2, struct kvm_device_attr)
> #define KVM_HAS_DEVICE_ATTR       _IOW(KVMIO,  0xe3, struct kvm_device_attr)
> 
> struct kvm_device_attr {
>         __u32   flags;          /* no flags currently defined */
>         __u32   group;          /* device-defined */
>         __u64   attr;           /* group-defined */
>         __u64   addr;           /* userspace address of attr data */
> };

Would it work to simply add an "__u64 size;" field to kvm_device_attr,
that is filled on exit by KVM_GET/HAS_DEVICE_ADDR, and filled on entry
to KVM_SET_DEVICE_ADDR?

Paolo

  reply	other threads:[~2013-10-16 13:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 12:59 [Qemu-devel] RFC: KVM _CREATE_DEVICE considered harmful? Christian Borntraeger
2013-10-16 13:06 ` Paolo Bonzini [this message]
2013-10-16 14:23   ` Christian Borntraeger
2013-10-16 14:59     ` Paolo Bonzini
2013-10-16 15:44 ` Gleb Natapov
2013-10-16 19:47   ` Christian Borntraeger

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=525E8F53.3090603@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=agraf@suse.de \
    --cc=christian@borntraeger.net \
    --cc=gleb@redhat.com \
    --cc=jfrei@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=valgrind-developers@lists.sourceforge.net \
    /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 NNTP newsgroup(s).