From: Joao Martins <joao.m.martins@oracle.com>
To: "Duan, Zhenzhong" <zhenzhong.duan@intel.com>,
Avihai Horon <avihaih@nvidia.com>
Cc: "alex.williamson@redhat.com" <alex.williamson@redhat.com>,
"clg@redhat.com" <clg@redhat.com>,
"Peng, Chao P" <chao.p.peng@intel.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [PATCH v3 3/3] vfio/migration: vfio/migration: Refactor and fix print of "Migration disabled"
Date: Tue, 27 Jun 2023 11:56:57 +0100 [thread overview]
Message-ID: <bbdf6724-4c5c-cb93-9da3-c28d3b75620a@oracle.com> (raw)
In-Reply-To: <SJ0PR11MB6744F88600646B8FD4E7F5019227A@SJ0PR11MB6744.namprd11.prod.outlook.com>
On 27/06/2023 03:55, Duan, Zhenzhong wrote:
>> I guess it makes sense -- the thing that was tieing him was the global migration
>> blocker, which is now consolidated into the main migration blocker.
>>
>> My vIOMMU series will relax this condition yes (still same per-device scope).
>> And I will need to check the maximum IOVA in the vIOMMU. But it's new code
>> I can adjust and Zhenzhong shouldn't worry about the vIOMMU future stuff
> A bit confused, you agreed to move vfio_block_giommu_migration into migration.c
>
>> but I don't expect to influence location, say if it gets moved into migration.c
> and final decision is no move for influencing location reason? Do I misunderstand?
Sorry for the confusion.
The thing is that I will need 'similar code' to test if a vIOMMU is enabled or
not. The reason being that dirty tracking will need this to understand what to
track meaning to decide whether we track the whole address space or just the
linear map[0]. And all that code is in common, not migration.c and where I use
it will have to look at all address spaces (because dirty tracking is started
for all devices, so there's no vbasedev to look at).
Eventually after the vIOMMU stuff, the migration blocker condition will look
more or less like this:
return (!vfio_viommu_preset(vbasedev) ||
(vfio_viommu_preset(vbasedev) &&
!vfio_viommu_get_max_iova(&max)))
Whereby vfio_viommu_preset(vbasedev) is what you currently call
vfio_block_giommu_migration(vbasedev) in current patch. So perhaps I would say
to leave it in common.c and rename it to vfio_viommu_preset(vbasedev) with a
comment on top for /* Block migration with a vIOMMU */
Then when the time comes I can introduce in my vIOMMU series a
vfio_viommu_possible() [or some other name] when starting dirty tracking which
looks all VFIOAddressSpaces and reuses your vfio_viommu_preset(vbasedev). This
should cover current and future needs, without going to great extents beyond the
purpose of this patch?
[0]
https://lore.kernel.org/qemu-devel/20230622214845.3980-13-joao.m.martins@oracle.com/#iZ31hw:vfio:common.c
next prev parent reply other threads:[~2023-06-27 10:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 8:02 [PATCH v3 0/3] VFIO migration related refactor and bug fix Zhenzhong Duan
2023-06-21 8:02 ` [PATCH v3 1/3] vfio/pci: Fix resource leak in vfio_realize Zhenzhong Duan
2023-06-21 11:08 ` Joao Martins
2023-06-25 6:00 ` Duan, Zhenzhong
2023-06-26 7:02 ` Duan, Zhenzhong
2023-06-26 10:07 ` Joao Martins
2023-06-27 2:38 ` Duan, Zhenzhong
2023-06-27 10:21 ` Joao Martins
2023-06-27 10:28 ` Duan, Zhenzhong
2023-06-21 8:02 ` [PATCH v3 2/3] vfio/pci: Fix a segfault " Zhenzhong Duan
2023-06-21 11:08 ` Joao Martins
2023-06-25 6:01 ` Duan, Zhenzhong
2023-06-26 9:58 ` Joao Martins
2023-06-21 8:02 ` [PATCH v3 3/3] vfio/migration: vfio/migration: Refactor and fix print of "Migration disabled" Zhenzhong Duan
2023-06-26 9:34 ` Avihai Horon
2023-06-26 10:18 ` Joao Martins
2023-06-27 2:55 ` Duan, Zhenzhong
2023-06-27 10:56 ` Joao Martins [this message]
2023-06-28 2:26 ` Duan, Zhenzhong
2023-06-27 2:46 ` Duan, Zhenzhong
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=bbdf6724-4c5c-cb93-9da3-c28d3b75620a@oracle.com \
--to=joao.m.martins@oracle.com \
--cc=alex.williamson@redhat.com \
--cc=avihaih@nvidia.com \
--cc=chao.p.peng@intel.com \
--cc=clg@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhenzhong.duan@intel.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).