Skip to contentSkip to conversation

VTPM mini-os: mfn_is_ram check disable

PATCH In review Matthew Fioravante 2 participants 2 messages Mar 11, 2011 – Mar 12, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 5/12 VTPM mini-os: mfn_is_ram check disable

Currently when mapping io memory regions into a mini-os domain a check is performed to make sure the memory region really is io memory. While this is a good idea in practice, the code doing the check fails if you have over 4GB since there may be system memory mapped after the io memory mappings.

This patch disables the check and turns it into a stub. It is required for tpm passthrough to the vtpm manager domain.

Signed off by: Matthew Fioravante <[email protected]>

extras/mini-os/arch/x86/mm.c +2 -0
diff -Naur xen-unstable-trp-sdp-pristine/extras/mini-os/arch/x86/mm.c xen-unstable-trp-sdp/extras/mini-os/arch/x86/mm.c
@@ -850,6 +850,8 @@
 static long system_ram_end_mfn;
 int mfn_is_ram(unsigned long mfn)
 {
+   /* This is broken on systems with large ammounts of ram. Always return 0 for now */
+    return 0;
     /* very crude check if a given MFN is memory or not. Probably should
      * make this a little more sophisticated ;) */
     return (mfn <= system_ram_end_mfn) ? 1 : 0;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Acked-by on v1 5/12
#1 lore raw
Quoted 10 lines · Matthew Fioravante, le Fri 11 Mar 2011 17:48:00 -0500, a écrit :

Currently when mapping io memory regions into a mini-os domain a check is performed to make sure the memory region really is io memory. While this is a good idea in practice, the code doing the check fails if you have over 4GB since there may be system memory mapped after the io memory mappings.

This patch disables the check and turns it into a stub. It is required for tpm passthrough to the vtpm manager domain.

Signed off by: Matthew Fioravante <[email protected]>