All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 00/12] RFC: Fix/add vmstate handling in some I2C code
@ 2018-11-15 19:24 minyard
  2018-11-15 19:24 ` [Qemu-devel] [PATCH v2 01/12] i2c: Split smbus into parts minyard
                   ` (12 more replies)
  0 siblings, 13 replies; 38+ messages in thread
From: minyard @ 2018-11-15 19:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Michael S . Tsirkin, Dr . David Alan Gilbert, minyard

These changes allow SMBus access while doing a state transfer.
Seems like a good idea to me in general.

I have these queued for the SMBus IPMI driver work, of course.

I had submitted this before and then lost track of the work since I
started finding all kinds of broken things in the I2C code.  I
have fixed the broken things I found first, and then added the
previous patches.

I have tested this in q35 and it works without issue.  On piix4 the
pm_smbus code is broken on a migration, however. The device disappears
from the PCI bus on a migration, from what I can tell.  It's not the
fault of this code, something more fundamental is going on.  The
following comment in piix4.c may have something to do with it:

/* qemu-kvm 1.2 uses version 3 but advertised as 2
 * To support incoming qemu-kvm 1.2 migration, change version_id
 * and minimum_version_id to 2 below (which breaks migration from
 * qemu 1.2).

Anyway, I need to chase that down.

I'm primarily submitting this to make sure I'm doing the backwards
compatability with .needed correctly.  I'm adding a new field in
the machine class and setting it in the initialization code for
older versions.  David, is this what you wanted?  It will have to
be adjusted for the proper version if/when it really goes in, of
course.  You can see those in the following commits:
  boards.h: Ignore migration for SMBus devices on
  i2c:pm_smbus: Fix state transfer
  i2c: Add vmstate handling to the smbus eeprom
I thought about adding a field to the pm_smbus code to only transfer
if it was accessed, but I'm assuming that most modern OSes will
at least initialized the device based on its presence on the PCI
bus.  So that didn't seem like it would add any value.

I'm also submitting to see if all the fixes and cleanups look ok.
That's the first 5 commits.

Thanks,

-corey

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2018-11-27 18:52 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-15 19:24 [Qemu-devel] [PATCH v2 00/12] RFC: Fix/add vmstate handling in some I2C code minyard
2018-11-15 19:24 ` [Qemu-devel] [PATCH v2 01/12] i2c: Split smbus into parts minyard
2018-11-15 22:22   ` Philippe Mathieu-Daudé
2018-11-16 13:20     ` Corey Minyard
2018-11-20 15:47       ` Peter Maydell
2018-11-20 19:30         ` Philippe Mathieu-Daudé
2018-11-21 11:59           ` Peter Maydell
2018-11-15 19:24 ` [Qemu-devel] [PATCH v2 02/12] i2c: have I2C receive operation return uint8_t minyard
2018-11-20 15:31   ` Peter Maydell
2018-11-15 19:24 ` [Qemu-devel] [PATCH v2 03/12] i2c: Simplify and correct the SMBus state machine minyard
2018-11-15 19:24 ` [Qemu-devel] [PATCH v2 04/12] i2c: Add a length check to the SMBus write handling minyard
2018-11-20 15:33   ` Peter Maydell
2018-11-20 16:58     ` Corey Minyard
2018-11-15 19:24 ` [Qemu-devel] [PATCH v2 05/12] i2c: Fix pm_smbus handling of I2C block read minyard
2018-11-15 19:24 ` [Qemu-devel] [PATCH v2 06/12] boards.h: Ignore migration for SMBus devices on older machines minyard
2018-11-26 17:23   ` Dr. David Alan Gilbert
2018-11-26 18:22     ` Corey Minyard
2018-11-27 16:01       ` Dr. David Alan Gilbert
2018-11-27 16:59         ` Corey Minyard
2018-11-27 18:14           ` Dr. David Alan Gilbert
2018-11-27 18:41             ` Laurent Vivier
2018-11-15 19:24 ` [Qemu-devel] [PATCH v2 07/12] i2c:pm_smbus: Fix state transfer minyard
2018-11-26 17:20   ` Dr. David Alan Gilbert
2018-11-26 18:24     ` Corey Minyard
2018-11-26 19:41       ` Corey Minyard
2018-11-27 18:20         ` Dr. David Alan Gilbert
2018-11-15 19:24 ` [Qemu-devel] [PATCH v2 08/12] i2c: Add an SMBus vmstate structure minyard
2018-11-15 19:24 ` [Qemu-devel] [PATCH v2 09/12] i2c: Add normal type name and cast to smbus_eeprom.c minyard
2018-11-20 15:34   ` Peter Maydell
2018-11-15 19:24 ` [Qemu-devel] [PATCH v2 10/12] i2c: Add a size constant for the smbus_eeprom size minyard
2018-11-15 22:34   ` Philippe Mathieu-Daudé
2018-11-15 19:24 ` [Qemu-devel] [PATCH v2 11/12] i2c: Add vmstate handling to the smbus eeprom minyard
2018-11-26 17:30   ` Dr. David Alan Gilbert
2018-11-15 19:24 ` [Qemu-devel] [PATCH v2 12/12] i2c: Add a reset function to smbus_eeprom minyard
2018-11-15 23:01 ` [Qemu-devel] [PATCH v2 00/12] RFC: Fix/add vmstate handling in some I2C code Philippe Mathieu-Daudé
2018-11-16 13:30   ` Corey Minyard
2018-11-26 14:11   ` Corey Minyard
2018-11-26 14:35     ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.