All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Bolognani <abologna@redhat.com>
To: Kevin Zhao <kevin.zhao@linaro.org>, Laine Stump <laine@redhat.com>
Cc: Marcel Apfelbaum <mapfelba@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Andrew Jones <drjones@redhat.com>,
	Gema Gomez-Solano <gema.gomez-solano@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Thomas Hanson <thomas.hanson@linaro.org>,
	qemu-arm <qemu-arm@nongnu.org>
Subject: Re: [Qemu-arm] [Qemu-devel] Help: Does Qemu support virtio-pci for net-device and disk device?
Date: Thu, 18 Aug 2016 15:51:52 +0200	[thread overview]
Message-ID: <1471528312.3820.48.camel@redhat.com> (raw)
In-Reply-To: <CAN76PtR-5NsEE_jqvmO=xdETOvh44c8q=t5AGimmPqU_N7bHJA@mail.gmail.com>

On Thu, 2016-08-18 at 20:43 +0800, Kevin Zhao wrote:
> What's the minimum version of  Qemu that support virito-1.0?
> Does Qemu 2.6 works? 

2.6 definitely has virtio 1.0 support, however libvirt does
not yet allow you to control whether a device uses 0.9, 1.0
or both. The default for 2.6 should be both IIRC.

> Now I will manually add the slots and bus to pcie. Because
> I am not familiar with it,  if it convenient, could you give
> me an available xml file which PCIE disk and PCIE
> net device can work for machine virt ?

The XML you're looking for is at the end of this message.

Note that a Fedora 24 guest configured this way will not
boot at all if the machine type is virt-2.6; on the other
hand, an identically-configured RHEL 7.3 guest will boot
even with virt-2.6, but both the disk and the network
adapter will be legacy PCI instead of PCIe.


<domain type='kvm'>
  <name>abologna-f24</name>
  <uuid>f6d0428b-a034-4c4e-8ef2-f12f6aa9cab0</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <os>
    <type arch='aarch64' machine='virt-2.7'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader>
    <nvram>/var/lib/libvirt/qemu/nvram/abologna-f24_VARS.fd</nvram>
    <boot dev='hd'/>
  </os>
  <features>
    <gic version='2'/>
  </features>
  <cpu mode='host-passthrough'/>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/abologna-qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/abologna-f24.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </disk>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='ioh3420'/>
      <target chassis='1' port='0x8'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pcie-root-port'>
      <model name='ioh3420'/>
      <target chassis='2' port='0x10'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='virtio-mmio'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:10:07:41'/>
      <source network='default'/>
      <model type='virtio'/>
      <rom bar='off'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <source mode='bind'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
  </devices>
</domain>

-- 
Andrea Bolognani / Red Hat / Virtualization

WARNING: multiple messages have this Message-ID (diff)
From: Andrea Bolognani <abologna@redhat.com>
To: Kevin Zhao <kevin.zhao@linaro.org>, Laine Stump <laine@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Andrew Jones <drjones@redhat.com>, qemu-arm <qemu-arm@nongnu.org>,
	Thomas Hanson <thomas.hanson@linaro.org>,
	Peter Maydell <peter.maydell@linaro.org>,
	Gema Gomez-Solano <gema.gomez-solano@linaro.org>,
	Marcel Apfelbaum <mapfelba@redhat.com>
Subject: Re: [Qemu-devel] Help: Does Qemu support virtio-pci for net-device and disk device?
Date: Thu, 18 Aug 2016 15:51:52 +0200	[thread overview]
Message-ID: <1471528312.3820.48.camel@redhat.com> (raw)
In-Reply-To: <CAN76PtR-5NsEE_jqvmO=xdETOvh44c8q=t5AGimmPqU_N7bHJA@mail.gmail.com>

On Thu, 2016-08-18 at 20:43 +0800, Kevin Zhao wrote:
> What's the minimum version of  Qemu that support virito-1.0?
> Does Qemu 2.6 works? 

2.6 definitely has virtio 1.0 support, however libvirt does
not yet allow you to control whether a device uses 0.9, 1.0
or both. The default for 2.6 should be both IIRC.

> Now I will manually add the slots and bus to pcie. Because
> I am not familiar with it,  if it convenient, could you give
> me an available xml file which PCIE disk and PCIE
> net device can work for machine virt ?

The XML you're looking for is at the end of this message.

Note that a Fedora 24 guest configured this way will not
boot at all if the machine type is virt-2.6; on the other
hand, an identically-configured RHEL 7.3 guest will boot
even with virt-2.6, but both the disk and the network
adapter will be legacy PCI instead of PCIe.


<domain type='kvm'>
  <name>abologna-f24</name>
  <uuid>f6d0428b-a034-4c4e-8ef2-f12f6aa9cab0</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <os>
    <type arch='aarch64' machine='virt-2.7'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader>
    <nvram>/var/lib/libvirt/qemu/nvram/abologna-f24_VARS.fd</nvram>
    <boot dev='hd'/>
  </os>
  <features>
    <gic version='2'/>
  </features>
  <cpu mode='host-passthrough'/>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/abologna-qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/abologna-f24.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </disk>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='ioh3420'/>
      <target chassis='1' port='0x8'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pcie-root-port'>
      <model name='ioh3420'/>
      <target chassis='2' port='0x10'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='virtio-mmio'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:10:07:41'/>
      <source network='default'/>
      <model type='virtio'/>
      <rom bar='off'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <source mode='bind'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
  </devices>
</domain>

-- 
Andrea Bolognani / Red Hat / Virtualization

  reply	other threads:[~2016-08-18 13:53 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17 12:08 [Qemu-arm] Help: Does Qemu support virtio-pci for net-device and disk device? Kevin Zhao
2016-08-17 12:08 ` [Qemu-devel] " Kevin Zhao
2016-08-17 16:13 ` [Qemu-arm] " Andrew Jones
2016-08-17 16:13   ` Andrew Jones
2016-08-17 16:41   ` [Qemu-arm] " Andrea Bolognani
2016-08-17 16:41     ` Andrea Bolognani
2016-08-18  6:38     ` [Qemu-arm] " Andrew Jones
2016-08-18  6:38       ` Andrew Jones
2016-08-19 15:43       ` [Qemu-arm] " Andrea Bolognani
2016-08-19 15:43         ` Andrea Bolognani
2016-08-19 17:51         ` [Qemu-arm] " Laine Stump
2016-08-19 17:51           ` Laine Stump
2016-08-17 17:00   ` Laine Stump
2016-08-17 17:00     ` Laine Stump
2016-08-18  7:41     ` [Qemu-arm] " Andrew Jones
2016-08-18  7:41       ` Andrew Jones
2016-08-18 21:11       ` [Qemu-arm] " Laine Stump
2016-08-18 21:11         ` Laine Stump
2016-08-18 12:10     ` [Qemu-arm] " Marcel Apfelbaum
2016-08-18 12:10       ` Marcel Apfelbaum
2016-08-18 21:20       ` [Qemu-arm] " Laine Stump
2016-08-18 21:20         ` Laine Stump
2016-08-18 12:43     ` [Qemu-arm] " Kevin Zhao
2016-08-18 12:43       ` Kevin Zhao
2016-08-18 13:51       ` Andrea Bolognani [this message]
2016-08-18 13:51         ` Andrea Bolognani
2016-08-24  1:52         ` Kevin Zhao
2016-08-24  1:52           ` Kevin Zhao
2016-09-08  6:50           ` [Qemu-arm] " Kevin Zhao
2016-09-08  6:50             ` Kevin Zhao
2016-08-18 21:26       ` [Qemu-arm] " Laine Stump
2016-08-18 21:26         ` Laine Stump
2016-08-18 12:30   ` [Qemu-arm] " Kevin Zhao
2016-08-18 12:30     ` Kevin Zhao
2016-08-18 12:51     ` [Qemu-arm] " Kevin Zhao
2016-08-18 12:51       ` Kevin Zhao

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=1471528312.3820.48.camel@redhat.com \
    --to=abologna@redhat.com \
    --cc=drjones@redhat.com \
    --cc=gema.gomez-solano@linaro.org \
    --cc=kevin.zhao@linaro.org \
    --cc=laine@redhat.com \
    --cc=mapfelba@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thomas.hanson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.