From: Paul Mackerras Date: Fri, 31 May 2019 06:36:52 +0000 Subject: Re: [PATCH] KVM: PPC: Book3S HV: XIVE: fix page offset when clearing ESB pages Message-Id: <20190531063652.GF26651@blackberry> List-Id: References: <20190528211324.18656-1-clg@kaod.org> In-Reply-To: <20190528211324.18656-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: =?iso-8859-1?Q?C=E9dric?= Le Goater Cc: Alexey Kardashevskiy , David Gibson , Greg Kurz , kvm@vger.kernel.org, kvm-ppc@vger.kernel.org On Tue, May 28, 2019 at 11:13:24PM +0200, C=E9dric Le Goater wrote: > Under XIVE, the ESB pages of an interrupt are used for interrupt > management (EOI) and triggering. They are made available to guests > through a mapping of the XIVE KVM device. >=20 > When a device is passed-through, the passthru_irq helpers, > kvmppc_xive_set_mapped() and kvmppc_xive_clr_mapped(), clear the ESB > pages of the guest IRQ number being mapped and let the VM fault > handler repopulate with the correct page. >=20 > The ESB pages are mapped at offset 4 (KVM_XIVE_ESB_PAGE_OFFSET) in the > KVM device mapping. Unfortunately, this offset was not taken into > account when clearing the pages. This lead to issues with the > passthrough devices for which the interrupts were not functional under > some guest configuration (tg3 and single CPU) or in any configuration > (e1000e adapter). >=20 > Signed-off-by: C=E9dric Le Goater Thanks, patch applied to my kvm-ppc-fixes branch. Paul.