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


Groups > linux.kernel > #1433273

Re: [PATCH 1/5] mmu: mark spte present if the x bit is set

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/5] mmu: mark spte present if the x bit is set
Date 2016-06-28 22:20 +0200
Message-ID <rP7Ee-3d8-37@gated-at.bofh.it> (permalink)
References <rOSYx-1Xl-7@gated-at.bofh.it> <rOSYx-1Xl-5@gated-at.bofh.it> <rOWSt-4vW-9@gated-at.bofh.it> <rP59o-1Ba-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 28/06/2016 19:33, Bandan Das wrote:
>>> >>  static int is_shadow_present_pte(u64 pte)
>>> >>  {
>>> >> -	return pte & PT_PRESENT_MASK && !is_mmio_spte(pte);
>>> >> +	return pte & (PT_PRESENT_MASK | shadow_x_mask) &&
>>> >> +		!is_mmio_spte(pte);
>> >
>> > This should really be pte & 7 when using EPT.  But this is okay as an
>> > alternative to a new shadow_present_mask.
> I could revive shadow_xonly_valid probably... Anyway, for now I will
> add a TODO comment here.

It's okay to it like this, because the only invalid PTEs reaching this
point are those that is_mmio_spte filters away.  Hence you'll never get
-W- PTEs here, and pte & 7 is really the same as how you wrote it.  It's
pretty clever, and doesn't need a TODO at all. :)

Paolo

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


Thread

[PATCH 1/5] mmu: mark spte present if the x bit is set Bandan Das <bsd@redhat.com> - 2016-06-28 06:40 +0200
  Re: [PATCH 1/5] mmu: mark spte present if the x bit is set Paolo Bonzini <pbonzini@redhat.com> - 2016-06-28 10:50 +0200
    Re: [PATCH 1/5] mmu: mark spte present if the x bit is set Bandan Das <bsd@redhat.com> - 2016-06-28 19:40 +0200
      Re: [PATCH 1/5] mmu: mark spte present if the x bit is set Paolo Bonzini <pbonzini@redhat.com> - 2016-06-28 22:20 +0200
        Re: [PATCH 1/5] mmu: mark spte present if the x bit is set Bandan Das <bsd@redhat.com> - 2016-06-28 22:40 +0200
          Re: [PATCH 1/5] mmu: mark spte present if the x bit is set Paolo Bonzini <pbonzini@redhat.com> - 2016-06-28 22:50 +0200
            Re: [PATCH 1/5] mmu: mark spte present if the x bit is set Bandan Das <bsd@redhat.com> - 2016-06-28 23:10 +0200
            Re: [PATCH 1/5] mmu: mark spte present if the x bit is set Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-06-29 05:10 +0200
            Re: [PATCH 1/5] mmu: mark spte present if the x bit is set Wanpeng Li <kernellwp@gmail.com> - 2016-07-05 05:10 +0200
              Re: [PATCH 1/5] mmu: mark spte present if the x bit is set Paolo Bonzini <pbonzini@redhat.com> - 2016-07-05 13:00 +0200
                Re: [PATCH 1/5] mmu: mark spte present if the x bit is set Wanpeng Li <kernellwp@gmail.com> - 2016-07-05 13:40 +0200

csiph-web