On Wed, Jul 19, 2023, Paolo Bonzini wrote:
> On 7/19/23 01:44, Sean Christopherson wrote:
> > + BUILD_BUG_ON(sizeof(gfn_range.arg) != sizeof(gfn_range.arg.raw));
> > + BUILD_BUG_ON(sizeof(range->arg) != sizeof(range->arg.raw));
>
> I think these should be static assertions near the definition
On Fri, Jul 21, 2023, Xu Yilun wrote:
> On 2023-07-21 at 14:26:11 +0800, Yan Zhao wrote:
> > On Tue, Jul 18, 2023 at 04:44:44PM -0700, Sean Christopherson wrote:
> >
> > May I know why KVM now needs to register to callback .change_pte()?
>
> I can see the original purpose is to "setting a pte in
On Tue, Jul 18, 2023 at 04:44:44PM -0700, Sean Christopherson wrote:
May I know why KVM now needs to register to callback .change_pte()?
As also commented in kvm_mmu_notifier_change_pte(), .change_pte() must be
surrounded by .invalidate_range_{start,end}().
While
On 2023-07-21 at 14:26:11 +0800, Yan Zhao wrote:
> On Tue, Jul 18, 2023 at 04:44:44PM -0700, Sean Christopherson wrote:
>
> May I know why KVM now needs to register to callback .change_pte()?
I can see the original purpose is to "setting a pte in the shadow page
table directly, instead of
On 7/19/23 01:44, Sean Christopherson wrote:
+ BUILD_BUG_ON(sizeof(gfn_range.arg) != sizeof(gfn_range.arg.raw));
+ BUILD_BUG_ON(sizeof(range->arg) != sizeof(range->arg.raw));
I think these should be static assertions near the definition of the
structs. However another possibility
On Wed, Jul 19, 2023, Jarkko Sakkinen wrote:
> On Wed Jul 19, 2023 at 2:44 AM EEST, Sean Christopherson wrote:
> > /* Huge pages aren't expected to be modified without first being
> > zapped. */
> > - WARN_ON(pte_huge(range->pte) || range->start + 1 != range->end);
> > +
On Wed Jul 19, 2023 at 2:44 AM EEST, Sean Christopherson wrote:
> /* Huge pages aren't expected to be modified without first being
> zapped. */
> - WARN_ON(pte_huge(range->pte) || range->start + 1 != range->end);
> + WARN_ON(pte_huge(range->arg.pte) || range->start + 1 !=
Signed-off-by: Sean Christopherson
---
arch/arm64/kvm/mmu.c | 2 +-
arch/mips/kvm/mmu.c| 2 +-
arch/riscv/kvm/mmu.c | 2 +-
arch/x86/kvm/mmu/mmu.c | 2 +-
arch/x86/kvm/mmu/tdp_mmu.c | 6 +++---
include/linux/kvm_host.h | 5 -
virt/kvm/kvm_main.c| 16