All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-trivial@nongnu.org
Subject: [Qemu-devel] [PATCH] hw/input/pckbd: The i8042 device should not be user_creatable
Date: Thu,  4 Apr 2019 09:14:21 +0200	[thread overview]
Message-ID: <20190404071421.4891-1-thuth@redhat.com> (raw)

The i8042 PS/2 controller is part of the chipset on the motherboard.
It is instantiated by the machine init code, and it does not make sense
to allow the user to plug an additional i8042 in any of the free ISA slots.
Thus let's mark the device with user_creatable = false.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/input/pckbd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index 47a606f5e3..af393818fc 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -568,6 +568,8 @@ static void i8042_class_initfn(ObjectClass *klass, void *data)
     dc->realize = i8042_realizefn;
     dc->vmsd = &vmstate_kbd_isa;
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
+    /* i8042 is a device on the motherboard, and not pluggable by the user */
+    dc->user_creatable = false;
 }
 
 static const TypeInfo i8042_info = {
-- 
2.21.0

             reply	other threads:[~2019-04-04  7:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04  7:14 Thomas Huth [this message]
2019-04-04 10:07 ` [Qemu-devel] [PATCH] hw/input/pckbd: The i8042 device should not be user_creatable Paolo Bonzini
2019-04-04 13:29   ` Philippe Mathieu-Daudé
2019-04-04 14:19     ` Thomas Huth
2019-04-04 16:30       ` Markus Armbruster
2019-04-05 10:57         ` Thomas Huth
2019-04-05 10:57           ` Thomas Huth
2019-04-08  6:29           ` Markus Armbruster
2019-04-04 16:40       ` Philippe Mathieu-Daudé
2019-04-04 20:49         ` Philippe Mathieu-Daudé
2019-04-05  7:58           ` Paolo Bonzini
2019-04-08  6:01             ` Markus Armbruster
2019-04-08  6:01               ` Markus Armbruster

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=20190404071421.4891-1-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.