Re: [PATCH 04/10] KVM: s390: add metric vcpus_in_sie to struct kvm_arch

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

 



On 06/11/2018 18:54, Cornelia Huck wrote:
On Tue, 6 Nov 2018 17:54:17 +0100
Halil Pasic <pasic@xxxxxxxxxxxxx> wrote:

On Thu, 25 Oct 2018 14:37:45 +0200
Michael Mueller <mimu@xxxxxxxxxxxxx> wrote:

This metric will allow to identify how many vcpus are currently
running for a given kvm in SIE context. Its value is between 0 and
the number of vcpus defined for the kvm guest, but never lager than
the number of cpus available to the KVM host in total.

This metric is required to decide if the GISA IAM has to be restored
from the kvm arch field of the guest. That will be the case when no
vcpu is in SIE context. (vcpus_in_sie == 0)

Mimu, we just spoke about -- thus a reminder for us, and a FYI for
the rest. vcpus_in_sie != 0 does not necessarily mean that FW can
deliver GISA interrupts to the guest (and thus we don't have to
dispatch a suitable vcpu): if all cpus in SIE mask IO interrupts it
does not really matter that they are in SIE. I.e. we should still get
alerted and try to dispatch an eligible vcpu.

If I understood well, I do not agree.
If all the vCPU have ISC masked in CR6 we do not need to dispatch the vCPU, running or not.
If running,
The first vCPU that will load CR6 with at least one bit of the ISC being one will be scheduled by the firmware.

We should not set the IAM if a vCPU with interrupt not masked is running because we will get the alert prior to the guest and loose the benefit of an interrupt directly sent to the guest.

The design done here is right.


So, do we need to restore the IAM as well if all cpus in SIE have I/O
interrupts masked? Or is it just some dispatching we have to do?


If not running, I think this is the right question.

We should not restore the IAM and should not dispatch the vCPU.
However I am not sure that dispatching the vCPU causes a problem.

Restoring the IAM would prevent the GISA to be delivered if another interrupt arrives.

--
Pierre Morel
Linux/KVM/QEMU in Böblingen - Germany




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux