From 2f546c8be0f4038f37aafa2371060d5cd25ed87b Mon Sep 17 00:00:00 2001 From: Eric Chanudet Date: Wed, 10 Jul 2019 19:25:15 -0400 Subject: [PATCH] input: Handle PVHv2 like PV guests. This is done because, to input_server at least, the handling will be the same: setup/connect to vkbd frontend. It is less than ideal too since PVonHVM has been around for a while. With the current rational, vkbd will not work on HVM guests with PV support. Signed-off-by: Eric Chanudet OXT-1648 (cherry picked from commit ccb32fcd92ae03946cefd43a71a7c04e13eb9bcc) Signed-off-by: Eric Chanudet --- domains.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/domains.c b/domains.c index bc7f40d..84ee1b2 100644 --- a/domains.c +++ b/domains.c @@ -696,7 +696,15 @@ domain_read_is_pv_domain(struct domain *d) return; } - d->is_pv_domain = !info.hvm; + /* For input-daemon, PVHv2 and PV guests are the same (vkbd, no controller emulation). + * This second test is the only way we have on 4.12 to differenciate + * through xc_domain_getinfo between HVM and PVHv2. + * Also, it is true on x86 only, LAPIC emulation is hard set by libxl + * (libxl_x86.c) and PVHv2 can only request LAPIC emulation, so no other + * flag can be set (xen/arch/x86/domain.c:arch_domain_create). */ + d->is_pv_domain = + !info.hvm + || (info.hvm && (info.arch_config.emulation_flags == XEN_X86_EMU_LAPIC)); } static void