RE: [PATCH 2/2] vmx,svm: Print errors if SVM or VMX were already set

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

 



> From: Alexander Graf
> Sent: Tuesday, July 05, 2011 8:42 AM
> 
> 
> On 05.07.2011, at 01:09, Sasha Levin wrote:
> 
> > Instead of exiting quietly, print an error if the VMX or the SVM bits
> > were already set when loading the module.
> >
> > Having VMX/SVM bits set means that either there is someone else doing
> > hardware virtualization, or that the BIOS is buggy and sets it on
> > by default.
> >
> > Cc: Avi Kivity <avi@xxxxxxxxxx>
> > Cc: Marcelo Tosatti <mtosatti@xxxxxxxxxx>
> > Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx>
> > ---
> > arch/x86/kvm/svm.c |    5 ++++-
> > arch/x86/kvm/vmx.c |    4 +++-
> > 2 files changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> > index 5ca76e3..2a1df2e 100644
> > --- a/arch/x86/kvm/svm.c
> > +++ b/arch/x86/kvm/svm.c
> > @@ -590,8 +590,11 @@ static int svm_hardware_enable(void *garbage)
> > 	int me = raw_smp_processor_id();
> >
> > 	rdmsrl(MSR_EFER, efer);
> > -	if (check_inuse && (efer & EFER_SVME))
> > +	if (check_inuse && (efer & EFER_SVME)) {
> > +		printk(KERN_ERR "svm_hardware_enable: SVM already set
> on %d\n",
> 
> CPU%d
> 
> Also I'd rephrase it as "already in use on". Otherwise looks good :)
> 

A more elaborative message sounds better, like the explanation for possible
cause in the commit message. Also an advertisement about "check_inuse"
option is a good thing here in the message. :-)

Thanks
Kevin
--
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