qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Avihai Horon <avihaih@nvidia.com>,
	qemu-devel@nongnu.org,
	Richard Henderson <richard.henderson@linaro.org>
Cc: Alex Williamson <alex.williamson@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Cornelia Huck <cohuck@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Matthew Rosato <mjrosato@linux.ibm.com>
Subject: Re: [PULL 2/2] vfio: tolerate migration protocol v1 uapi renames
Date: Thu, 12 May 2022 16:04:23 +0200	[thread overview]
Message-ID: <1fa226fd-02e5-1711-656e-dc807af2b388@redhat.com> (raw)
In-Reply-To: <b248ca40-c322-69d0-799f-d0a95bf0c31b@nvidia.com>

On 12/05/2022 15.53, Avihai Horon wrote:
> 
> On 5/12/2022 1:29 PM, Thomas Huth wrote:
>> External email: Use caution opening links or attachments
>>
>>
>> From: Matthew Rosato <mjrosato@linux.ibm.com>
>>
>> The v1 uapi is deprecated and will be replaced by v2 at some point;
>> this patch just tolerates the renaming of uapi fields to reflect
>> v1 / deprecated status.
>>
>> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
>> Message-Id: <20220404181726.60291-3-mjrosato@linux.ibm.com>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>   hw/vfio/common.c    |  2 +-
>>   hw/vfio/migration.c | 19 +++++++++++--------
>>   2 files changed, 12 insertions(+), 9 deletions(-)
>>
>> diff --git a/hw/vfio/common.c b/hw/vfio/common.c
>> index 159f910421..8e73d3714a 100644
>> --- a/hw/vfio/common.c
>> +++ b/hw/vfio/common.c
>> @@ -381,7 +381,7 @@ static bool 
>> vfio_devices_all_running_and_saving(VFIOContainer *container)
>>                   return false;
>>               }
>>
>> -            if ((migration->device_state & VFIO_DEVICE_STATE_SAVING) &&
>> +            if ((migration->device_state & VFIO_DEVICE_STATE_V1_SAVING) &&
>>                   (migration->device_state & VFIO_DEVICE_STATE_RUNNING)) {
> 
> Only now I noticed this, but all existing VFIO_DEVICE_STATE_* enums should 
> be changed to their corresponding VFIO_DEVICE_STATE_V1_*.
> E.g., here VFIO_DEVICE_STATE_RUNNING should be changed as well to 
> VFIO_DEVICE_STATE_V1_RUNNING.
> 
> I already have a patch that does this. I will send it today as part of the 
> VFIO migration v2 series I am planning to send, so you can just take it.

Ugh, thanks for noticing!

Alex, could you please take care of this in the next days? Seems like the 
next linux-header updates is really not that trivial anymore due to that 
ugly vfio macro renaming :-( And I'd prefer if somebody could tackle this 
who is really more confident in this area.

  Thomas



  reply	other threads:[~2022-05-12 14:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 10:29 [PULL 0/2] Update linux-headers to v5.18-rc6 Thomas Huth
2022-05-12 10:29 ` [PULL 1/2] linux-headers: Update headers " Thomas Huth
2022-05-12 10:29 ` [PULL 2/2] vfio: tolerate migration protocol v1 uapi renames Thomas Huth
2022-05-12 13:53   ` Avihai Horon
2022-05-12 14:04     ` Thomas Huth [this message]
2022-05-12 14:01 ` [PULL 0/2] Update linux-headers to v5.18-rc6 Thomas Huth

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=1fa226fd-02e5-1711-656e-dc807af2b388@redhat.com \
    --to=thuth@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=avihaih@nvidia.com \
    --cc=cohuck@redhat.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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).