[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 22/50] pckbd: implement i8042_mmio_reset() for I8042_MMIO dev
From: |
Peter Maydell |
Subject: |
Re: [PATCH 22/50] pckbd: implement i8042_mmio_reset() for I8042_MMIO device |
Date: |
Thu, 9 Jun 2022 11:49:14 +0100 |
On Sun, 22 May 2022 at 19:19, Mark Cave-Ayland
<mark.cave-ayland@ilande.co.uk> wrote:
>
> This allows the I8042_MMIO reset function to be registered directly within the
> DeviceClass rather than using qemu_register_reset() directly.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
> hw/input/pckbd.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
> index bbdd3bc568..df443aaff2 100644
> --- a/hw/input/pckbd.c
> +++ b/hw/input/pckbd.c
> @@ -665,10 +665,20 @@ static const MemoryRegionOps i8042_mmio_ops = {
> .endianness = DEVICE_NATIVE_ENDIAN,
> };
>
> +static void i8042_mmio_reset(DeviceState *dev)
> +{
> + MMIOKBDState *s = I8042_MMIO(dev);
> + KBDState *ks = &s->kbd;
> +
> + ks->extended_state = true;
> + kbd_reset(ks);
> +}
extended_state is not runtime guest-changeable state, it's a
device property that's set at device creation time. So we
shouldn't be setting it to 'true' here, but instead in the
device init or realize function.
thanks
-- PMM
- Re: [PATCH 22/50] pckbd: implement i8042_mmio_reset() for I8042_MMIO device,
Peter Maydell <=