xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Connor Davis <connojd@pm.me>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"rianquinn@gmail.com" <rianquinn@gmail.com>
Subject: Re: PVH Whitelist Results / Windows Dom0
Date: Tue, 4 Dec 2018 13:18:21 +0100	[thread overview]
Message-ID: <20181204121821.xdcjlfe6rhop76wx@mac> (raw)
In-Reply-To: <lnkXeUdIou5TUPE2f2Vc_Eo_Z8w6JezLcMOIznTNLDKNsrGN9y6cRITcXP87JOalZ5jj8tG9LX4ZSiXX5i70_NxvXLCKS87UhjqM5_PU1GQ=@pm.me>

On Tue, Dec 04, 2018 at 05:46:38AM +0000, Connor Davis wrote:
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Monday, December 3, 2018 1:07 PM, Rian Quinn <rianquinn@gmail.com> wrote:
> >>> > > IO Ports (some of these are odd):
> >>> > > - 0xCF8 - 0xCFF
> >>> > > - 0x4D0 (odd since PIT and ACPI is disable for everything that might need
> >>> > > this)
> >>> >
> >>> > Likely some poking for EISA devices? (same for 0x4D1)
> >>> >
> >>> > Can you trace this to the Linux code that's actually making the call
> >>> > by injecting a trap when this happens?
> >>> >
> >>> > > - 0x4D1
> 
> 0x4D0 and 0x4D1 were touched from apci_early_init -> acpi_pic_sci_set_trigger since
> we don't emulate any IOAPICs yet.

Hm, yes. When I looked into this I couldn't find a way to signal from
ACPI that there's no SCI. The only way seems to be to report
hardware-reduced ACPI, but that has a lot of other implications.

Maybe we could look into adding something to the ACPI spec to signal
there's no SCI even when not using hardware-reduced ACPI?

The FADT IA-PC boot flags field still has plenty of space.

> >>> > > - 0x70
> >>> > > - 0x71
> 
> These are accessed from reassert_nmi. This is only called from default_do_nmi
> in the version the guest is based on (4.20-rc2).
> 
> >>> > > - 0x3FE (any ideas)?
> >>> >
> >>> > Serial port poking?
> >>> >
> >>> > Again would be interesting to know the Linux code that's poking
> >>> > this.
> >>> >
> >>> > > - 0x42, 0x43, 0x61
> 
> These are in pit_calibrate_tsc.

Right, there's no way I'm aware of to signal there's no PIT. Again we
could consider trying to add a field to the IA-PC boot flags field for
this, but I'm not sure how useful it would be since quite a lot of
stuff relies on the existence of a PIT, and by the time FADT gets
checked it might be too late. I've seen the PIT being used very early
during boot due to the fact that it's assumed to be always present on
PC systems.

> The guest was taking this path initially, but
> right now we are abusing cpuid.15h by returning the TSC hz in ecx rather
> than the core crystal. We made a small, temporary hack to the pv interface/linux
> to get this working:
> 
> https://github.com/connojd/linux/commit/6b620ebc4f56129ed068d9995d59e46521abc80b
> 
> In all our attempts to convince linux that TSC is reliable, it inevitably decided that it
> in fact was not. Any thoughts on how to make this not be so dirty?

I'm not that familiar with Linux, do you know why Linux decides the TSC
is not reliable?

Is this based on CPU model, CPUID features, or some kind of test?

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-12-04 12:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-01 16:21 PVH Whitelist Results / Windows Dom0 Rian Quinn
2018-12-03 11:17 ` Wei Liu
2018-12-03 11:23 ` Juergen Gross
2018-12-03 11:42 ` Roger Pau Monné
2018-12-03 16:06   ` Rian Quinn
2018-12-03 17:04     ` Roger Pau Monné
2018-12-03 20:07       ` Rian Quinn
2018-12-04  5:46         ` Connor Davis
2018-12-04 12:18           ` Roger Pau Monné [this message]
2018-12-04 17:50           ` Roger Pau Monné
2018-12-05  8:48             ` 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=20181204121821.xdcjlfe6rhop76wx@mac \
    --to=roger.pau@citrix.com \
    --cc=connojd@pm.me \
    --cc=rianquinn@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).