From: Wei Liu Date: Mon, 5 Nov 2018 17:38:58 +0000 (+0000) Subject: x86: put x86emul_{read,write}_dr under CONFIG_PV X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a76e48f879dda43d5f7d36ecdb241678ff0c441e;p=people%2Fsstabellini%2Fxen-unstable.git%2F.git 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 bridge when we get there. Signed-off-by: Wei Liu Acked-by: Andrew Cooper --- 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: