Re: Rule 10.1 violations in perfc_incra and PERFCOUNTER_ARRAY

2023-10-09 Thread Stefano Stabellini
On Fri, 6 Oct 2023, Nicola Vetrini wrote: > Given the following macros in and > > #define perfc_incra(x,y)\ > ( (y) <= PERFC_LAST_ ## x - PERFC_ ## x ? \ >++this_cpu(perfcounters)[PERFC_ ## x + (y)] : 0 ) > > a

Re: [XEN PATCH v2 1/7] xen: add declarations for variables where needed

2023-10-09 Thread Stefano Stabellini
On Mon, 9 Oct 2023, Nicola Vetrini wrote: > Some variables with external linkage used in C code do not have > a visible declaration where they are defined. Providing such > declaration also resolves violations of MISRA C:2012 Rule 8.4. > > Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabe

Re: [XEN PATCH v2] xen/sched: address violations of MISRA C:2012 Rule 8.2

2023-10-09 Thread Henry Wang
Hi, > On Oct 10, 2023, at 09:25, Stefano Stabellini wrote: > > On Mon, 9 Oct 2023, Federico Serafini wrote: >> Add missing parameter names. No functional change. >> >> Signed-off-by: Federico Serafini > > Reviewed-by: Stefano Stabellini Release-acked-by: Henry Wang Kind regards, Henry >

Re: [XEN PATCH v2] xen/sched: address violations of MISRA C:2012 Rule 8.2

2023-10-09 Thread Stefano Stabellini
On Mon, 9 Oct 2023, Federico Serafini wrote: > Add missing parameter names. No functional change. > > Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini

Re: [XEN PATCH][for-4.19 v2 2/2] docs/misra: add deviations.rst to document additional deviations.

2023-10-09 Thread Henry Wang
Hi Stefano, > On Oct 10, 2023, at 09:19, Stefano Stabellini wrote: > > +Henry Thank you. > > On Mon, 9 Oct 2023, Nicola Vetrini wrote: >> This file contains the deviation that are not marked by >> a deviation comment, as specified in >> docs/misra/documenting-violations.rst. >> >> Suggested-

Re: [XEN PATCH][for-4.19 v2 1/2] automation/eclair: update deviations and accepted guidelines

2023-10-09 Thread Stefano Stabellini
On Mon, 9 Oct 2023, Nicola Vetrini wrote: > From: Simone Ballarin > > Remove deviations for ERROR_EXIT, ERROR_EXIT_DOM and PIN_FAIL: > the aforementioned macros have been removed. > Add deviation for Rule 2.1 for pure declarations. > Remove legacy text-based deviations: these are now implemented

Re: [XEN PATCH][for-4.19 v2 2/2] docs/misra: add deviations.rst to document additional deviations.

2023-10-09 Thread Stefano Stabellini
+Henry On Mon, 9 Oct 2023, Nicola Vetrini wrote: > This file contains the deviation that are not marked by > a deviation comment, as specified in > docs/misra/documenting-violations.rst. > > Suggested-by: Stefano Stabellini > Signed-off-by: Nicola Vetrini This is great! Thank you so much! I h

Re: [XEN PATCH][for-4.19 8/9] xen/types: address Rule 10.1 for DECLARE_BITMAP use

2023-10-09 Thread Stefano Stabellini
On Mon, 9 Oct 2023, Julien Grall wrote: > On 07/10/2023 02:04, Stefano Stabellini wrote: > > On Fri, 6 Oct 2023, Julien Grall wrote: > > > Hi Nicola, > > > > > > On 06/10/2023 11:10, Nicola Vetrini wrote: > > > > On 06/10/2023 11:34, Julien Grall wrote: > > > > > Hi Nicola, > > > > > > > > > > On

Re: [XEN PATCH 9/9] xen/compat: address Rule 10.1 for macros CHECK_SIZE

2023-10-09 Thread Stefano Stabellini
On Fri, 6 Oct 2023, Nicola Vetrini wrote: > The essential type of the result of an inequality operator is > essentially boolean, therefore it shouldn't be used as an argument of > the multiplication operator, which expects an integer. > > Signed-off-by: Nicola Vetrini > --- > xen/include/xen/com

Re: [PATCH for-4.18 0/5] xenalyze: Miscellaneous fixes

2023-10-09 Thread Henry Wang
Hi George, > On Oct 9, 2023, at 20:51, George Dunlap wrote: > > None of these are critical; but they're also in a fairly low > criticality part of the code. I'd be fine with either putting them in > now or waiting until 4.19. I saw most of the patches are bugfix so I am fine with including the

Re: [XEN PATCH 6/9] x86/io_apic: address violation of MISRA C:2012 Rule 10.1

2023-10-09 Thread Stefano Stabellini
On Fri, 6 Oct 2023, Nicola Vetrini wrote: > The definition of IO_APIC_BASE contains a sum of an essentially enum > value (FIX_IO_APIC_BASE_0) that is positive with an index that, in all > instances, is unsigned, therefore the former is cast to unsigned, so that > the operands are of the same essent

Re: [XEN PATCH][for-4.19 2/9] arm/bitops: encapsulate violation of MISRA C:2012 Rule 10.1

2023-10-09 Thread Stefano Stabellini
On Fri, 6 Oct 2023, Nicola Vetrini wrote: > The definitions of ffs{l}? violate Rule 10.1, by using the well-known > pattern (x & -x); its usage is wrapped by the LOWEST_POW2 macro. > > No functional change. Once we settle on a name for LOWEST_POW2 I can provided by reviewed-by for this and the ot

Re: [QEMU][PATCH v1 2/7] xen: add pseudo RAM region for grant mappings

2023-10-09 Thread Stefano Stabellini
On Mon, 9 Oct 2023, Stefano Stabellini wrote: > On Thu, 5 Oct 2023, Vikram Garhwal wrote: > > From: Juergen Gross > > > > Add a memory region which can be used to automatically map granted > > memory. It is starting at 0x8000ULL in order to be able to > > distinguish it from normal RA

Re: [QEMU][PATCH v1 6/7] xen: add map and unmap callbacks for grant region

2023-10-09 Thread Stefano Stabellini
On Thu, 5 Oct 2023, Vikram Garhwal wrote: > From: Juergen Gross > > Add the callbacks for mapping/unmapping guest memory via grants to the > special grant memory region. > > Signed-off-by: Juergen Gross > Signed-off-by: Vikram Garhwal This looks good. We need to add a check to make sure we do

Re: [QEMU][PATCH v1 4/7] xen: let xen_ram_addr_from_mapcache() return -1 in case of not found entry

2023-10-09 Thread Stefano Stabellini
On Thu, 5 Oct 2023, Vikram Garhwal wrote: > From: Juergen Gross > > Today xen_ram_addr_from_mapcache() will either abort() or return 0 in > case it can't find a matching entry for a pointer value. Both cases > are bad, so change that to return an invalid address instead. > > Signed-off-by: Juerg

Re: [QEMU][PATCH v1 2/7] xen: add pseudo RAM region for grant mappings

2023-10-09 Thread Stefano Stabellini
On Thu, 5 Oct 2023, Vikram Garhwal wrote: > From: Juergen Gross > > Add a memory region which can be used to automatically map granted > memory. It is starting at 0x8000ULL in order to be able to > distinguish it from normal RAM. > > For this reason the xen.ram memory region is expan

Re: [QEMU][PATCH v1 1/7] xen: when unplugging emulated devices skip virtio devices

2023-10-09 Thread Stefano Stabellini
On Thu, 5 Oct 2023, Vikram Garhwal wrote: > From: Juergen Gross > > Virtio devices should never be unplugged at boot time, as they are > similar to pci passthrough devices. > > Signed-off-by: Juergen Gross > Signed-off-by: Vikram Garhwal > --- > hw/i386/xen/xen_platform.c | 8 +++- > 1 fi

Re: [XEN PATCH] xen: Add SAF deviations for MISRA C:2012 Rule 7.1

2023-10-09 Thread Stefano Stabellini
On Mon, 9 Oct 2023, Julien Grall wrote: > On 07/10/2023 01:43, Stefano Stabellini wrote: > > On Fri, 6 Oct 2023, Luca Fancellu wrote: > > > > On 6 Oct 2023, at 02:02, Stefano Stabellini > > > > wrote: > > > > > > > > On Thu, 5 Oct 2023, Luca Fancellu wrote: > > > > > > On 5 Oct 2023, at 00:32, St

[PATCH v3 5/5] [FUTURE] xen/arm: enable vPCI for domUs

2023-10-09 Thread Stewart Hildebrand
Select HAS_VPCI_GUEST_SUPPORT in Kconfig for enabling vPCI in domUs. Set the pci flags in xen_arch_domainconfig to enable vPCI if a pci device has been specified in the xl domain config file. Signed-off-by: Stewart Hildebrand --- As the tag implies, this patch is not intended to be merged (yet).

[PATCH v3 4/5] xen/arm: enable vPCI for dom0

2023-10-09 Thread Stewart Hildebrand
Set the pci flags in xen_arch_domainconfig to enable vPCI for dom0. Signed-off-by: Stewart Hildebrand --- Julien had a suggestion to make this conditional on pci_passthrough_enabled [1]. However, in v5 of the PCI ARM SMMU series [2], we propose removing the pci_passthrough_enabled flag. If pci_pa

[PATCH v3 3/5] xen/arm: make has_vpci() depend on d->arch.has_vpci

2023-10-09 Thread Stewart Hildebrand
From: Oleksandr Andrushchenko VPCI is disabled on ARM. Make it depend on d->arch.has_vpci to enable the PCI passthrough support on ARM. While here, remove the comment on the preceding line. Signed-off-by: Oleksandr Andrushchenko Signed-off-by: Rahul Singh Signed-off-by: Stewart Hildebrand --

[PATCH v3 2/5] xen/arm: pci: plumb xen_arch_domainconfig with pci info

2023-10-09 Thread Stewart Hildebrand
Add a flag to struct xen_arch_domainconfig to allow specifying at domain creation time whether the domain uses vPCI. Add a corresponding flag to struct arch_domain to indicate vPCI and set it accordingly. Bump XEN_DOMCTL_INTERFACE_VERSION since we're modifying struct xen_arch_domainconfig. Signe

[PATCH v3 1/5] xen/arm: pci: introduce PCI_PASSTHROUGH Kconfig option

2023-10-09 Thread Stewart Hildebrand
From: Rahul Singh Setting CONFIG_PCI_PASSTHROUGH=y will enable PCI passthrough on ARM, even though the feature is not yet complete in the current upstream codebase. The purpose of this is to make it easier to enable the necessary configs (HAS_PCI, HAS_VPCI) for testing and development of PCI pas

[PATCH v3 0/5] Kconfig for PCI passthrough on ARM

2023-10-09 Thread Stewart Hildebrand
There are multiple series in development/review [1], [2] that will benefit from having a Kconfig option for PCI passthrough on ARM. Hence I have sent this series independent from any other series. v2->v3: * add ("xen/arm: pci: plumb xen_arch_domainconfig with pci info") * rename ("xen/arm: make ha

Re: [XEN PATCH][for-next v2 5/7] x86/vm_event: add missing include for hvm_vm_event_do_resume

2023-10-09 Thread Tamas K Lengyel
On Mon, Oct 9, 2023 at 2:55 AM Nicola Vetrini wrote: > > The missing header makes the declaration visible when the function > is defined, thereby fixing a violation of MISRA C:2012 Rule 8.4. > > Fixes: 1366a0e76db6 ("x86/vm_event: add hvm/vm_event.{h,c}") > Signed-off-by: Nicola Vetrini Acked-by

Re: [XEN PATCH][for-next v2 7/7] x86/mem_access: make function static

2023-10-09 Thread Tamas K Lengyel
On Mon, Oct 9, 2023 at 2:55 AM Nicola Vetrini wrote: > > The function is used only within this file, and therefore can be static. > > No functional change. > > Signed-off-by: Nicola Vetrini Acked-by: Tamas K Lengyel

Re: [PATCH v2 3/3] [FUTURE] xen/arm: enable vPCI for domUs

2023-10-09 Thread Stewart Hildebrand
On 7/7/23 05:00, Julien Grall wrote: > Hi, > > On 07/07/2023 02:47, Stewart Hildebrand wrote: >> Remove is_hardware_domain check in has_vpci, and select >> HAS_VPCI_GUEST_SUPPORT >> in Kconfig. >> >> [1] >> https://lists.xenproject.org/archives/html/xen-devel/2023-06/msg00863.html >> >> Signed-o

Re: [PATCH v2 2/3] xen/arm: make has_vpci depend on CONFIG_HAS_VPCI

2023-10-09 Thread Stewart Hildebrand
On 7/7/23 04:55, Julien Grall wrote: > Hi, > > On 07/07/2023 02:47, Stewart Hildebrand wrote: >> From: Oleksandr Andrushchenko >> >> VPCI is disabled on ARM. Make it depend on CONFIG_HAS_VPCI to test the PCI >> passthrough support. Also make it depend on is_hardware_domain for now. The >> is_hard

Re: [PATCH][next] xen/xenbus: Add __counted_by for struct read_buffer and use struct_size()

2023-10-09 Thread Kees Cook
On Mon, Oct 09, 2023 at 12:55:30PM -0600, Gustavo A. R. Silva wrote: > Prepare for the coming implementation by GCC and Clang of the __counted_by > attribute. Flexible array members annotated with __counted_by can have > their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for > array

[PATCH][next] xen/xenbus: Add __counted_by for struct read_buffer and use struct_size()

2023-10-09 Thread Gustavo A. R. Silva
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). W

[XEN PATCH][for-4.19 v2 0/2] update ecl configurations and deviations

2023-10-09 Thread Nicola Vetrini
This series brings updates to the configuration of the ECLAIR static analysis tool, as well as a new document detailing the deviations from MISRA guidelines that have no noticeable indication in the source code, as detailed by Stefano Stabellini here [1]. [1] https://marc.info/?l=xen-devel&m=16966

[XEN PATCH][for-4.19 v2 2/2] docs/misra: add deviations.rst to document additional deviations.

2023-10-09 Thread Nicola Vetrini
This file contains the deviation that are not marked by a deviation comment, as specified in docs/misra/documenting-violations.rst. Suggested-by: Stefano Stabellini Signed-off-by: Nicola Vetrini --- docs/index.rst| 1 + docs/misra/deviations.rst | 240 +

[XEN PATCH][for-4.19 v2 1/2] automation/eclair: update deviations and accepted guidelines

2023-10-09 Thread Nicola Vetrini
From: Simone Ballarin Remove deviations for ERROR_EXIT, ERROR_EXIT_DOM and PIN_FAIL: the aforementioned macros have been removed. Add deviation for Rule 2.1 for pure declarations. Remove legacy text-based deviations: these are now implemented with SAF comments. Add deviations for Rules 8.4, 10.1,

[XEN PATCH v2] xen/sched: address violations of MISRA C:2012 Rule 8.2

2023-10-09 Thread Federico Serafini
Add missing parameter names. No functional change. Signed-off-by: Federico Serafini --- Changes in v2: - added parameter names in accordance with schedulers in xen/common/sched/*; - improved comment format. --- xen/common/sched/private.h | 99 -- 1 file change

[PATCH for-4.18 3/5] xenalyze: Don't expect an HVM_HANDLER trace for PAUSE vmexits

2023-10-09 Thread George Dunlap
Neither vmx nor svm trace anything, nor is there anything obvious worth tracing. Signed-off-by: George Dunlap --- Release justification: This is a bug fix; a minor one, but also in a non-critical part of the code. CC: Anthony Perard CC: Stefano Stabellini CC: Xenia Ragiodakou --- tools/xentr

[PATCH for-4.18 4/5] xenalyze: Fix interrupt EIP reporting

2023-10-09 Thread George Dunlap
EIP lists are generalized across several use cases. For many of them, it make sense to have a cycle per sample; but not really for interrupt EIP lists. For this reason, it normally just passes 0 as for the tsc value, which will in turn down at the bottom of update_cycles(), update only the summar

[PATCH for-4.18 1/5] xenalyze: Only accumulate data from one vmexit without a handler

2023-10-09 Thread George Dunlap
If a vmentry/exit arc unexpectedly doesn't have a handler, we throw an error, and then log the information under HVM event 0; thus those particular traces within the vmexit reason will have stats gathered, and will show up with "(no handler)". This is useful in the event that there are unusual pat

[PATCH for-4.18 5/5] xenalyze: Reduce warnings about leaving a vcpu in INIT

2023-10-09 Thread George Dunlap
We warn when we see data for a vcpu moving into a non-RUNNING state, just so that people know why we're ignoring it. On full traces, this happens only once. However, if the trace was limited to a subset of pcpus, then this will happen every time the domain in question is woken on that pcpu. Add

[PATCH for-4.18 0/5] xenalyze: Miscellaneous fixes

2023-10-09 Thread George Dunlap
None of these are critical; but they're also in a fairly low criticality part of the code. I'd be fine with either putting them in now or waiting until 4.19.

[PATCH for-4.18 2/5] xenalyze: AMD's VMEXIT_VINTR doesn't need a trace record

2023-10-09 Thread George Dunlap
Just like Intel's PENDING_VIRT_INTR, AMD's VINTR doesn't need an HVM trace record. Expect that. Signed-off-by: George Dunlap --- Release justification: This is a bug fix. It's a *very* small one, but then the code path is not very critical either. CC: Stefano Stabellini CC: Xenia Ragiadakou

[xen-unstable test] 183323: tolerable FAIL

2023-10-09 Thread osstest service owner
flight 183323 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/183323/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-qemuu-rhel6hvm-amd 7 xen-install fail in 183319 pass in 183323 test-armhf-armhf-libvirt-raw 17

Re: [PATCH for-4.18 v5] xen/pdx: Make CONFIG_PDX_COMPRESSION a common Kconfig option

2023-10-09 Thread Julien Grall
On 06/10/2023 17:01, Andrew Cooper wrote: On 06/10/2023 4:09 pm, Julien Grall wrote: On 06/10/2023 15:44, Andrew Cooper wrote: From: Alejandro Vallejo Adds a new compile-time flag to allow disabling PDX compression and compiles out compression-related code/data. It also shorts the pdx<->

[PATCH V3 1/2] xen: evtchn: Allow shared registration of IRQ handers

2023-10-09 Thread Viresh Kumar
Currently the handling of events is supported either in the kernel or userspace, but not both. In order to support fast delivery of interrupts from the guest to the backend, we need to handle the Queue notify part of Virtio protocol in kernel and the rest in userspace. Update the interrupt handle

[PATCH V3 2/2] xen: privcmd: Add support for ioeventfd

2023-10-09 Thread Viresh Kumar
Virtio guests send VIRTIO_MMIO_QUEUE_NOTIFY notification when they need to notify the backend of an update to the status of the virtqueue. The backend or another entity, polls the MMIO address for updates to know when the notification is sent. It works well if the backend does this polling by itse

[PATCH V3 0/2] xen: privcmd: Add ioeventfd support

2023-10-09 Thread Viresh Kumar
Hello, Now that irqfd support (backend to guest interrupt) is already merged, this series solves the other part of the problem, i.e. ioeventfd (guest to backend interrupt). More details inside the commits. -- Viresh V2->V3: - Remove explicit barriers and depend on spin lock instead to take care

Xen 4.18 rc2

2023-10-09 Thread Henry Wang
Hi all, Xen 4.18 rc2 is tagged. You can check that out from xen.git: git://xenbits.xen.org/xen.git 4.18.0-rc2 For your convenience there is also a tarball at: https://downloads.xenproject.org/release/xen/4.18.0-rc2/xen-4.18.0-rc2.tar.gz And the signature is at: https://downloads.xenproject.org/

Re: [PATCH 2/2] xen: privcmd: Add support for ioeventfd

2023-10-09 Thread Juergen Gross
On 09.10.23 12:53, Viresh Kumar wrote: On 09-10-23, 10:40, Alex Bennée wrote: I thought generally sync points act as full barriers. Doing a bunch of grepping I think ends at: static __always_inline bool __mutex_unlock_fast(struct mutex *lock) { unsigned long curr = (unsigned lo

Re: [PATCH 2/2] xen: privcmd: Add support for ioeventfd

2023-10-09 Thread Viresh Kumar
On 09-10-23, 10:40, Alex Bennée wrote: > I thought generally sync points act as full barriers. Doing a bunch of > grepping I think ends at: > > static __always_inline bool __mutex_unlock_fast(struct mutex *lock) > { > unsigned long curr = (unsigned long)current; > > return

[ovmf test] 183326: all pass - PUSHED

2023-10-09 Thread osstest service owner
flight 183326 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/183326/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 137f799aaed91e592700e0488067292495b7ea7e baseline version: ovmf 4ddd8ac3a29d9c5974a19

Re: [PATCH 2/2] xen: privcmd: Add support for ioeventfd

2023-10-09 Thread Alex Bennée
Viresh Kumar writes: > On 29-09-23, 07:46, Juergen Gross wrote: >> On 29.08.23 14:29, Viresh Kumar wrote: >> > +static irqreturn_t ioeventfd_interrupt(int irq, void *dev_id) >> > +{ >> > + struct ioreq_port *port = dev_id; >> > + struct privcmd_kernel_ioreq *kioreq = port->kioreq; >> > + str

[linux-linus test] 183322: tolerable FAIL - PUSHED

2023-10-09 Thread osstest service owner
flight 183322 linux-linus real [real] flight 183324 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/183322/ http://logs.test-lab.xenproject.org/osstest/logs/183324/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-

Re: [XEN PATCH][for-4.19 8/9] xen/types: address Rule 10.1 for DECLARE_BITMAP use

2023-10-09 Thread Julien Grall
On 07/10/2023 02:04, Stefano Stabellini wrote: On Fri, 6 Oct 2023, Julien Grall wrote: Hi Nicola, On 06/10/2023 11:10, Nicola Vetrini wrote: On 06/10/2023 11:34, Julien Grall wrote: Hi Nicola, On 06/10/2023 09:26, Nicola Vetrini wrote: Given its use in the declaration 'DECLARE_BITMAP(fea

Re: [XEN PATCH] xen: Add SAF deviations for MISRA C:2012 Rule 7.1

2023-10-09 Thread Julien Grall
Hi, On 07/10/2023 01:43, Stefano Stabellini wrote: On Fri, 6 Oct 2023, Luca Fancellu wrote: On 6 Oct 2023, at 02:02, Stefano Stabellini wrote: On Thu, 5 Oct 2023, Luca Fancellu wrote: On 5 Oct 2023, at 00:32, Stefano Stabellini wrote: On Wed, 4 Oct 2023, Luca Fancellu wrote: On 4 Oct 2023

Re: [XEN PATCH][for-4.19 1/9] xen/include: add macro LOWEST_POW2

2023-10-09 Thread Nicola Vetrini
On 07/10/2023 02:29, Stefano Stabellini wrote: On Fri, 6 Oct 2023, Stefano Stabellini wrote: On Fri, 6 Oct 2023, Julien Grall wrote: > Hi Nicola, > > On 06/10/2023 11:34, Nicola Vetrini wrote: > > On 06/10/2023 12:22, Julien Grall wrote: > > > On 06/10/2023 11:02, Nicola Vetrini wrote: > > > > O

Re: [XEN PATCH] xen: Add SAF deviations for MISRA C:2012 Rule 7.1

2023-10-09 Thread Luca Fancellu
>>> >>> Right so the results would be all off by a few lines of code so when >>> you go to read the report generated by cppcheck, the references >>> wouldn't match anymore. >>> >>> Before giving up and accepting that we are constrained to only formats >>> that don't change the LOC numbers, can we

Re: [XEN PATCH][for-4.19 8/9] xen/types: address Rule 10.1 for DECLARE_BITMAP use

2023-10-09 Thread Nicola Vetrini
On 07/10/2023 03:04, Stefano Stabellini wrote: On Fri, 6 Oct 2023, Julien Grall wrote: Hi Nicola, On 06/10/2023 11:10, Nicola Vetrini wrote: > On 06/10/2023 11:34, Julien Grall wrote: > > Hi Nicola, > > > > On 06/10/2023 09:26, Nicola Vetrini wrote: > > > Given its use in the declaration > > >

Re: [XEN PATCH][for-4.19 8/9] xen/types: address Rule 10.1 for DECLARE_BITMAP use

2023-10-09 Thread Nicola Vetrini
On 06/10/2023 16:47, Julien Grall wrote: Hi Nicola, On 06/10/2023 11:10, Nicola Vetrini wrote: On 06/10/2023 11:34, Julien Grall wrote: Hi Nicola, On 06/10/2023 09:26, Nicola Vetrini wrote: Given its use in the declaration 'DECLARE_BITMAP(features, IOMMU_FEAT_count)' the argument 'bits' has

Re: [XEN PATCH 7/9] x86/mce: Move MC_NCLASSES into the enum mctelem_class

2023-10-09 Thread Nicola Vetrini
On 06/10/2023 21:11, andrew.coop...@citrix.com wrote: On 06/10/2023 9:26 am, Nicola Vetrini wrote: The definition of MC_NCLASSES contained a violation of MISRA C:2012 Rule 10.1, therefore by moving it as an enumeration constant resolves the violation and makes it more resilient to possible addi

Re: [XEN PATCH 5/9] x86/cpu-policy: address violations of MISRA C Rule 10.1

2023-10-09 Thread Nicola Vetrini
On 06/10/2023 19:57, Andrew Cooper wrote: On 06/10/2023 9:26 am, Nicola Vetrini wrote: The COUNT_LEAVES macro is introduced to avoid using an essentially boolean value in a subtraction. No functional change. Signed-off-by: Nicola Vetrini --- xen/include/xen/lib/x86/cpu-policy.h | 13 +++-

Re: [XEN PATCH][for-4.19 1/9] xen/include: add macro LOWEST_POW2

2023-10-09 Thread Nicola Vetrini
On 06/10/2023 18:35, andrew.coop...@citrix.com wrote: On 06/10/2023 9:26 am, Nicola Vetrini wrote: diff --git a/xen/include/xen/macros.h b/xen/include/xen/macros.h index d0caae7db298..bb9a1c9a53d0 100644 --- a/xen/include/xen/macros.h +++ b/xen/include/xen/macros.h @@ -8,8 +8,10 @@ #define DIV_