Re: [RFC PATCH 3/4] KVM: x86: Add EOI exit bitmap inference

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

 



On Wed, May 13, 2015 at 09:51:43AM +0200, Paolo Bonzini wrote:
> 
> 
> On 13/05/2015 03:47, Steve Rutherford wrote:
> > @@ -205,6 +205,8 @@ int kvm_set_irq_routing(struct kvm *kvm,
> >  
> >  	synchronize_srcu_expedited(&kvm->irq_srcu);
> >  
> > +	kvm_vcpu_request_scan_userspace_ioapic(kvm);
> > +
> >  	new = old;
> >  	r = 0;
> >  
> 
> This can be done before synchronize_srcu_expedited, so that changes
> ripple to the VCPUs faster.
> 
> > +void kvm_vcpu_request_scan_userspace_ioapic(struct kvm *kvm)
> > +{
> > +	struct kvm_ioapic *ioapic = kvm->arch.vioapic;
> > +
> > +	if (ioapic)
> > +		return;
> > +	if (!lapic_in_kernel(kvm))
> > +		return;
> > +	kvm_make_scan_ioapic_request(kvm);
> > +}
> 
> This is okay for use in kvm_set_irq_routing (perhaps renamed to
> kvm_arch_irq_routing_update), but when it is used here:
> 
> >  	if (!irqchip_split(kvm))
> >  		kvm_vcpu_request_scan_ioapic(kvm);
> > +	else
> > +		kvm_vcpu_request_scan_userspace_ioapic(kvm);
> 
> ... you can simply do this:
> 
> - 	if (!irqchip_split(kvm))
> -		kvm_vcpu_request_scan_ioapic(kvm);
> +	kvm_make_scan_ioapic_request(kvm);
> 
> Paolo

Seems reasonable.

While we're on the topic of scanning the IOAPIC, should this also scan the IOAPIC when (un)registering irq ack notifiers? [Which is currently done for the in-kernel IOAPIC.]
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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