qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/3] i386: hvf: In kick_vcpu use hv_vcpu_interrupt to force e


From: Phil Dennis-Jordan
Subject: Re: [PATCH 2/3] i386: hvf: In kick_vcpu use hv_vcpu_interrupt to force exit
Date: Sun, 8 Oct 2023 20:39:08 +0200

On Sun, 8 Oct 2023 at 20:23, Roman Bolshakov <roman@roolebo.dev> wrote:
On Fri, Sep 22, 2023 at 04:09:13PM +0200, Phil Dennis-Jordan wrote:
> When interrupting a vCPU thread, this patch actually tells the hypervisor to
> stop running guest code on that vCPU.
>
> Calling hv_vcpu_interrupt actually forces a vCPU exit, analogously to
> hv_vcpus_exit on aarch64.
>
> Previously, hvf_kick_vcpu_thread relied upon hv_vcpu_run returning very
> frequently, including many spurious exits, which made it less of a problem that
> nothing was actively done to stop the vCPU thread running guest code.
> The newer, more efficient hv_vcpu_run_until exits much more rarely, so a true
> "kick" is needed.
>

Hi Roman,

Thanks for the review and test of this patch and the preceding one!
 
I see severe performance regression with the patch on a Windows XP
guest. The display is not refreshed properly like a broken LVDS panel,
only some horizontal lines appear on it.

OK, that's interesting - I've been running into that sort of issue while trying to integrate HVF's APIC implementation into Qemu. I assume that's with patch 3/3 applied as well? The fact you've repro'd it with just these patch would explain why I've not been able to fix it on the APIC side…

My test laptop for x86 hvf is
MBA 2015 with the latest Big Sur. What are you runing QEMU/HVF on?

Most of the testing has been with 2018 Mac Mini (Intel Coffee Lake) hosts running Big Sur (11), Monterey (12), and Ventura (13), and using macOS guests. I've also sanity-checked with a 2015 MBP (Broadwell) Monterey host with various macOS guests as well as Linux and FreeBSD guests. Guess I should have tried Windows guests too, sorry about the regression!
 
FWIW. I recall a few years ago I submitted a similar patch that does
something similar but addresses a few more issues:
https://patchwork.kernel.org/project/qemu-devel/patch/20200729124832.79375-1-r.bolshakov@yadro.com/

I don't remember why it never got merged.

Looks like the VM kick might be a more complex undertaking than I was anticipating. I'll try to repro the problem you ran into, and then look over your original patch and make sense of it. Hopefully an updated version of your 'kick' implementation will work well in combination with the newer hv_vcpu_run_until() API from patch 3/3. I'll keep you posted.

Thanks again,
Phil


reply via email to

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