Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Nirmal Patel <nirmal.patel@linux.intel.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: nirmal.patel@intel.com, linux-pci@vger.kernel.org,
	bhelgaas@google.com, kwilczynski@kernel.org, mani@kernel.org,
	robh@kernel.org, lpieralisi@kernel.org,
	Andy Shevchenko <andriy.shevchenko@intel.com>
Subject: Re: [PATCH] PCI: vmd: Only assign _OSC features in bare metal OS.
Date: Mon, 6 Jul 2026 07:56:08 -0700	[thread overview]
Message-ID: <20260706075433.000075b6@linux.intel.com> (raw)
In-Reply-To: <20260630171003.GA143656@bhelgaas>

On Tue, 30 Jun 2026 12:10:03 -0500
Bjorn Helgaas <helgaas@kernel.org> wrote:

> On Mon, Jun 29, 2026 at 05:02:43PM +0000, Nirmal Patel wrote:
> > From: Nirmal Patel <nirmal.patel@intel.com>
> > 
> > Copy valid _OSC flags from root bridge only when OS can provide
> > correct values. In virtual machine, all of the control features are
> > disabled as hypervisor will not passthrough root bridge information
> > to VM.
> > 
> > Signed-off-by: Nirmal Patel <nirmal.patel@linux.intel.com>
> > Reviewed-by:  Andy Shevchenko <andriy.shevchenko@intel.com>
> > ---
> >  drivers/pci/controller/vmd.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/pci/controller/vmd.c
> > b/drivers/pci/controller/vmd.c index d4ae250d4bc6..f9e38f2f926a
> > 100644 --- a/drivers/pci/controller/vmd.c
> > +++ b/drivers/pci/controller/vmd.c
> > @@ -910,8 +910,10 @@ static int vmd_enable_domain(struct vmd_dev
> > *vmd, unsigned long features) return -ENODEV;
> >  	}
> >  
> > -
> > vmd_copy_host_bridge_flags(pci_find_host_bridge(vmd->dev->bus),
> > -
> > to_pci_host_bridge(vmd->bus->bridge));
> > +	/* Don't copy _OSC control flags in VM, it disables
> > features.*/
> > +	if (!offset[0] || !offset[1])  
> 
> Drop period in subject line.
> 
> Replace period in comment with space.
> 
> Kind of a weird way to check for VM.  I see it's already done this way
> earlier in the function, but maybe it's time to add a descriptive
> boolean based on offset[0] and offset[1].

Thanks for the response, I will add a boolean implementation.
> 
> > +
> > vmd_copy_host_bridge_flags(pci_find_host_bridge(vmd->dev->bus),
> > +
> > to_pci_host_bridge(vmd->bus->bridge)); 
> >  	vmd_attach_resources(vmd);
> >  	if (vmd->irq_domain)
> > -- 
> > 2.43.0
> >   


  reply	other threads:[~2026-07-06 14:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29 17:02 [PATCH] PCI: vmd: Only assign _OSC features in bare metal OS Nirmal Patel
2026-06-29 17:13 ` sashiko-bot
2026-06-29 17:18 ` Andy Shevchenko
2026-06-30 17:10 ` Bjorn Helgaas
2026-07-06 14:56   ` Nirmal Patel [this message]
2026-07-06 16:15   ` Manivannan Sadhasivam
  -- strict thread matches above, loose matches on Subject: below --
2026-06-29 17:01 Nirmal Patel
2026-06-29 17:11 ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260706075433.000075b6@linux.intel.com \
    --to=nirmal.patel@linux.intel.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=nirmal.patel@intel.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox