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]
Message-ID: <1294239388.3831.3516.camel@zakaz.uk.xensource.com>
Date:	Wed, 05 Jan 2011 14:56:28 +0000
From:	Ian Campbell <ijc@...lion.org.uk>
To:	Sheng Yang <sheng@...ux.intel.com>
Cc:	Jeremy Fitzhardinge <jeremy@...p.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...e.hu>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2 v2] xen: HVM X2APIC support

> > @@ -1384,6 +1365,17 @@ static bool __init xen_hvm_platform(void)
> >       return true;
> >  }
> > 
> > +bool xen_hvm_need_lapic(void)
> > +{
> > +     if (xen_pv_domain())
> > +             return false;
> > +     if (xen_hvm_domain() && xen_feature(XENFEAT_hvm_pirqs) &&
> > +                     xen_have_vector_callback)
> > +             return false;
> > +     return (xen_cpuid_base() != 0);
> > +}
> > +EXPORT_SYMBOL_GPL(xen_hvm_need_lapic);
> > +

Since xen_hvm_domain() is always true if xen_cpuid_base() != 0, isn't
this more obviously written as:
	if (!xen_hvm_domain())
		return false;
	if (xen_feature(XENFEAT_hvm_pirqs) && xen_have_vector_callback)
		return false;
	return true;
?

Also, checking for the XenVMMXenVMM signature alone seems like a very
broad test for checking the availability of a specific feature, is there
nothing more specific which we could/should be testing?

Ian.

-- 
Ian Campbell
Current Noise: Taint - Mass Appeal Sadness

What's a cult?  It just means not enough people to make a minority.
		-- Robert Altman

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