Re: [PATCH] kvm: x86: get vmcs12 pages before checking pending interrupts

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

 



On Wed, May 06, 2020 at 02:07:17PM +0200, Paolo Bonzini wrote:
> On 06/05/20 01:22, Oliver Upton wrote:
> > +	/*
> > +	 * We must first get the vmcs12 pages before checking for interrupts
> > +	 * (done in kvm_arch_vcpu_runnable) in case L1 is using
> > +	 * virtual-interrupt delivery.
> > +	 */
> > +	if (kvm_check_request(KVM_REQ_GET_VMCS12_PAGES, vcpu)) {
> > +		if (unlikely(!kvm_x86_ops.nested_ops->get_vmcs12_pages(vcpu)))
> > +			return 0;
> > +	}
> > +
> 
> 
> The patch is a bit ad hoc, I'd rather move the whole "if
> (kvm_request_pending(vcpu))" from vcpu_enter_guest to vcpu_run (via a
> new function).

It might make sense to go with an ad hoc patch to get the thing fixed, then
worry about cleaning up the pending request crud.  It'd be nice to get rid
of the extra nested_ops->check_events() call in kvm_vcpu_running(), as well
as all of the various request checks in (or triggered by) vcpu_block().

I was very tempted to dive into that mess when working on the nested events
stuff, but was afraid that I would be opening up pandora's box.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux