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

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


  • To: Jane Malalane <Jane.Malalane@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 7 Mar 2022 13:31:24 +0100
  • 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=OX8+mQGx/S0OPfBxV04yPiNt/DoaGgGSTLZ/OoAajj4=; b=KL0qWW+QlUsuLJZrN5dq7WBj8Xf2QglDzu/lNP0tagFy/fhY0f0EVhu9UJQMfqAEBJ1qVUkpHEJDdKloEpDHRvk9Hi6lhrmBqhORbECM6LJu8zHiMiR8mNAq0NUBftGxp3msu25nMFcddSDuPmx7x2e3FDuGN4w8RzY0ZLLx5ASS79iksm9nCYhYyqfFfiCqCqBU7RRs5pYFFfUZb/UUi+mgftJLxcohH86lRGUCVHZUnVnYvfH8TdPJCYD7dy6uC1ETppoTzV+IkTcLBQFjVEM6ep0e3pQ3MsupmBWmKlAwcemzmf9iWDvCgnetPUN3wkRJYCAdftnL3qv+NdxIWg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D2ORbTD25SHIKuT/RB9wO4GdXCq/p9tSipSO06hpxcRPiIKTdPmYDH6jGIiEEqOASxnaFTgZcGHyGRuAN/9XGAdlHc2Ee1IZv6Cd2l9gE9YGS9EjG1qLQwCPSLTN0tpddFrWBWRFSR9J3VSVAh3awJWN4VvUXfSIvOn7LADjnIDwEgiMn/zljRJxn5LsQlKQdNmVW5F/3Yyj9D05t7wac2tg2QzGNrlp3GSt5HkEEVmORE1X4fPcaRO0wmBwX32f2Wx6Jy/+Uw3GdlG1b/kHlP9H5Hq3CJDSAW6JDl0+66/pzPtFBldtDW+OpLgecbl/UhqEtnVVBWR/neCWbpTSLA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: 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>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 07 Mar 2022 12:31:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.03.2022 13:17, Jane Malalane wrote:
> On 04/03/2022 08:17, Jan Beulich wrote:
>> [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments 
>> unless you have verified the sender and know the content is safe.
>>
>> On 03.03.2022 17:37, Jane Malalane wrote:
>>> On 03/03/2022 11:37, Jan Beulich wrote:
>>>> On 02.03.2022 16:00, Jane Malalane wrote:
>>>>> Add XEN_SYSCTL_PHYSCAP_ARCH_ASSISTED_xapic and
>>>>> XEN_SYSCTL_PHYSCAP_ARCH_ASSISTED_x2apic to report accelerated xapic
>>>>> and x2apic, on x86 hardware.
>>>>> No such features are currently implemented on AMD hardware.
>>>>>
>>>>> For that purpose, also add an arch-specific "capabilities" parameter
>>>>> to struct xen_sysctl_physinfo.
>>>>>
>>>>> Note that this interface is intended to be compatible with AMD so that
>>>>> AVIC support can be introduced in a future patch. Unlike Intel that
>>>>> has multiple controls for APIC Virtualization, AMD has one global
>>>>> 'AVIC Enable' control bit, so fine-graining of APIC virtualization
>>>>> control cannot be done on a common interface. Therefore, for xAPIC HW
>>>>> assisted virtualization support to be reported, HW must support
>>>>> virtualize_apic_accesses as well as apic_reg_virt.
>>>>
>>>> Okay, here you now describe _what_ is being implemented, but I'm
>>>> afraid it still lacks justification (beyond making this re-usable for
>>>> AVIC, which imo can only be a secondary goal). You actually say ...
> Is the following any better...?
> 
> "Add XEN_SYSCTL_PHYSCAP_ARCH_ASSISTED_xapic and
> XEN_SYSCTL_PHYSCAP_ARCH_ASSISTED_x2apic to report accelerated xapic
> and x2apic, on x86 hardware.
> No such features are currently implemented on AMD hardware.
> 
> HW assisted xAPIC virtualization will be reported if HW, at the minimum, 
>   supports virtualize_apic_accesses as this feature alone means that an 
> access to the APIC page will cause an APIC-access VM exit. An 
> APIC-access VM exit provides a VMM with information about the access 
> causing the VM exit, unlike a regular EPT fault, thus simplifying some 
> internal handling.
> 
> HW assisted x2APIC virtualization will be reported if HW supports 
> virtualize_x2apic_mode and, at least, either apic_reg_virt or 
> virtual_intr_delivery. This is due to apic_reg_virt and 
> virtual_intr_delivery preventing a VM exit from occuring or at least 
> replacing a regular EPT fault VM-exit with an APIC-access VM-exit on 
> read and write APIC accesses, respectively.
> This also means that sysctl follows the conditionals in 
> vmx_vlapic_msr_changed().
> 
> For that purpose, also add an arch-specific "capabilities" parameter
> to struct xen_sysctl_physinfo.
> 
> Note that this interface is intended to be compatible with AMD so that
> AVIC support can be introduced in a future patch. Unlike Intel that
> has multiple controls for APIC Virtualization, AMD has one global
> 'AVIC Enable' control bit, so fine-graining of APIC virtualization
> control cannot be done on a common interface."

Yes, this looks quite a bit better, thanks. Assuming, of course, it's
in sync with the code in v5 ...

Jan




 


Rackspace

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