lkml.org 
[lkml]   [2022]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/5] KVM: x86: Get vmcs12 pages before checking pending interrupts
On 8/3/22 01:07, Mingwei Zhang wrote:
> + /*
> + * We must first get the vmcs12 pages before checking for interrupts
> + * that might unblock the guest if L1 is using virtual-interrupt
> + * delivery.
> + */
> + if (kvm_check_request(KVM_REQ_GET_NESTED_STATE_PAGES, vcpu)) {
> + /*
> + * If we have to ask user-space to post-copy a page,
> + * then we have to keep trying to get all of the
> + * VMCS12 pages until we succeed.
> + */
> + if (unlikely(!kvm_x86_ops.nested_ops->get_nested_state_pages(vcpu))) {
> + kvm_make_request(KVM_REQ_GET_NESTED_STATE_PAGES, vcpu);
> + return 0;
> + }
> + }
> +

I think request handling (except for KVM_REQ_EVENT) could be more
generically moved from vcpu_enter_guest() to vcpu_run().

Paolo

\
 
 \ /
  Last update: 2022-08-03 19:19    [W:0.147 / U:1.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site