Re: [kvm-unit-tests PATCH 3/7] x86/debug: Test OUT instead of RDMSR for single-step #DB emulation test

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

 



On 1/20/22 01:29, Sean Christopherson wrote:
@@ -153,8 +152,7 @@ static unsigned long singlestep_emulated_instructions(void)
  		"1:push %%rax\n\t"
  		"xor %%rax,%%rax\n\t"
  		"cpuid\n\t"
-		"movl $0x1a0,%%ecx\n\t"
-		"rdmsr\n\t"
+		"out %%eax, $0x80\n\t"
  		"popf\n\t"
  		"lea 1b,%0\n\t"
  		: "=r" (start) : : "rax", "ebx", "ecx", "edx"

This is a bit more "dangerous" if the tests are run on bare metal. Let's replace it with a

	movl $0x3fd, %%edx
	in %%edx, %%al

Queued with this change, thanks.

Paolo




[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