Re: [kvm-unit-tests PATCH v2 4/5] x86: Dedup 32-bit vs. 64-bit ASM_TRY() by stealing kernel's __ASM_SEL()

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

 



On Sun, Aug 07, 2022, Michal Luczaj wrote:
> diff --git a/lib/x86/processor.h b/lib/x86/processor.h
> index 0324220..30e2de8 100644
> --- a/lib/x86/processor.h
> +++ b/lib/x86/processor.h
> @@ -19,6 +19,18 @@
>  #  define S "4"
>  #endif
>  
> +#ifdef __ASSEMBLY__
> +#define __ASM_FORM(x, ...)	x,## __VA_ARGS__
> +#else
> +#define __ASM_FORM(x, ...)	" " xstr(x,##__VA_ARGS__) " "
> +#endif
> +
> +#ifndef __x86_64__
> +#define __ASM_SEL(a,b)		__ASM_FORM(a)
> +#else
> +#define __ASM_SEL(a,b)		__ASM_FORM(b)
> +#endif

Argh, this can't go in processor.h, because processor.h includes desc.h (to use
ASM_TRY).  This patch "works" because emulator.c includes both process.or and
desc.h, but things go sideways if ASM_TRY_FEP() is moved into desc.h.

I'll post a new version of the entire series, the KVM_FEP macro and a helper to
check for FEP availability should really go in a common location, e.g. the PMU
test can use the common helper instead of requiring a separate unittest.cfg entry.



[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