From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5bzs-00008i-70 for qemu-devel@nongnu.org; Thu, 18 Jun 2015 11:44:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5bzn-0002na-Q2 for qemu-devel@nongnu.org; Thu, 18 Jun 2015 11:44:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5bzn-0002my-Ji for qemu-devel@nongnu.org; Thu, 18 Jun 2015 11:44:51 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 47EC1365059 for ; Thu, 18 Jun 2015 15:44:50 +0000 (UTC) Message-ID: <1434642288.4968.51.camel@redhat.com> From: Gerd Hoffmann Date: Thu, 18 Jun 2015 17:44:48 +0200 In-Reply-To: <20150618113745-mutt-send-email-mst@redhat.com> References: <1434620035-10808-1-git-send-email-kraxel@redhat.com> <1434620035-10808-2-git-send-email-kraxel@redhat.com> <20150618113745-mutt-send-email-mst@redhat.com> Content-Type: multipart/mixed; boundary="=-7pDEcLHwhrSYa6pQ75AA" Mime-Version: 1.0 Subject: Re: [Qemu-devel] [PULL 1/1] virtio-input: evdev passthrough List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org --=-7pDEcLHwhrSYa6pQ75AA Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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 --=-7pDEcLHwhrSYa6pQ75AA Content-Description: Content-Disposition: inline; filename="x" Content-Type: text/x-patch; name="x"; charset="UTF-8" Content-Transfer-Encoding: 7bit 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(), }; --=-7pDEcLHwhrSYa6pQ75AA--