[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] hw/input/pckbd: The i8042 device should not be
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH] hw/input/pckbd: The i8042 device should not be user_creatable |
Date: |
Thu, 4 Apr 2019 15:29:47 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 4/4/19 12:07 PM, Paolo Bonzini wrote:
> On 04/04/19 09:14, Thomas Huth wrote:
>> 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(+)
>
> user_creatable is not for devices that are not pluggable in real life;
> it is for devices that crash QEMU (!) or always fail if plugged by the user.
>
> So the question to ask is: would it make sense, and especially work, to
> add an i8042 to machines that do have an ISA bridge (for example the Alpha?)
Correct me if I'm wrong but it seems no machine directly use a 8042 on a
ISA bus, it is always part of a SuperIO chipset. It is not reflected in
the code (in particular the X86 machines, but I'm working on cleaning this).
So I think this change is OK and will help to enforce using proper
superio chipsets in the future.
>
> Paolo
>
>
>> 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
>> */
I'm not sure the comment is accurate, maybe "ISA i8042 are provided by
Super I/O devices"?
>> + dc->user_creatable = false;
>> }
>>
>> static const TypeInfo i8042_info = {
>>
>
>
- [Qemu-devel] [PATCH] hw/input/pckbd: The i8042 device should not be user_creatable, Thomas Huth, 2019/04/04
- Re: [Qemu-devel] [PATCH] hw/input/pckbd: The i8042 device should not be user_creatable, Paolo Bonzini, 2019/04/04
- Re: [Qemu-devel] [PATCH] hw/input/pckbd: The i8042 device should not be user_creatable,
Philippe Mathieu-Daudé <=
- Re: [Qemu-devel] [PATCH] hw/input/pckbd: The i8042 device should not be user_creatable, Philippe Mathieu-Daudé, 2019/04/04
- Re: [Qemu-devel] [PATCH] hw/input/pckbd: The i8042 device should not be user_creatable, Philippe Mathieu-Daudé, 2019/04/04
- Re: [Qemu-devel] [PATCH] hw/input/pckbd: The i8042 device should not be user_creatable, Paolo Bonzini, 2019/04/05
- Re: [Qemu-devel] [PATCH] hw/input/pckbd: The i8042 device should not be user_creatable, Markus Armbruster, 2019/04/08