On 2/23/21 12:14 PM, Cornelia Huck wrote:
On Mon, 22 Feb 2021 13:41:01 +0100
Pierre Morel <pmorel@xxxxxxxxxxxxx> wrote:
When we intercept a DIAG_9C from the guest we verify that the
target real CPU associated with the virtual CPU designated by
the guest is running and if not we forward the DIAG_9C to the
target real CPU.
To avoid a diag9c storm we allow a maximal rate of diag9c forwarding.
The rate is calculated as a count per second defined as a new
parameter of the s390 kvm module: diag9c_forwarding_hz .
The default value of 0 is to not forward diag9c.
Signed-off-by: Pierre Morel <pmorel@xxxxxxxxxxxxx>
---
Documentation/virt/kvm/s390-diag.rst | 33 ++++++++++++++++++++++++++++
arch/s390/include/asm/kvm_host.h | 1 +
arch/s390/include/asm/smp.h | 1 +
arch/s390/kernel/smp.c | 1 +
arch/s390/kvm/diag.c | 31 +++++++++++++++++++++++---
arch/s390/kvm/kvm-s390.c | 6 +++++
arch/s390/kvm/kvm-s390.h | 8 +++++++
7 files changed, 78 insertions(+), 3 deletions(-)
Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>
Thanks,
Pierre
--
Pierre Morel
IBM Lab Boeblingen