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

Re: [PATCH v9 1/2] xen+tools: Report Interrupt Controller Virtualization capabilities on x86


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 7 Apr 2022 10:45:10 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6CLZAi0cLY6kqsFOAu7uy8giJZDS95AXEjzDsNp3OeI=; b=i3iFKZB3hSOyWHkEUFCddHYzB4XNMurH1G/Nxt0Kdgih1ORmF0JiQ+Ak+XsKu2dCsM4VLzpjPnWMhAcp2C5mI/7To7jbHzB4ba+Q/Q3gtfOkHvB423g4RUeOYRdJJQxe+wPNz6fuidvZTt1bJcIlC1vGzGlxrsuSgjlAELFgfRkRrNwdlN7vgJEz5oHD3uoufgyh3fv2lZkEuXROesihbXrUoktMTvsQikXmyDwvRLWTz8t87Amf5b5WArkW7pGTlBch6jjil7sKov8kwPDWKhGrbnHzjBXgKd6htIxqDPdwf8DeMbeG8vActZBBEU5qGWDLt72sY1ixke555COTQQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fxigr1bOkxFzEj27GiwSiz9vuitN/Qk+sG1zVPd6RlFGfTaim2OlFHySSs3/iAUUg8coBzP4lWU0RmrIWGZ3Kq6maV4M4aPadMquNrSDXdHKu5Zh1a5yzMMsLF4Nd6JTItoxtxUynbZi+23X1v8RpYzkP38NafqvYT+9kcnf4BWlmuBByl0a4yoa9mVFj/YlgfZrvVRAQpnFfxt44J0NvlFQPJPMk44W+WOauKSvKEivKYLWw6y5B0Wjwl5LlMVlkrfuij/8Zl7nFCmAvZlWO4jarB707HYsd/xx/I3ydLV5z8KVjwItZHi1LJHC5OIhLnZctjLlwbO/jcxorBgjFw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Jane Malalane <jane.malalane@xxxxxxxxxx>
  • Delivery-date: Thu, 07 Apr 2022 08:45:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.04.2022 10:28, Roger Pau Monné wrote:
> On Fri, Apr 01, 2022 at 11:47:12AM +0100, Jane Malalane wrote:
>> --- a/xen/arch/x86/hvm/vmx/vmcs.c
>> +++ b/xen/arch/x86/hvm/vmx/vmcs.c
>> @@ -2145,6 +2145,12 @@ int __init vmx_vmcs_init(void)
>>  
>>      ret = _vmx_cpu_up(true);
>>  
>> +    /* Check whether hardware supports accelerated xapic and x2apic. */
>> +    assisted_xapic_available = cpu_has_vmx_virtualize_apic_accesses;
>> +    assisted_x2apic_available = cpu_has_vmx_virtualize_x2apic_mode &&
>> +                                (cpu_has_vmx_apic_reg_virt ||
>> +                                 cpu_has_vmx_virtual_intr_delivery);
> 
> Setting assisted_x{2}apic_available should only be done !ret, or else
> we might be reporting those capabilities when VMX is not usable, which
> would be misleading IMO.

Hmm, while I agree with the observation, wouldn't it be better if all
the feature masks were cleared in case of failure, such that other
code using the predicates wouldn't be mislead either? (That would
likely want to be a separate, prereq change.)

Jan




 


Rackspace

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