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: <4A26196B.10402@goop.org>
Date:	Wed, 03 Jun 2009 16:34:19 +1000
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	Ingo Molnar <mingo@...e.hu>,
	the arch/x86 maintainers <x86@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Xen-devel <xen-devel@...ts.xensource.com>,
	Stephen Tweedie <sct@...hat.com>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
Subject: Re: [PATCH 05/16] xen mtrr: Add mtrr_ops support for Xen mtrr

Thomas Gleixner wrote:
> On Tue, 12 May 2009, Jeremy Fitzhardinge wrote:
>   
>>  	if (cpu_has_mtrr) {
>>  		mtrr_if = &generic_mtrr_ops;
>> +#ifdef CONFIG_XEN_DOM0
>> +		xen_init_mtrr();
>> +#endif
>> +
>>     
>
>   No #ifdefs please. Also isn't there some common place where Xen can
>   do all of it's magic extra init ?
>   

This init function overrides mtrr_if if its running under Xen, so it 
needs to happen here.  But we can certainly lose the #ifdef.

>   Aside of that this patch needs to be split into two. One adding the
>   num_var_ranges op and one adding the Xen bits.
>   

OK.

>> +#include <xen/interface/platform.h>
>> +#include <asm/xen/hypervisor.h>
>> +#include <asm/xen/hypercall.h>
>> +
>> +static int __init xen_num_var_ranges(void);
>>     
>
>   Can we move the function here please ?
>   
OK.

>> +/* DOM0 TODO: Need to fill in the remaining mtrr methods to have full
>> + * working userland mtrr support. */
>> +static struct mtrr_ops xen_mtrr_ops = {
>> +	.vendor            = X86_VENDOR_UNKNOWN,
>> +	.get_free_region   = generic_get_free_region,
>> +	.have_wrcomb       = positive_have_wrcomb,
>> +	.use_intel_if	   = 0,
>> +	.num_var_ranges	   = xen_num_var_ranges,
>> +};
>> +
>> +static int __init xen_num_var_ranges(void)
>> +{
>> +	int ranges;
>> +	struct xen_platform_op op;
>> +
>> +	for (ranges = 0; ; ranges++) {
>> +		op.cmd = XENPF_read_memtype;
>>     
>
>   Is op.cmd changed in the hypervisor call ?
>   

No, it can be hoisted.

>   cpu_has_mtrr ..... please 
>   

OK.

Thanks,
    J
--
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