From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Andrew Cooper <andrew.cooper3@citrix.com>, Wei Liu <wl@xen.org>
Subject: Re: [PATCH 7/7] x86: don't allow Dom0 access to ELCR ports
Date: Thu, 26 Oct 2023 13:02:43 +0200 [thread overview]
Message-ID: <ZTpHUzeBbDLe5Lin@macbook> (raw)
In-Reply-To: <118fa3e5-e1ac-ab3e-8b86-1ec751513434@suse.com>
On Thu, May 11, 2023 at 02:08:09PM +0200, Jan Beulich wrote:
> Much like the other PIC ports, Dom0 has no business touching these. Even
> our own uses are somewhat questionable, as the corresponding IO-APIC
> code in Linux is enclosed in a CONFIG_EISA conditional; I don't think
> there are any x86-64 EISA systems.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> RFC: For Linux'es (matching our) construct_default_ioirq_mptable() we
> may need to permit read access at least for PVH, if such default
> table construction is assumed to be sensible there in the first
> place (we assume ACPI and no PIC for PVH Dom0, after all).
Unless I'm confused, thise ports only control the triggering mode of
the PICs, and hence a PVH dom0 should have no business with them, as
not having a PIC in the first place.
>
> RFC: Linux further has ACPI boot code accessing ELCR
> (acpi_pic_sci_set_trigger() and acpi_register_gsi_pic()), which we
> have no equivalent of.
If access to the port is denied, ~0 will be returned, and hence all
IRQs will be assumed to be level. Some bits reserved and must be 0
will also be returned as 1.
>
> Taken together, perhaps the hiding needs to be limited to PVH Dom0?
I very much doubt Xen will ever use the PIC unless forced on the
command line, and we should likely remove such option and just
mandate a working IO-APIC in order to run Xen.
My only doubt is whether some Linux code will get confused by poking
at ELCR{1,2} and malfunction as a result of not being able to fetch a
sane mask.
As a last resort, we could make the register RO?
Thanks, Roger.
next prev parent reply other threads:[~2023-10-26 11:03 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 12:03 [PATCH 0/7] x86: Dom0 I/O port access permissions Jan Beulich
2023-05-11 12:05 ` [PATCH 1/7] x86: don't allow Dom0 access to port CF9 Jan Beulich
2023-10-25 12:36 ` Roger Pau Monné
2023-10-25 13:59 ` Jan Beulich
2023-05-11 12:05 ` [PATCH 2/7] x86: don't allow Dom0 access to port 92 Jan Beulich
2023-10-25 12:49 ` Roger Pau Monné
2023-10-25 14:11 ` Jan Beulich
2023-05-11 12:06 ` [PATCH 3/7] x86/PVH: deny Dom0 access to the ISA DMA controller Jan Beulich
2023-10-25 13:22 ` Roger Pau Monné
2023-05-11 12:06 ` [PATCH 4/7] x86: detect PIC aliasing on ports other than 0x[2A][01] Jan Beulich
2023-10-26 8:34 ` Roger Pau Monné
2023-10-26 9:03 ` Jan Beulich
2023-10-26 13:24 ` Roger Pau Monné
2023-10-26 15:07 ` Jan Beulich
2023-10-26 15:19 ` Roger Pau Monné
2023-10-30 12:24 ` Jan Beulich
2023-10-30 15:14 ` Roger Pau Monné
2023-10-30 15:19 ` Jan Beulich
2023-10-30 15:23 ` Roger Pau Monné
2023-10-30 15:35 ` Jan Beulich
2023-10-30 16:25 ` Roger Pau Monné
2023-05-11 12:07 ` [PATCH 5/7] x86: detect PIT aliasing on ports other than 0x4[0-3] Jan Beulich
2023-10-26 10:25 ` Roger Pau Monné
2023-10-26 12:31 ` Jan Beulich
2023-10-26 13:57 ` Roger Pau Monné
2023-10-26 15:10 ` Jan Beulich
2023-10-26 15:13 ` Roger Pau Monné
2023-10-30 12:50 ` Jan Beulich
2023-05-11 12:07 ` [PATCH 6/7] x86: don't allow Dom0 (direct) access to port F0 Jan Beulich
2023-10-26 10:48 ` Roger Pau Monné
2023-05-11 12:08 ` [PATCH 7/7] x86: don't allow Dom0 access to ELCR ports Jan Beulich
2023-10-26 11:02 ` Roger Pau Monné [this message]
2023-10-26 12:51 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZTpHUzeBbDLe5Lin@macbook \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.