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

[Xen-devel] [PATCH] x86: put x86emul_{read, write}_dr under CONFIG_PV



A build breakage is discovered by a non-debug build. Debug build
worked because the ASSERT made the compiler eliminate the rest of the
functions.

Currently they are PV only. There are comments alluding to possible
future HVM support but we can cross the bride when we get there.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 xen/arch/x86/x86_emulate.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/x86_emulate.c b/xen/arch/x86/x86_emulate.c
index 886bd87e59..b1dfc9f261 100644
--- a/xen/arch/x86/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate.c
@@ -89,6 +89,7 @@ int x86emul_write_xcr(unsigned int reg, uint64_t val,
     return X86EMUL_OKAY;
 }
 
+#ifdef CONFIG_PV
 /* Called with NULL ctxt in hypercall context. */
 int x86emul_read_dr(unsigned int reg, unsigned long *val,
                     struct x86_emulate_ctxt *ctxt)
@@ -155,6 +156,7 @@ int x86emul_write_dr(unsigned int reg, unsigned long val,
         return X86EMUL_EXCEPTION;
     }
 }
+#endif /* CONFIG_PV */
 
 /*
  * Local variables:
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.