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

[PATCH v3 1/6] x86/vioapic: top word redir entry writes don't trigger interrupts


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Tue, 26 Jan 2021 14:45:16 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZOg4CQnce8V68jgFkjekq4x4TGd9TVd2TOnMUjeWQRw=; b=dZuUOkllXuhDZk5nbrwONmEqSx5xxbIy9K6DJcFmJZwfUgSIXQ+B7AqdTpIwc19/BuU7PsX1ACyPepu8JQUq1qK3FTzShaH/IFq5LzyQP/KwGpoRAvtYEiZbnv1jiO5sgn3abBaXyk+ExkWb3CUhxRHwRuv3eSRxTuGTO140ARmes7sMl6ClFzCMaxbx5wyE+k1UeDTu8TTALbKs7d0LdnHYkmVfOM9k0GQWvmBCrlomOAhTIqMnww/AnxBEPp21N1RbsoTLyGHoLOZlQPWUjS82nYPM0iMZjhd6GDrfhc8qnHQY41kjFRQ9/LEdz/VpXwF53gXj5A+MptJRyrA7eQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fIQUYscEWzfUmza+yPPFNyot1r+qQBC9HGKEj7i+ZjGyvcMHtdSlimZcnP4Ssm+2pyBjBe3Mmv4zhmnyBF5UCP770m91/XLR2NVWOkzbKEvEomXQ5N5WuvLt2835O6HqSO8gVqKe1pTs5qSGN9EjtJNcy3BuJtsSXkQEgFiGgKyIrcfKA4g6EKScuPFagMfNNZtOYXVINDjL2A7Y0tZTe+chxpz0s3g7wM5//KuHU4HWP+pBlvxh2KX3GohQNhelGIxev+J3RigOGIr3zsnxqioJafjgN+pWHnBf0aFNm3Mi84Ahm4j0kyd/w07/UYGV/clsQNDivP/W5PdkYxSlbQ==
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 26 Jan 2021 13:46:11 +0000
  • Ironport-sdr: 3g0MHlyjz83bFPKSEK3mrM7Yf5VPEJjGiByv0XXBxdYClo0qVrD7NHNT0X+KH8dndNpAth34n3 2iZG4G+u30BfGWkdI09mJtMF1SBCFoQIM505YgQatM8NhET0chZWRGm+P5fIf+BUNX7bGntVZT 2xfqJOE5RmpKndq8eeVQrZTIuIwfSPBZKK+ZQefYKjRkjMle0jDaNvDhyHokpuBTIysqZrXZhi JEVJ3Vxf+LkPUd0zgaQB0ZXRCleROSZmsrTWaC61JB5QAYAmXbxH8+dEEiOSr1M18RhEeaochS 638=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Top word writes just update the destination of the interrupt, but
since there's no change on the masking or the triggering mode no
guest interrupt injection can result of such write. Add an assert to
that effect.

Requested-by: Jan Beulich <jbeulich@xxxxxxxx>
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
Changes since v2:
 - New in this version.
---
 xen/arch/x86/hvm/vioapic.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/hvm/vioapic.c b/xen/arch/x86/hvm/vioapic.c
index 804bc77279..e3ee747b7d 100644
--- a/xen/arch/x86/hvm/vioapic.c
+++ b/xen/arch/x86/hvm/vioapic.c
@@ -262,6 +262,8 @@ static void vioapic_write_redirent(
               !ent.fields.remote_irr &&
               hvm_irq->gsi_assert_count[gsi] )
     {
+        /* A top word write should never trigger an interrupt injection. */
+        ASSERT(!top_word);
         pent->fields.remote_irr = 1;
         vioapic_deliver(vioapic, idx);
     }
-- 
2.29.2




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.