hw/isa: specify instance_size in isa_superio_type_info
commit413d0ccb05de21491bc9d0c461e47034f50fd6af
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 13 Feb 2024 15:50:00 +0000 (13 16:50 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 15 Feb 2024 14:53:12 +0000 (15 15:53 +0100)
treeecb6714935899ec4c379b169015e92c96101b59d
parentcf5f5f9235bca5f838087f63c1c1b3c5be591b1b
hw/isa: specify instance_size in isa_superio_type_info

Right now all subclasses of TYPE_ISA_SUPERIO have to specify an instance_size,
because the ISASuperIODevice struct adds fields to ISADevice but the type does
not include the increased instance size.  Failure to do so results in an access
past the bounds of struct ISADevice as soon as isa_superio_realize is called.
Fix this by specifying the instance_size already in the superclass.

Fixes: 4c3119a6e3 ("hw/isa/superio: Factor out the parallel code from pc87312.c")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Bernhard Beschow <shentey@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20240213155005.109954-6-pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/isa/isa-superio.c
hw/isa/smc37c669-superio.c