[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-4.17 v2] hvm/apic: repurpose the reporting of the APIC assist options
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Tue, 8 Nov 2022 11:09:49 +0100
- 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=V8dfr0cQ9lxR1JEPd63sydxGV52vKF8HcJSRQfh3Czw=; b=bvaDEYl/5b2TJG9c1jt7mWrVGMWKYxC7x9ETWWsme2LYMpYqbfUYKuJ4AGUdmBoZp2WwX8vECLcA/9zp6iUh9T8c8AgUseQaNqSfS0+iWAOh0dILYqu19ExnRd52Ncp1s4IFuA2PeAAyi7Ezf5MkvD/wrwEUYokYFafNXOc76KGjkk8TJjsLYr6uBJbgPitHai2655K9yYLil6ABCNelIA9BcWiLm9A41wNNW4VqlW0dIowLwdOdsW66JQPRtQoYwkpIlurJta+3wJhTIF4K97/YQopobGFk9J+mGK5tfIEay2sgR+w6iJq3OKllxajIJ6cP0Lhyo+vLON6IxiGH2g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IE0W3aA+uRYLB1uCPh47PmNCW/zTa3TO8op8em8iFY8wjLGO9FBslq8OJIJUHE151kWDg25Y70mAkK7wI8N+u2UbW1P3jzW73kDoXiYLa6d6AJ98lQKyYvGMQfU2Rkf7eueRcklDk+aZDuIyP+shj9RIIburYSlhY/xIzGPpyommfCNK8n56Gr7hT8kHC4HQKG8+IHBFvFQxyKwm6tjM9CqvN839hEU3RmFfKHnMC5UYhiffgJg4A0oFNGGscUmfUlkhILH003rCH7PU4p8cm+gDXv8MxPSiYP8f8sArsV7iC2AFst/WePsoKDtKZSDnXSpTlGl+p2tqqQGcL+HwOg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Henry.Wang@xxxxxxx, Paul Durrant <paul@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Tue, 08 Nov 2022 10:10:13 +0000
- Ironport-data: A9a23:uiNMSaJi86GhAOSXFE+RJZQlxSXFcZb7ZxGr2PjKsXjdYENS1jdTz DcXXTqPP/mCYWrwft8ja4vkp04E6MKGztM2TABlqX01Q3x08seUXt7xwmUcnc+xBpaaEB84t ZV2hv3odp1coqr0/0/1WlTZhSAgk/rOHv+kUrWs1hlZHWdMUD0mhQ9oh9k3i4tphcnRKw6Ws Jb5rta31GWNglaYCUpJrfPdwP9TlK6q4mlB5wRuPakjUGL2zBH5MrpOfcldEFOgKmVkNrbSb /rOyri/4lTY838FYj9yuu+mGqGiaue60Tmm0hK6aYD76vRxjnVaPpIAHOgdcS9qZwChxLid/ jnvWauYEm/FNoWU8AgUvoIx/ytWZcWq85efSZSzXFD6I+QrvBIAzt03ZHzaM7H09c5FUGFK8 6dfBgoTNBubxMS8/ra4a7BV05FLwMnDZOvzu1lG5BSAV7MDfsqGRK/Ho9hFwD03m8ZCW+7EY NYUYiZuaxKGZABTPlAQC9Q1m+LAanvXKmUE7g7K4/RppTSJpOBy+OGF3N79YNuFSN8Thk+Fj mnH4374ElcRM9n3JT+toinw27OXxXyTtIQ6Pq3pq8NphlSv9jIWOhQISX+GmqiosxvrMz5YA wlOksY0loAw/kG2Stj2XzWjvWWJ+BUbXrJ4M+A88hDL9aPS7C6QHG1CRTlEAPQ+vdIybSwn0 BmOhdyBLSNrmK2YTzSa7Lj8hTGvP24TJGwLZy4BRCME5cXupMc4iRenZtVuDq+zyMH0EDfYw jaWoSx4jLIW5eYb2qP+8V3ZjjaEopnSUhVz9gjRRnii7A5yeMiifYPA1LTAxfNJLYLcS0bbu nEBwpKa9LpWUcvLkzGRSuIQGr3v/+yCLDDXnV9oGd8m6iip/HmgO4tX5VmSOXtUDyrNQhexC Ge7hO+bzMY70KeCBUOvX7+MNg==
- Ironport-hdrordr: A9a23:+NObfqFDpMDBOrGVpLqFdJHXdLJyesId70hD6qkvc3Fom52j/f xGws5x6faVslkssb8b6LW90Y27MAvhHP9OkPAs1NKZMDUO11HJEGgP1/qA/9SkIVyEygc/79 YdT0EdMqyWMbESt6+TjmiF+pQbsb+6GciT9JrjJhxWPGVXgs9bnmVE4lHxKDwNeOAKP+tOKH LajfA31waISDAyVICWF3MFV+/Mq5nik4/nWwcPA1oC5BOVhT2lxbbmG1zAty1uGw9n8PMHyy zoggb57qKsv7WSzQLd7Xba69BzlMH6wtVOKcSQgow+KynqiCyveIN9Mofy9QwdkaWK0hIHgd PMqxAvM4Ba7G7QRHi8pV/X1wzpwF8Vmgrf4G7dpUGmjd3yRTo8BcYEr5leaAHl500pu8w5+L 5X3kqC3qAnQS/orWDY3ZzlRhtqnk27rT4JiugIlUFSVoMYdft4sZEfxkVIC50NdRiKpbzPKN MeQv002cwmMG9zNxvizylSKZ2XLz4O9y69Mwc/Upf/6UkUoJh7p3FotvD30E1wtq7VcKM0lt gsAp4Y642mcfVmE56VJN1xNfdfWVa9Ni7kASa1HWnNMp0hFjbkl6PXiY9Fl91CPqZ4h6cPpA ==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Mon, Nov 07, 2022 at 05:58:04PM +0100, Jan Beulich wrote:
> On 04.11.2022 17:18, Roger Pau Monne wrote:
> > --- a/xen/arch/x86/hvm/viridian/viridian.c
> > +++ b/xen/arch/x86/hvm/viridian/viridian.c
> > @@ -197,7 +197,7 @@ void cpuid_viridian_leaves(const struct vcpu *v,
> > uint32_t leaf,
> > res->a = CPUID4A_RELAX_TIMER_INT;
> > if ( viridian_feature_mask(d) & HVMPV_hcall_remote_tlb_flush )
> > res->a |= CPUID4A_HCALL_REMOTE_TLB_FLUSH;
> > - if ( !cpu_has_vmx_apic_reg_virt )
> > + if ( !has_assisted_xapic(d) )
> > res->a |= CPUID4A_MSR_BASED_APIC;
>
> Isn't this too restrictive when considering x2APIC? IOW is there anything
> wrong with leaving this as is?
Using cpu_has_vmx_apic_reg_virt won't be correct, as a domain can have
it disabled now after this change.
When using x2APIC accesses will already be done using MSRs, so the
hint is not useful in that mode.
> > @@ -3432,6 +3436,10 @@ void vmx_vlapic_msr_changed(struct vcpu *v)
> > vmx_set_msr_intercept(v, MSR_X2APIC_PPR, VMX_MSR_R);
> > vmx_set_msr_intercept(v, MSR_X2APIC_TMICT, VMX_MSR_R);
> > vmx_set_msr_intercept(v, MSR_X2APIC_TMCCT, VMX_MSR_R);
> > +
> > + v->arch.hvm.vmx.secondary_exec_control |=
> > + SECONDARY_EXEC_APIC_REGISTER_VIRT;
> > +
> > }
>
> Nit: stray trailing blank line inside the block.
Oh, thanks. I will wait for Andrews feedback then, I think the extra
blank can likely be removed at commit if we agree this is OK.
> Everything else looks plausible to me, but from prior discussion I
> wonder whether the result isn't still going to be too coarse grained
> for Andrew's taste.
Ack, thanks, I think this is the best that we can do given the status
of the release, but would likely need to be quick or else it's gonna
be too late.
Roger.
|