Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4250972pxu; Wed, 9 Dec 2020 12:05:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxy6lF2kYkW9o0I3mN65nDrAsaC5NXcDoVOBIsG6vvXJJxuhvyaERng3Ky+Uj3bdh3c9pfS X-Received: by 2002:aa7:c353:: with SMTP id j19mr3587147edr.204.1607544307155; Wed, 09 Dec 2020 12:05:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607544307; cv=none; d=google.com; s=arc-20160816; b=qOo/AntDPxfXHyeI1sWSwoYuJUHNg9Su3QaKxd706D+Nfm0jTVYrzxyiiNPAV4/+zO TPGsvTWsN0NxnfzTDt/qeg9ghiBlvawgdjw26IOZj2RVonxn+O/JAELSEKU/DKp2O60X /jYgqsB/6BlDH4aCnzElnwlcsN1anJQf4fVOQBol539UcFFaKi9ZukG968YZgIA1pu8O uvxfSXA928h2il8pTuAe7sR04bqyhcOo07AJbfG2mC9lYks/8x1idSfze8Wm0laBybOr iT9IP0R9FPMTYfcXqJQh9QUvBgfSaEBZCixbo8rxshZn/yPKtylh2twyUHJRi2w/OEoW WLOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:date:message-id:from:references:cc:to :subject:dkim-signature; bh=86yS5ZSEM4uLoGDP4K4dfalOsPgydZF3kRohkHa788k=; b=TbVW8Ct+VzlRfHguvBhIHFhpvUBwVGL22Udv2ZHJdNCr2NfpX+8enkbTTSDNU4sk27 o2fGekOYC+NHh/Ldzd7K7p+WLHM8/0S/9qiwTgW+LB+ks53O5FkBjJ5NwbBDEDilo7dj 3dY5fzol5huci6BMCeWtbWB1wGoEU1Nw0cxd0ZaeUyBQ5pSl+TyyXF2MnvzuVK1GKx5g QHgGeP8JCyZOLWjvAHxDLksA0qaN6Qac0L2/JEDt026w8qTtIDgBIsIlKz50APEZ4aQZ /QfRqrP/YRorYXVjG9H7DNUzSR8T44jkVckbyxCzfokk2Ppe7drJqAm6ASmP3zb87iq7 yyxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b="OEWxn/8v"; 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=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c1si1479357edm.144.2020.12.09.12.04.37; Wed, 09 Dec 2020 12:05:07 -0800 (PST) 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=@oracle.com header.s=corp-2020-01-29 header.b="OEWxn/8v"; 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=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730016AbgLIQQN (ORCPT + 99 others); Wed, 9 Dec 2020 11:16:13 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:47040 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728404AbgLIQQF (ORCPT ); Wed, 9 Dec 2020 11:16:05 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0B9G9MnR083781; Wed, 9 Dec 2020 16:15:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=86yS5ZSEM4uLoGDP4K4dfalOsPgydZF3kRohkHa788k=; b=OEWxn/8v3C0lRN470tEn+9GKAsOfbGeBngvE0EwG4JpCfeyL+cqztxrxumCrtv2F51zs j6sC19bk2GQns84sKXvvRw0YuyR9a4sqDpndz2EZj/jDM6WdbRaT1vcfFLeMhgxn+L/E pL1NjR61rmKp2TRc+b5A80VNzYMoqb6F6vhot65LI+jRsRN1P7he1heQ/0l7kgZUMw2k PrYGuhboP9FkE4K3nlV9I1WtziuzjbrTSzgYyPD7214iHw8zQeWtdbBMfiN6HrLQIntx f0OBKIUALFsoSsGvl+wtFesu/WjUbMbYUtq3GmwE0B8rDFzcDZgGD4iyu1NA1aN4K16/ oQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 357yqc13jt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 09 Dec 2020 16:15:07 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0B9GAil4111778; Wed, 9 Dec 2020 16:13:07 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 358kyuwg06-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 09 Dec 2020 16:13:07 +0000 Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0B9GD3f3012679; Wed, 9 Dec 2020 16:13:03 GMT Received: from [10.175.160.66] (/10.175.160.66) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 09 Dec 2020 08:13:02 -0800 Subject: Re: [PATCH RFC 10/39] KVM: x86/xen: support upcall vector To: David Woodhouse , Ankur Arora , karahmed@amazon.de Cc: Boris Ostrovsky , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190220201609.28290-1-joao.m.martins@oracle.com> <20190220201609.28290-11-joao.m.martins@oracle.com> <71753a370cd6f9dd147427634284073b78679fa6.camel@infradead.org> <53baeaa7-0fed-d22c-7767-09ae885d13a0@oracle.com> <4ad0d157c5c7317a660cd8d65b535d3232f9249d.camel@infradead.org> <052867ae1c997487d85c21e995feb5647ac6c458.camel@infradead.org> <6a6b5806be1fe4c0fe96c0b664710d1ce614f29d.camel@infradead.org> <1af00fa4-03b8-a059-d859-5cfd71ef10f4@oracle.com> <0eb8c2ef01b77af0d288888f200e812d374beada.camel@infradead.org> <35165dbc-73d0-21cd-0baf-db4ffb55fc47@oracle.com> <2E57982D-6508-4850-ABA5-67592381379D@infradead.org> From: Joao Martins Message-ID: Date: Wed, 9 Dec 2020 16:12:58 +0000 MIME-Version: 1.0 In-Reply-To: <2E57982D-6508-4850-ABA5-67592381379D@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9829 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 spamscore=0 mlxscore=0 malwarescore=0 suspectscore=1 mlxlogscore=999 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012090113 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9829 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 mlxlogscore=999 clxscore=1015 malwarescore=0 bulkscore=0 phishscore=0 adultscore=0 spamscore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012090113 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/9/20 3:41 PM, David Woodhouse wrote: > On 9 December 2020 13:26:55 GMT, Joao Martins wrote: >> On 12/9/20 11:39 AM, David Woodhouse wrote: >>> As far as I can tell, Xen's hvm_vcpu_has_pending_irq() will still >>> return the domain-wide vector in preference to the one in the LAPIC, >> if >>> it actually gets invoked. >> >> Only if the callback installed is HVMIRQ_callback_vector IIUC. >> >> Otherwise the vector would be pending like any other LAPIC vector. > > Ah, right. > > For some reason I had it in my head that you could only set the per-vCPU lapic vector if the domain was set to HVMIRQ_callback_vector. If the domain is set to HVMIRQ_callback_none, that clearly makes more sense. > > Still, my patch should do the same as Xen does in the case where a guest does set both, I think. > > Faithful compatibility with odd Xen behaviour FTW :) > Ah, yes. In that case, HVMIRQ_callback_vector does take precedence. But it would be very weird for a guest to setup two callback vectors :)