Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The vcpu flag wrapper macros (`_vcpu_get_flag`, `_vcpu_set_flag`, etc.) are syntactically broken and will cause build failures if instantiated.
--
--- Patch [26]: [PATCH v6 26/33] KVM: s390: arm64: Introduce host definitions ---
commit 9d09eb59e082ce9c0d035d93867a0ac53fc503a3
Author: Steffen Eiden <[email protected]>
KVM: s390: arm64: Introduce host definitions
This commit adds basic definitions required by the ARM on s390 KVM host.
It introduces struct kvm*arch definitions and various defines needed to
run arm64 guests, selecting the new header variant if KVM_S390_ARM64 is
defined.
> diff --git a/arch/s390/include/asm/kvm_host_arm64.h b/arch/s390/include/asm/kvm_host_arm64.h
> new file mode 100644
> index 0000000000000..8088409bb0411
> --- /dev/null
> +++ b/arch/s390/include/asm/kvm_host_arm64.h
[ ... ]
> +#define _vcpu_get_flag(v, flagset, ...) \
> + __vcpu_get_flag(&(v)->arch.flagset, __VA_ARGS__)
> +#define _vcpu_set_flag(v, flagset, ...) \
> + __vcpu_set_flag(&(v)->arch.flagset, __VA_ARGS__)
> +#define _vcpu_clear_flag(v, flagset, ...) \
> + __vcpu_clear_flag(&(v)->arch.flagset, __VA_ARGS__)
> +#define _vcpu_test_and_clear_flag(v, flagset, ...) \
> + __vcpu_test_and_clear_flag(&(v)->arch.flagset, __VA_ARGS__)
[Severity: Low]
Will these wrapper macros cause a build failure when instantiated?
Looking at __vcpu_get_flag() and the related macros from the shared arm64
headers, they expect exactly four arguments: v, flagset, f, and m.
In these wrappers, we pass &(v)->arch.flagset as the first argument and
__VA_ARGS__ as the remaining arguments. Since standard flag constants usually
expand to two arguments (for example, BIT(0), BIT(0) for f and m), this
invocation only provides three arguments in total instead of the required four.
Does this need an additional argument or a different macro structure to
resolve the arity mismatch?
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=26
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.