On 6/27/25 11:12 AM, Matthew Rosato wrote:
AFAICT this portion of the handler including mutex should be moved out of ap.c 
into chsc_sei_nt0_get_event().  When vfio_ap is not in use, we can't call into 
it.  Can't you also build without VFIO_AP?  I didn't try it but that sure seems 
like it would cause issues too.
If that were the case, I think the checks I mentioned above would be sufficient 
because
the S390_FEAT_AP feature could not be set.

OK, I tested it quick (remove VFIO_AP from config) and that appears to be the 
case; this also restores zPCI hotplug capability since we won't call info 
hw/vfio/ap.c/.

What about moving lock initialization to the vfio_ap_class_init() function?

I tried a quick hack of that too and it appears to work, at least for the zPCI 
regression (note: I did not test the AP portion).

This approach is probably not the way I would have designed it initially...  
But it does seem to be the simplest thing to do from a fix perspective.

Can you or Rorie prepare a proper patch w/ a fixes tag and send (please add me 
to CC). Also please test the change against the vfio-ap environment; you can 
also test zPCI but I would also like to run some tests.
I can make those changes

Reply via email to