Re: [PATCH v3 05/12] x86/xen: set MTRR state when running as Xen PV initial domain

2023-02-27 Thread Juergen Gross
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_platfo

Re: [PATCH v3 05/12] x86/xen: set MTRR state when running as Xen PV initial domain

2023-02-27 Thread Boris Ostrovsky
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 f

Re: [PATCH v3 05/12] x86/xen: set MTRR state when running as Xen PV initial domain

2023-02-26 Thread Juergen Gross
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

Re: [PATCH v3 05/12] x86/xen: set MTRR state when running as Xen PV initial domain

2023-02-24 Thread Boris Ostrovsky
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 a

[PATCH v3 05/12] x86/xen: set MTRR state when running as Xen PV initial domain

2023-02-23 Thread Juergen Gross
When running as Xen PV initial domain (aka dom0), MTRRs are disabled by the hypervisor, but the system should nevertheless use correct cache memory types. This has always kind of worked, as disabled MTRRs resulted in disabled PAT, too, so that the kernel avoided code paths resulting in inconsistenc