于 2011年10月19日 21:55, Eric Blake 写道:
On 10/18/2011 11:32 PM, Xu He Jie wrote:
> Hmm, you are right. domain_conf didn't separate with different layer. So
> I found another place that in the qemu layer for the fix. The patch as
> below:
>
> Signed-off-by: Xu He Jie <xuhj(a)linux.vnet.ibm.com>
> ---
> src/qemu/qemu_command.c | 10 +++++++---
> 1 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 30c0be6..7c4bc0a 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -1321,13 +1321,17 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
> qemuDomainPCIAddressSetPtr addrs)
>
> /* Disks (VirtIO only for now */
> for (i = 0; i < def->ndisks ; i++) {
> - if (def->disks[i]->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)
> - continue;
> -
> /* Only VirtIO disks use PCI addrs */
> if (def->disks[i]->bus != VIR_DOMAIN_DISK_BUS_VIRTIO)
> continue;
>
> + if ((def->disks[i]->info.type !=
> VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) &&
> + (def->disks[i]->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)) {
> + qemuReportError(VIR_ERR_INTERNAL_ERROR,
> + _("virtio only support device address type 'PCI' "));
s/support/supports/
> + goto error;
> + }
> +
Yes, this is better. But the patch doesn't apply as-is; all the
whitespace got mangled by your mailer. Could you resubmit it using
'git send-email' or similar?
OK, I will send patch v2 later.