qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 6/6] hw/arm/virt: Add 'compact-highmem' property


From: Gavin Shan
Subject: Re: [PATCH v5 6/6] hw/arm/virt: Add 'compact-highmem' property
Date: Thu, 20 Oct 2022 19:13:17 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0

Hi Marc,

On 10/20/22 5:44 PM, Marc Zyngier wrote:
On Thu, 20 Oct 2022 00:57:32 +0100,
Gavin Shan <gshan@redhat.com> wrote:

For Marc's suggestion to add properties so that these high memory
regions can be disabled by users. I can add one patch after this one
to introduce the following 3 properties. Could you please confirm
the property names are good enough? It's nice if Marc can help to
confirm before I'm going to work on next revision.

     "highmem-ecam":    "on"/"off" on vms->highmem_ecam
     "highmem-mmio":    "on"/"off" on vms->highmem_mmio
     "highmem-redists": "on"/"off" on vms->highmem_redists

I think that'd be reasonable, and would give the user some actual
control over what gets exposed in the highmem region.

I guess that the annoying thing with these options is that they allow
the user to request conflicting settings (256 CPUs and
highmem-redists=off, for example). You'll need to make this fail more
or less gracefully.


Thanks for the quick confirm. The check is already existing in machvirt_init().
I think what we need is simply to calculate 'virt_max_cpus' with consideration
to 'highmem-redists' property there.

    if (max_cpus > virt_max_cpus) {
        error_report("Number of SMP CPUs requested (%d) exceeds max CPUs "
                     "supported by machine 'mach-virt' (%d)",
                     max_cpus, virt_max_cpus);
        exit(1);
    }

Thanks,
Gavin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]