Re: [PATCH kvm-unit-tests] x86: umip: skip SMSW test because it fails

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

 



On Tue, 2018-09-11 at 16:58 +0200, Paolo Bonzini wrote:
> SMSW does not cause a VMEXIT and therefore emulated UMIP fails.
> Comment out the test.
> 
> Suggested-by: Liran Alon <liran.alon@xxxxxxxxxx>
> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> ---
>  x86/umip.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/x86/umip.c b/x86/umip.c
> index cda1971..4566852 100644
> --- a/x86/umip.c
> +++ b/x86/umip.c
> @@ -95,8 +95,11 @@ static void test_umip_gp(const char *msg)
>  {
>      puts(msg);
>  
> +#if 0
> +    /* Skip this, because it cannot be emulated correctly.  */

IMO the comment is unnecessary and potentially confusing, e.g. it may
not be clear that the comment is tied to the "#if 0".  If I were
reading this without historical context I'd probably end up blaming
the code anyways to understand what can't be emulated and why.  If
you want documentation in the code itself, maybe just copy the
changelog?  It's concise and covers both what and why.

>      do_smsw();
>      report("exception from smsw", gp_count == 1);
> +#endif
>      do_sgdt();
>      report("exception from sgdt", gp_count == 1);
>      do_sidt();



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux