Re: [PATCH 0/2] kvm: IOMMU read-only mapping support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 25 Jan 2013 11:28:40 +0800
Xiao Guangrong <xiaoguangrong@xxxxxxxxxxxxxxxxxx> wrote:

> > I think I can naturally update my patch after this gets merged.
> > 
> 
> Please wait.

The patch I mentioned above won't change anything.  Just cleans up
set_memory_region().  The only possible change which we discussed
before was whether we call iommu_map() on a flags change.

> The commit c972f3b1 changed the write-protect behaviour - it does
> wirte-protection only when dirty flag is set.
> [ I did not see this commit when we discussed the problem before. ]

I'll look at the commit later, after the lunch break.

> Further more, i notice that write-protect is not enough, when do sync
> shadow page:
> 
> FNAME(sync_page):
> 
> 		host_writable = sp->spt[i] & SPTE_HOST_WRITEABLE;
> 
> 		set_spte(vcpu, &sp->spt[i], pte_access,
> 			 PT_PAGE_TABLE_LEVEL, gfn,
> 			 spte_to_pfn(sp->spt[i]), true, false,
> 			 host_writable);
> 
> It sets spte based on the old value that means the readonly flag check
> is missed. We need to call kvm_arch_flush_shadow_all under this case.

So the change needed will be in arch/x86.
	in arch_commit_* one.

Right?

Note: I'm not touching arch_* memory slot APIs now because ARM KVM
is coming now.  So no problem, the flags will be passed as before.

	Takuya
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux