Re: [PATCH 01/10] qemu: auto assign pci address for shared memory device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 07/08/2015 05:37 PM, Martin Kletzander wrote:
On Fri, Jul 03, 2015 at 02:39:49PM +0200, Martin Kletzander wrote:
On Wed, Jun 17, 2015 at 11:56:12AM +0800, Luyao Huang wrote:
Shared memory device is base on PCI address, even we do not
pass the pci address to qemu, qemu will auto assign a pci
address for it.

Signed-off-by: Luyao Huang <lhuang@xxxxxxxxxx>
---
src/qemu/qemu_command.c                        | 11 +++++++++++
tests/qemuxml2argvdata/qemuxml2argv-shmem.args | 16 ++++++++--------
2 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 89f775d..5ac43d8 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2562,6 +2562,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
                                              flags) < 0)
           goto error;
   }
+

Spurious change, ACK without that.


I also squashed in the following to make sure it works fine (which it
does):


Good idea ! Thanks a lot for your help.

diff --git i/tests/qemuxml2argvdata/qemuxml2argv-shmem.args w/tests/qemuxml2argvdata/qemuxml2argv-shmem.args
index 4c383db6985f..08cd5ac4588e 100644
--- i/tests/qemuxml2argvdata/qemuxml2argv-shmem.args
+++ w/tests/qemuxml2argvdata/qemuxml2argv-shmem.args
@@ -2,8 +2,8 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefaults \
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \
-device ivshmem,shm=shmem0,id=shmem0,bus=pci.0,addr=0x3 \
--device ivshmem,size=128m,shm=shmem1,id=shmem1,bus=pci.0,addr=0x4 \
--device ivshmem,size=256m,shm=shmem2,id=shmem2,bus=pci.0,addr=0x5 \
+-device ivshmem,size=128m,shm=shmem1,id=shmem1,bus=pci.0,addr=0x5 \
+-device ivshmem,size=256m,shm=shmem2,id=shmem2,bus=pci.0,addr=0x4 \
-device ivshmem,size=512m,chardev=charshmem3,id=shmem3,bus=pci.0,addr=0x6 \
-chardev socket,id=charshmem3,path=/var/lib/libvirt/shmem-shmem3-sock \
-device ivshmem,size=1024m,chardev=charshmem4,id=shmem4,bus=pci.0,addr=0x7 \ diff --git i/tests/qemuxml2argvdata/qemuxml2argv-shmem.xml w/tests/qemuxml2argvdata/qemuxml2argv-shmem.xml
index fd79c89c1a43..d4b38f91b050 100644
--- i/tests/qemuxml2argvdata/qemuxml2argv-shmem.xml
+++ w/tests/qemuxml2argvdata/qemuxml2argv-shmem.xml
@@ -23,6 +23,7 @@
    </shmem>
    <shmem name='shmem2'>
      <size unit='M'>256</size>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </shmem>
    <shmem name='shmem3'>
      <size unit='M'>512</size>



Luyao

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]