Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-29 Thread BALATON Zoltan via
On Tue, 29 Dec 2020, Mark Cave-Ayland wrote: On 29/12/2020 12:01, BALATON Zoltan via wrote: Fortunately with PCI_CLASS_PROG at 0x8a Linux will keep the VIA IDE in compatible mode and not attempt to switch to native mode: therefore if you keep this as-is and add the legacy IDE ioports back, that

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-29 Thread Mark Cave-Ayland
On 29/12/2020 12:01, BALATON Zoltan via wrote: Fortunately with PCI_CLASS_PROG at 0x8a Linux will keep the VIA IDE in compatible mode and not attempt to switch to native mode: therefore if you keep this as-is and add the legacy IDE ioports back, that just leaves the problem with BAR4 (BMDMA). I

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-29 Thread BALATON Zoltan via
On Tue, 29 Dec 2020, Mark Cave-Ayland wrote: On 28/12/2020 20:50, BALATON Zoltan via wrote: I think leaving the legacy ports enabled is a bad idea for at least two reasons: 1) It may clash with other io ports on other machines, e.g. I'm not sure on PPC where firmware or OS does not expect to se

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-29 Thread BALATON Zoltan via
On Tue, 29 Dec 2020, Mark Cave-Ayland wrote: On 28/12/2020 20:50, BALATON Zoltan via wrote: diff --git a/hw/ide/via.c b/hw/ide/via.c index be09912b33..7d54d7e829 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -26,6 +26,7 @@     #include "qemu/osdep.h"   #include "hw/pci/pci.h" +#include "hw/qde

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-29 Thread Mark Cave-Ayland
On 28/12/2020 20:50, BALATON Zoltan via wrote: I think leaving the legacy ports enabled is a bad idea for at least two reasons: 1) It may clash with other io ports on other machines, e.g. I'm not sure on PPC where firmware or OS does not expect to see legacy ISA ports won't map some io BAR of a

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-29 Thread BALATON Zoltan via
On Tue, 29 Dec 2020, Philippe Mathieu-Daudé wrote: I think this casued problems before because if it's not set to 0x8a (legacy) at start then guests may assume it's already switched to native mode by firmware and won't program the BARs and it will not work. This way, even if it looks odd all gues

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-29 Thread Mark Cave-Ayland
On 28/12/2020 20:50, BALATON Zoltan via wrote: diff --git a/hw/ide/via.c b/hw/ide/via.c index be09912b33..7d54d7e829 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -26,6 +26,7 @@     #include "qemu/osdep.h"   #include "hw/pci/pci.h" +#include "hw/qdev-properties.h"   #include "migration/vmstate

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-29 Thread Philippe Mathieu-Daudé
On 12/28/20 9:50 PM, BALATON Zoltan via wrote: > On Mon, 28 Dec 2020, Mark Cave-Ayland wrote: >> On 27/12/2020 22:13, BALATON Zoltan via wrote: >> >>> From: Guenter Roeck >>> >>> The IDE legacy mode emulation has been removed in commit 4ea98d317eb >>> ("ide/via: Implement and use native PCI IDE mo

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-28 Thread BALATON Zoltan via
On Mon, 28 Dec 2020, Mark Cave-Ayland wrote: On 27/12/2020 22:13, BALATON Zoltan via wrote: From: Guenter Roeck The IDE legacy mode emulation has been removed in commit 4ea98d317eb ("ide/via: Implement and use native PCI IDE mode") but some Linux kernels (probably including def_config) requir

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-28 Thread Mark Cave-Ayland
On 27/12/2020 22:13, BALATON Zoltan via wrote: From: Guenter Roeck The IDE legacy mode emulation has been removed in commit 4ea98d317eb ("ide/via: Implement and use native PCI IDE mode") but some Linux kernels (probably including def_config) require legacy mode on the Fuloong2e so only emulati

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-28 Thread Jiaxun Yang
在 2020/12/28 上午6:13, BALATON Zoltan 写道: From: Guenter Roeck The IDE legacy mode emulation has been removed in commit 4ea98d317eb ("ide/via: Implement and use native PCI IDE mode") but some Linux kernels (probably including def_config) require legacy mode on the Fuloong2e so only emulating nativ

[PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-27 Thread BALATON Zoltan via
From: Guenter Roeck The IDE legacy mode emulation has been removed in commit 4ea98d317eb ("ide/via: Implement and use native PCI IDE mode") but some Linux kernels (probably including def_config) require legacy mode on the Fuloong2e so only emulating native mode did not turn out feasible. Add prop