Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1441805

[PATCH v2 4/5] mmu: change unconditional setting of the u bit in fault bitmap

From Bandan Das <bsd@redhat.com>
Newsgroups linux.kernel
Subject [PATCH v2 4/5] mmu: change unconditional setting of the u bit in fault bitmap
Date 2016-07-13 00:30 +0200
Message-ID <rUelH-2F3-7@gated-at.bofh.it> (permalink)
References <rUec2-2Bd-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


For the nested EPT case, we assume that the read bit (u) is
always set since we used to unconditionally set it in set_spte().
Modify it to only be set when host ept execute only support
isn't present.

Signed-off-by: Bandan Das <bsd@redhat.com>
---
 arch/x86/kvm/mmu.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index c364dcb..566eea5 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -3923,9 +3923,10 @@ static void update_permission_bitmask(struct kvm_vcpu *vcpu,
 				 *   clearer.
 				 */
 				smap = cr4_smap && u && !uf && !ff;
-			} else
-				/* Not really needed: no U/S accesses on ept  */
-				u = 1;
+			} else {
+				if (shadow_present_mask)
+					u = 1;
+			}
 
 			fault = (ff && !x) || (uf && !u) || (wf && !w) ||
 				(smapf && smap);
-- 
2.5.5

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/5] Add support for EPT execute only for nested hypervisors Bandan Das <bsd@redhat.com> - 2016-07-13 00:20 +0200
  [PATCH v2 2/5] mmu: don't set the present bit unconditionally Bandan Das <bsd@redhat.com> - 2016-07-13 00:30 +0200
    Re: [PATCH v2 2/5] mmu: don't set the present bit unconditionally Paolo Bonzini <pbonzini@redhat.com> - 2016-07-13 10:20 +0200
  [PATCH v2 4/5] mmu: change unconditional setting of the u bit in fault bitmap Bandan Das <bsd@redhat.com> - 2016-07-13 00:30 +0200
    Re: [PATCH v2 4/5] mmu: change unconditional setting of the u bit in  fault bitmap Paolo Bonzini <pbonzini@redhat.com> - 2016-07-13 10:30 +0200
      Re: [PATCH v2 4/5] mmu: change unconditional setting of the u bit in  fault bitmap Paolo Bonzini <pbonzini@redhat.com> - 2016-07-13 11:10 +0200
  [PATCH v2 3/5] mmu: remove is_present_gpte() Bandan Das <bsd@redhat.com> - 2016-07-13 00:30 +0200
  [PATCH v2 5/5] vmx: advertise support for ept execute only Bandan Das <bsd@redhat.com> - 2016-07-13 00:30 +0200
  Re: [PATCH v2 0/5] Add support for EPT execute only for nested  hypervisors Paolo Bonzini <pbonzini@redhat.com> - 2016-07-13 11:30 +0200
    Re: [PATCH v2 0/5] Add support for EPT execute only for nested  hypervisors Fam Zheng <famz@redhat.com> - 2016-07-13 12:00 +0200
      Re: [PATCH v2 0/5] Add support for EPT execute only for nested  hypervisors Paolo Bonzini <pbonzini@redhat.com> - 2016-07-13 12:10 +0200
    Re: [PATCH v2 0/5] Add support for EPT execute only for nested hypervisors Bandan Das <bsd@redhat.com> - 2016-07-13 17:10 +0200
      Re: [PATCH v2 0/5] Add support for EPT execute only for nested  hypervisors Paolo Bonzini <pbonzini@redhat.com> - 2016-07-13 17:30 +0200
        Re: [PATCH v2 0/5] Add support for EPT execute only for nested hypervisors Bandan Das <bsd@redhat.com> - 2016-07-13 17:50 +0200
          Re: [PATCH v2 0/5] Add support for EPT execute only for nested  hypervisors Paolo Bonzini <pbonzini@redhat.com> - 2016-07-14 09:00 +0200
            Re: [PATCH v2 0/5] Add support for EPT execute only for nested hypervisors Bandan Das <bsd@redhat.com> - 2016-07-14 19:40 +0200
              Re: [PATCH v2 0/5] Add support for EPT execute only for nested  hypervisors Paolo Bonzini <pbonzini@redhat.com> - 2016-07-14 20:30 +0200
                Re: [PATCH v2 0/5] Add support for EPT execute only for nested hypervisors Bandan Das <bsd@redhat.com> - 2016-07-14 21:00 +0200

csiph-web