[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ba2deb01-ccb3-8a01-9856-0ac7d0679ccc@suse.com>
Date: Mon, 27 Feb 2023 14:56:11 +0100
From: Juergen Gross <jgross@...e.com>
To: Boris Ostrovsky <boris.ostrovsky@...cle.com>,
linux-kernel@...r.kernel.org, x86@...nel.org
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>, xen-devel@...ts.xenproject.org
Subject: Re: [PATCH v3 05/12] x86/xen: set MTRR state when running as Xen PV
initial domain
On 27.02.23 14:52, Boris Ostrovsky wrote:
>
>
> On 2/27/23 2:12 AM, Juergen Gross wrote:
>> On 24.02.23 22:00, Boris Ostrovsky wrote:
>>>
>>> On 2/23/23 4:32 AM, Juergen Gross wrote:
>>>> +
>>>> + for (reg = 0; reg < MTRR_MAX_VAR_RANGES; reg++) {
>>>> + op.u.read_memtype.reg = reg;
>>>> + if (HYPERVISOR_platform_op(&op))
>>>> + break;
>>>
>>>
>>> If we fail on the first iteration, do we still want to mark MTRRs are
>>> enabled/set in mtrr_overwrite_state()?
>>
>> Hmm, good idea.
>>
>> I think we should just drop the call of mtrr_overwrite_state() in this
>> case.
>
>
> TBH I am not sure what the right way is to handle errors here. What if the
> hypercall fails on second iteration?
The main reason would be that only one variable MTRR is available.
Its not as if there are very complicated scenarios leading to failures here.
Either the interface is usable and then it will work, or it isn't usable
and we can fall back to today's handling by ignoring MTRRs.
Juergen
Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3099 bytes)
Download attachment "OpenPGP_signature" of type "application/pgp-signature" (496 bytes)
Powered by blists - more mailing lists