|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/5] xen/domain: Audit config->max_vcpus during {, arch_}check_domain_config()
Hi Andrew, On 05/10/2018 15:54, Andrew Cooper wrote: The purpose of this is to move the auduting to be earlier than arch_domain_create(). Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- CC: Jan Beulich <JBeulich@xxxxxxxx> CC: Wei Liu <wei.liu2@xxxxxxxxxx> CC: Stefano Stabellini <sstabellini@xxxxxxxxxx> CC: Julien Grall <julien.grall@xxxxxxx> The max_vcpus setting for GIC_V3 is somewhat confusing. The current GIC_V3 driver claims to support 4096 cpus, while the newer GIC_V3 driver uses 255. The maximum number of vCPUs supported for GICv3 depends on the number of affinity levels supported by the vGIC emulation. --- xen/arch/arm/domain.c | 18 ++++++++++++++++++ xen/arch/x86/domain.c | 6 ++++++ xen/common/domain.c | 3 +++ 3 files changed, 27 insertions(+) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 43593a4..9676893 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -601,6 +601,8 @@ void vcpu_switch_to_aarch64_mode(struct vcpu *v)int arch_check_domain_config(struct xen_domctl_createdomain *config) I would prefer to keep those values in a separate helper implemented by each vGIC. + + /* ... clipped at the maximum value Xen has been configured for. */ + max_vcpus = min(max_vcpus, MAX_VIRT_CPUS + 0u); + 0U feels a bit odd to read. It would be better to append u in MAX_VIRT_CPUS.
Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |