libxc: Expose the pdpe1gb cpuid flag to guest
PATCH 1/1 libxc: Expose the pdpe1gb cpuid flag to guest
If hardware support the pdpe1gb flag, expose it to guest by default. Users don't have to use a 'cpuid= ' option in config file to turn it on.
--- tools/libxc/xc_cpuid_x86.c | 3 +++ 1 file changed, 3 insertions(+)
tools/libxc/xc_cpuid_x86.c +3 -0
@@ -109,6 +109,7 @@ static void amd_xc_cpuid_policy( regs[3] &= (0x0183f3ff | /* features shared with 0x00000001:EDX */ bitmaskof(X86_FEATURE_NX) | bitmaskof(X86_FEATURE_LM) | + bitmaskof(X86_FEATURE_PAGE1GB) | bitmaskof(X86_FEATURE_SYSCALL) | bitmaskof(X86_FEATURE_MP) | bitmaskof(X86_FEATURE_MMXEXT) |
@@ -192,6 +193,7 @@ static void intel_xc_cpuid_policy( bitmaskof(X86_FEATURE_ABM)); regs[3 ] &= (bitmaskof (X86_FEATURE_NX ) |bitmaskof (X86_FEATURE_LM ) | +bitmaskof (X86_FEATURE_PAGE1GB ) |bitmaskof (X86_FEATURE_SYSCALL ) |bitmaskof (X86_FEATURE_RDTSCP ));break ;
@@ -386,6 +388,7 @@ static void xc_cpuid_hvm_policy(clear_bit (X86_FEATURE_LM , regs[3 ]);clear_bit (X86_FEATURE_NX , regs[3 ]);clear_bit (X86_FEATURE_PSE36 , regs[3 ]); +clear_bit (X86_FEATURE_PAGE1GB , regs[3 ]); }break ;
Signature · 1 line
1.9.1
Liang Li writes ("[PATCH] libxc: Expose the pdpe1gb cpuid flag to guest"):
Quoted 3 lines
If hardware support the pdpe1gb flag, expose it to guest by default. Users don't have to use a 'cpuid= ' option in config file to turn it on.
I don't understand what this flag does. I guess from the name it turns on 1G pages. I guess these are supported ?
I would like to see comment from an x86 hypervisor maintainer.
Thanks,
Ian.
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 17.11.14 at 16:39, <[email protected]> wrote:
Liang Li writes ("[PATCH] libxc: Expose the pdpe1gb cpuid flag to guest"):
Quoted 3 lines
If hardware support the pdpe1gb flag, expose it to guest by default. Users don't have to use a 'cpuid= ' option in config file to turn it on.
I don't understand what this flag does. I guess from the name it turns on 1G pages. I guess these are supported ?
I would like to see comment from an x86 hypervisor maintainer.
Yes, we support 1Gb pages. The purpose of the patch is to not unconditionally hide the flag from guests. (I had commented on v1, but sadly this one wasn't tagged as v2, nor was I included on the Cc list, hence I didn't spot the new version.)
The one thing I'm not certain about is shadow mode: Only 2Mb pages may be supported there. Tim?
Jan
Quoted 11 lines · Jan Beulich
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 17.11.14 at 16:39, <[email protected]> wrote:
Liang Li writes ("[PATCH] libxc: Expose the pdpe1gb cpuid flag to guest"):
Quoted 3 lines
If hardware support the pdpe1gb flag, expose it to guest by default. Users don't have to use a 'cpuid= ' option in config file to turn it on.
I don't understand what this flag does. I guess from the name it turns on 1G pages. I guess these are supported ?
I would like to see comment from an x86 hypervisor maintainer.
Quoted 7 lines
Yes, we support 1Gb pages. The purpose of the patch is to not unconditionally hide the flag from guests. (I had commented on v1, but sadly this one wasn't tagged as v2, nor was I included on the Cc list, hence I didn't spot the new version.)
The one thing I'm not certain about is shadow mode: Only 2Mb pages may be supported there. Tim?
Indeed, only 2MiB pages are supported in shadow mode. See, e.g. guest_supports_1G_superpages()->hvm_pse1gb_supported()->paging_mode_hap()
Tim.
Quoted 15 lines · Tim Deegan
Quoted 14 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 17.11.14 at 16:39, <[email protected]> wrote:
Liang Li writes ("[PATCH] libxc: Expose the pdpe1gb cpuid flag to guest"):
Quoted 3 lines
If hardware support the pdpe1gb flag, expose it to guest by default. Users don't have to use a 'cpuid= ' option in config file to turn it on.
I don't understand what this flag does. I guess from the name it turns on 1G pages. I guess these are supported ?
I would like to see comment from an x86 hypervisor maintainer.
Yes, we support 1Gb pages. The purpose of the patch is to not unconditionally hide the flag from guests. (I had commented on v1, but sadly this one wasn't tagged as v2, nor was I included on the Cc list, hence I didn't spot the new version.)
Quoted 4 lines
Quoted 2 lines
The one thing I'm not certain about is shadow mode: Only 2Mb pages may be supported there. Tim?
Indeed, only 2MiB pages are supported in shadow mode. See, e.g. guest_supports_1G_superpages()->hvm_pse1gb_supported()->paging_mode_hap()
This is yet another case which proves that libxc is the wrong place to be choosing the cpuid flags exposed to a domain.
Furthermore, guest_supports_1G_superpages() is insufficient as it only checks whether the host is capable of providing 1G superpages, not whether the guest has been permitted to use it.
This causes a problem when migrating between hap-capable and hap-incapable systems.
I do hope to fix all of this with my planned changes to the cpuid infrastructure.
~Andrew
Quoted 24 lines · Andrew Cooper
Quoted 15 lines · Tim Deegan
Quoted 14 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 17.11.14 at 16:39, <[email protected]> wrote:
Liang Li writes ("[PATCH] libxc: Expose the pdpe1gb cpuid flag to guest"):
Quoted 3 lines
If hardware support the pdpe1gb flag, expose it to guest by default. Users don't have to use a 'cpuid= ' option in config file to turn it on.
I don't understand what this flag does. I guess from the name it turns on 1G pages. I guess these are supported ?
I would like to see comment from an x86 hypervisor maintainer.
Yes, we support 1Gb pages. The purpose of the patch is to not unconditionally hide the flag from guests. (I had commented on v1, but sadly this one wasn't tagged as v2, nor was I included on the Cc list, hence I didn't spot the new version.)
Quoted 4 lines
Quoted 2 lines
The one thing I'm not certain about is shadow mode: Only 2Mb pages may be supported there. Tim?
Indeed, only 2MiB pages are supported in shadow mode. See, e.g. guest_supports_1G_superpages()->hvm_pse1gb_supported()->paging_mode_hap()
This is yet another case which proves that libxc is the wrong place to be choosing the cpuid flags exposed to a domain.
Quoted 6 lines
Furthermore,
guest_supports_1G_superpages()is insufficient as it only checks whether the host is capable of providing 1G superpages, not whether the guest has been permitted to use it.This causes a problem when migrating between hap-capable and hap-incapable systems.
There's no notion of 'permitted' to use 1G pages, AFAICS, much like other CPU features. But of course a _well-behaved_ guest that has been told in cpuid not to use 1G superpages will have no problems. :)
Quoted 2 lines
I do hope to fix all of this with my planned changes to the cpuid infrastructure.
Good luck!
Tim.
Quoted 28 lines · Tim Deegan
Quoted 27 lines · Andrew Cooper
Quoted 15 lines · Tim Deegan
Quoted 14 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 17.11.14 at 16:39, <[email protected]> wrote:
Liang Li writes ("[PATCH] libxc: Expose the pdpe1gb cpuid flag to guest"):
Quoted 3 lines
If hardware support the pdpe1gb flag, expose it to guest by default. Users don't have to use a 'cpuid= ' option in config file to turn it on.
I don't understand what this flag does. I guess from the name it turns on 1G pages. I guess these are supported ?
I would like to see comment from an x86 hypervisor maintainer.
Yes, we support 1Gb pages. The purpose of the patch is to not unconditionally hide the flag from guests. (I had commented on v1, but sadly this one wasn't tagged as v2, nor was I included on the Cc list, hence I didn't spot the new version.)
Quoted 4 lines
Quoted 2 lines
The one thing I'm not certain about is shadow mode: Only 2Mb pages may be supported there. Tim?
Indeed, only 2MiB pages are supported in shadow mode. See, e.g. guest_supports_1G_superpages()->hvm_pse1gb_supported()->paging_mode_hap()
This is yet another case which proves that libxc is the wrong place to be choosing the cpuid flags exposed to a domain.
Furthermore,
guest_supports_1G_superpages()is insufficient as it only checks whether the host is capable of providing 1G superpages, not whether the guest has been permitted to use it.
Quoted 5 lines
Quoted 2 lines
This causes a problem when migrating between hap-capable and hap-incapable systems.
There's no notion of 'permitted' to use 1G pages, AFAICS, much like other CPU features. But of course a _well-behaved_ guest that has been told in cpuid not to use 1G superpages will have no problems. :)
That is my point.
If 1GB pages are not supported (i.e. not present in cpuid), then the PS bit in an L3 is reserved, must be 0, and cause a pagefault if used.
Nothing in Xen currently enforces this because guest_supports_1G_superpages() doesn't check domain_cpuid().
It does however make me wonder how VMX/SVM non-root mode would enforce this as it would see the host cpuid, not guest cpuid when performing paging internally.
~Andrew
Quoted 35 lines · Andrew Cooper
Quoted 28 lines · Tim Deegan
Quoted 27 lines · Andrew Cooper
Quoted 15 lines · Tim Deegan
Quoted 14 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 17.11.14 at 16:39, <[email protected]> wrote:
Liang Li writes ("[PATCH] libxc: Expose the pdpe1gb cpuid flag to guest"):
Quoted 3 lines
If hardware support the pdpe1gb flag, expose it to guest by default. Users don't have to use a 'cpuid= ' option in config file to turn it on.
I don't understand what this flag does. I guess from the name it turns on 1G pages. I guess these are supported ?
I would like to see comment from an x86 hypervisor maintainer.
Yes, we support 1Gb pages. The purpose of the patch is to not unconditionally hide the flag from guests. (I had commented on v1, but sadly this one wasn't tagged as v2, nor was I included on the Cc list, hence I didn't spot the new version.)
Quoted 4 lines
Quoted 2 lines
The one thing I'm not certain about is shadow mode: Only 2Mb pages may be supported there. Tim?
Indeed, only 2MiB pages are supported in shadow mode. See, e.g. guest_supports_1G_superpages()->hvm_pse1gb_supported()->paging_mode_hap()
This is yet another case which proves that libxc is the wrong place to be choosing the cpuid flags exposed to a domain.
Furthermore,
guest_supports_1G_superpages()is insufficient as it only checks whether the host is capable of providing 1G superpages, not whether the guest has been permitted to use it.Quoted 5 lines
Quoted 2 lines
This causes a problem when migrating between hap-capable and hap-incapable systems.
There's no notion of 'permitted' to use 1G pages, AFAICS, much like other CPU features. But of course a _well-behaved_ guest that has been told in cpuid not to use 1G superpages will have no problems. :)
Quoted 7 lines
That is my point.
If 1GB pages are not supported (i.e. not present in cpuid), then the PS bit in an L3 is reserved, must be 0, and cause a pagefault if used.
Nothing in Xen currently enforces this because
guest_supports_1G_superpages()doesn't checkdomain_cpuid().
For shadow mode, Xen DTRT by checking hvm_pse1gb_supported() in the HVM cpuid handler, so we don't advertise a feature we can't support.
For HAP mode, we _could_ add a cpuid check to the pagetable walker but...
Quoted 3 lines
It does however make me wonder how VMX/SVM non-root mode would enforce this as it would see the host cpuid, not guest cpuid when performing paging internally.
...non-emulated PT walks will get to use 1GB superpages anyway. This is the same for other features (new instructions &c). We can mask them out of CPUID but by and large we can't make them fault.
Tim.
Quoted 48 lines · Tim Deegan
Quoted 34 lines · Andrew Cooper
Quoted 28 lines · Tim Deegan
Quoted 27 lines · Andrew Cooper
Quoted 15 lines · Tim Deegan
Quoted 14 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 17.11.14 at 16:39, <[email protected]> wrote:
Liang Li writes ("[PATCH] libxc: Expose the pdpe1gb cpuid flag to guest"):
Quoted 3 lines
If hardware support the pdpe1gb flag, expose it to guest by default. Users don't have to use a 'cpuid= ' option in config file to turn it on.
I don't understand what this flag does. I guess from the name it turns on 1G pages. I guess these are supported ?
I would like to see comment from an x86 hypervisor maintainer.
Yes, we support 1Gb pages. The purpose of the patch is to not unconditionally hide the flag from guests. (I had commented on v1, but sadly this one wasn't tagged as v2, nor was I included on the Cc list, hence I didn't spot the new version.)
Quoted 4 lines
Quoted 2 lines
The one thing I'm not certain about is shadow mode: Only 2Mb pages may be supported there. Tim?
Indeed, only 2MiB pages are supported in shadow mode. See, e.g. guest_supports_1G_superpages()->hvm_pse1gb_supported()->paging_mode_hap()
This is yet another case which proves that libxc is the wrong place to be choosing the cpuid flags exposed to a domain.
Furthermore,
guest_supports_1G_superpages()is insufficient as it only checks whether the host is capable of providing 1G superpages, not whether the guest has been permitted to use it.Quoted 5 lines
Quoted 2 lines
This causes a problem when migrating between hap-capable and hap-incapable systems.
There's no notion of 'permitted' to use 1G pages, AFAICS, much like other CPU features. But of course a _well-behaved_ guest that has been told in cpuid not to use 1G superpages will have no problems. :)
Quoted 7 lines
That is my point.
If 1GB pages are not supported (i.e. not present in cpuid), then the PS bit in an L3 is reserved, must be 0, and cause a pagefault if used.
Nothing in Xen currently enforces this because
guest_supports_1G_superpages()doesn't checkdomain_cpuid().For shadow mode, Xen DTRT by checking
hvm_pse1gb_supported()in the HVM cpuid handler, so we don't advertise a feature we can't support.For HAP mode, we _could_ add a cpuid check to the pagetable walker but...
Quoted 6 lines
Quoted 3 lines
It does however make me wonder how VMX/SVM non-root mode would enforce this as it would see the host cpuid, not guest cpuid when performing paging internally.
...non-emulated PT walks will get to use 1GB superpages anyway. This is the same for other features (new instructions &c). We can mask them out of CPUID but by and large we can't make them fault.
Hmm - this is a pitfall waiting to happen.
In the case that there is a heterogeneous setup with one 1G capable and one 1G incapable server, Xen cannot forcibly prevent the use of 1G pages on the capable hardware. Any VM which guesses at hardware support by means other than cpuid features is liable to explode on migrate.
I suspect this will just have to fall into the category of "here be yet more dragons with heterogeneous migration"
~Andrew
Andrew Cooper wrote on 2014-11-18:
Quoted 60 lines · Tim Deegan
Quoted 8 lines
Quoted 7 lines · Andrew Cooper
Quoted 6 lines · Tim Deegan
Quoted 5 lines · Andrew Cooper
Quoted 4 lines · Tim Deegan
Quoted 3 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 17.11.14 at 16:39, <[email protected]> wrote:
Liang Li writes ("[PATCH] libxc: Expose the pdpe1gb cpuid flag to
guest"):
Quoted 50 lines
Quoted 31 lines
Quoted 25 lines
Quoted 25 lines
Quoted 12 lines
Quoted 12 lines
Quoted 7 lines
Quoted 3 lines
If hardware support the pdpe1gb flag, expose it to guest by default. Users don't have to use a 'cpuid= ' option in config file to turn it on.
I don't understand what this flag does. I guess from the name it turns on 1G pages. I guess these are supported ?
I would like to see comment from an x86 hypervisor maintainer.
Yes, we support 1Gb pages. The purpose of the patch is to not unconditionally hide the flag from guests. (I had commented on v1, but sadly this one wasn't tagged as v2, nor was I included on the Cc list, hence I didn't spot the new version.)
Quoted 6 lines
Quoted 2 lines
The one thing I'm not certain about is shadow mode: Only 2Mb pages may be supported there. Tim?
Indeed, only 2MiB pages are supported in shadow mode. See, e.g.
guest_supports_1G_superpages()->hvm_pse1gb_supported()->paging_mod
e_hap()This is yet another case which proves that libxc is the wrong place to be choosing the cpuid flags exposed to a domain.
Furthermore,
guest_supports_1G_superpages()is insufficient as it only checks whether the host is capable of providing 1G superpages, not whether the guest has been permitted to use it.Quoted 6 lines
Quoted 2 lines
This causes a problem when migrating between hap-capable and hap-incapable systems.
There's no notion of 'permitted' to use 1G pages, AFAICS, much like other CPU features. But of course a _well-behaved_ guest that has been told in cpuid not to use 1G superpages will have no problems. :)
Quoted 7 lines
That is my point.
If 1GB pages are not supported (i.e. not present in cpuid), then the PS bit in an L3 is reserved, must be 0, and cause a pagefault if used.
Nothing in Xen currently enforces this because
guest_supports_1G_superpages()doesn't checkdomain_cpuid().For shadow mode, Xen DTRT by checking
hvm_pse1gb_supported()in the HVM cpuid handler, so we don't advertise a feature we can't support.For HAP mode, we _could_ add a cpuid check to the pagetable walker but...
Quoted 3 lines
It does however make me wonder how VMX/SVM non-root mode would enforce this as it would see the host cpuid, not guest cpuid when performing paging internally.
...non-emulated PT walks will get to use 1GB superpages anyway. This is the same for other features (new instructions &c). We can mask them out of CPUID but by and large we can't make them fault.
Agree. I will forward this question to internally to see whether they aware of this problem.
Quoted 7 lines
Hmm - this is a pitfall waiting to happen.
In the case that there is a heterogeneous setup with one 1G capable and one 1G incapable server, Xen cannot forcibly prevent the use of 1G pages on the capable hardware. Any VM which guesses at hardware support by means other than cpuid features is liable to explode on migrate.
But a normal guest shouldn't to guess it, right?
Quoted 5 lines
I suspect this will just have to fall into the category of "here be yet more dragons with heterogeneous migration"
~Andrew
Best regards,
Yang
Quoted 8 lines · Yang Z
Quoted 6 lines
Hmm - this is a pitfall waiting to happen.
In the case that there is a heterogeneous setup with one 1G capable and one 1G incapable server, Xen cannot forcibly prevent the use of 1G pages on the capable hardware. Any VM which guesses at hardware support by means other than cpuid features is liable to explode on migrate.
But a normal guest shouldn't to guess it, right?
IMHO any guest which does not use the mechanism explicitly provided for feature detection deserves to break randomly.
It's basically equivalent to a physical system where the BIOS masks this cpuid bit because of some hardware errata or something, the underlying feature might appear to be present but will have more or less subtle issues.
Ian.
Quoted 8 lines · Ian Campbell
Quoted 7 lines · Yang Z
Quoted 6 lines
Hmm - this is a pitfall waiting to happen.
In the case that there is a heterogeneous setup with one 1G capable and one 1G incapable server, Xen cannot forcibly prevent the use of 1G pages on the capable hardware. Any VM which guesses at hardware support by means other than cpuid features is liable to explode on migrate.
Quoted 4 lines
Quoted 1 line
But a normal guest shouldn't to guess it, right?
IMHO any guest which does not use the mechanism explicitly provided for feature detection deserves to break randomly.
Yes, that's a reasonable position (notwithstanding that we know such software exists).
In this case, the guest is entitled to _expect_ pagefaults on 1GB mappings if CPUID claims they are not supported. That sounds like an unlikely thing for the guest to be relying on, but Xen itself does something similar for the SHOPT_FAST_FAULT_PATH (and now also for IOMMU entries for the deferred caching attribute updates).
Cheers,
Tim.
Tim Deegan wrote on 2014-11-18:
Quoted 11 lines
Quoted 8 lines · Ian Campbell
Quoted 7 lines · Yang Z
Quoted 7 lines
Hmm - this is a pitfall waiting to happen.
In the case that there is a heterogeneous setup with one 1G capable and one 1G incapable server, Xen cannot forcibly prevent the use of 1G pages on the capable hardware. Any VM which guesses at hardware support by means other than cpuid features is liable to
explode on migrate.
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
But a normal guest shouldn't to guess it, right?
IMHO any guest which does not use the mechanism explicitly provided for feature detection deserves to break randomly.
Yes, that's a reasonable position (notwithstanding that we know such software exists).
Agree.
Quoted 5 lines
In this case, the guest is entitled to _expect_ pagefaults on 1GB mappings if CPUID claims they are not supported. That sounds like an unlikely thing for the guest to be relying on, but Xen itself does something similar for the
SHOPT_FAST_FAULT_PATH(and now also for IOMMU entries for the deferred caching attribute updates).
Indeed. How about adding the software check (as Andrew mentioned) firstly and leave the hardware problem (Actually, I don't think we can solve it currently).
Quoted 4 lines
Cheers,
Tim.
Best regards,
Yang
Quoted 10 lines · Yang Z
Tim Deegan wrote on 2014-11-18:
Quoted 5 lines
In this case, the guest is entitled to _expect_ pagefaults on 1GB mappings if CPUID claims they are not supported. That sounds like an unlikely thing for the guest to be relying on, but Xen itself does something similar for the
SHOPT_FAST_FAULT_PATH(and now also for IOMMU entries for the deferred caching attribute updates).Indeed. How about adding the software check (as Andrew mentioned) firstly and leave the hardware problem (Actually, I don't think we can solve it currently).
I don't think we should change the software path unless we can change the hardware behaviour too. It's better to be consistent, and it saves us some cycles in the pt walker.
Cheers,
Tim.
Tim Deegan wrote on 2014-11-19:
Quoted 8 lines
Quoted 7 lines · Yang Z
Tim Deegan wrote on 2014-11-18:
Quoted 5 lines
In this case, the guest is entitled to _expect_ pagefaults on 1GB mappings if CPUID claims they are not supported. That sounds like an unlikely thing for the guest to be relying on, but Xen itself does something similar for the
SHOPT_FAST_FAULT_PATH(and now also for IOMMU entries for the deferred caching attribute updates).
Quoted 7 lines
Quoted 3 lines
Indeed. How about adding the software check (as Andrew mentioned) firstly and leave the hardware problem (Actually, I don't think we can solve it currently).
I don't think we should change the software path unless we can change the hardware behaviour too. It's better to be consistent, and it saves us some cycles in the pt walker.
So if we don't need to add the software check, does this mean current patch is ok?
Quoted 4 lines
Cheers,
Tim.
Best regards,
Yang
Quoted 14 lines
Quoted 1 line
Quoted 1 line · On 25.11.14 at 02:47, <[email protected]> wrote:
Tim Deegan wrote on 2014-11-19:
Quoted 12 lines
Quoted 10 lines · Yang Z
Tim Deegan wrote on 2014-11-18:
Quoted 5 lines
In this case, the guest is entitled to _expect_ pagefaults on 1GB mappings if CPUID claims they are not supported. That sounds like an unlikely thing for the guest to be relying on, but Xen itself does something similar for the
SHOPT_FAST_FAULT_PATH(and now also for IOMMU entries for the deferred caching attribute updates).Indeed. How about adding the software check (as Andrew mentioned) firstly and leave the hardware problem (Actually, I don't think we can solve it currently).
Quoted 6 lines
Quoted 3 lines
I don't think we should change the software path unless we can change the hardware behaviour too. It's better to be consistent, and it saves us some cycles in the pt walker.
So if we don't need to add the software check, does this mean current patch is ok?
No - Tim having confirmed that shadow mode doesn't support 1Gb pages, the feature clearly must not be made visible for shadow mode guest.
Jan
Jan Beulich wrote on 2014-11-25:
Quoted 18 lines
Quoted 18 lines
Quoted 1 line
Quoted 1 line · On 25.11.14 at 02:47, <[email protected]> wrote:
Tim Deegan wrote on 2014-11-19:
Quoted 15 lines
Quoted 10 lines · Yang Z
Tim Deegan wrote on 2014-11-18:
Quoted 5 lines
In this case, the guest is entitled to _expect_ pagefaults on 1GB mappings if CPUID claims they are not supported. That sounds like an unlikely thing for the guest to be relying on, but Xen itself does something similar for the
SHOPT_FAST_FAULT_PATH(and now also for IOMMU entries for the deferred caching attribute updates).Indeed. How about adding the software check (as Andrew mentioned) firstly and leave the hardware problem (Actually, I don't think we can solve it currently).
I don't think we should change the software path unless we can change the hardware behaviour too. It's better to be consistent, and it saves us some cycles in the pt walker.
Quoted 5 lines
Quoted 2 lines
So if we don't need to add the software check, does this mean current patch is ok?
No - Tim having confirmed that shadow mode doesn't support 1Gb pages, the feature clearly must not be made visible for shadow mode guest.
Indeed. Liang, Can you add the shadow mode check in the next version?
Quoted 2 lines
Jan
Best regards,
Yang
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
patch is ok?
No - Tim having confirmed that shadow mode doesn't support 1Gb pages,
the feature clearly must not be made visible for shadow mode guest.
Indeed. Liang, Can you add the shadow mode check in the next version?
Ok , I will do it and resend the patch.