qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	jsnow@redhat.com,  qemu-block@nongnu.org, qemu-devel@nongnu.org,
	philmd@linaro.org,  shentey@gmail.com
Subject: Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers
Date: Mon, 20 Nov 2023 12:10:05 +0100 (CET)	[thread overview]
Message-ID: <0ce24a22-c4d4-ab8d-fc59-6d5655de9506@eik.bme.hu> (raw)
In-Reply-To: <ZVsyHHMZKhmNZU/7@redhat.com>

On Mon, 20 Nov 2023, Kevin Wolf wrote:
> Am 17.11.2023 um 15:23 hat BALATON Zoltan geschrieben:
>> On Thu, 16 Nov 2023, BALATON Zoltan wrote:
>>> On Thu, 16 Nov 2023, Kevin Wolf wrote:
>>>> Am 16.11.2023 um 11:33 hat Mark Cave-Ayland geschrieben:
>>>>> This series adds a simple implementation of legacy/native mode
>>>>> switching for PCI
>>>>> IDE controllers and updates the via-ide device to use it.
>>>>>
>>>>> The approach I take here is to add a new pci_ide_update_mode()
>>>>> function which handles
>>>>> management of the PCI BARs and legacy IDE ioports for each mode
>>>>> to avoid exposing
>>>>> details of the internal logic to individual PCI IDE controllers.
>>>>>
>>>>> As noted in [1] this is extracted from a local WIP branch I have
>>>>> which contains
>>>>> further work in this area. However for the moment I've kept it simple (and
>>>>> restricted it to the via-ide device) which is good enough for Zoltan's PPC
>>>>> images whilst paving the way for future improvements after 8.2.
>>>>>
>>>>> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>>>>>
>>>>> [1] https://lists.gnu.org/archive/html/qemu-devel/2023-10/msg05403.html
>>>>>
>>>>> v3:
>>>>> - Rebase onto master
>>>>> - Move ide_portio_list[] and ide_portio_list2[] to IDE core to
>>>>> prevent duplication in
>>>>>   hw/ide/pci.c
>>>>> - Don't zero BARs when switching from native mode to legacy
>>>>> mode, instead always force
>>>>>   them to read zero as suggested in the PCI IDE specification
>>>>> (note: this also appears
>>>>>   to fix the fuloong2e machine booting from IDE)
>>>>> - Add comments in pci_ide_update_mode() suggested by Kevin
>>>>> - Drop the existing R-B and T-B tags: whilst this passes my
>>>>> local tests, the behaviour
>>>>>   around zero BARs feels different enough here
>>>>
>>>> Thanks, applied to the block branch.
>>>
>>> I feel a bit left out of this conversation... Did Google or some other
>>> spam filter decide again to filter my messages so you did not see them
>>> at all? Could you confitm that you've got my previous two replies in
>>> this thread so I know I'm not sending comments to /dev/null please?
>>
>> Looks like there's some issue with these mails. They appear in the list
>> archive but maybe not in people's mailboxes? Did any of you got this message
>> and previous ones I've sent?
>> https://lists.nongnu.org/archive/html/qemu-devel/2023-11/msg03180.html
>> https://lists.nongnu.org/archive/html/qemu-devel/2023-11/msg03983.html
>
> I received it, but at least the second one only after sending the mail
> you replied to here.
>
> For your specific concern, it seems to me that resetting BAR 4 on a
> switch between compatibility mode and native mode is another via quirk
> and should therefore be implemented in via.c rather than pci.c?

I think in real chip the default value is there so no need to reset it 
when switching mode. Also the defeult mode is legacy so writing 0x8a first 
does nothing on real chip but we can't do that in QEMU becaise PCI code 
resets BARs after calling device reset method so we can't set reset 
degaults there but have to establish them on mode switch instead when the 
BARs are yet unset. Setting the BMDMA BAR4 in via.c is fine as well and 
could be done as a follow up so that's OK.

> If I get a new version of the patches in the next few hours, I can
> update the queued patches before sending a pull request, but otherwise
> this can still be done in a separate patch.

This v3 series does not work with latest AmigaOS driver as I wrote in my 
last reply. So maybe wait for a v4 or merge either v2 from Mark or my 
single patch fix for now. Those are better than v3 that's queued now.

Regards,
BALATON Zoltan


  reply	other threads:[~2023-11-20 11:10 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-16 10:33 [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers Mark Cave-Ayland
2023-11-16 10:33 ` [PATCH v3 1/4] ide/ioport: move ide_portio_list[] and ide_portio_list2[] definitions to IDE core Mark Cave-Ayland
2023-11-16 13:13   ` Philippe Mathieu-Daudé
2023-11-16 10:33 ` [PATCH v3 2/4] ide/pci: introduce pci_ide_update_mode() function Mark Cave-Ayland
2023-11-16 10:33 ` [PATCH v3 3/4] ide/via: don't attempt to set default BAR addresses Mark Cave-Ayland
2023-11-16 13:14   ` Philippe Mathieu-Daudé
2023-11-16 10:33 ` [PATCH v3 4/4] hw/ide/via: implement legacy/native mode switching Mark Cave-Ayland
2023-11-16 12:39   ` BALATON Zoltan
2023-11-16 13:48 ` [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers Kevin Wolf
2023-11-16 21:59   ` BALATON Zoltan
2023-11-17 14:23     ` BALATON Zoltan
2023-11-20 10:17       ` Kevin Wolf
2023-11-20 11:10         ` BALATON Zoltan [this message]
2023-11-19 21:43 ` BALATON Zoltan
2023-11-19 22:11   ` BALATON Zoltan
2023-11-20 12:18   ` Mark Cave-Ayland
2023-11-20 13:09     ` BALATON Zoltan
2023-11-20 13:42       ` Kevin Wolf
2023-11-20 13:47         ` BALATON Zoltan
2023-11-20 14:00           ` BALATON Zoltan
2023-11-20 14:58           ` Kevin Wolf
2023-11-20 15:11             ` BALATON Zoltan
2023-11-21  9:48               ` Kevin Wolf
2023-11-20 14:28         ` Mark Cave-Ayland
2023-11-20 15:02           ` BALATON Zoltan
2023-11-21  9:12             ` Kevin Wolf
2023-11-21 10:16               ` Mark Cave-Ayland
2023-11-21 11:04                 ` Peter Maydell
2023-11-20 12:26   ` Mark Cave-Ayland
2023-11-20 13:19     ` BALATON Zoltan
2023-11-20 13:30       ` BALATON Zoltan
2023-11-20 14:15         ` Mark Cave-Ayland
2023-11-20 14:58           ` BALATON Zoltan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0ce24a22-c4d4-ab8d-fc59-6d5655de9506@eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shentey@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).