OSDN Git Service

ide/via: don't attempt to set default BAR addresses
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Thu, 16 Nov 2023 10:33:54 +0000 (10:33 +0000)
committerKevin Wolf <kwolf@redhat.com>
Tue, 21 Nov 2023 11:45:21 +0000 (12:45 +0100)
commit7a9d672b8149794e0509950ba53dad64c8d476ac
tree8e68ec552d3e988e879d2cef0f9422b25ebb7d2c
parentfd6a543d19dae461f2b6a4df7f6571d3f77af45a
ide/via: don't attempt to set default BAR addresses

The via-ide device currently attempts to set the default BAR addresses to the
values shown in the datasheet, but this doesn't work for 2 reasons: firstly
BARS 1-4 do not set the bottom 2 bits to PCI_BASE_ADDRESS_SPACE_IO, and
secondly the initial PCI bus reset clears the values of all PCI device BARs
after the device itself has been reset.

Remove the setting of the default BAR addresses from via_ide_reset() to ensure
there is no doubt that these values are never exposed to the guest.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-ID: <20231116103355.588580-4-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/ide/via.c