qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PATCH] hw/input/pckbd: The i8042 device should not be us


From: Thomas Huth
Subject: [Qemu-trivial] [PATCH] hw/input/pckbd: The i8042 device should not be user_creatable
Date: Thu, 4 Apr 2019 09:14:21 +0200

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 <address@hidden>
---
 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 via email to

[Prev in Thread] Current Thread [Next in Thread]