[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e76ed034-7c7a-4cd6-ae10-945ad39c2b00@linux.ibm.com>
Date: Thu, 27 Nov 2025 15:37:47 +0100
From: Janosch Frank <frankja@...ux.ibm.com>
To: Andrew Donnellan <ajd@...ux.ibm.com>, kvm@...r.kernel.org,
linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
Claudio Imbrenda <imbrenda@...ux.ibm.com>,
Heiko Carstens
<hca@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>,
Alexander Gordeev <agordeev@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>
Cc: Nicholas Miehlbradt <nicholas@...ux.ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Andy Lutomirski <luto@...nel.org>,
David Hildenbrand <david@...nel.org>
Subject: Re: [PATCH v2 3/3] KVM: s390: Use generic VIRT_XFER_TO_GUEST_WORK
functions
On 11/26/25 06:33, Andrew Donnellan wrote:
> Switch to using the generic infrastructure to check for and handle pending
> work before transitioning into guest mode.
>
> xfer_to_guest_mode_handle_work() does a few more things than the current
> code does when deciding whether or not to exit the __vcpu_run() loop. The
> exittime tests from kvm-unit-tests, in my tests, were within a few percent
> compared to before this series, which is within noise tolerance.
>
> Co-developed-by: Heiko Carstens <hca@...ux.ibm.com>
> Signed-off-by: Heiko Carstens <hca@...ux.ibm.com>
> Signed-off-by: Andrew Donnellan <ajd@...ux.ibm.com>
> ---
> v2: if work is handled, recheck for outstanding work with interrupts
> disabled before entering guest (Heiko)
>
> The way I've implemented this, I do the check between vcpu_pre_run() and
> entering the guest, and bail out of the loop if
> kvm_xfer_to_guest_mode_handle_work() returns nonzero, without calling
> vcpu_post_run(). My impression is that this is safe, but it does mean
> there is an sie_enter vcpu event and trace event which isn't matched with
> corresponding exit events. Is this a problem?
Acked-by: Janosch Frank <frankja@...ux.ibm.com>
Powered by blists - more mailing lists