[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e78cee6c-5d05-753e-1265-0b0e06c201a7@intel.com>
Date: Mon, 25 Jan 2021 20:53:27 +0800
From: "Xu, Like" <like.xu@...el.com>
To: Peter Zijlstra <peterz@...radead.org>,
Sean Christopherson <seanjc@...gle.com>
Cc: Andi Kleen <andi@...stfloor.org>,
Kan Liang <kan.liang@...ux.intel.com>,
Paolo Bonzini <pbonzini@...hat.com>, eranian@...gle.com,
kvm@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, wei.w.wang@...el.com,
luwei.kang@...el.com, linux-kernel@...r.kernel.org,
Like Xu <like.xu@...ux.intel.com>
Subject: Re: [PATCH v3 00/17] KVM: x86/pmu: Add support to enable Guest PEBS
via DS
On 2021/1/25 20:18, Peter Zijlstra wrote:
> On Mon, Jan 25, 2021 at 08:07:06PM +0800, Xu, Like wrote:
>
>> So under the premise that counter cross-mapping is allowed,
>> how can hypercall help fix it ?
> Hypercall or otherwise exposing the mapping, will let the guest fix it
> up when it already touches the data. Which avoids the host from having
> to access the guest memory and is faster, no?
- as you may know, the mapping table is changing rapidly from
the time records to be rewritten to the time records to be read;
- the patches will modify the records before it is notified via PMI
which means it's transparent to normal guests (including Windows);
- a malicious guest would ignore the exposed mapping and the
hypercall and I don't think it can solve the leakage issue at all;
- make the guest aware of that hypercall or mapping requires more code changes
in the guest side; but now we can make it on the KVM side and we also know that
cross-mapping case rarely happens, and the overhead is acceptable based on
our tests;
Please let me know if you or Sean are not going to
buy in the PEBS records rewrite proposal in the patch 13 - 17.
---
thx,likexu
Powered by blists - more mailing lists