Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp650595pxb; Thu, 23 Sep 2021 07:57:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgsK3dg62QPmrJFS/RHtObnnedckBsZ6Ip5hFGNZISqB05WLUpjmR+FC4nfSRi68r7hm4O X-Received: by 2002:a05:6402:358a:: with SMTP id y10mr5829618edc.238.1632409043265; Thu, 23 Sep 2021 07:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632409043; cv=none; d=google.com; s=arc-20160816; b=1Cvby+yxZxjjvTzcHpMAXdz4DLufcAcj87APOZ7qXRwBZQpLo2H4e1hwtEKgIF21Xj uV4PbGA7c8j3TlqMJQZwkW9TimZ0YwYT62A0gnwVVvhIVcDv7YyjYnmsAamLO30fxCan nXssfhCEZRXsJbyJZKEjSp4JAHZ7tHPEZcjdVM55AxYz5Px7AL5e83bZMCrAn9/U4PYy uCECWL38AJtRexGB/OmwXgGpPu3pRZUHyoHxs/708GDEkx+Im0+nSwmd9Hu1iNH6nEU7 TzKctfvg041CAeDZFA5EMzJp2EcO5HWT8SKrQtsRUFkKzeehvd9QXdY5LY9GAH+J9ZS8 6JIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:mime-version:user-agent:date :message-id:subject:from:references:cc:to:dkim-signature; bh=my7VqY53A6e1Wd90ewQAn8Sl1sh3HuXoPlhSNUiEzmI=; b=D+pGabyIBOM1BrPKwG0sLl8sS+YeJ59DVPFRoh25dHk9j2aiYVRMzLMG2ucLPlW0UH tC5rHdft+KeYRhqf2zEe5B6P4CDawgNy7c6LpyNIat0jCXdq+dOPDWhLnazc8YLkdveq SKe3N3ATxLjF1zyY8pIg3Mrb613YweIzy8yibq3MJJOeGbln6D2N39+Xw8UbZZSVwJ40 GOxqYol10vJH7zom+zg+WhW612qpyxPmOHxCrHYZYaZ9b3iEgaTC7jxKWsK+SBQ5fiVG XPV//Jw5qdtwWV9KzW3hzlmWIu/a5dslqDy1p/iI5XvX1YMBHzk2XGFHijZbYd4v6/CW Yl7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=EO78IeaG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 6si6144015ejk.777.2021.09.23.07.56.56; Thu, 23 Sep 2021 07:57:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=EO78IeaG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241792AbhIWO4e (ORCPT + 99 others); Thu, 23 Sep 2021 10:56:34 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:60422 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241794AbhIWO4d (ORCPT ); Thu, 23 Sep 2021 10:56:33 -0400 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id EC0512236C; Thu, 23 Sep 2021 14:55:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1632408900; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=my7VqY53A6e1Wd90ewQAn8Sl1sh3HuXoPlhSNUiEzmI=; b=EO78IeaGVeI9AbNU3/Oo2sIhF+U1+YlUVfZWAr10ZWTMqchVE+WF5xlgvH+WPmnxvW/29R 5R0LpnckeK1fJMx5c621/D6rcNYqmo8VRF3RhEyfyJPaYtEUZaoYGmzGcPTjLxQlzNX86X ioKLPIS4JgZMHHq3J0YxGw+7hC85R28= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C73D913E76; Thu, 23 Sep 2021 14:55:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wSNSL0SVTGFnfQAAMHmgww (envelope-from ); Thu, 23 Sep 2021 14:55:00 +0000 To: Jan Beulich , Boris Ostrovsky Cc: Stefano Stabellini , lkml , "xen-devel@lists.xenproject.org" References: <4efa804e-3250-227f-00c7-347581366cd4@suse.com> <0b7afef6-1c46-ed74-ca83-f1e29f763f4a@suse.com> From: Juergen Gross Subject: Re: [PATCH 6/9] xen/x86: generalize preferred console model from PV to PVH Dom0 Message-ID: Date: Thu, 23 Sep 2021 16:54:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <0b7afef6-1c46-ed74-ca83-f1e29f763f4a@suse.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="91iDXi0U6EUiXy5e5GnMRq1VY3EqTjDTl" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --91iDXi0U6EUiXy5e5GnMRq1VY3EqTjDTl Content-Type: multipart/mixed; boundary="KJGvBtqHlnedeq33aAE3U0cqUhtZBlVt0"; protected-headers="v1" From: Juergen Gross To: Jan Beulich , Boris Ostrovsky Cc: Stefano Stabellini , lkml , "xen-devel@lists.xenproject.org" Message-ID: Subject: Re: [PATCH 6/9] xen/x86: generalize preferred console model from PV to PVH Dom0 References: <4efa804e-3250-227f-00c7-347581366cd4@suse.com> <0b7afef6-1c46-ed74-ca83-f1e29f763f4a@suse.com> In-Reply-To: <0b7afef6-1c46-ed74-ca83-f1e29f763f4a@suse.com> --KJGvBtqHlnedeq33aAE3U0cqUhtZBlVt0 Content-Type: multipart/mixed; boundary="------------B81120A55C794E6A11CAA6AE" Content-Language: en-US This is a multi-part message in MIME format. --------------B81120A55C794E6A11CAA6AE Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 07.09.21 12:10, Jan Beulich wrote: > Without announcing hvc0 as preferred it won't get used as long as tty0 > gets registered earlier. This is particularly problematic with there no= t > being any screen output for PVH Dom0 when the screen is in graphics > mode, as the necessary information doesn't get conveyed yet from the > hypervisor. >=20 > Follow PV's model, but be conservative and do this for Dom0 only for > now. >=20 > Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross > --- > Prior to 418492ba40b2 ("x86/virt/xen: Use guest_late_init to detect Xen= > PVH guest") x86_init.oem.arch_setup was already used by PVH, so I assum= e > the use of this hook is acceptable here. Yes, I think so. > Seeing that change, I wonder in how far setting xen_pvh to true only in= > xen_hvm_guest_late_init() can really work: This hook, as its name says,= > gets called pretty late; any decision taken earlier might have been > wrong. One such wrong decision is what gets added here - preferred > consoles won't be registered when taking that path. While adding a 2nd > call there might work, aiui they would better be registered prior to > parse_early_param(), i.e. before "earlyprintk=3D" gets evaluated. >=20 > I also consider tying "detecting" PVH mode to the no-VGA and no-CMOS-RT= C > FADT flags as problematic looking forward: There may conceivably be > "legacy free" HVM guests down the road, yet they shouldn't be mistaken > for being PVH. Most of the XEN_X86_EMU_* controlled functionality would= > seem unsuitable for the same reason; presence/absence of > XENFEAT_hvm_pirqs (tied to XEN_X86_EMU_USE_PIRQ) might be sufficiently > reliable an indicator. Question there is whether the separation > introduced by Xen commit b96b50004804 ("x86: remove XENFEAT_hvm_pirqs > for PVHv2 guests") came early enough in the process of enabling PVHv2. Yes, it did. The boot path not using the PVH specific entry point was enabled with Xen 4.11, while commit b96b50004804 was in 4.9. Juergen --------------B81120A55C794E6A11CAA6AE Content-Type: application/pgp-keys; name="OpenPGP_0xB0DE9DD628BF132F.asc" Content-Transfer-Encoding: quoted-printable Content-Description: OpenPGP public key Content-Disposition: attachment; filename="OpenPGP_0xB0DE9DD628BF132F.asc" -----BEGIN PGP PUBLIC KEY BLOCK----- xsBNBFOMcBYBCACgGjqjoGvbEouQZw/ToiBg9W98AlM2QHV+iNHsEs7kxWhKMjrioyspZKOBy= cWx w3ie3j9uvg9EOB3aN4xiTv4qbnGiTr3oJhkB1gsb6ToJQZ8uxGq2kaV2KL9650I1SJvedYm8O= f8Z d621lSmoKOwlNClALZNew72NjJLEzTalU1OdT7/i1TXkH09XSSI8mEQ/ouNcMvIJNwQpd369y= 9bf IhWUiVXEK7MlRgUG6MvIj6Y3Am/BBLUVbDa4+gmzDC9ezlZkTZG2t14zWPvxXP3FAp2pkW0xq= G7/ 377qptDmrk42GlSKN4z76ELnLxussxc7I2hx18NUcbP8+uty4bMxABEBAAHNHEp1ZXJnZW4gR= 3Jv c3MgPGpnQHBmdXBmLm5ldD7CwHkEEwECACMFAlOMcBYCGwMHCwkIBwMCAQYVCAIJCgsEFgIDA= QIe AQIXgAAKCRCw3p3WKL8TL0KdB/93FcIZ3GCNwFU0u3EjNbNjmXBKDY4FUGNQH2lvWAUy+dnyT= hpw dtF/jQ6j9RwE8VP0+NXcYpGJDWlNb9/JmYqLiX2Q3TyevpB0CA3dbBQp0OW0fgCetToGIQrg0= MbD 1C/sEO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4tU4PONxF5D+/tvgkPfDAfF77zy2AH1= vJz Q1fOU8lYFpZXTXIHb+559UqvIB8AdgR3SAJGHHt4RKA0F7f5ipYBBrC6cyXJyyoprT10EMvU8= VGi wXvTyJz3fjoYsdFzpWPlJEBRMedCot60g5dmbdrZ5DWClAr0yau47zpWj3enf1tLWaqcsuylW= svi uGjKGw7KHQd3bxALOknAp4dN3QwBYCKuZ7AddY9yjynVaD5X7nF9nO5BjR/i1DG86lem3iBDX= zXs ZDn8R38=3D =3D2wuH -----END PGP PUBLIC KEY BLOCK----- --------------B81120A55C794E6A11CAA6AE-- --KJGvBtqHlnedeq33aAE3U0cqUhtZBlVt0-- --91iDXi0U6EUiXy5e5GnMRq1VY3EqTjDTl Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEhRJncuj2BJSl0Jf3sN6d1ii/Ey8FAmFMlUQFAwAAAAAACgkQsN6d1ii/Ey8x iAf/fgB9XcFj3SYVqzq+hQfPHb/7f8TzC1lVTGPiQA7e9d4ro//aIspKnnpzSujRBBA1vbdcNgqS 2g2xF8pJkE2idoYXUcIJbGr+/r+3mOjfqjQSCDC6OcoR1qBC8kTWChjjHw8Wufb8nqF7j4ilW30p kjVKta6xvUN7hSw6KIvjRrejw8SnjkgeESP8kLKEm71uWuCbR7URli2MI3G2lDORfIlwoRyBfETY Ti6vQNgYPU7Ol2i+syUPxhDdnfF96niNSKFyNqzETQMnteuoO+yxBwlAoejaP2zjIXDt2sHRkKvK 0WcvpWYxl3qY51WgYc1ivB7G2Bk84fAO553ibr4OiA== =Xbvv -----END PGP SIGNATURE----- --91iDXi0U6EUiXy5e5GnMRq1VY3EqTjDTl--