[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/2] xen+tools: Report Interrupt Controller Virtualization capabilities on x86
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Jane Malalane <Jane.Malalane@xxxxxxxxxx>
- Date: Mon, 28 Feb 2022 12:09:55 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=BoN8B1+cDkPXX9B0BoNFj3nAifW7TvSeiefJpZxzqc8=; b=QZMpHv2b5hkHfazuedXE7SW0AD9FIGA4uWNioNg0B29ozKYF0IUOKazT5kBmOH5AkBrgBvExHRiPkmd8v1TwSqDu0MyWvR/goYrVum7VQhqpf6x6tOt/uFoO2fKG7GpDlxXizY0GczYMERZvVhTCK930+oN0ZphfOi5JB0t+LJj8WwrKE42MjIzEufmNVFwnpjRppmgkijJGJGrw8v8XAcFD4gpCu06wnPcI+zVSafywq8BWQA/CX09J9jjN5nm25ONtu/QqL7EcLEOmV+SuvOzv7g9ISh6n8UBE+UIuOE5GwR3A+wO/P9fCzB3xreAzHThKQsutps9/RFvtC1aTCw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BnIHTwM0iA0HvlJHXxNS9uWCzEVjVERBgVTwkC1U8srKWkMb96BQ/qQRrTQa3lSAWb5VfrYBNeQLd3/uvLKuKye8wtYGvzi8xDvaigP9xGw5eQqua1jprgx+IN6Az1e6ZLhSqRNLRr712LCyQpraCWw9ZDsIteDxxxiCcXHGkDPqhCwy0CaM9jmPvd3+dOqyq/q4UteKaCqDnhJYLrTl/y2m3/uRtucBVc5bmy1u23cqTSRMF9AYY58MWQcV2vLlBb4BVKUNx7r/X3OqzrJe4R+TLVyiH55N4YapJpSetJANSsOIhZVs3hVc76lQPPkodC+4nGbZGRcHyfqctX1Kcw==
- Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.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, 28 Feb 2022 12:10:10 +0000
- Ironport-data: A9a23:XLo0NKrwzOiuEL/FPBWTdZbNpydeBmKpZRIvgKrLsJaIsI4StFCzt garIBnTO/3bM2X8KdkkYIi390sHupPRyYNrHgM//y00Qn9Dp5uZCYyVIHmrMnLJJKUvbq7GA +byyDXkBJppJpMJjk71atANlVEliefQAOCU5NfsYkidfyc9IMsaoU8lyrZRbrJA24DjWVvX4 4yq+aUzBXf+s9JKGjNMg068gEsHUMTa4Fv0aXRnOJinFHeH/5UkJMp3yZOZdhMUcaENdgKOf M7RzanRw4/s10xF5uVJMFrMWhZirrb6ZWBig5fNMkSoqkAqSicais7XOBeAAKv+Zvrgc91Zk b1wWZKMpQgBPKzHsrw6dBNkSAJ7PfV03JXXEVGumJnGp6HGWyOEL/RGCUg3OcsT+/ptAHEI/ vsdQNwPRknd3aTsmuv9E7QywJ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gC1/qv/9SEIUPDH4FmpN 5dmsRFeb7N5B1B/LzHCWqDYpcdKbu8gdiVbI7lph8HJ2ALV0gj1XYDNu/yKDwseOAsP+tcKH Po3Lsgm9PWQwVxUi3UPAhmY8Hz4/nw0L72ax8PABAqrCOUiymz1bL8Gx+Emj8DTjJm294ZgC j4uj28wp/mn+Cwyxfa2WOWxY9RgsHdxtxKA9HJotQJKw/rlh2jaO1aKv6/VXEO0aOSAWQR4Z 3xSiQbToNOArTqDyeISC7WqkzdOfAVmibfIBGj8CPeSIfCNU0H4oJ69Pxkm13imhAdVZhHod N29nPcuJxNARzamiPho9DOShFxj0Kx5WEviOgJkhVkIMAjgRBq3PkiFW5uYd499RjBmcga+S hVfbXhzecTdUnfY2HSv2FpztDpVnMvHg2eSkxHvsCOyTBZkH1w0kNdnaUk7zo93YN4T4MB6/ XPM6xumr0LRsgKbbhlDONERcesEGTCTR/FLWrXK1X6E6MMPW7LtvfMkf8IzfDvfIZNwIo5mZ zHXl8dvWkue1j2AcnLx5FP+gClehTKYd0s8LAo23FUgMyOeFOwC1zydLkHqbrTn8ki
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYJO06JWynylsFtkyl8WR8WaDosKyixjKAgAGyPACABChhAIAATYQA
- Thread-topic: [PATCH v3 1/2] xen+tools: Report Interrupt Controller Virtualization capabilities on x86
On 28/02/2022 07:32, 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 25.02.2022 17:02, Jane Malalane wrote:
>> On 24/02/2022 14:08, Jan Beulich wrote:
>>> On 18.02.2022 18:29, 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.
>>>>
>>>> Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>>>> Signed-off-by: Jane Malalane <jane.malalane@xxxxxxxxxx>
>>>> ---
>>>> v3:
>>>> * Define XEN_SYSCTL_PHYSCAP_ARCH_MAX for ABI checking and actually
>>>> set arch_capbilities, via a call to c_bitmap_to_ocaml_list()
>>>> * Have assisted_x2apic_available only depend on
>>>> cpu_has_vmx_virtualize_x2apic_mode
>>>
>>> I understand this was the result from previous discussion, but this
>>> needs justifying in the description. Not the least because it differs
>>> from when XEN_HVM_CPUID_X2APIC_VIRT would be set as well as from what
>>> vmx_vlapic_msr_changed() does. The difference between those two is
>>> probably intended (judging from a comment there), but the further
>>> difference to what you add isn't obvious.
>>
>> Okay, I will make that explicit.
>>
>>> Which raises another thought: If that hypervisor leaf was part of the
>>> HVM feature set, the tool stack could be able to obtain the wanted
>>> information without altering sysctl (assuming the conditions to set
>>> the respective bits were the same). And I would view it as generally
>>> reasonable for there to be a way for tool stacks to know what
>>> hypervisor leaves guests are going to get to see (at the maximum and
>>> by default).
>>
>> Like the "cpuid" xtf test allows us to?
>
> I don't think I understand the question. That xtf test is concerned
> about checking the CPUID output it gets to see itself. It doesn't care
> about what other guests might get to see, nor the maximum and default.
>
>> Makes sense to me. I'm happy to take that up after.
>
> "After" what?
So I meant to say that I could add the Xen CPUID leaves (40000x...) to
the policy so that toolstacks could know what hypervisor leaves guests
are going to see - in a future patch, as this wouldn't just expose
XEN_HVM_CPUID_APIC_ACCESS_VIRT and XEN_HVM_CPUID_X2APIC_VIRT
(0x40000x04) but other features too.
But, at the same time, w.r.t. this patch in particular, using
XEN_HVM_CPUID_APIC_ACCESS_VIRT and XEN_HVM_CPUID_X2APIC_VIRT to detect
assisted APIC gives us less flexibility to add more fine grained
controls in the future.
Thanks,
Jane.
|