Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1225892
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v8 12/13] KVM: Warn if 'SN' is set during posting interrupts by software |
| Date | 2015-09-16 11:40 +0200 |
| Message-ID | <q9hm3-uy-25@gated-at.bofh.it> (permalink) |
| References | <q9gSZ-8o1-5@gated-at.bofh.it> <q9gT0-8o1-33@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 16/09/2015 10:50, Feng Wu wrote:
> Currently, we don't support urgent interrupt, all interrupts
> are recognized as non-urgent interrupt, so we cannot post
> interrupts when 'SN' is set.
>
> If the vcpu is in guest mode, it cannot have been scheduled out,
> and that's the only case when SN is set currently, warning if
> SN is set.
>
> Signed-off-by: Feng Wu <feng.wu@intel.com>
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Please fold this into patch 10.
Paolo
> ---
> arch/x86/kvm/vmx.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 9888c43..58fbbc6 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -4498,6 +4498,22 @@ static inline bool kvm_vcpu_trigger_posted_interrupt(struct kvm_vcpu *vcpu)
> {
> #ifdef CONFIG_SMP
> if (vcpu->mode == IN_GUEST_MODE) {
> + struct vcpu_vmx *vmx = to_vmx(vcpu);
> +
> + /*
> + * Currently, we don't support urgent interrupt,
> + * all interrupts are recognized as non-urgent
> + * interrupt, so we cannot post interrupts when
> + * 'SN' is set.
> + *
> + * If the vcpu is in guest mode, it means it is
> + * running instead of being scheduled out and
> + * waiting in the run queue, and that's the only
> + * case when 'SN' is set currently, warning if
> + * 'SN' is set.
> + */
> + WARN_ON_ONCE(pi_test_sn(&vmx->pi_desc));
> +
> apic->send_IPI_mask(get_cpu_mask(vcpu->cpu),
> POSTED_INTR_VECTOR);
> return true;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v8 00/13] Add VT-d Posted-Interrupts support Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
[PATCH v8 10/13] KVM: Update Posted-Interrupts Descriptor when vCPU is preempted Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
Re: [PATCH v8 10/13] KVM: Update Posted-Interrupts Descriptor when vCPU is preempted Paolo Bonzini <pbonzini@redhat.com> - 2015-09-16 11:30 +0200
[PATCH v8 11/13] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
Re: [PATCH v8 11/13] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked Paolo Bonzini <pbonzini@redhat.com> - 2015-09-16 11:40 +0200
[PATCH v8 13/13] iommu/vt-d: Add a command line parameter for VT-d posted-interrupts Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
[PATCH v8 02/13] KVM: Add some helper functions for Posted-Interrupts Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
[PATCH v8 04/13] KVM: Make struct kvm_irq_routing_table accessible Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
[PATCH v8 12/13] KVM: Warn if 'SN' is set during posting interrupts by software Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
Re: [PATCH v8 12/13] KVM: Warn if 'SN' is set during posting interrupts by software Paolo Bonzini <pbonzini@redhat.com> - 2015-09-16 11:40 +0200
[PATCH v8 06/13] vfio: Register/unregister irq_bypass_producer Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
[PATCH v8 09/13] KVM: Add an arch specific hooks in 'struct kvm_kernel_irqfd' Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
Re: [PATCH v8 09/13] KVM: Add an arch specific hooks in 'struct kvm_kernel_irqfd' Paolo Bonzini <pbonzini@redhat.com> - 2015-09-16 11:30 +0200
RE: [PATCH v8 09/13] KVM: Add an arch specific hooks in 'struct kvm_kernel_irqfd' "Wu, Feng" <feng.wu@intel.com> - 2015-09-17 04:00 +0200
Re: [PATCH v8 09/13] KVM: Add an arch specific hooks in 'struct kvm_kernel_irqfd' Paolo Bonzini <pbonzini@redhat.com> - 2015-09-17 11:40 +0200
[PATCH v8 07/13] KVM: x86: Update IRTE for posted-interrupts Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
[PATCH v8 01/13] KVM: Extend struct pi_desc for VT-d Posted-Interrupts Feng Wu <feng.wu@intel.com> - 2015-09-16 11:20 +0200
[PATCH v8 05/13] KVM: make kvm_set_msi_irq() public Feng Wu <feng.wu@intel.com> - 2015-09-16 11:20 +0200
[PATCH v8 03/13] KVM: Define a new interface kvm_intr_is_single_vcpu() Feng Wu <feng.wu@intel.com> - 2015-09-16 11:20 +0200
Re: [PATCH v8 03/13] KVM: Define a new interface kvm_intr_is_single_vcpu() Paolo Bonzini <pbonzini@redhat.com> - 2015-09-16 11:30 +0200
RE: [PATCH v8 03/13] KVM: Define a new interface kvm_intr_is_single_vcpu() "Wu, Feng" <feng.wu@intel.com> - 2015-09-17 05:20 +0200
Re: [PATCH v8 03/13] KVM: Define a new interface kvm_intr_is_single_vcpu() Paolo Bonzini <pbonzini@redhat.com> - 2015-09-17 11:50 +0200
RE: [PATCH v8 03/13] KVM: Define a new interface kvm_intr_is_single_vcpu() "Wu, Feng" <feng.wu@intel.com> - 2015-09-17 15:40 +0200
Re: [PATCH v8 03/13] KVM: Define a new interface kvm_intr_is_single_vcpu() Paolo Bonzini <pbonzini@redhat.com> - 2015-09-17 16:30 +0200
Re: [PATCH v8 03/13] KVM: Define a new interface kvm_intr_is_single_vcpu() Radim Krčmář <rkrcmar@redhat.com> - 2015-09-17 18:00 +0200
Re: [PATCH v8 03/13] KVM: Define a new interface kvm_intr_is_single_vcpu() Paolo Bonzini <pbonzini@redhat.com> - 2015-09-17 18:10 +0200
RE: [PATCH v8 03/13] KVM: Define a new interface kvm_intr_is_single_vcpu() "Wu, Feng" <feng.wu@intel.com> - 2015-09-18 01:20 +0200
Re: [PATCH v8 03/13] KVM: Define a new interface kvm_intr_is_single_vcpu() Paolo Bonzini <pbonzini@redhat.com> - 2015-09-18 18:20 +0200
Re: [PATCH v8 03/13] KVM: Define a new interface kvm_intr_is_single_vcpu() Radim Krčmář <rkrcmar@redhat.com> - 2015-09-18 18:20 +0200
RE: [PATCH v8 03/13] KVM: Define a new interface kvm_intr_is_single_vcpu() "Wu, Feng" <feng.wu@intel.com> - 2015-09-18 01:20 +0200
Re: [PATCH v8 00/13] Add VT-d Posted-Interrupts support Paolo Bonzini <pbonzini@redhat.com> - 2015-09-16 11:40 +0200
csiph-web