lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 4 Sep 2013 15:03:44 +0000
From:	KY Srinivasan <kys@...rosoft.com>
To:	Jan Beulich <JBeulich@...e.com>
CC:	"olaf@...fle.de" <olaf@...fle.de>, "bp@...en8.de" <bp@...en8.de>,
	"apw@...onical.com" <apw@...onical.com>,
	"x86@...nel.org" <x86@...nel.org>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"jasowang@...hat.com" <jasowang@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"hpa@...or.com" <hpa@...or.com>
Subject: RE: [PATCH V2 1/1] X86: Hyper-V: Get the local APIC timer frequency
 from the hypervisor



> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@...e.com]
> Sent: Wednesday, September 04, 2013 12:17 AM
> To: KY Srinivasan
> Cc: olaf@...fle.de; bp@...en8.de; apw@...onical.com; x86@...nel.org;
> tglx@...utronix.de; devel@...uxdriverproject.org; gregkh@...uxfoundation.org;
> jasowang@...hat.com; linux-kernel@...r.kernel.org; hpa@...or.com
> Subject: Re: [PATCH V2 1/1] X86: Hyper-V: Get the local APIC timer frequency
> from the hypervisor
> 
> >>> On 03.09.13 at 20:30, "K. Y. Srinivasan" <kys@...rosoft.com> wrote:
> > @@ -76,6 +80,26 @@ static void __init ms_hyperv_init_platform(void)
> >  	printk(KERN_INFO "HyperV: features 0x%x, hints 0x%x\n",
> >  	       ms_hyperv.features, ms_hyperv.hints);
> >
> > +	if (ms_hyperv.features & HV_X64_MSR_APIC_FREQUENCY_AVAILABLE) {
> > +		/*
> > +		 * Get the APIC frequency.
> > +		 */
> > +		rdmsrl(HV_X64_MSR_APIC_FREQUENCY, hv_lapic_frequency);
> > +		hv_lapic_frequency /= HZ;
> > +		lapic_timer_frequency = hv_lapic_frequency;
> > +		printk(KERN_INFO "HyperV: LAPIC Timer Frequency: %#x\n",
> > +				lapic_timer_frequency);
> > +
> > +		/*
> > +		 * On Hyper-V, when we are booting off an EFI firmware stack,
> > +		 * we do not have many legacy devices including PIC, PIT etc.
> > +		 */
> > +		if (efi_enabled(EFI_BOOT)) {
> > +			printk(KERN_INFO "HyperV: Using null_legacy_pic\n");
> > +			legacy_pic = &null_legacy_pic;
> > +		}
> 
> And this check is really connected to the feature check around the
> whole block, rather than being independent? (I'd also think that
> this latter message would suffice to be KERN_DEBUG).

I felt it was safer to first check for the feature  since if the feature is not
there, we need to calibrate based on PIT. Furthermore, the feature is available
even in legacy environments when we are not booting on an EFI stack.

Regards,

K. Y

> 
> Jan

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ