qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ani Sinha <ani@anisinha.ca>
To: "QEMU Developers" <qemu-devel@nongnu.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Julia Suvorova <jusual@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH v2] i440fx/acpi: disable hotplug of cold plugged bridges regarldless of hotplug switch
Date: Fri, 4 Sep 2020 19:34:53 +0530	[thread overview]
Message-ID: <CAARzgwxR3yhyrqxcM+WVhHkSTmhsw9xVWLqupb4FModkzXQSzg@mail.gmail.com> (raw)
In-Reply-To: <CAARzgwwwbxqwxdni4rANsDF-f5HytcdM9NC9R8X7X0bqJSeVPw@mail.gmail.com>

On Fri, Sep 4, 2020 at 7:09 PM Ani Sinha <ani@anisinha.ca> wrote:
>
> On Sep 4, 2020, 18:59 +0530, Philippe Mathieu-Daudé <philmd@redhat.com>, wrote:
>
> Hi Ani,
>
>
> On 9/4/20 2:44 PM, Ani Sinha wrote:
>
> Cold plugged bridges should not be hot unpluggable, even when their hotplug
>
> property (acpi-pci-hotplug-with-bridge-support) is turned off. However, with
>
> the current implementaton, windows would try to hot-unplug a pci bridge when
>
> it's hotplug switch is off. This is regardless of whether there are devices
>
> attached to the bridge. When devices are attached to the bridge, the bridge
>
> is ultimately not hot-unpluggable. We have a demo video here:
>
> https://youtu.be/pME2sjyQweo
>
>
> In this fix, we identify a cold plugged bridge and for cold plugged bridges,
>
> we do not add the appropriate amls and acpi methods that are used by the OS
>
> to identify a hot-unpluggable pci device. After this change, Windows does not
>
> show an option to eject the PCI bridge. A demo video is here:
>
> https://youtu.be/kbgej5B9Hgs
>
>
> While at it, I have also updated a stale comment.
>
>
> This change is tested with a Windows 2012R2 guest image and Windows 2019 server
>
> guest image running on Ubuntu 18.04 host. This change is based off of upstream
>
> qemu master branch tag v5.1.0.
>
>
> Can you add a test reproducer?
>
>
> Looking at tests/qtest/virtio-rng-test.c it shouldn't be that
>
> hard / time consuming.

I think this test is hotplugging a bridge through the qmp command.
This test does not apply here as we are talking about cold plugged
bridges and making sure cold plugged bridges are not ejectable.
If you have a test infra to test such a case, please let me know.

>
> I can add a unit test. If you look at the disassembled DSDT table, you can easily see that it’s adding the EJ0 method for the slot in which the bridge is attached.

The unit test will capture this change perfectly. It will compare the
generated AML against expected AML and fail if they don't match.


      reply	other threads:[~2020-09-04 14:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04 12:44 [PATCH v2] i440fx/acpi: disable hotplug of cold plugged bridges regarldless of hotplug switch Ani Sinha
2020-09-04 13:29 ` Philippe Mathieu-Daudé
2020-09-04 13:39   ` Ani Sinha
2020-09-04 14:04     ` Ani Sinha [this message]

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=CAARzgwxR3yhyrqxcM+WVhHkSTmhsw9xVWLqupb4FModkzXQSzg@mail.gmail.com \
    --to=ani@anisinha.ca \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=jusual@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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;
as well as URLs for NNTP newsgroup(s).