qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel@redhat.com>
To: Andrew Jones <drjones@redhat.com>
Cc: qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	laine@redhat.com, "Michael S. Tsirkin" <mst@redhat.com>,
	David Gibson <david@gibson.dropbear.id.au>,
	Thomas Huth <thuth@redhat.com>,
	Laurent Vivier <lvivier@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] hw/pci: disable pci-bridge's shpc by default
Date: Tue, 22 Nov 2016 19:26:32 +0200	[thread overview]
Message-ID: <165c06da-ae03-f855-19c8-a99a8aa13dba@redhat.com> (raw)
In-Reply-To: <20161118155201.uifhhouuidl2bsha@kamzik.brq.redhat.com>

On 11/18/2016 05:52 PM, Andrew Jones wrote:
> On Wed, Nov 16, 2016 at 07:05:25PM +0200, Marcel Apfelbaum wrote:
>> On 11/16/2016 06:44 PM, Andrew Jones wrote:
>>> On Sat, Nov 05, 2016 at 06:46:34PM +0200, Marcel Apfelbaum wrote:
>>>> On 11/03/2016 09:40 PM, Michael S. Tsirkin wrote:
>>>>> On Thu, Nov 03, 2016 at 01:05:44PM +0200, Marcel Apfelbaum wrote:
>>>>>> On 11/03/2016 06:18 AM, Michael S. Tsirkin wrote:
>>>>>>> On Wed, Nov 02, 2016 at 05:16:42PM +0200, Marcel Apfelbaum wrote:
>>>>>>>> The shpc component is optional while  ACPI hotplug is used
>>>>>>>> for hot-plugging PCI devices into a PCI-PCI bridge.
>>>>>>>> Disabling the shpc by default will make slot 0 usable at boot time
>>>>>>
>>>>>> Hi Michael
>>>>>>
>>>>>>>
>>>>>>> at the cost of breaking all hotplug for all non-acpi users.
>>>>>>>
>>>>>>
>>>>>> Do we have a non-acpi user that is able to use the shpc component as-is today?
>>>>>
>>>>> power and some arm systems I guess?
>>>>>
>>>>
>>>> Adding Andrew , maybe he can give us an answer.
>>>
>>> Not really :-) My lack of PCI knowledge makes that difficult. I'd be happy
>>> to help with an experiment though. Can you give me command line arguments,
>>> qmp commands, etc. that I should use to try it out? I imagine I should
>>> just boot an ARM guest using DT (instead of ACPI) and then attempt to
>>> hotplug a PCI device. I'm not sure, however, what, if any, special
>>> configuration I need in order to ensure I'm testing what you're
>>> interested in.
>>>
>>
>> Hi Drew,
>>
>>
>> Just run QEMU with '-device pci-bridge,chassis_nr=1,id=bridge1 -monitor stdio'
>> with an ARM guest using DT and wait until the guest finish booting.
>>
>> Then run at hmp:
>> device_add virtio-net-pci,bus=bridge1,id=net2
>>
>> Next run lspci in the guest to see the new device.
>
> Thanks for the instructions Marcel. Here's the results
>
>  $QEMU -machine virt,accel=$ACCEL -cpu $CPU -nographic -m 4096 -smp 8 \
>        -bios /usr/share/AAVMF/AAVMF_CODE.fd \
>        -device pci-bridge,chassis_nr=1,id=bridge1 \
>        -drive file=$FEDORA_IMG,if=none,id=dr0,format=qcow2 \
>        -device virtio-blk-pci,bus=bridge1,addr=01,drive=dr0,id=disk0 \
>        -netdev user,id=hostnet0 \
>        -device virtio-net-pci,bus=bridge1,addr=02,netdev=hostnet0,id=net0
>
>  # lspci
>  00:00.0 Host bridge: Red Hat, Inc. Device 0008
>  00:01.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge
>  01:01.0 SCSI storage controller: Red Hat, Inc Virtio block device
>  01:02.0 Ethernet controller: Red Hat, Inc Virtio network device
>
>  (qemu) device_add virtio-net-pci,bus=bridge1,id=net2
>  Unsupported PCI slot 0 for standard hotplug controller. Valid slots are
>  between 1 and 31.
>
> (Tried again giving addr=03)
>
>  (qemu) device_add virtio-net-pci,bus=bridge1,id=net2,addr=03
>
> (Seemed to work, but...)
>
>  # lspci
>  00:00.0 Host bridge: Red Hat, Inc. Device 0008
>  00:01.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge
>  01:01.0 SCSI storage controller: Red Hat, Inc Virtio block device
>  01:02.0 Ethernet controller: Red Hat, Inc Virtio network device
>
> (Doesn't show up in lscpi. So I guess it doesn't work)
>

Hi Drew,
Thanks for confirming that it doesn't work.

Michael asked if we can check the same for powerpc before
disabling the shpc by default.

Adding David, Thomas and Laurrent, maybe they have time
to check it for powerpc.

Your help would be very much appreciated.

Thanks,
Marcel

>>
>>
>> BTW, will an ARM guest run 'fast' enough to be usable on a x86 machine?
>> If yes, any pointers on how to create such a guest?
>
> You can run AArch64 guests on x86 machines. It's not super fast though...
> Certainly I wouldn't want to create my guest image using TCG. So, assuming
> you acquire an image somewhere (or create it on a real machine), then you
> can use the above command line, just change
>
> ACCEL=kvm CPU=host to ACCEL=tcg CPU=cortex-a57
>
> Thanks,
> drew
>

  parent reply	other threads:[~2016-11-22 17:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02 15:16 [Qemu-devel] [PATCH] hw/pci: disable pci-bridge's shpc by default Marcel Apfelbaum
2016-11-02 16:01 ` Laine Stump
2016-11-03 11:08   ` Marcel Apfelbaum
2016-11-03 15:24     ` Laine Stump
2016-11-03 16:43       ` Marcel Apfelbaum
2016-11-03 19:09         ` Eduardo Habkost
2016-11-03  4:18 ` Michael S. Tsirkin
2016-11-03 11:05   ` Marcel Apfelbaum
2016-11-03 19:40     ` Michael S. Tsirkin
2016-11-05 16:46       ` Marcel Apfelbaum
2016-11-16 16:44         ` Andrew Jones
2016-11-16 17:05           ` Marcel Apfelbaum
2016-11-18 15:52             ` Andrew Jones
2016-11-18 15:55               ` Michael S. Tsirkin
2016-11-22 17:26               ` Marcel Apfelbaum [this message]
2016-11-22 20:25                 ` Laurent Vivier
2016-11-23 11:08                   ` Marcel Apfelbaum
2016-11-24  4:06                     ` David Gibson
2016-11-24  9:39                       ` Marcel Apfelbaum
2016-11-25  4:14                         ` David Gibson
2016-11-22 17:47               ` Michael S. Tsirkin
2017-01-10  3:48 ` Michael S. Tsirkin

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=165c06da-ae03-f855-19c8-a99a8aa13dba@redhat.com \
    --to=marcel@redhat.com \
    --cc=armbru@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=drjones@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=laine@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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).