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

Re: [PATCH v2] x86/ioapic: sanitize IO-APIC pins before enabling lapic LVTERR/ESR


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 17 Jul 2023 10:24:08 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Yuw+Dxn6OwPytOF3eYN8Jek1bRUNjs3qLPEvj93NZNA=; b=KEM5m0k+aw/Xo4UDPMXA9wnhajHzZ4oDDINwJgUPUOj9dANkIYB/KiPLrkJnHiw0sMHtm1e1EbgdgCkUZNkFGkTX3wXM3mScCmjhd58alO8/C6iG8KKuPSbUwWnI9y+ICcyMz2ipSbFjHHvWejCIYgmJnarWYwJINM+r7ektpgTfrGAsdf66aaZaxIOS2Mqh7f2NyX7UURNaheEQudiA/pHTVwTsYvToF4Jdv/6DZpkA0E3H9iGeIPnVVC3N7L3pCtuVrLiVlkcNIXvhw9jIZ4TwQzvQatAVJxBfrFEMpbhBCWGLfFCkn+E6k4EsD+aNQ6D5zlz2yWITDkFzTXJtEg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P0AeQk8TAOSnZugGftqWTJWPih/G0HVAJk8FS5hqwrjosdAoD8oHtUocjqqifAB839kWaECweU+SiMqYTlgPVTIz/07iLFZMCn1h8VF0xCxElVo1x2K4cgJzh3BXT3diLUCaefsXZZk33X/ZVhyZ8gdXy0/PZGyyhqU1dWsanUUNyXObZxhlDTNKb1iJQMZ5KqBVnLtdiDDGvKw/h0e147je/blI+xlasGuBXM+Mtx418IDXvcL7Q6fH9c0GyYxbKA42GCG/iYgbk9taJQnO2bsi1QuT8127PSFm92W6J1fPAq0SRhAeWx6nfXpCim19kDXZsLyZOCOlwdqoSTHtRg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 17 Jul 2023 08:24:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 14.07.2023 18:03, Roger Pau Monne wrote:
> The current logic to init the local APIC and the IO-APIC does init the
> local APIC LVTERR/ESR before doing any sanitation on the IO-APIC pin

Nit: I guess I'll take the liberty of making this read "sanitization"
while committing.

> configuration.  It's already noted on enable_IO_APIC() that Xen
> shouldn't trust the IO-APIC being empty at bootup.
> 
> At XenServer we have a system where the IO-APIC 0 is handed to Xen
> with pin 0 unmasked, set to Fixed delivery mode, edge triggered and
> with a vector of 0 (all fields of the RTE are zeroed).  Once the local
> APIC LVTERR/ESR is enabled periodic injections from such pin cause the
> local APIC to in turn inject periodic error vectors:
> 
> APIC error on CPU0: 00(40), Received illegal vector
> APIC error on CPU0: 40(40), Received illegal vector
> APIC error on CPU0: 40(40), Received illegal vector
> APIC error on CPU0: 40(40), Received illegal vector
> APIC error on CPU0: 40(40), Received illegal vector
> APIC error on CPU0: 40(40), Received illegal vector
> 
> That prevents Xen from booting.
> 
> Move the masking of the IO-APIC pins ahead of the setup of the local
> APIC.  This has the side effect of also moving the detection of the
> pin where the i8259 is connected, as such detection must be done
> before masking any pins.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>




 


Rackspace

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