Message ID | 1381405241-32434-1-git-send-email-pranavkumar@linaro.org |
---|---|
State | New |
Headers | show |
On Thu, Oct 10, 2013 at 05:10:41PM +0530, Pranavkumar Sawargaonkar wrote: > AArch64 qemu has similar behavior as armv7l, like use of mmio etc. > This patch adds similar bypass checks what we have for armv7l to aarch64. > E.g. we are enabling mmio transport for Nicdev. > Making addDefaultUSB and addDefaultMemballoon to false etc. > > Signed-off-by: Anup Patel <anup.patel@linaro.org> > Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> > --- > src/qemu/qemu_capabilities.c | 2 +- > src/qemu/qemu_command.c | 8 +++++--- > src/qemu/qemu_domain.c | 5 ++++- > 3 files changed, 10 insertions(+), 5 deletions(-) Our general rule is that changes to qemu_command.c should be accompanied by additions to tests/qemuxml2argvtest.c to validate their correctness, otherwise it is all to easy for us to have regressions in behaviour later. Daniel
Hi, On 10 October 2013 17:20, Daniel P. Berrange <berrange@redhat.com> wrote: > On Thu, Oct 10, 2013 at 05:10:41PM +0530, Pranavkumar Sawargaonkar wrote: >> AArch64 qemu has similar behavior as armv7l, like use of mmio etc. >> This patch adds similar bypass checks what we have for armv7l to aarch64. >> E.g. we are enabling mmio transport for Nicdev. >> Making addDefaultUSB and addDefaultMemballoon to false etc. >> >> Signed-off-by: Anup Patel <anup.patel@linaro.org> >> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> >> --- >> src/qemu/qemu_capabilities.c | 2 +- >> src/qemu/qemu_command.c | 8 +++++--- >> src/qemu/qemu_domain.c | 5 ++++- >> 3 files changed, 10 insertions(+), 5 deletions(-) > > Our general rule is that changes to qemu_command.c should be accompanied > by additions to tests/qemuxml2argvtest.c to validate their correctness, > otherwise it is all to easy for us to have regressions in behaviour later. Ok i will revise this patch. > > Daniel > -- > |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| > |: http://libvirt.org -o- http://virt-manager.org :| > |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| > |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| Thanks, Pranav
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 1eae4ba..74a1690 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2872,7 +2872,7 @@ virQEMUCapsSupportsChardev(virDomainDefPtr def, !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) return false; - if (def->os.arch != VIR_ARCH_ARMV7L) + if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch != VIR_ARCH_AARCH64)) return true; /* This may not be true for all ARM machine types, but at least diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 22cc5f2..1c4de84 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -427,7 +427,8 @@ qemuDomainSupportsNicdev(virDomainDefPtr def, return false; /* non-virtio ARM nics require legacy -net nic */ - if (def->os.arch == VIR_ARCH_ARMV7L && + if (((def->os.arch == VIR_ARCH_ARMV7L) || + (def->os.arch == VIR_ARCH_AARCH64)) && net->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO) return false; @@ -1339,7 +1340,8 @@ static int qemuDomainAssignARMVirtioMMIOAddresses(virDomainDefPtr def, virQEMUCapsPtr qemuCaps) { - if (def->os.arch == VIR_ARCH_ARMV7L && + if (((def->os.arch == VIR_ARCH_ARMV7L) || + (def->os.arch == VIR_ARCH_AARCH64)) && STRPREFIX(def->os.machine, "vexpress-") && virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MMIO)) { qemuDomainPrimeVirtioDeviceAddresses( @@ -1870,7 +1872,7 @@ cleanup: static bool qemuDomainSupportsPCI(virDomainDefPtr def) { - if (def->os.arch != VIR_ARCH_ARMV7L) + if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch != VIR_ARCH_AARCH64)) return true; if (STREQ(def->os.machine, "versatilepb")) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 968e323..f4986d7 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -727,7 +727,10 @@ qemuDomainDefPostParse(virDomainDefPtr def, addDefaultUSB = false; addDefaultMemballoon = false; break; - + case VIR_ARCH_AARCH64: + addDefaultUSB = false; + addDefaultMemballoon = false; + break; case VIR_ARCH_ALPHA: case VIR_ARCH_PPC: case VIR_ARCH_PPC64: