[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 01/11] x86/hvm: drop vcpu parameter from vlapic EOI callbacks
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Thu, 1 Apr 2021 11:12:52 +0200
- 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-SenderADCheck; bh=F6xTik7cg0w5yMM+5ODaWnDwMfxiWiQ9Cpu9dj2GIqM=; b=JG99yIG3H4oqFfVSTSJ0zq/BKerlbYEWUgmZvnh4ov9sQUwAcquolhFWUNYkXPH8EbVaNBcEjS9UL0v3UzQZEcRUWemRzd2s+I2dWHMgtWFc4j6zSawt+720RVv+8h7XE48ZxtjGTU+Tgmy6jQLRMdXx0Dc6e9T+y6FSUuiPAnpm1z6XC/PlEqDXkhBpeyqQLvI6JJZJ8DX9cRzHDCZmcRHffYPv6270t7Yv2Rbv2zUmkpTH7I7wddARVfRa35wjuARzSAXQ6NcYn+iF3SIqjgOH59uAAoQWLMMSDdWgZPpEuqFLi589j6jXl13EPEIPUo9qn1ByyQ2jNCmDBBXsbg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ji8WuRR92PjjWwgnmBN0sCIzNklx+i8y3br/G6jNgp0lhFYtledXcWslHxU3BhyZUPOzaQ7buQEVMNkPdyHTiQxgtV41SNkmEIQuv5L7QxBZglmYkVIbuMhu6ROf4vwy3SA15YpnhDy1iEXTwRwLF6EEULarX/B74RLD0omCuT3tDUkeLUZ53UoaKI8sfK1lYwZKohmQZtgCe8k5VDQDv7irGIIRf/bjq2PheCIW7brWJ7X2HRkgPrh+nraH7MBwpwnnTrkK+1g2NKbphl9bQc1Ac1q77qlyzcn4Txq8XF6E8Z10PtdTHmzIzH/GqMi6od4a0jx8YTIELvc0UKnlsw==
- Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, Paul Durrant <pdurrant@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 01 Apr 2021 09:13:11 +0000
- Ironport-hdrordr: A9a23:bdQNVK9yEsJqE4OWDStuk+AOI+orLtY04lQ7vn1ZYxpTb8Ceio SSjO0WvCWVtB89UGwt8OrqBICuWnXZnKQe3aA0HZOPGDbro3GpKoYK1+rf6hntATf3+OIY9Y oIScdDIeb9B1R7ksr2iTPQe+oI+9Wf9bDtuOG29RpQZDt3YKJt5RoRMGimO3BxLTMrObMJUK OG5sxdpyexEE5nDfiGOg==
- Ironport-sdr: yOin2xhUPiG9rcEqeJg85pwO1j5MmEAv+Mw+8mo80L1iH7ZjAX3Bcs2B0dv4XLpD2reC82osrq mZgw5WxOS5SBJ+1BLotH/rgaKtaL18pxaWhGq+eQLjSbMR7wifs+UVMDBQrZSxe0gpsgz2w9TQ S4Hfa4tLuoP29OHLxApRvjyTMwagj0cr3NracDC0tYJcQwdy43X3LC+ypboyUKFlV8AqJMK0qU 3HtXFF2sxAlyQgjV1e+Q1W2Ia6dW4iAfyqouoM5VLoLI9rGOa2BAeCFIszTrVguse8aRzKf8nA xl0=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Mar 31, 2021 at 05:24:24PM +0100, Andrew Cooper wrote:
> On 31/03/2021 17:02, Jan Beulich wrote:
> > On 31.03.2021 12:32, Roger Pau Monne wrote:
> >> EOIs are always executed in guest vCPU context, so there's no reason to
> >> pass a vCPU parameter around as can be fetched from current.
> >>
> >> While there make the vector parameter of both callbacks unsigned int.
> >>
> >> No functional change intended.
> >>
> >> Suggested-by: Paul Durrant <pdurrant@xxxxxxxxxx>
> >> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> >> Reviewed-by: Paul Durrant <paul@xxxxxxx>
> >> ---
> >> Changes since v1:
> >> - New in this version.
> > I'm afraid the situation with viridian_synic_wrmsr() hasn't changed
> > since v2, and hence my previous comment still applies.
>
> Only just spotted that line of reasoning.
>
> Longterm, I do want to remove all the Viridian special cases, and handle
> all of the state via architectural mechanisms (cpu policy for static
> settings, and the existing MSR records for dynamic content).
>
> A consequence of this cleanup is that guest_{rd,wr}msr() will be
> eventually be used to save/restore dynamic state in the migrate stream,
> which is why I've been engineering guest_{rd,wr}msr() to work for MSRs
> in "current || !scheduled" context.
>
> As such, it is important to retain a vcpu pointer because it will not be
> current on the save/restore hypercalls, which execute in control domain
> context.
But you are never going to restore an HV_X64_MSR_EOI MSR, as such
should never be part of the migrate stream in the first place. It
doesn't have a value itself - it's only used as an alternative way to
EOI an interrupt.
I still think the EOIs will always be performed on the affected vCPU
context, but I don't want this discussion the block the current
series, so I'm just going to drop this patch.
Roger.
|