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

Re: [libvirt] [RFC PATCH 4/4] powerpc: Remove incompatible command line options from qemu startup



On Mon, 10 Oct 2011 11:02:08 +0100
"Daniel P. Berrange" <berrange redhat com> wrote:

> On Sat, Oct 08, 2011 at 12:19:11AM +0530, Prerna Saxena wrote:
> > This patch is a hack at the moment and would need code refactoring to
> > split-out the defaults for x86 and powerpc.  Libvirt chooses a set of
> > default options such as disk controller, network specific options, etc
> > which are suitable for a x86 host.  These defaults are arch specific
> > and hence libvirt needs a runtime switch to setup defaults based on
> > host architecture.  Libvirt should have this routine split per-arch at
> > the right level with minimal code duplication.
> > 
> > ---
> >  src/qemu/qemu_command.c |   30 +++++++++++++++++++++++++++++-
> >  1 files changed, 29 insertions(+), 1 deletions(-)
> > 
> > diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> > index 0adc56a..3040f6a 100644
> > --- a/src/qemu/qemu_command.c
> > +++ b/src/qemu/qemu_command.c
> > 
> > ...[snip]... 
> 
> I have a rough idea of why you need most of these changes, but to just
> clarify things, could you show us the following data from a PPC QEMU
> guest after you have this patch applied.
> 
>  - XML configuration file

<domain type='kvm'>
    <name>test-1</name>
    <memory>1048576</memory>
    <memoryBacking>
       <hugepages/>
    </memoryBacking>
    <vcpu>2</vcpu>
    <os>
       <type arch='ppc64' machine='pseries'>hvm</type>
    </os>
    <features>
       <acpi/>
    </features>
    <clock offset='utc'/>
    <devices>
       <emulator>qemu-system-ppc64</emulator>
       <disk type='file' device='disk' >
         <driver name='qemu' type='raw'/>
         <source file='/TEST.img'/>
         <target dev='sda' bus='scsi'/>
       </disk>
       <serial type='pty'>
           <target port='0'/>
       </serial>
       <console type='pty'>
           <target type='serial' port='0'/>
       </console>
       <graphics type='vnc' port='-1' autoport='yes' listen='www.xxx.yyy.zzz'/>
      </devices>
</domain>


>  - The QEMU ARGV from /var/log/libvirt/qemu/$GUESTNAME.log

qemu-system-ppc64 -S -M pseries -enable-kvm -m 4096 -mem-prealloc \
-mem-path /hugetlbfs/libvirt/qemu -smp 2,sockets=2,cores=1,\
threads=1 -name test1 -chardev socket,id=charmonitor,\
path=/var/lib/libvirt/qemu/test1.monitor,server,nowait \
-mon chardev=charmonitor,id=monitor,mode=readline -rtc base=utc \
-drive file=/TEST.img,if=scsi,format=raw -chardev pty,id=charserial0\
-usb -vnc www.xxx.yyy.zzz -vga cirrus 

>  - The output of
> 
>      $ virsh qemu-monitor-command --hmp $GUESTNAME 'info qtree'

virsh # qemu-monitor-command --hmp test-1 'info qtree'
bus: main-system-bus
  type System
  dev: spapr-virtio-bridge, id ""
    irq 0
    bus: spapr-virtio
      type spapr-virtio
  dev: spapr-vio-bridge, id ""
    irq 0
    bus: spapr-vio
      type spapr-vio
      dev: spapr-vscsi, id "v-scsi 2000"
        dev-prop: reg = 8192
        bus-prop: irq = 18
        bus: v-scsi 2000 0
          type SCSI
          dev: scsi-disk, id ""
            dev-prop: drive = scsi0-cd2
            dev-prop: logical_block_size = 512
            dev-prop: physical_block_size = 512
            dev-prop: min_io_size = 0
            dev-prop: opt_io_size = 0
            dev-prop: bootindex = -1
            dev-prop: discard_granularity = 0
            dev-prop: ver = "0.15.50"
            dev-prop: serial = <null>
            dev-prop: removable = off
            bus-prop: scsi-id = 2
            bus-prop: lun = 0
          dev: scsi-disk, id ""
            dev-prop: drive = scsi0-hd0
            dev-prop: logical_block_size = 512
            dev-prop: physical_block_size = 512
            dev-prop: min_io_size = 0
            dev-prop: opt_io_size = 0
            dev-prop: bootindex = -1
            dev-prop: discard_granularity = 0
            dev-prop: ver = "0.15.50"
            dev-prop: serial = <null>
            dev-prop: removable = off
            bus-prop: scsi-id = 0
            bus-prop: lun = 0
      dev: spapr-vlan, id "l-lan 1000"
        dev-prop: reg = 4096
        dev-prop: mac = 52:54:00:12:34:56
        dev-prop: vlan = 0
        dev-prop: netdev = <null>
        dev-prop: bootindex = -1
        bus-prop: irq = 17
      dev: spapr-vty, id "vty 30000000"
        dev-prop: reg = 805306368
        dev-prop: chardev = serial0
        bus-prop: irq = 16

>      $ virsh qemu-monitor-command --hmp $GUESTNAME 'info pci'
>      $ virsh qemu-monitor-command --hmp $GUESTNAME 'info block'
> 

virsh # qemu-monitor-command --hmp test-1 'info pci'

virsh # qemu-monitor-command --hmp test-1 'info block'
scsi0-hd0: removable=0 file=/home/prerna/RHEL6_install.img ro=0 drv=raw encrypted=0
scsi0-cd2: removable=1 locked=0 tray-open=0 [not inserted]
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]

>  - The output of $ qemu-kvm -device '?'

Throws a lot of devices, I'm pasting a few here :
name "xilinx,ethlite", bus System  
name "spapr-vty", bus spapr-vio
name "spapr-vscsi", bus spapr-vio  
name "scsi-cd", bus SCSI, desc "virtual SCSI CD-ROM"
name "scsi-hd", bus SCSI, desc "virtual SCSI disk"
...

Thanks,
-- 
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India


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