Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a295673a authored by Avi Kivity's avatar Avi Kivity
Browse files

KVM: VMX: Return 0 from a failed VMREAD



If we execute VMREAD during reboot we'll just skip over it.  Instead of
returning garbage, return 0, which has a much smaller chance of confusing
the code.  Otherwise we risk a flood of debug printk()s which block the
reboot process if a serial console or netconsole is enabled.

Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent b7c4145b
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -565,10 +565,10 @@ static inline void ept_sync_individual_addr(u64 eptp, gpa_t gpa)


static unsigned long vmcs_readl(unsigned long field)
static unsigned long vmcs_readl(unsigned long field)
{
{
	unsigned long value;
	unsigned long value = 0;


	asm volatile (__ex(ASM_VMX_VMREAD_RDX_RAX)
	asm volatile (__ex(ASM_VMX_VMREAD_RDX_RAX)
		      : "=a"(value) : "d"(field) : "cc");
		      : "+a"(value) : "d"(field) : "cc");
	return value;
	return value;
}
}