Re: [PATCH v6 03/27] x86, boot: move verify_cpu.S and no_longmode after 0x200
On Wed, Dec 19, 2012 at 01:58:57PM -0800, Yinghai Lu wrote: > On Wed, Dec 19, 2012 at 12:57 PM, Borislav Petkov wrote: > > On Tue, Dec 18, 2012 at 07:44:55PM -0800, Yinghai Lu wrote: > > > > So this explains what you're doing but I'd like to know why? > > > > Why do you need to free some more room between startup_32 and > > startup_64? Do you need this room in another patch, maybe the next one: > > > > "[PATCH v7 14/27] x86, boot: Move lldt/ltr out of 64bit code section" > > > > Is that so? If yes, please write that in the commit message so that we > > know why you're doing that change. > > duplicate next patch commit log here. no, that's too long. Why is that a problem? Long patch commit logs are OK. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6 03/27] x86, boot: move verify_cpu.S and no_longmode after 0x200
On Wed, Dec 19, 2012 at 01:58:57PM -0800, Yinghai Lu wrote: On Wed, Dec 19, 2012 at 12:57 PM, Borislav Petkov b...@alien8.de wrote: On Tue, Dec 18, 2012 at 07:44:55PM -0800, Yinghai Lu wrote: So this explains what you're doing but I'd like to know why? Why do you need to free some more room between startup_32 and startup_64? Do you need this room in another patch, maybe the next one: [PATCH v7 14/27] x86, boot: Move lldt/ltr out of 64bit code section Is that so? If yes, please write that in the commit message so that we know why you're doing that change. duplicate next patch commit log here. no, that's too long. Why is that a problem? Long patch commit logs are OK. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6 03/27] x86, boot: move verify_cpu.S and no_longmode after 0x200
On Wed, Dec 19, 2012 at 01:58:57PM -0800, Yinghai Lu wrote: > On Wed, Dec 19, 2012 at 12:57 PM, Borislav Petkov wrote: > > On Tue, Dec 18, 2012 at 07:44:55PM -0800, Yinghai Lu wrote: > > > > So this explains what you're doing but I'd like to know why? > > > > Why do you need to free some more room between startup_32 and > > startup_64? Do you need this room in another patch, maybe the next one: > > > > "[PATCH v7 14/27] x86, boot: Move lldt/ltr out of 64bit code section" > > > > Is that so? If yes, please write that in the commit message so that we > > know why you're doing that change. > > duplicate next patch commit log here. no, that's too long. Sorry, I'm not suggesting to duplicate the patch commit log here - simply say instead: "We are short of space before address 0x200 which is the 64-bit entry point (startup_64). Since we're going to need that space in the next patch, and, according to hpa, startup_64 has become an ABI and thus cannot be moved, move function verify_cpu and no_longmode further down." See, clear and simple. Thanks. -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6 03/27] x86, boot: move verify_cpu.S and no_longmode after 0x200
On Wed, Dec 19, 2012 at 12:57 PM, Borislav Petkov wrote: > On Tue, Dec 18, 2012 at 07:44:55PM -0800, Yinghai Lu wrote: > > So this explains what you're doing but I'd like to know why? > > Why do you need to free some more room between startup_32 and > startup_64? Do you need this room in another patch, maybe the next one: > > "[PATCH v7 14/27] x86, boot: Move lldt/ltr out of 64bit code section" > > Is that so? If yes, please write that in the commit message so that we > know why you're doing that change. duplicate next patch commit log here. no, that's too long. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6 03/27] x86, boot: move verify_cpu.S and no_longmode after 0x200
On Tue, Dec 18, 2012 at 07:44:55PM -0800, Yinghai Lu wrote: > On Sat, Dec 15, 2012 at 9:06 AM, Borislav Petkov wrote: > > On Thu, Dec 13, 2012 at 02:01:57PM -0800, Yinghai Lu wrote: > >> We are short of space before 0x200 that is entry for startup_64. > > > > And you're moving this down because of the couple of bytes the next > > patch is adding? If so, then explain that here. > > better? > > --- > Subject: [PATCH] x86, boot: move verify_cpu.S and no_longmode down > > We need to move some code with 32bit section in following patch: > >x86, boot: Move lldt/ltr out of 64bit code section > > but that will push startup_64 down from 0x200. > > According to hpa, we can not change startup_64 to other offset and > that become ABI now. > > We could move function verify_cpu and no_longmode down, because > verify_cpu is used via function call and no_longmode will not > return. > --- Almost. So this explains what you're doing but I'd like to know why? Why do you need to free some more room between startup_32 and startup_64? Do you need this room in another patch, maybe the next one: "[PATCH v7 14/27] x86, boot: Move lldt/ltr out of 64bit code section" Is that so? If yes, please write that in the commit message so that we know why you're doing that change. Thanks. -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6 03/27] x86, boot: move verify_cpu.S and no_longmode after 0x200
On Tue, Dec 18, 2012 at 07:44:55PM -0800, Yinghai Lu wrote: On Sat, Dec 15, 2012 at 9:06 AM, Borislav Petkov b...@alien8.de wrote: On Thu, Dec 13, 2012 at 02:01:57PM -0800, Yinghai Lu wrote: We are short of space before 0x200 that is entry for startup_64. And you're moving this down because of the couple of bytes the next patch is adding? If so, then explain that here. better? --- Subject: [PATCH] x86, boot: move verify_cpu.S and no_longmode down We need to move some code with 32bit section in following patch: x86, boot: Move lldt/ltr out of 64bit code section but that will push startup_64 down from 0x200. According to hpa, we can not change startup_64 to other offset and that become ABI now. We could move function verify_cpu and no_longmode down, because verify_cpu is used via function call and no_longmode will not return. --- Almost. So this explains what you're doing but I'd like to know why? Why do you need to free some more room between startup_32 and startup_64? Do you need this room in another patch, maybe the next one: [PATCH v7 14/27] x86, boot: Move lldt/ltr out of 64bit code section Is that so? If yes, please write that in the commit message so that we know why you're doing that change. Thanks. -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6 03/27] x86, boot: move verify_cpu.S and no_longmode after 0x200
On Wed, Dec 19, 2012 at 12:57 PM, Borislav Petkov b...@alien8.de wrote: On Tue, Dec 18, 2012 at 07:44:55PM -0800, Yinghai Lu wrote: So this explains what you're doing but I'd like to know why? Why do you need to free some more room between startup_32 and startup_64? Do you need this room in another patch, maybe the next one: [PATCH v7 14/27] x86, boot: Move lldt/ltr out of 64bit code section Is that so? If yes, please write that in the commit message so that we know why you're doing that change. duplicate next patch commit log here. no, that's too long. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6 03/27] x86, boot: move verify_cpu.S and no_longmode after 0x200
On Wed, Dec 19, 2012 at 01:58:57PM -0800, Yinghai Lu wrote: On Wed, Dec 19, 2012 at 12:57 PM, Borislav Petkov b...@alien8.de wrote: On Tue, Dec 18, 2012 at 07:44:55PM -0800, Yinghai Lu wrote: So this explains what you're doing but I'd like to know why? Why do you need to free some more room between startup_32 and startup_64? Do you need this room in another patch, maybe the next one: [PATCH v7 14/27] x86, boot: Move lldt/ltr out of 64bit code section Is that so? If yes, please write that in the commit message so that we know why you're doing that change. duplicate next patch commit log here. no, that's too long. Sorry, I'm not suggesting to duplicate the patch commit log here - simply say instead: We are short of space before address 0x200 which is the 64-bit entry point (startup_64). Since we're going to need that space in the next patch, and, according to hpa, startup_64 has become an ABI and thus cannot be moved, move function verify_cpu and no_longmode further down. See, clear and simple. Thanks. -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6 03/27] x86, boot: move verify_cpu.S and no_longmode after 0x200
On Sat, Dec 15, 2012 at 9:06 AM, Borislav Petkov wrote: > On Thu, Dec 13, 2012 at 02:01:57PM -0800, Yinghai Lu wrote: >> We are short of space before 0x200 that is entry for startup_64. > > And you're moving this down because of the couple of bytes the next > patch is adding? If so, then explain that here. better? --- Subject: [PATCH] x86, boot: move verify_cpu.S and no_longmode down We need to move some code with 32bit section in following patch: x86, boot: Move lldt/ltr out of 64bit code section but that will push startup_64 down from 0x200. According to hpa, we can not change startup_64 to other offset and that become ABI now. We could move function verify_cpu and no_longmode down, because verify_cpu is used via function call and no_longmode will not return. --- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6 03/27] x86, boot: move verify_cpu.S and no_longmode after 0x200
On Sat, Dec 15, 2012 at 9:06 AM, Borislav Petkov b...@alien8.de wrote: On Thu, Dec 13, 2012 at 02:01:57PM -0800, Yinghai Lu wrote: We are short of space before 0x200 that is entry for startup_64. And you're moving this down because of the couple of bytes the next patch is adding? If so, then explain that here. better? --- Subject: [PATCH] x86, boot: move verify_cpu.S and no_longmode down We need to move some code with 32bit section in following patch: x86, boot: Move lldt/ltr out of 64bit code section but that will push startup_64 down from 0x200. According to hpa, we can not change startup_64 to other offset and that become ABI now. We could move function verify_cpu and no_longmode down, because verify_cpu is used via function call and no_longmode will not return. --- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6 03/27] x86, boot: move verify_cpu.S and no_longmode after 0x200
On Thu, Dec 13, 2012 at 02:01:57PM -0800, Yinghai Lu wrote: > We are short of space before 0x200 that is entry for startup_64. And you're moving this down because of the couple of bytes the next patch is adding? If so, then explain that here. > According to hpa, we can not change startup_64 to other offset and > that become ABI now. > > We could move function verify_cpu and no_longmode down, because one is > used via call and another will not return. > So could avoid extra code of jmp back and forth if we would move other > lines. What does that sentence even mean? Why is it in the commit message? > Signed-off-by: Yinghai Lu > Cc: Matt Fleming > --- > arch/x86/boot/compressed/head_64.S | 17 + > 1 file changed, 9 insertions(+), 8 deletions(-) > > diff --git a/arch/x86/boot/compressed/head_64.S > b/arch/x86/boot/compressed/head_64.S > index 2c4b171..fb984c0 100644 > --- a/arch/x86/boot/compressed/head_64.S > +++ b/arch/x86/boot/compressed/head_64.S > @@ -176,14 +176,6 @@ ENTRY(startup_32) > lret > ENDPROC(startup_32) > > -no_longmode: > - /* This isn't an x86-64 CPU so hang */ > -1: > - hlt > - jmp 1b > - > -#include "../../kernel/verify_cpu.S" > - > /* >* Be careful here startup_64 needs to be at a predictable >* address so I can export it in an ELF header. Bootloaders > @@ -349,6 +341,15 @@ relocated: > */ > jmp *%rbp > > + .code32 > +no_longmode: > + /* This isn't an x86-64 CPU so hang */ > +1: > + hlt > + jmp 1b > + > +#include "../../kernel/verify_cpu.S" > + > .data > gdt: > .word gdt_end - gdt > -- > 1.7.10.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6 03/27] x86, boot: move verify_cpu.S and no_longmode after 0x200
On Thu, Dec 13, 2012 at 02:01:57PM -0800, Yinghai Lu wrote: We are short of space before 0x200 that is entry for startup_64. And you're moving this down because of the couple of bytes the next patch is adding? If so, then explain that here. According to hpa, we can not change startup_64 to other offset and that become ABI now. We could move function verify_cpu and no_longmode down, because one is used via call and another will not return. So could avoid extra code of jmp back and forth if we would move other lines. What does that sentence even mean? Why is it in the commit message? Signed-off-by: Yinghai Lu ying...@kernel.org Cc: Matt Fleming matt.flem...@intel.com --- arch/x86/boot/compressed/head_64.S | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S index 2c4b171..fb984c0 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S @@ -176,14 +176,6 @@ ENTRY(startup_32) lret ENDPROC(startup_32) -no_longmode: - /* This isn't an x86-64 CPU so hang */ -1: - hlt - jmp 1b - -#include ../../kernel/verify_cpu.S - /* * Be careful here startup_64 needs to be at a predictable * address so I can export it in an ELF header. Bootloaders @@ -349,6 +341,15 @@ relocated: */ jmp *%rbp + .code32 +no_longmode: + /* This isn't an x86-64 CPU so hang */ +1: + hlt + jmp 1b + +#include ../../kernel/verify_cpu.S + .data gdt: .word gdt_end - gdt -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/