From: Gerd Hoffmann <kraxel@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PULL 1/1] virtio-input: evdev passthrough
Date: Thu, 18 Jun 2015 17:44:48 +0200 [thread overview]
Message-ID: <1434642288.4968.51.camel@redhat.com> (raw)
In-Reply-To: <20150618113745-mutt-send-email-mst@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 809 bytes --]
Hi,
> > +static Property virtio_input_host_pci_properties[] = {
> > + DEFINE_VIRTIO_INPUT_PROPERTIES(VirtIOInputPCI, vdev.input),
> > + DEFINE_PROP_STRING("evdev", VirtIOInputHostPCI, vdev.evdev),
> > + DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
> > + DEFINE_PROP_END_OF_LIST(),
> > +};
> > +
>
> Hmm I only noticed this now: I think properties
> should all move into virtio input, there is
> no reason to make them pci specific.
Hmm, looking into this. Can't figure how this works. For virtio-net a
bunch of properties are defined for virtio-net-device. But they show up
(using -device $dev,?) on both virtio-net-device and virtio-net-pci.
Trying to do the same for the (already merged) virtio-input hid devices.
Not working. Patch below. Any clues?
thanks,
Gerd
[-- Attachment #2: Type: text/x-patch, Size: 1274 bytes --]
diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c
index f7c6bc9..55998a2 100644
--- a/hw/input/virtio-input-hid.c
+++ b/hw/input/virtio-input-hid.c
@@ -337,10 +337,17 @@ static void virtio_input_hid_handle_status(VirtIOInput *vinput,
}
}
+static Property virtio_input_hid_properties[] = {
+ DEFINE_VIRTIO_INPUT_PROPERTIES(VirtIOInput, input),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
static void virtio_input_hid_class_init(ObjectClass *klass, void *data)
{
+ DeviceClass *dc = DEVICE_CLASS(klass);
VirtIOInputClass *vic = VIRTIO_INPUT_CLASS(klass);
+ dc->props = virtio_input_hid_properties;
vic->realize = virtio_input_hid_realize;
vic->unrealize = virtio_input_hid_unrealize;
vic->change_active = virtio_input_hid_change_active;
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 2c053c7..46dc77a 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1901,7 +1901,6 @@ static const TypeInfo virtio_rng_pci_info = {
/* virtio-input-pci */
static Property virtio_input_hid_pci_properties[] = {
- DEFINE_VIRTIO_INPUT_PROPERTIES(VirtIOInputPCI, vdev.input),
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
DEFINE_PROP_END_OF_LIST(),
};
next prev parent reply other threads:[~2015-06-18 15:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-18 9:33 [Qemu-devel] [PULL 0/1] virtio-input: evdev passthrough Gerd Hoffmann
2015-06-18 9:33 ` [Qemu-devel] [PULL 1/1] " Gerd Hoffmann
2015-06-18 9:39 ` Michael S. Tsirkin
2015-06-18 11:11 ` Peter Maydell
2015-06-18 11:14 ` Michael S. Tsirkin
2015-06-18 15:44 ` Gerd Hoffmann [this message]
2015-06-19 7:52 ` Michael S. Tsirkin
2015-06-19 8:40 ` Gerd Hoffmann
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=1434642288.4968.51.camel@redhat.com \
--to=kraxel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).