From: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
To: liulongfang <liulongfang@huawei.com>,
Alex Williamson <alex.williamson@redhat.com>
Cc: "jgg@nvidia.com" <jgg@nvidia.com>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linuxarm@openeuler.org" <linuxarm@openeuler.org>
Subject: RE: [PATCH v2 1/5] hisi_acc_vfio_pci: fix XQE dma address error
Date: Tue, 14 Jan 2025 08:07:43 +0000 [thread overview]
Message-ID: <8225389dd537497c9753cf0a321964e4@huawei.com> (raw)
In-Reply-To: <80a4e398-ad29-cce8-4a52-ce2a5f6a308c@huawei.com>
> -----Original Message-----
> From: liulongfang <liulongfang@huawei.com>
> Sent: Tuesday, January 14, 2025 3:18 AM
> To: Alex Williamson <alex.williamson@redhat.com>
> Cc: Shameerali Kolothum Thodi
> <shameerali.kolothum.thodi@huawei.com>; jgg@nvidia.com; Jonathan
> Cameron <jonathan.cameron@huawei.com>; kvm@vger.kernel.org; linux-
> kernel@vger.kernel.org; linuxarm@openeuler.org
> Subject: Re: [PATCH v2 1/5] hisi_acc_vfio_pci: fix XQE dma address error
>
[...]
> > @@ -418,7 +440,7 @@ static int vf_qm_get_match_data(struct
> hisi_acc_vf_core_device *hisi_acc_vdev,
> > int vf_id = hisi_acc_vdev->vf_id;
> > int ret;
> >
> > - vf_data->acc_magic = ACC_DEV_MAGIC;
> > + vf_data->acc_magic = ACC_DEV_MAGIC_V2;
> > /* Save device id */
> > vf_data->dev_id = hisi_acc_vdev->vf_dev->device;
> >
> > Thanks,
> > Alex
> >
> >>>
> >>> As for the compatibility issues between old and new versions in the
> >>> future, we do not need to reserve version numbers to deal with them
> >>> now. Because before encountering specific problems, our design may
> be redundant.
> >>
> >> A magic value + version number would prevent the need to replace the
> >> magic value every time an issue is encountered, which I think was
> >> also Shameer's commit, which is not addressed by forcing the
> >> formatting of a portion of the magic value. None of what you're
> >> trying to do here precludes a new data structure for the new magic
> >> value or defining the padding fields for different use cases.
> >> Thanks,
> >>
> >> Alex
> >
>
> If we want to use the original magic number, we also need to add the major
> and minor version numbers. It does not cause compatibility issues and can
> only reuse the original u64 memory space.
>
> This is also Shameerali's previous plan. Do you accept this plan?
The suggestion here is to improve my previous plan.. ie, instead of overloading
the V2 MAGIC with version info, introduce version(major:minor) separately.
Something like,
Rename old MAGIC as MAGIC_V1
Introduce new MAGIC as MAGIC_V2
Repurpose any padding or reserved fields in struct vf_data for major:minor
version fields. The idea of introducing these major:minor is for future use
where instead of coming up with a new MAGIC data every time we can
increment the version for bug fixes and features if required.
Hope this is clear now.
Thanks,
Shameer
next prev parent reply other threads:[~2025-01-14 8:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 9:17 [PATCH v2 0/5] bugfix some driver issues Longfang Liu
2024-12-19 9:17 ` [PATCH v2 1/5] hisi_acc_vfio_pci: fix XQE dma address error Longfang Liu
2024-12-19 10:01 ` Shameerali Kolothum Thodi
2024-12-27 7:24 ` liulongfang
2025-01-02 22:30 ` Alex Williamson
2025-01-13 9:43 ` liulongfang
2025-01-13 13:34 ` Alex Williamson
2025-01-13 19:45 ` Alex Williamson
2025-01-14 3:17 ` liulongfang
2025-01-14 8:07 ` Shameerali Kolothum Thodi [this message]
2025-01-14 13:54 ` Alex Williamson
2024-12-19 9:17 ` [PATCH v2 2/5] hisi_acc_vfio_pci: add eq and aeq interruption restore Longfang Liu
2024-12-19 10:01 ` Shameerali Kolothum Thodi
2024-12-19 9:17 ` [PATCH v2 3/5] hisi_acc_vfio_pci: bugfix cache write-back issue Longfang Liu
2024-12-19 10:01 ` Shameerali Kolothum Thodi
2024-12-19 9:17 ` [PATCH v2 4/5] hisi_acc_vfio_pci: bugfix the problem of uninstalling driver Longfang Liu
2024-12-19 10:01 ` Shameerali Kolothum Thodi
2024-12-19 9:18 ` [PATCH v2 5/5] hisi_acc_vfio_pci: bugfix live migration function without VF device driver Longfang Liu
2024-12-19 10:02 ` Shameerali Kolothum Thodi
2024-12-27 7:20 ` liulongfang
2024-12-19 10:23 ` [PATCH v2 0/5] bugfix some driver issues Shameerali Kolothum Thodi
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=8225389dd537497c9753cf0a321964e4@huawei.com \
--to=shameerali.kolothum.thodi@huawei.com \
--cc=alex.williamson@redhat.com \
--cc=jgg@nvidia.com \
--cc=jonathan.cameron@huawei.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@openeuler.org \
--cc=liulongfang@huawei.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