pv-ops dom0 contains Linux upstream VT-d driver, and will go to enable it when VT-d is set in kernel config file. It should not enable VT-d in dom0. Currently it already zaps ACPI DMAR signature to prevents dom0 using VT-d HW when VT-d is enabled for Xen. But when VT-d is not enabled for Xen, and VT-d is set in pv-ops kernel config file, pv-ops dom0 will go to enable it. This will results in pv-ops dom0 booting failure. This patch prevents dom0 to use VT-d HW whether VT-d is enabled or disabled for Xen. Signed-off-by: Weidong Han <weidong.han@intel.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Christian Tramnitz
2009-Sep-08 11:43 UTC
[Xen-devel] Re: [PATCH] VT-d: prevent dom0 to use VT-d HW
Han, Weidong wrote:> pv-ops dom0 contains Linux upstream VT-d driver, and will go to enable it when VT-d is set in kernel config file. It should not enable VT-d in dom0. > > Currently it already zaps ACPI DMAR signature to prevents dom0 using VT-d HW when VT-d is enabled for Xen. But when VT-d is not enabled for Xen, and VT-d is set in pv-ops kernel config file, pv-ops dom0 will go to enable it. This will results in pv-ops dom0 booting failure. This patch prevents dom0 to use VT-d HW whether VT-d is enabled or disabled for Xen.Wouldn''t be easier (and more likely to be adopted by upstream) to add a Kconfig dependency like "depends on !XEN_DOM0" to VT-d? Best regards, Christian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Teo En Ming (Zhang Enming)
2009-Sep-08 11:51 UTC
RE: [Xen-devel] Re: [PATCH] VT-d: prevent dom0 to use VT-d HW
Dear Christian, Could you help to look at my problem? Thank you. Regards, Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) Technical Support Engineer Information Technology Department Asiasoft Online Pte Ltd Tampines Central 1 #04-01 Tampines Plaza Singapore 529541 Republic of Singapore Mobile: +65-9648-9798 MSN: teoenming@hotmail.com -----Original Message----- From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Christian Tramnitz Sent: Tuesday, September 08, 2009 7:43 PM To: xen-devel@lists.xensource.com Subject: [Xen-devel] Re: [PATCH] VT-d: prevent dom0 to use VT-d HW Han, Weidong wrote:> pv-ops dom0 contains Linux upstream VT-d driver, and will go to enable itwhen VT-d is set in kernel config file. It should not enable VT-d in dom0.> > Currently it already zaps ACPI DMAR signature to prevents dom0 using VT-dHW when VT-d is enabled for Xen. But when VT-d is not enabled for Xen, and VT-d is set in pv-ops kernel config file, pv-ops dom0 will go to enable it. This will results in pv-ops dom0 booting failure. This patch prevents dom0 to use VT-d HW whether VT-d is enabled or disabled for Xen. Wouldn''t be easier (and more likely to be adopted by upstream) to add a Kconfig dependency like "depends on !XEN_DOM0" to VT-d? Best regards, Christian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.83/2352 - Release Date: 09/07/09 18:03:00 No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.83/2352 - Release Date: 09/07/09 18:03:00 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2009-Sep-08 14:07 UTC
[Xen-devel] Re: [PATCH] VT-d: prevent dom0 to use VT-d HW
Christian Tramnitz writes ("[Xen-devel] Re: [PATCH] VT-d: prevent dom0 to use VT-d HW"):> Wouldn''t be easier (and more likely to be adopted by upstream) to add a > Kconfig dependency like "depends on !XEN_DOM0" to VT-d?I don''t think that would be right. Nowadays we want to be able to build kernels that will work on bare hardware, or under Xen, rather than baking the configuration statically into the kernel image. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Sep-08 14:14 UTC
Re: [Xen-devel] Re: [PATCH] VT-d: prevent dom0 to use VT-d HW
On 08/09/2009 15:07, "Ian Jackson" <Ian.Jackson@eu.citrix.com> wrote:> Christian Tramnitz writes ("[Xen-devel] Re: [PATCH] VT-d: prevent dom0 to use > VT-d HW"): >> Wouldn''t be easier (and more likely to be adopted by upstream) to add a >> Kconfig dependency like "depends on !XEN_DOM0" to VT-d? > > I don''t think that would be right. Nowadays we want to be able to > build kernels that will work on bare hardware, or under Xen, rather > than baking the configuration statically into the kernel image.The correct alternative would be to gate VT-d initialisation at run-time, conditional on being run as dom0. Probably would need a hook and probably would not be hugely palatable to the kernel maintainers. This effective ''virtualisation''/hack of the ACPI tables is probably the right way to go. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2009-Sep-09 22:32 UTC
Re: [Xen-devel] [PATCH] VT-d: prevent dom0 to use VT-d HW
On 09/07/09 19:24, Han, Weidong wrote:> pv-ops dom0 contains Linux upstream VT-d driver, and will go to enable it when VT-d is set in kernel config file. It should not enable VT-d in dom0. > > Currently it already zaps ACPI DMAR signature to prevents dom0 using VT-d HW when VT-d is enabled for Xen. But when VT-d is not enabled for Xen, and VT-d is set in pv-ops kernel config file, pv-ops dom0 will go to enable it. This will results in pv-ops dom0 booting failure. This patch prevents dom0 to use VT-d HW whether VT-d is enabled or disabled for Xen. >Which tree is this against? My dom0 tree doesn''t have drivers/passthrough/vtd/. Is there a branch you''d like me to pull in? Thanks, J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kay, Allen M
2009-Sep-09 22:35 UTC
RE: [Xen-devel] [PATCH] VT-d: prevent dom0 to use VT-d HW
The patch is for xen source tree, not pv-ops tree. -----Original Message----- From: Jeremy Fitzhardinge [mailto:jeremy@goop.org] Sent: Wednesday, September 09, 2009 3:32 PM To: Han, Weidong Cc: xen-devel@lists.xensource.com; Kay, Allen M; ''Keir.Fraser@eu.citrix.com'' Subject: Re: [Xen-devel] [PATCH] VT-d: prevent dom0 to use VT-d HW On 09/07/09 19:24, Han, Weidong wrote:> pv-ops dom0 contains Linux upstream VT-d driver, and will go to enable it when VT-d is set in kernel config file. It should not enable VT-d in dom0. > > Currently it already zaps ACPI DMAR signature to prevents dom0 using VT-d HW when VT-d is enabled for Xen. But when VT-d is not enabled for Xen, and VT-d is set in pv-ops kernel config file, pv-ops dom0 will go to enable it. This will results in pv-ops dom0 booting failure. This patch prevents dom0 to use VT-d HW whether VT-d is enabled or disabled for Xen. >Which tree is this against? My dom0 tree doesn''t have drivers/passthrough/vtd/. Is there a branch you''d like me to pull in? Thanks, J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2009-Sep-09 22:41 UTC
Re: [Xen-devel] [PATCH] VT-d: prevent dom0 to use VT-d HW
On 09/09/09 15:35, Kay, Allen M wrote:> The patch is for xen source tree, not pv-ops tree. >Ah, of course. Silly me. On the other hand, if someone were to submit some passthough patches for pvops, I''d be very appreciative. J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel