Date: Tue, 20 Aug 2013 06:46:40 +0000 (UTC) From: Neel Natu <neel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254549 - head/sys/amd64/vmm/intel Message-ID: <201308200646.r7K6kf0Q067844@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: neel Date: Tue Aug 20 06:46:40 2013 New Revision: 254549 URL: http://svnweb.freebsd.org/changeset/base/254549 Log: Do not create superpage mappings in the iommu. This is a workaround to hide the fact that we do not have any code to demote a superpage mapping before we unmap a single page that is part of the superpage. Modified: head/sys/amd64/vmm/intel/vtd.c Modified: head/sys/amd64/vmm/intel/vtd.c ============================================================================== --- head/sys/amd64/vmm/intel/vtd.c Tue Aug 20 06:20:05 2013 (r254548) +++ head/sys/amd64/vmm/intel/vtd.c Tue Aug 20 06:46:40 2013 (r254549) @@ -611,13 +611,30 @@ vtd_create_domain(vm_paddr_t maxaddr) dom = malloc(sizeof(struct domain), M_VTD, M_ZERO | M_WAITOK); dom->pt_levels = pt_levels; dom->addrwidth = addrwidth; - dom->spsmask = VTD_CAP_SPS(vtdmap->cap); dom->id = domain_id(); dom->maxaddr = maxaddr; dom->ptp = malloc(PAGE_SIZE, M_VTD, M_ZERO | M_WAITOK); if ((uintptr_t)dom->ptp & PAGE_MASK) panic("vtd_create_domain: ptp (%p) not page aligned", dom->ptp); +#ifdef notyet + /* + * XXX superpage mappings for the iommu do not work correctly. + * + * By default all physical memory is mapped into the host_domain. + * When a VM is allocated wired memory the pages belonging to it + * are removed from the host_domain and added to the vm's domain. + * + * If the page being removed was mapped using a superpage mapping + * in the host_domain then we need to demote the mapping before + * removing the page. + * + * There is not any code to deal with the demotion at the moment + * so we disable superpage mappings altogether. + */ + dom->spsmask = VTD_CAP_SPS(vtdmap->cap); +#endif + SLIST_INSERT_HEAD(&domhead, dom, next); return (dom);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308200646.r7K6kf0Q067844>