[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 8/9] ide/via: don't attempt to set default BAR addresses
From: |
Kevin Wolf |
Subject: |
[PULL 8/9] ide/via: don't attempt to set default BAR addresses |
Date: |
Tue, 21 Nov 2023 12:53:01 +0100 |
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
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 | 5 -----
1 file changed, 5 deletions(-)
diff --git a/hw/ide/via.c b/hw/ide/via.c
index fff23803a6..87b134083a 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -132,11 +132,6 @@ static void via_ide_reset(DeviceState *dev)
pci_set_word(pci_conf + PCI_STATUS, PCI_STATUS_FAST_BACK |
PCI_STATUS_DEVSEL_MEDIUM);
- pci_set_long(pci_conf + PCI_BASE_ADDRESS_0, 0x000001f0);
- pci_set_long(pci_conf + PCI_BASE_ADDRESS_1, 0x000003f4);
- pci_set_long(pci_conf + PCI_BASE_ADDRESS_2, 0x00000170);
- pci_set_long(pci_conf + PCI_BASE_ADDRESS_3, 0x00000374);
- pci_set_long(pci_conf + PCI_BASE_ADDRESS_4, 0x0000cc01); /* BMIBA: 20-23h
*/
pci_set_long(pci_conf + PCI_INTERRUPT_LINE, 0x0000010e);
/* IDE chip enable, IDE configuration 1/2, IDE FIFO Configuration*/
--
2.42.0
- [PULL 0/9] Block layer fixes for 8.2.0-rc1, Kevin Wolf, 2023/11/21
- [PULL 2/9] block: Fix bdrv_graph_wrlock() call in blk_remove_bs(), Kevin Wolf, 2023/11/21
- [PULL 4/9] stream: Fix AioContext locking during bdrv_graph_wrlock(), Kevin Wolf, 2023/11/21
- [PULL 1/9] hw/ide/ahci: fix legacy software reset, Kevin Wolf, 2023/11/21
- [PULL 5/9] iotests: Test two stream jobs in a single iothread, Kevin Wolf, 2023/11/21
- [PULL 6/9] ide/ioport: move ide_portio_list[] and ide_portio_list2[] definitions to IDE core, Kevin Wolf, 2023/11/21
- [PULL 3/9] block: Fix deadlocks in bdrv_graph_wrunlock(), Kevin Wolf, 2023/11/21
- [PULL 7/9] ide/pci: introduce pci_ide_update_mode() function, Kevin Wolf, 2023/11/21
- [PULL 9/9] hw/ide/via: implement legacy/native mode switching, Kevin Wolf, 2023/11/21
- [PULL 8/9] ide/via: don't attempt to set default BAR addresses,
Kevin Wolf <=
- Re: [PULL 0/9] Block layer fixes for 8.2.0-rc1, Stefan Hajnoczi, 2023/11/21