I believe I've fixed all the issues pointed out by everyone, and I've tested migration between 2.12 and 3.0 and back on q35 and piix4 (with the fix I posted earlier for piix4).
Changes since v2: Added proper license headers for the newly created files. Added myself as a maintainer of the i2c core files. Removed unneeded code in several places pointed out by Peter Maydell since i2c_recv() returns a uint8_t instead of an int. These are in two separate patches. Added a patch from Philippe Mathieu-Daudé <phi...@redhat.com> to replace a magic number with a constant in the smbus_eeprom code and verify the count so there is no overflow. Updated the pm_smbus migration to not update the version numbers in the existing vmstate structures. The needed field didn't accomplish what was needed because it is only called on the save side, not the load side of the migration. So I'm using VMSTATE_STRUCT_TEST() to transfer the pm_smbus data now, that should be all that is required for backwards compatibility, and will be safer for falling back to an older version. I found the problem with the SMBus being broken on piix4 after a migration, but I sent it out as a separate patch since it has nothing to do with this series, and should probably go into the current release being worked on.