From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7BC0B1FDA99 for ; Mon, 13 Jan 2025 10:07:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736762852; cv=none; b=oWAy5/CWrf+rQ8QeAJRQHlZRo14mjCKLN8ssAkYs+88YcZT4I6h8LNIZH9ow6EvPPrM6koSoxOh5i/eYsfOoyXdPVSJkOuWnbGZjt+1T3NRWHqpASJOrGjKok0KRsGqt8LeKCxgUdLH3Qhb/Ssbpt3UE9smnJkpf2j+QTD5m2n8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736762852; c=relaxed/simple; bh=uVlzrz3E6vH4q34gF/dYh6m4EUQgd1t+Iyw8+OhmVRk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EK7aqtP7hYWZfssLY0Mj6kn2dSneysB/+yrMlT5gV+LlA/p1F2rc2oMYHrew0ZjQQeqtW0aBxIl1LS4eWar7opsThx99TXDYQPTCQqsauNmLhwpZ6ZVIhenMjiFhf1iFhYYsqLHfruPxEH+b7fR5Z0kQnGRRjfOmeUCgWv3ks6k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=citrix.com; spf=pass smtp.mailfrom=cloud.com; dkim=pass (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b=RF5Vqlhb; arc=none smtp.client-ip=209.85.208.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=citrix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cloud.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="RF5Vqlhb" Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5d3d0205bd5so6207028a12.3 for ; Mon, 13 Jan 2025 02:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1736762849; x=1737367649; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=GQ8hBilHaiJrXdn1x4pZcUJFv7XAxAtU+AZUJTBvXks=; b=RF5VqlhbGNzoSm5Z2lDK2QOo3n49FyuHfnORYXC8b/RToi+ZtICPHZJF7b2s+UKLrk 4nw8I46Jwb9TaB04ph4H7weZ8MZw2e1vbyaw/Nf6Qqgjprap3Ce+FqVrSL18tVBFEKqq 3TiA4SqcbRKQONCMJGGy0kwTDe/pEg73sc57M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736762849; x=1737367649; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=GQ8hBilHaiJrXdn1x4pZcUJFv7XAxAtU+AZUJTBvXks=; b=Z9pDoajcQoSGjVUaKz2AyxXGVpEqZPFca9+VkOGZjwCq/9lwAOloAeC6I5OJdbEvKD eeM+0KJaTwNSK2Or9qCp2x+WaSRqv9niS8lvuXFF9lbk5l/THDU/Oo4/Ix0tXVTWfxZd eoTFtocDXAuHt2zf0AYViZfxas1EPuGlEitEC9LOn4gYX0wEaQwan65f4XSQfmQeGsaf Ly+bAEaG74tRuBJaz/CfM2z43HjKKuCPRkEpenZuKvcqcuViFtgJ2dYcE5juVf+Lgt5c HjfPjqSljDarMF0lPn8gHS411CQm37/bFkTUxHcWYrczTjWKjaBQvMHciU9xQ/mCR0oa R2JA== X-Forwarded-Encrypted: i=1; AJvYcCXwAy6hhN24A3xN1sPfCXWQt6W4S5U1GVDhJYZV5DIzakDSQXclYEvuMHxYJ4dCTkixb4L403Heojlzyxk=@vger.kernel.org X-Gm-Message-State: AOJu0YyxvSebgnDfU/TJUXuMsxnybqU6/d+L449Az62+lK0Ugqii3OEQ JwsNqyIPz5EFsX0lFr5O49b/YkKw4nkIeN3blIc6m68vG227isBEWcQOfUHa71o= X-Gm-Gg: ASbGncsq95IDympwnD06ZKw9Zfv43P8tjNGReqXme03mg42M41PHjtBc54GDKWIa+sX UWSY/2q0nzhVFWOQo4E03LPPFS6/8hEjyS6aJ6V3nqi4huuOL0s5W3wzKEKc/Ekfy/qOXWwfQw1 P3gLTg5FrPaTmiO6w3Pv5y7FGPAFi01VNjXl2X+wRfXx5yYaPp+bn12k/MUSnsqGClzT2xA+7e+ bwb3JAaAv4A1xoiF/Ml6ZUk0AR/cm/9F5DAsGFv9cClIkoDNNkp1UKMSBguWg== X-Google-Smtp-Source: AGHT+IG0+0hZDzdp4js5X9Qv1pwIacDTz8sB7g6BrtwD/4COxyJ2JYTA+74n/qblZAnNxdkdxaGgnw== X-Received: by 2002:a05:6402:50d0:b0:5d6:37e9:8a93 with SMTP id 4fb4d7f45d1cf-5d972dfbbcdmr14241323a12.2.1736762848818; Mon, 13 Jan 2025 02:07:28 -0800 (PST) Received: from localhost ([84.78.159.3]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d99008c2ccsm4765038a12.18.2025.01.13.02.07.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 02:07:28 -0800 (PST) Date: Mon, 13 Jan 2025 11:07:27 +0100 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Jonathan Derrick Cc: Bjorn Helgaas , linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, linux-pci@vger.kernel.org, Nirmal Patel , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas Subject: Re: [PATCH 2/3] vmd: disable MSI remapping bypass under Xen Message-ID: References: <20250110222525.GA318386@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Fri, Jan 10, 2025 at 10:02:00PM -0700, Jonathan Derrick wrote: > Hi Bjorn, > > On 1/10/25 3:25 PM, Bjorn Helgaas wrote: > > Match historical subject line style for prefix and capitalization: > > > > PCI: vmd: Set devices to D0 before enabling PM L1 Substates > > PCI: vmd: Add DID 8086:B06F and 8086:B60B for Intel client SKUs > > PCI: vmd: Fix indentation issue in vmd_shutdown() > > > > On Fri, Jan 10, 2025 at 03:01:49PM +0100, Roger Pau Monne wrote: > > > MSI remapping bypass (directly configuring MSI entries for devices on the VMD > > > bus) won't work under Xen, as Xen is not aware of devices in such bus, and > > > hence cannot configure the entries using the pIRQ interface in the PV case, and > > > in the PVH case traps won't be setup for MSI entries for such devices. > > > > > > Until Xen is aware of devices in the VMD bus prevent the > > > VMD_FEAT_CAN_BYPASS_MSI_REMAP capability from being used when running as any > > > kind of Xen guest. > > > > Wrap to fit in 75 columns. > > > > Can you include a hint about *why* Xen is not aware of devices below > > VMD? That will help to know whether it's a permanent unfixable > > situation or something that could be done eventually. > > > I wasn't aware of the Xen issue with VMD but if I had to guess it's probably > due to the special handling of the downstream device into the dmar table. Nothing to do with DMAR or IOMMUs, it's just that on a Xen system it must be Xen the one that configures the MSI entries, and that requires Xen being aware of the VMD devices and it's MSI or MSI-X capabilities. None of this is currently done, as Xen has no visibility at all of devices behind a VMD bridge because is doesn't even know about VMD bridges, neither about the exposed ECAM-like region on those devices. Thanks, Roger.