From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (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 4F32E235C0E for ; Mon, 13 Jan 2025 10:13:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736763233; cv=none; b=WUj3tNMv9jsLIO40kCcGf6waEy5eh0tXg7G5EsK6UwXaZPAXIbtRjeizmJNaXkfgJXbgC9oiDeuQekiMMz7LAw33/F7IS6N+a6Kl09HkmOAZdE5BqLWUfBAObQur7gJR62vnAkHuCoG646GJTfwCpjz0vRIAIOj1/tLWHvb4EI0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736763233; c=relaxed/simple; bh=AdlptR2FBBgQjQhoMZnNp6MMpuoIH+5snT8wktosXuM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WWAoXvuwkgwJG1itUwO4fkTIMOhZdyFZe3LTe59wgWIcnQ9j2oxrQPM2hskQqnlkeL5BMhPChI+mRDqLarsPQhw+qpnOKRE5q0ODh4gub2SYTmMnFrkJYqVHbcQ61UmOrYsG21wXR6jvA/Fq/j1nhiN0b+86UL2rmK4OB84DjRQ= 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=Cxu3vhve; arc=none smtp.client-ip=209.85.208.50 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="Cxu3vhve" Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-5d414b8af7bso7368685a12.0 for ; Mon, 13 Jan 2025 02:13:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1736763230; x=1737368030; 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=D8lTHlEAyEJii3/Mpwsxjw0Vi02XDn0bU6dFc3Qzs4M=; b=Cxu3vhveRQO+8ZDw39YVTqViERi2e1I8K2ILUIUjhmhCMLjinrrWiE/JJJDQT1EwuK j9YnEHQUi1ekLLQDZoBeP+YWxzhf3ZCxhrusaazky0K21KlJ41Oq3k2wH7zuA2kkuRBm kvydzwHRcVIz1m0NbU5+YxwszEtqKduGGqCYc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736763230; x=1737368030; 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=D8lTHlEAyEJii3/Mpwsxjw0Vi02XDn0bU6dFc3Qzs4M=; b=FAEQgoQIn0ah/ZjXL29R5pmhaUnrPugxfoKsSIv5SFjwXSjqrtQGpEkNH5tNFzQ8+1 Co/8UjWhBwpcJ3UeMdkhBuinvfL4/9q87TUCQUeZVE4Zzys+daRAPkAfWba4TpC6oCbT ekpYM254E1R0Ac4zWH2ObqRZ7FwSh3ZOLStG2+6y/C5HoQqL2hHMcae+8jw1OP+xwubE 5cEFuc/3nO1dMpy5vqnZn0uz1fE0qQuuKaiSWQI86+3arfN6Qoxhwoy9/iaLxWzRixah hxoZL2ZXzaMIeyn+6k0OJvpqrSYVvB+EyCAucGQTfYy/sd4W5q7Yt+/SlpJuK+3SS4cE bqag== X-Forwarded-Encrypted: i=1; AJvYcCX2ZtLebs3/rBQJK5UnhpKpn0xYqHk7Spxy2ObRYIXgvrn5oW+nkZV5TgWrjNKal85L42cO7KXF0+UA/hc=@vger.kernel.org X-Gm-Message-State: AOJu0YzkW+0xTed5nPCUlSW584CwtCY1gFVhW8xWsVRhu5I5c9CABOkF yP1k7OxH4mMsKeMODHtue03H7AVVe454rh2qmp8+D5vMNh2lYpYu5RkDRxCJ+Fk= X-Gm-Gg: ASbGncsD9AUnMPxgn5Ul/+81uyeBAyOqUeDtSSserHvTnKeDBEO3ESvThqXh5DVTGMP 1NVx1weC+NVP4pU2aUR+6tSgGKG5yJ5Cs8Fa8x5lvhOq1dm7mNrIt+9xQUTXkKPy5RYQPberljq VX6PCqXaBDKpdbx/JMVy6xIOhrvEgBJc40vxo7PyzfhxqVqEvbdcJxZDVX9WMVlgjFM27ZspVfa eh6ceuGwolyU//IdGdemlxecvWxsz+iO19goL/1MPj1QOkLHkK/nhl9RFQReg== X-Google-Smtp-Source: AGHT+IHQkfbOK7qojKw+VPoB34F3v7yvjSb9eEpH3DVYUTt7SdxJWey3SgTqrE3crVT85gfimKgYaQ== X-Received: by 2002:a17:907:1998:b0:ab2:c9b8:aaa7 with SMTP id a640c23a62f3a-ab2c9b8ad19mr1517175666b.44.1736763228224; Mon, 13 Jan 2025 02:13:48 -0800 (PST) Received: from localhost ([84.78.159.3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab2c95b20b1sm476929666b.157.2025.01.13.02.13.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 02:13:47 -0800 (PST) Date: Mon, 13 Jan 2025 11:13:46 +0100 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Jan Beulich Cc: Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org Subject: Re: [PATCH 1/3] xen/pci: do not register devices outside of PCI segment scope Message-ID: References: <20250110140152.27624-1-roger.pau@citrix.com> <20250110140152.27624-2-roger.pau@citrix.com> <28ad828a-0a9a-4637-bf55-59de2f731537@suse.com> 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: <28ad828a-0a9a-4637-bf55-59de2f731537@suse.com> On Mon, Jan 13, 2025 at 08:17:23AM +0100, Jan Beulich wrote: > On 10.01.2025 15:01, Roger Pau Monne wrote: > > The PCI segment value is limited to 16 bits, however there are buses like VMD > > that fake being part of the PCI topology by adding segment with a number > > outside the scope of the PCI firmware specification range (>= 0x10000). The > > MCFG ACPI Table "PCI Segment Group Number" field is defined as having a 16 bit > > width. > > > > Attempting to register or manage those devices with Xen would result in errors > > at best, or overlaps with existing devices living on the truncated equivalent > > segment values. > > > > Skip notifying Xen about those devices. > > Hmm, is simply omitting the notification really all it takes? How would Xen > manage MSI / MSI-X, for example, without knowing of the device? As per the > BoF on the summit in Prague(?), I continue to think we need partial driver > logic in Xen for VMD ... The basic mode of operation of devices behind a VMD bridge is to reference the interrupts of the bridge device in its MSI(-X) entries, so the VMD bridge acts as a de-multiplexer and forwards the interrupts to the device behind the VMD bridge. See vmd_alloc_irqs() (and calling context) in the VMD driver for a reference about how this is setup and operates. Note also that devices behind a VMD bridge operate using a different MSI domain, that uses a custom irq_compose_msi_msg hook. Thanks, Roger.