Re: MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-15 Thread Laszlo Ersek
On 07/15/15 21:30, Xiao Guangrong wrote: > > Hi, > > I have posted the pachset to make OVMF happy and have CCed you guys, > could you please check it if it works for you? Sorry, I can't check it; I don't have an environment that exposes the issue in the first place. Perhaps Alex can check it,

Re: MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-15 Thread Xiao Guangrong
Hi, I have posted the pachset to make OVMF happy and have CCed you guys, could you please check it if it works for you? On 07/15/2015 05:15 AM, Paolo Bonzini wrote: The long delay that Alex reported (for the case when all guest memory was set to UC up-front) is due to the fact that the SEC

Re: MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-15 Thread Laszlo Ersek
On 07/15/15 00:37, Jordan Justen wrote: > On 2015-07-14 14:29:11, Laszlo Ersek wrote: >> On 07/14/15 23:15, Paolo Bonzini wrote: The long delay that Alex reported (for the case when all guest memory was set to UC up-front) is due to the fact that the SEC phase of OVMF decompresses

Re: MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-15 Thread Laszlo Ersek
On 07/15/15 00:37, Jordan Justen wrote: On 2015-07-14 14:29:11, Laszlo Ersek wrote: On 07/14/15 23:15, Paolo Bonzini wrote: The long delay that Alex reported (for the case when all guest memory was set to UC up-front) is due to the fact that the SEC phase of OVMF decompresses an approximately

Re: MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-15 Thread Xiao Guangrong
Hi, I have posted the pachset to make OVMF happy and have CCed you guys, could you please check it if it works for you? On 07/15/2015 05:15 AM, Paolo Bonzini wrote: The long delay that Alex reported (for the case when all guest memory was set to UC up-front) is due to the fact that the SEC

Re: MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-15 Thread Laszlo Ersek
On 07/15/15 21:30, Xiao Guangrong wrote: Hi, I have posted the pachset to make OVMF happy and have CCed you guys, could you please check it if it works for you? Sorry, I can't check it; I don't have an environment that exposes the issue in the first place. Perhaps Alex can check it, or

RE: [edk2] MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-14 Thread Fan, Jeff
Cc: edk2-devel list; Xiao Guangrong; k...@vger.kernel.org; g...@kernel.org; mtosa...@redhat.com; linux-kernel@vger.kernel.org Subject: Re: [edk2] MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR] > The long delay that Alex reported (for the case when all gu

Re: MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-14 Thread Jordan Justen
On 2015-07-14 14:29:11, Laszlo Ersek wrote: > On 07/14/15 23:15, Paolo Bonzini wrote: > >> The long delay that Alex reported (for the case when all guest memory > >> was set to UC up-front) is due to the fact that the SEC phase of OVMF > >> decompresses an approximately 1712 KB sized,

Re: MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-14 Thread Laszlo Ersek
On 07/14/15 23:15, Paolo Bonzini wrote: >> The long delay that Alex reported (for the case when all guest memory >> was set to UC up-front) is due to the fact that the SEC phase of OVMF >> decompresses an approximately 1712 KB sized, LZMA-compressed blob, to >> approx. 896 KB worth of PEI drivers

Re: MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-14 Thread Paolo Bonzini
> The long delay that Alex reported (for the case when all guest memory > was set to UC up-front) is due to the fact that the SEC phase of OVMF > decompresses an approximately 1712 KB sized, LZMA-compressed blob, to > approx. 896 KB worth of PEI drivers and 8192 KB worth of DXE and UEFI > drivers

MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-14 Thread Laszlo Ersek
Cross-posting to edk2-devel. Original sub-thread starts here: http://thread.gmane.org/gmane.linux.kernel/1952205/focus=1994315 On 07/13/15 17:15, Xiao Guangrong wrote: > > > On 07/13/2015 11:13 PM, Paolo Bonzini wrote: >> On 13/07/2015 16:45, Xiao Guangrong wrote: +/* MTRR is

Re: MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-14 Thread Laszlo Ersek
On 07/14/15 23:15, Paolo Bonzini wrote: The long delay that Alex reported (for the case when all guest memory was set to UC up-front) is due to the fact that the SEC phase of OVMF decompresses an approximately 1712 KB sized, LZMA-compressed blob, to approx. 896 KB worth of PEI drivers and 8192

MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-14 Thread Laszlo Ersek
Cross-posting to edk2-devel. Original sub-thread starts here: http://thread.gmane.org/gmane.linux.kernel/1952205/focus=1994315 On 07/13/15 17:15, Xiao Guangrong wrote: On 07/13/2015 11:13 PM, Paolo Bonzini wrote: On 13/07/2015 16:45, Xiao Guangrong wrote: +/* MTRR is completely

Re: MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-14 Thread Paolo Bonzini
The long delay that Alex reported (for the case when all guest memory was set to UC up-front) is due to the fact that the SEC phase of OVMF decompresses an approximately 1712 KB sized, LZMA-compressed blob, to approx. 896 KB worth of PEI drivers and 8192 KB worth of DXE and UEFI drivers --

Re: MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-14 Thread Jordan Justen
On 2015-07-14 14:29:11, Laszlo Ersek wrote: On 07/14/15 23:15, Paolo Bonzini wrote: The long delay that Alex reported (for the case when all guest memory was set to UC up-front) is due to the fact that the SEC phase of OVMF decompresses an approximately 1712 KB sized, LZMA-compressed blob,

RE: [edk2] MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR]

2015-07-14 Thread Fan, Jeff
Cc: edk2-devel list; Xiao Guangrong; k...@vger.kernel.org; g...@kernel.org; mtosa...@redhat.com; linux-kernel@vger.kernel.org Subject: Re: [edk2] MTRR setup in OVMF [was: PATCH v3 01/10 KVM: MMU: fix decoding cache type from MTRR] The long delay that Alex reported (for the case when all guest

Re: [PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-07-13 Thread Xiao Guangrong
On 07/13/2015 11:13 PM, Paolo Bonzini wrote: On 13/07/2015 16:45, Xiao Guangrong wrote: +/* MTRR is completely disabled, use UC for all of physical memory. */ +if (!(mtrr_state->enabled & 0x2)) +return MTRR_TYPE_UNCACHABLE; actually disappears in commit fa61213746a7 (KVM:

Re: [PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-07-13 Thread Paolo Bonzini
On 13/07/2015 16:45, Xiao Guangrong wrote: >> +/* MTRR is completely disabled, use UC for all of physical >> memory. */ >> +if (!(mtrr_state->enabled & 0x2)) >> +return MTRR_TYPE_UNCACHABLE; >> >> actually disappears in commit fa61213746a7 (KVM: MTRR: simplify >>

Re: [PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-07-13 Thread Xiao Guangrong
On 07/13/2015 03:32 PM, Paolo Bonzini wrote: I'm seeing a significant regression in boot performance on Intel hardware with assigned devices that bisects back to this patch. There's a long delay with Seabios between the version splash and execution of option ROMs, and a _very_ long delay with

Re: [PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-07-13 Thread Paolo Bonzini
On 12/07/2015 20:59, Xiao Guangrong wrote: > > > On 07/13/2015 01:33 AM, Alex Williamson wrote: >> On Wed, 2015-05-13 at 14:42 +0800, Xiao Guangrong wrote: >>> There are some bugs in current get_mtrr_type(); >>> 1: bit 1 of mtrr_state->enabled is corresponding bit 11 of >>>

Re: [PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-07-13 Thread Xiao Guangrong
On 07/13/2015 03:32 PM, Paolo Bonzini wrote: I'm seeing a significant regression in boot performance on Intel hardware with assigned devices that bisects back to this patch. There's a long delay with Seabios between the version splash and execution of option ROMs, and a _very_ long delay with

Re: [PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-07-13 Thread Paolo Bonzini
On 13/07/2015 16:45, Xiao Guangrong wrote: +/* MTRR is completely disabled, use UC for all of physical memory. */ +if (!(mtrr_state-enabled 0x2)) +return MTRR_TYPE_UNCACHABLE; actually disappears in commit fa61213746a7 (KVM: MTRR: simplify kvm_mtrr_get_guest_memory_type,

Re: [PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-07-13 Thread Xiao Guangrong
On 07/13/2015 11:13 PM, Paolo Bonzini wrote: On 13/07/2015 16:45, Xiao Guangrong wrote: +/* MTRR is completely disabled, use UC for all of physical memory. */ +if (!(mtrr_state-enabled 0x2)) +return MTRR_TYPE_UNCACHABLE; actually disappears in commit fa61213746a7 (KVM: MTRR:

Re: [PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-07-13 Thread Paolo Bonzini
On 12/07/2015 20:59, Xiao Guangrong wrote: On 07/13/2015 01:33 AM, Alex Williamson wrote: On Wed, 2015-05-13 at 14:42 +0800, Xiao Guangrong wrote: There are some bugs in current get_mtrr_type(); 1: bit 1 of mtrr_state-enabled is corresponding bit 11 of IA32_MTRR_DEF_TYPE MSR which

Re: [PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-07-12 Thread Bandan Das
Alex Williamson writes: > On Wed, 2015-05-13 at 14:42 +0800, Xiao Guangrong wrote: >> There are some bugs in current get_mtrr_type(); >> 1: bit 1 of mtrr_state->enabled is corresponding bit 11 of >>IA32_MTRR_DEF_TYPE MSR which completely control MTRR's enablement >>that means other bits

Re: [PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-07-12 Thread Xiao Guangrong
On 07/13/2015 01:33 AM, Alex Williamson wrote: On Wed, 2015-05-13 at 14:42 +0800, Xiao Guangrong wrote: There are some bugs in current get_mtrr_type(); 1: bit 1 of mtrr_state->enabled is corresponding bit 11 of IA32_MTRR_DEF_TYPE MSR which completely control MTRR's enablement that

Re: [PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-07-12 Thread Alex Williamson
On Wed, 2015-05-13 at 14:42 +0800, Xiao Guangrong wrote: > There are some bugs in current get_mtrr_type(); > 1: bit 1 of mtrr_state->enabled is corresponding bit 11 of >IA32_MTRR_DEF_TYPE MSR which completely control MTRR's enablement >that means other bits are ignored if it is cleared >

Re: [PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-07-12 Thread Xiao Guangrong
On 07/13/2015 01:33 AM, Alex Williamson wrote: On Wed, 2015-05-13 at 14:42 +0800, Xiao Guangrong wrote: There are some bugs in current get_mtrr_type(); 1: bit 1 of mtrr_state-enabled is corresponding bit 11 of IA32_MTRR_DEF_TYPE MSR which completely control MTRR's enablement that

Re: [PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-07-12 Thread Bandan Das
Alex Williamson alex.william...@redhat.com writes: On Wed, 2015-05-13 at 14:42 +0800, Xiao Guangrong wrote: There are some bugs in current get_mtrr_type(); 1: bit 1 of mtrr_state-enabled is corresponding bit 11 of IA32_MTRR_DEF_TYPE MSR which completely control MTRR's enablement that

Re: [PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-07-12 Thread Alex Williamson
On Wed, 2015-05-13 at 14:42 +0800, Xiao Guangrong wrote: There are some bugs in current get_mtrr_type(); 1: bit 1 of mtrr_state-enabled is corresponding bit 11 of IA32_MTRR_DEF_TYPE MSR which completely control MTRR's enablement that means other bits are ignored if it is cleared 2:

Re: [PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-05-13 Thread Wanpeng Li
On Wed, May 13, 2015 at 02:42:19PM +0800, Xiao Guangrong wrote: >There are some bugs in current get_mtrr_type(); >1: bit 1 of mtrr_state->enabled is corresponding bit 11 of > IA32_MTRR_DEF_TYPE MSR which completely control MTRR's enablement > that means other bits are ignored if it is cleared

[PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-05-13 Thread Xiao Guangrong
There are some bugs in current get_mtrr_type(); 1: bit 1 of mtrr_state->enabled is corresponding bit 11 of IA32_MTRR_DEF_TYPE MSR which completely control MTRR's enablement that means other bits are ignored if it is cleared 2: the fixed MTRR ranges are controlled by bit 0 of

Re: [PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-05-13 Thread Wanpeng Li
On Wed, May 13, 2015 at 02:42:19PM +0800, Xiao Guangrong wrote: There are some bugs in current get_mtrr_type(); 1: bit 1 of mtrr_state-enabled is corresponding bit 11 of IA32_MTRR_DEF_TYPE MSR which completely control MTRR's enablement that means other bits are ignored if it is cleared 2:

[PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-05-13 Thread Xiao Guangrong
There are some bugs in current get_mtrr_type(); 1: bit 1 of mtrr_state-enabled is corresponding bit 11 of IA32_MTRR_DEF_TYPE MSR which completely control MTRR's enablement that means other bits are ignored if it is cleared 2: the fixed MTRR ranges are controlled by bit 0 of