qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH/RFC 2/3] s390x/ais: enable ais when migration is


From: Christian Borntraeger
Subject: Re: [Qemu-devel] [PATCH/RFC 2/3] s390x/ais: enable ais when migration is available
Date: Fri, 22 Sep 2017 16:07:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0


On 09/22/2017 04:02 PM, Pierre Morel wrote:
> On 22/09/2017 14:40, Christian Borntraeger wrote:
>>
>>
>> On 09/22/2017 02:13 PM, Pierre Morel wrote:
>>> On 22/09/2017 10:38, Christian Borntraeger wrote:
>>>> Instead of unconditionally enabling the KVM AIS capability
>>>> in the kvm arch init function, do this in the flic realize function
>>>> when we know if migration is available. This requires to initialize
>>>> flic before the CPUs.
>>>
>>> I am not sure to agree.
>>>
>>> AIS facility is used for PCI (currently only PCI)
>>> We want to support PCI emulation and PCI VFIO
>>>
>>>
>>> Not having AIS support in the host kernel or not supporting AISM in the 
>>> host kernel does not affect the emulation.
>>> Neither virtio-pci nor TCG.
>>> The only devices, (currently), which can not work without AIS and is not 
>>> migratable without AISM are PCI VFIO devices.
>>
>> This patch enable the conditional enablement facility for the KVM host mask. 
>> The cpu model enablement is done
>> differently for KVM and TCG anyway.
>> Right now AIS is only enabled for KVM. For TCG AIS is not implemented at all 
>> and disabled. So for whenever this
>> is fixed in TCG it can be handled then.
>>
>> And for emulated devices under KVM you still need the kernel support - 
>> otherwise migration is really broken for
>> the nimm/dimm values.
>>
> 
> Yes, that is right.
> I do not pretend that it is working directly.
> 
> To support AIS emulation we have some work to do there (the migration), in 
> kvm_s390_inject_airq() and other functions using ais_supported, to use 
> emulated values.
> 
> Don't you think that we could use emulation instead of faulting when the 
> kernel can not handle values needed for pass-through?
> 
> We can fault at the moment a VFIO device is realized.
> Migration will be stopped on realizing VFIO PCI devices instead of flic.
> 
> I can miss something, is there a reason not to do so?

The problem is not vfio vs emulation. The problem is that for KVM the kernel is 
handling the interrupts.
and it holds the state of the interrupt controller (nimm/dimm) and without an 
interface to read/write these, 
the PCI core will be in a wrong state after migration regarding AIS.

Really, this patch just moves the supported host kernel from >=4.12 to >=4.13. 
It makes absolutely no
sense to start having a mixed interrupt stack (qemu + kernel) just to make this 
work on 4.12.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]