Re: [kvm-unit-tests PATCH v2 3/3] x86/msr.c generalize to any input msr

Ahmed, Daniele
2021-10-01T14:15:10Z

Hi Paolo,
This would be to test the handling of specific MSR's, both the purposes you mention.
It may not cover all possible cases. I'm extending the kvm unit tests for others who might have similar needs.
I looked up BITS and it seems like it's been unmaintained for many years now (although it could still be useful).
Let me know if you don't think this is the right place for this change. I've seen other tests that take custom
values to be used inside the tests.
Thank you

﻿On 28/09/2021, 17:37, "Paolo Bonzini" <pbonzini@redhat.com> wrote:

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.

On 27/09/21 17:30, ahmeddan@amazon.com wrote:
> From: Daniele Ahmed <ahmeddan@amazon.com>
>
> If an MSR description is provided as input by the user,
> run the test against that MSR. This allows the user to
> run tests on custom MSR's.
>
> Otherwise run all default tests.
>
> This is to validate custom MSR handling in user space
> with an easy-to-use tool. This kvm-unit-test submodule
> is a perfect fit. I'm extending it with a mode that
> takes an MSR index and a value to test arbitrary MSR accesses.
>
> Signed-off-by: Daniele Ahmed <ahmeddan@amazon.com>

I don't understand; is this a debugging tool, or is it meant to be
driven by another test suite?

I'm not sure this fits the purpose of kvm-unit-tests very well, though.
An alternative is BITS (https://github.com/biosbits/bits/), which is
relatively easy to use and comes with Python bindings to RDMSR/WRMSR.

Paolo