[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 3/6] x86/vpic: force int output to low when in init mode
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Tue, 26 Jan 2021 14:45:18 +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=Zk5/Yanq7YakWGqtSzKO9ebXzxAHQDzGRCoPFe7bjPk=; b=hMKPH1ipHxbIim+vyQAAPLE1x5xP34aMPQAFeiliirlwiZGKAdC/TrjBEQHd/grhaJfGz2sIpNlR/ob+5E7qHKzntVhuVqAM28TgJMPFeSTmzl9Ij8sqSe7Ze+Z+92RjSET+oEaTZwJSKM34HoTYnrfC6x8jD1EdvzBDcoMC0cr68noG2/6oA3bJf+IHDIOLZfF2PEzlny/8LzU4WVKxP176MVAMu4vBuqz0SR0Ds5kjffevaHs0Itvqy6NREDcOsxw+20rxS/Hg+Izi4Y92pa1CdKHnLvLAzUEx4UbESd1FPAdRyWY6QGjL7vquTCE9D1Yr39Z3K9kfkfD9lwqLoA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZnsplQ0GHmSVg/79U6wCeEkztiHlNBGJFIa30K0fmyL5JX1e1I6g+KEsaM9B6AC+7Vhn6iYzj5LlbQ2ttSKC5l1yrLefni+N1NNEnGgoRevse1YdDYsxwUttjHDUMvez2Skokk7PG7pzJtHHUMflyhfh/u3clkuLiMWM2ljUSNOXU7GRBzGzQjJtD7N1bnvKGVsgmk1EmPUmUm2Q1bCRHHOXPcYD0j2hHCKrnDW5JnLMA9S2EtUlEx4mXwHmOlUPnY2aI05FzN0DI08ug1B52tWUzCQbo7IzON16JlE2/J8TGX5J9p/PBdzUXax/sXCYx5mHceyrCcv9pMFpfUOCCA==
- Authentication-results: esa4.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:25 +0000
- Ironport-sdr: qR/5MSr+HtpjAaQUVpqKQiPOckkx4J7t+1xd1cojpHnJJ+c2EonPZz7B6ydDGgpnu93zpJjWCP FNWWCyH557PXvHSORTr0LasNV8H0y2MUw2P1oTmLwpBfuo3EmI45Xq2d+VhuOZg3dNbkxW28+S y5gRdRhGfBzMcFyXN6iCFj1AfqeP8yaqaVzIYvCr1IPu1eTVMubBTFO7h7kOjPTldTP7xeKShX wZSkMQwC2TCswBnss1u2A56gHbtDCvpMkJlBwUyg3GXWdE5Qqfc8fLYULNN67ccgEPA4JowzQW un0=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
When the PIC is on the init sequence prevent interrupt delivery. The
state of the registers is in the process of being set during the init
phase, so it makes sense to prevent any int line changes during that
process.
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/vpic.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/hvm/vpic.c b/xen/arch/x86/hvm/vpic.c
index c1c1de7fd0..9195155ff0 100644
--- a/xen/arch/x86/hvm/vpic.c
+++ b/xen/arch/x86/hvm/vpic.c
@@ -101,11 +101,14 @@ static void vpic_update_int_output(struct hvm_hw_vpic
*vpic)
irq = vpic_get_highest_priority_irq(vpic);
TRACE_3D(TRC_HVM_EMUL_PIC_INT_OUTPUT, vpic->int_output, vpic->is_master,
irq);
- if ( vpic->int_output == (irq >= 0) )
+ if ( vpic->int_output == (!vpic->init_state && irq >= 0) )
return;
- /* INT line transition L->H or H->L. */
- vpic->int_output = !vpic->int_output;
+ /*
+ * INT line transition L->H or H->L.
+ * Force line status to L when in init mode.
+ */
+ vpic->int_output = !vpic->init_state && !vpic->int_output;
if ( vpic->int_output )
{
--
2.29.2
|