Re: [PATCH kvm-unit-tests] x86: vmx: fix RDPMC interception test

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

 



On Thu, Mar 3, 2016 at 5:13 AM, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> RDPMC can cause a general protection fault if ECX is not within the
> valid range for performance counters.  Tweak the test to ensure that
> ECX is valid.
>
> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Reviewed-by: Peter Feiner <pfeiner@xxxxxxxxxx>
> ---
>  x86/vmx_tests.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
> index b3ddec6..d851692 100644
> --- a/x86/vmx_tests.c
> +++ b/x86/vmx_tests.c
> @@ -733,7 +733,7 @@ asm(
>         "insn_hlt: hlt;ret\n\t"
>         "insn_invlpg: invlpg 0x12345678;ret\n\t"
>         "insn_mwait: mwait;ret\n\t"
> -       "insn_rdpmc: rdpmc;ret\n\t"
> +       "insn_rdpmc: xor %ecx, %ecx; rdpmc;ret\n\t"
>         "insn_rdtsc: rdtsc;ret\n\t"
>         "insn_cr3_load: mov cr3,%rax; mov %rax,%cr3;ret\n\t"
>         "insn_cr3_store: mov %cr3,%rax;ret\n\t"
> --
> 2.5.0
>

Thanks! We had this, byte for byte, in our internal patch queue
already :-) You beat me to the punch getting it upstream.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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