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


Groups > linux.kernel > #1374380

Re: [PATCH 13/17] kvm-arm: Add stage2 page table modifiers

From Christoffer Dall <christoffer.dall@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 13/17] kvm-arm: Add stage2 page table modifiers
Date 2016-04-08 19:30 +0200
Message-ID <rlIoi-7kL-5@gated-at.bofh.it> (permalink)
References (1 earlier) <rkfy4-5Pj-47@gated-at.bofh.it> <rlEXn-4y2-7@gated-at.bofh.it> <rlGFQ-60n-5@gated-at.bofh.it> <rlI4V-7ce-9@gated-at.bofh.it> <rlI4V-7ce-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Apr 08, 2016 at 06:07:13PM +0100, Suzuki K Poulose wrote:
> On 08/04/16 18:03, Christoffer Dall wrote:
> >On Fri, Apr 08, 2016 at 04:37:02PM +0100, Suzuki K Poulose wrote:
> >>On 08/04/16 14:42, Christoffer Dall wrote:
> >>>On Mon, Apr 04, 2016 at 05:26:13PM +0100, Suzuki K Poulose wrote:
> >>
> >>>>
> >>>>-static void clear_pud_entry(struct kvm *kvm, pud_t *pud, phys_addr_t addr)
> >>>>+static void clear_stage2_pud_entry(struct kvm *kvm, pud_t *pud, phys_addr_t addr)
> >>>>  {
> >>>>-	pmd_t *pmd_table = pmd_offset(pud, 0);
> >>>>-	VM_BUG_ON(pud_huge(*pud));
> >>>>-	pud_clear(pud);
> >>>>+	pmd_t *pmd_table __maybe_unused = stage2_pmd_offset(pud, 0);
> >>>
> >>>The __maybe_unused are slightly ugly, so it may be nicer to create the
> >>>stage2_pmd_free() as static inline's if they're defined to do nothing
> >>>instead.
> >>>
> >>
> >>Sure, we could do that for stage2. However, we will need to fix the host helpers
> >>as well for making such a change in the _hyp version (for 16K + 36bit VA).
> >>
> >
> >I thought the host helpers were already done like that, since we don't
> >need the __maybe_unused currently.  If it involves changing core code
> >etc. then don't bother.
> 
> Unfortunately no, e.g,
> 
> include/asm-generic/pgtable-nopud.h defines:
> 
> #define pud_free(mm, x)                         do { } while (0)
> 

Leave it then :)

Thanks,
-Christoffer

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


Thread

[PATCH 00/17] kvm-arm: Add stage2 page table walker Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-04-04 18:30 +0200
  [PATCH 13/17] kvm-arm: Add stage2 page table modifiers Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-04-04 18:30 +0200
    Re: [PATCH 13/17] kvm-arm: Add stage2 page table modifiers Christoffer Dall <christoffer.dall@linaro.org> - 2016-04-08 15:50 +0200
      Re: [PATCH 13/17] kvm-arm: Add stage2 page table modifiers Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2016-04-08 17:40 +0200
        Re: [PATCH 13/17] kvm-arm: Add stage2 page table modifiers Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2016-04-08 19:10 +0200
          Re: [PATCH 13/17] kvm-arm: Add stage2 page table modifiers Christoffer Dall <christoffer.dall@linaro.org> - 2016-04-08 19:30 +0200
        Re: [PATCH 13/17] kvm-arm: Add stage2 page table modifiers Christoffer Dall <christoffer.dall@linaro.org> - 2016-04-08 19:10 +0200
  [PATCH 03/17] kvm arm: Move fake PGD handling to arch specific files Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-04-04 18:40 +0200
  [PATCH 01/17] arm64: Reuse TCR field definitions for EL1 and EL2 Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-04-04 18:40 +0200
    Re: [PATCH 01/17] arm64: Reuse TCR field definitions for EL1 and EL2 Christoffer Dall <christoffer.dall@linaro.org> - 2016-04-08 14:50 +0200
  [PATCH 08/17] kvm-arm: arm: Introduce hyp page table empty checks Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-04-04 18:40 +0200
    Re: [PATCH 08/17] kvm-arm: arm: Introduce hyp page table empty checks Christoffer Dall <christoffer.dall@linaro.org> - 2016-04-08 15:20 +0200
  [PATCH 05/17] kvm-arm: Replace kvm_pmd_huge with pmd_thp_or_huge Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-04-04 18:40 +0200
    Re: [PATCH 05/17] kvm-arm: Replace kvm_pmd_huge with pmd_thp_or_huge Christoffer Dall <christoffer.dall@linaro.org> - 2016-04-08 14:50 +0200
  [PATCH 06/17] kvm-arm: Remove kvm_pud_huge() Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-04-04 18:40 +0200
    Re: [PATCH 06/17] kvm-arm: Remove kvm_pud_huge() Christoffer Dall <christoffer.dall@linaro.org> - 2016-04-08 14:50 +0200
  Re: [PATCH 00/17] kvm-arm: Add stage2 page table walker Christoffer Dall <christoffer.dall@linaro.org> - 2016-04-08 17:20 +0200

csiph-web