diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-12-11 22:26:44 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-12-11 22:26:44 +0000 |
commit | 4b3aab204204ca742836219b97b538d90584f4f2 (patch) | |
tree | da51258da51d79b777fd6402ad74e2c4ea26557f /target | |
parent | bb9bf94b3e8926553290bc9a7cb84315af422086 (diff) | |
parent | 82c48fb79df5596a9d0a3b6d998c4491e542aa7a (diff) |
Merge remote-tracking branch 'remotes/vivier2/tags/trivial-patches-pull-request' into staging
Trivial patches (2018-12-11)
# gpg: Signature made Tue 11 Dec 2018 18:02:20 GMT
# gpg: using RSA key F30C38BD3F2FBE3C
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
# gpg: aka "Laurent Vivier <laurent@vivier.eu>"
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C
* remotes/vivier2/tags/trivial-patches-pull-request: (30 commits)
Fixes i386 xchgq test
maint: Grammar fix to mailmap
MAINTAINERS: Update email address for Fam Zheng
cutils: Assert in-range base for string-to-integer conversions
util: vfio-helpers: use ARRAY_SIZE in qemu_vfio_init_pci()
target: hax: fix errors in comment
MAINTAINERS: Use my work email to review Build and test automation patches
MAINTAINERS: Add a missing entry for the NVDIMM device
MAINTAINERS: Add a missing entry to the QMP section
MAINTAINERS: Add a missing entry to SPICE
MAINTAINERS: Add missing entries for the MPS2 machine
MAINTAINERS: Add missing entries for the Canon DIGIC machine
MAINTAINERS: Add missing entries to the vhost section
MAINTAINERS: Add missing entries to the PC Chipset section
MAINTAINERS: Add a missing entry for the sun4m machines
MAINTAINERS: Add a missing entry for the Old World machines
MAINTAINERS: Add a missing entry for the Xilinx S3A-DSP 1800 machine
MAINTAINERS: Add missing entries for the Jazz machine
MAINTAINERS: Add missing entries for the Xilinx ZynqMP machine
MAINTAINERS: Add a missing entry to the SPARC CPU
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/cpu.c | 2 | ||||
-rw-r--r-- | target/i386/hax-all.c | 17 |
2 files changed, 5 insertions, 14 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c index f81d35e1f9..748eaf8367 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -4065,7 +4065,7 @@ arch_query_cpu_model_expansion(CpuModelExpansionType type, x86_cpu_to_dict_full(xc, props); break; default: - error_setg(&err, "Unsupportted expansion type"); + error_setg(&err, "Unsupported expansion type"); goto out; } diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c index d2e512856b..b978a9b821 100644 --- a/target/i386/hax-all.c +++ b/target/i386/hax-all.c @@ -154,13 +154,7 @@ int hax_vcpu_create(int id) return 0; } - vcpu = g_malloc(sizeof(struct hax_vcpu_state)); - if (!vcpu) { - fprintf(stderr, "Failed to alloc vcpu state\n"); - return -ENOMEM; - } - - memset(vcpu, 0, sizeof(struct hax_vcpu_state)); + vcpu = g_new0(struct hax_vcpu_state, 1); ret = hax_host_create_vcpu(hax_global.vm->fd, id); if (ret) { @@ -211,7 +205,7 @@ int hax_vcpu_destroy(CPUState *cpu) } /* - * 1. The hax_tunnel is also destroied when vcpu destroy + * 1. The hax_tunnel is also destroyed when vcpu is destroyed * 2. close fd will cause hax module vcpu be cleaned */ hax_close_fd(vcpu->fd); @@ -250,11 +244,8 @@ struct hax_vm *hax_vm_create(struct hax_state *hax) return hax->vm; } - vm = g_malloc(sizeof(struct hax_vm)); - if (!vm) { - return NULL; - } - memset(vm, 0, sizeof(struct hax_vm)); + vm = g_new0(struct hax_vm, 1); + ret = hax_host_create_vm(hax, &vm_id); if (ret) { fprintf(stderr, "Failed to create vm %x\n", ret); |