[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 04/13] sm501: QOMify
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v3 04/13] sm501: QOMify |
Date: |
Fri, 3 Mar 2017 18:39:48 +0000 |
On 3 March 2017 at 01:03, BALATON Zoltan <address@hidden> wrote:
> Adding vmstate saving is not in this patch because the state structure
> will be changed in further patches, then another patch will add
> vmstate descriptor after those changes.
>
> Signed-off-by: BALATON Zoltan <address@hidden>
> +static void sm501_init(SM501State *s, DeviceState *dev, uint32_t base,
> + uint32_t local_mem_bytes)
> +{
> + s->base = base;
> + s->local_mem_size_index = get_local_mem_size_index(local_mem_bytes);
> + SM501_DPRINTF("sm501 local mem size=%x. index=%d\n",
> get_local_mem_size(s),
> + s->local_mem_size_index);
> + if (get_local_mem_size(s) != local_mem_bytes) {
> + error_report("Warning: sm501 VRAM size adjusted to %" PRIu32,
> + get_local_mem_size(s));
> + }
Just noticed this. I think reporting the error upwards by
failing device realize is better than adjusting the value.
It's what we tend to do for other devices. Management tools
like libvirt prefer to get hard errors if there's a config
file error that means they misconfigure a device.
thanks
-- PMM
- [Qemu-devel] [PATCH v3 02/13] sm501: Use defined constants instead of literal values where available, (continued)
- [Qemu-devel] [PATCH v3 02/13] sm501: Use defined constants instead of literal values where available, BALATON Zoltan, 2017/03/02
- [Qemu-devel] [PATCH v3 06/13] sm501: Add emulation of chip connected via PCI, BALATON Zoltan, 2017/03/02
- [Qemu-devel] [PATCH v3 12/13] sm501: Add vmstate descriptor, BALATON Zoltan, 2017/03/02
- [Qemu-devel] [PATCH v3 11/13] sm501: Add some more missing registers, BALATON Zoltan, 2017/03/02
- [Qemu-devel] [PATCH v3 04/13] sm501: QOMify, BALATON Zoltan, 2017/03/02
- [Qemu-devel] [PATCH v3 05/13] sm501: Get rid of base address in draw_hwc_line, BALATON Zoltan, 2017/03/02
- [Qemu-devel] [PATCH v3 03/13] sm501: Add missing arbitration control register, BALATON Zoltan, 2017/03/02
- [Qemu-devel] [PATCH v3 08/13] sm501: Fix hardware cursor, BALATON Zoltan, 2017/03/02
- [Qemu-devel] [PATCH v3 01/13] sm501: Fixed code style and a few typos in comments, BALATON Zoltan, 2017/03/02