[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 8/9] imx7-ccm: add digprog mmio write method
From: |
Peter Maydell |
Subject: |
Re: [PATCH v3 8/9] imx7-ccm: add digprog mmio write method |
Date: |
Thu, 16 Jul 2020 17:56:49 +0100 |
On Thu, 16 Jul 2020 at 17:55, P J P <ppandit@redhat.com> wrote:
>
> +-- On Thu, 16 Jul 2020, Peter Maydell wrote --+
> | > +static void imx7_digprog_write(void *opaque, hwaddr addr,
> | > + uint64_t data, unsigned size)
> | > +{
> | > + qemu_log_mask(LOG_UNIMP, "%s not implemented\n", __func__);
> | > +}
> |
> | This covers a single register (DIGPROG) which is read-only (it returns a
> | silicon revision number). So this is not a LOG_UNIMP, but a LOG_GUEST_ERROR:
> |
> | qemu_log_mask(LOG_GUEST_ERROR, "Guest write to read-only
> | ANALOG_DIGPROG register\n");
>
> Should this be g_assert_not_reached() in that case?
No, because a malicious guest can write to the register
(and cause the function to be called), it is merely that
it is a bug in guest code for it to do that.
-- PMM