- 25 1月, 2020 40 次提交
-
-
由 Marc-André Lureau 提交于
A child property is a different kind of property. Let's use "target" for the link target. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200110153039.1379601-14-marcandre.lureau@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Marc-André Lureau 提交于
The following patch is going to introduce more flags. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200110153039.1379601-13-marcandre.lureau@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Marc-André Lureau 提交于
The release callback is called during object_property_del_all(), on a live instance. But class properties are common among all instances. It is not currently called, because we don't release classes, but it would not be correct if we did. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200110153039.1379601-12-marcandre.lureau@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Marc-André Lureau 提交于
Add a default value to ObjectProperty and an implementation of ObjectPropertyInit that uses it. This will make it easier to show the default in help messages. Also provide convenience functions object_property_set_default_{bool, str, int, uint}(). Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200110153039.1379601-11-marcandre.lureau@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Marc-André Lureau 提交于
Similar to g_string_free(), optionally return the underlying char*. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200110153039.1379601-10-marcandre.lureau@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Marc-André Lureau 提交于
This will help calling other ObjectProperty associated functions easily after. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200110153039.1379601-9-marcandre.lureau@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Marc-André Lureau 提交于
This callback is used to set default value in following patch "object: add object_property_set_defaut_{bool,str,int,uint}()". Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200110153039.1379601-7-marcandre.lureau@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Marc-André Lureau 提交于
Like object properties, no need to duplicate property name, as it is owned already by ObjectProperty value. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200110153039.1379601-6-marcandre.lureau@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Marc-André Lureau 提交于
Move the one-user function to the place it is being used. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200110153039.1379601-5-marcandre.lureau@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Marc-André Lureau 提交于
All callers use error_abort, and even the function itself calls with error_abort. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200110153039.1379601-4-marcandre.lureau@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Marc-André Lureau 提交于
The function is already documented in the header. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200110153039.1379601-3-marcandre.lureau@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Marc-André Lureau 提交于
Type system checked that children class_size >= parent class_size, but not instances. Fix that. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200110153039.1379601-2-marcandre.lureau@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
Commit af0440ae moved the qemu_tcg_configure() function, but introduced extraneous 'include/' in the includes path. As it is not necessary, remove it. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NCornelia Huck <cohuck@redhat.com> Message-Id: <20200121110349.25842-11-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
We actually want to access the accelerator, not the machine, so use the current_accel() wrapper instead. Suggested-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NAlistair Francis <alistair.francis@wdc.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200121110349.25842-10-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
The accel/ code only accesses the MachineState::accel field. As we simply want to access the accelerator, not the machine, add a current_accel() wrapper. Suggested-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NAlistair Francis <alistair.francis@wdc.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NCornelia Huck <cohuck@redhat.com> Message-Id: <20200121110349.25842-9-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
QEMU object model is scarse in documentation. Some calls are recursive, and it might be hard to figure out even trivial issues. We can avoid developers to waste time in a debugging session by displaying a simple error message. This commit is also similar to e02bdf1c ("Display more helpful message when an object type is missing"). Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NCornelia Huck <cohuck@redhat.com> Message-Id: <20200121110349.25842-7-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
KVMState is already accessible via CPUState::kvm_state, use it. Reviewed-by: NAlistair Francis <alistair.francis@wdc.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200121110349.25842-5-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
We only access this variable in the RTAS_SYSPARM_SPLPAR_CHARACTERISTICS case. Use it in place and remove the local declaration. Suggested-by: NGreg Kurz <groug@kaod.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200121110349.25842-4-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
We received a SpaprMachineState argument. Since SpaprMachineState inherits of MachineState, use it instead of calling qdev_get_machine. Reviewed-by: NGreg Kurz <groug@kaod.org> Acked-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200121110349.25842-3-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
Since we have the MachineState already available locally, use it instead of the global current_machine. Reviewed-by: NGreg Kurz <groug@kaod.org> Acked-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200121110349.25842-2-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Pan Nengyuan 提交于
Use virtio_delete_queue to make it more clear. Signed-off-by: NPan Nengyuan <pannengyuan@huawei.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Message-Id: <20200117075547.60864-3-pannengyuan@huawei.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Pan Nengyuan 提交于
This patch fix memleaks when attaching/detaching virtio-scsi device, the memory leak stack is as follow: Direct leak of 21504 byte(s) in 3 object(s) allocated from: #0 0x7f491f2f2970 (/lib64/libasan.so.5+0xef970) ??:? #1 0x7f491e94649d (/lib64/libglib-2.0.so.0+0x5249d) ??:? #2 0x564d0f3919fa (./x86_64-softmmu/qemu-system-x86_64+0x2c3e9fa) /mnt/sdb/qemu/hw/virtio/virtio.c:2333 #3 0x564d0f2eca55 (./x86_64-softmmu/qemu-system-x86_64+0x2b99a55) /mnt/sdb/qemu/hw/scsi/virtio-scsi.c:912 #4 0x564d0f2ece7b (./x86_64-softmmu/qemu-system-x86_64+0x2b99e7b) /mnt/sdb/qemu/hw/scsi/virtio-scsi.c:924 #5 0x564d0f39ee47 (./x86_64-softmmu/qemu-system-x86_64+0x2c4be47) /mnt/sdb/qemu/hw/virtio/virtio.c:3531 #6 0x564d0f980224 (./x86_64-softmmu/qemu-system-x86_64+0x322d224) /mnt/sdb/qemu/hw/core/qdev.c:865 Reported-by: NEuler Robot <euler.robot@huawei.com> Signed-off-by: NPan Nengyuan <pannengyuan@huawei.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Message-Id: <20200117075547.60864-2-pannengyuan@huawei.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
KVM can return the host microcode revision as a feature MSR. Use it as the default value for -cpu host. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Message-Id: <1579544504-3616-4-git-send-email-pbonzini@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Add the property and plumb it in TCG and HVF (the latter of which tried to support returning a constant value but used the wrong MSR). Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Message-Id: <1579544504-3616-3-git-send-email-pbonzini@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Some read-only MSRs affect the behavior of ioctls such as KVM_SET_NESTED_STATE. We can initialize them once and for all right after the CPU is realized, since they will never be modified by the guest. Reported-by: NQingua Cheng <qcheng@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Message-Id: <1579544504-3616-2-git-send-email-pbonzini@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
To ease review/modifications of this Makefile, group generic objects first, then system-mode specific ones, and finally peripherals (which are only used in system-mode). No logical changes introduced here. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200118140619.26333-7-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
The user-mode code does not use this API, restrict it to the system-mode. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org> Reviewed-by: NThomas Huth <thuth@redhat.com> Message-Id: <20200118140619.26333-6-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
It is pointless to keep qapi/ object separate from the other common-objects. Drop the comment. Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org> Message-Id: <20200118140619.26333-5-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
Restrict all the system emulation and tools objects with a Makefile IF (CONFIG_SOFTMMU OR CONFIG_TOOLS) check. Using the same description over and over is not very helpful. Use it once, just before the if() block. Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org> Message-Id: <20200118140619.26333-4-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
QEMU user-mode also requires the qom/ objects, it is not only used by "system emulation and qemu-img". As we will use a big if() block, move it upper in the "Common libraries for tools and emulators" section. Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org> Message-Id: <20200118140619.26333-3-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
We only require libfdt for system emulation, in a small set of architecture: 4077 # fdt support is mandatory for at least some target architectures, 4078 # so insist on it if we're building those system emulators. 4079 fdt_required=no 4080 for target in $target_list; do 4081 case $target in 4082 aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv*-softmmu) 4083 fdt_required=yes Do not build libfdt if we did not manually specified --enable-fdt, or have one of the platforms that require it in our target list. Reviewed-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NAlistair Francis <alistair.francis@wdc.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org> Message-Id: <20200118140619.26333-2-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
We don't need to explicit this obvious switch fall through. Stay consistent with the rest of the codebase. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NAleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NThomas Huth <thuth@redhat.com> Message-Id: <20191218192526.13845-7-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
We don't need to explicit these obvious switch fall through comments. Stay consistent with the rest of the codebase. Suggested-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NAleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NThomas Huth <thuth@redhat.com> Message-Id: <20191218192526.13845-6-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
GCC9 is confused by this comment when building with CFLAG -Wimplicit-fallthrough=2: hw/net/imx_fec.c: In function ‘imx_eth_write’: hw/net/imx_fec.c:906:12: error: this statement may fall through [-Werror=implicit-fallthrough=] 906 | if (unlikely(single_tx_ring)) { | ^ hw/net/imx_fec.c:912:5: note: here 912 | case ENET_TDAR: /* FALLTHROUGH */ | ^~~~ cc1: all warnings being treated as errors Rewrite the comments in the correct place, using 'fall through' which is recognized by GCC and static analyzers. Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NAleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Message-Id: <20191218192526.13845-5-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=2: hw/timer/aspeed_timer.c: In function ‘aspeed_timer_set_value’: hw/timer/aspeed_timer.c:283:24: error: this statement may fall through [-Werror=implicit-fallthrough=] 283 | if (old_reload || !t->reload) { | ~~~~~~~~~~~^~~~~~~~~~~~~ hw/timer/aspeed_timer.c:287:5: note: here 287 | case TIMER_REG_STATUS: | ^~~~ cc1: all warnings being treated as errors Add the missing fall through comment. Fixes: 1403f364Reviewed-by: NCédric Le Goater <clg@kaod.org> Reviewed-by: NAleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20191218192526.13845-4-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
When building with GCC9 using CFLAG -Wimplicit-fallthrough=2 we get: hw/display/tcx.c: In function ‘tcx_dac_writel’: hw/display/tcx.c:453:26: error: this statement may fall through [-Werror=implicit-fallthrough=] 453 | s->dac_index = (s->dac_index + 1) & 0xff; /* Index autoincrement */ | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/display/tcx.c:454:9: note: here 454 | default: | ^~~~~~~ hw/display/tcx.c: In function ‘tcx_dac_readl’: hw/display/tcx.c:412:22: error: this statement may fall through [-Werror=implicit-fallthrough=] 412 | s->dac_index = (s->dac_index + 1) & 0xff; /* Index autoincrement */ | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/display/tcx.c:413:5: note: here 413 | default: | ^~~~~~~ cc1: all warnings being treated as errors Give a hint to GCC by adding the missing fall through comments. Fixes: 55d7bfe2Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NAleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20191218192526.13845-3-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
When building with GCC9 using CFLAG -Wimplicit-fallthrough=2 we get: audio/audio.c: In function ‘audio_pcm_init_info’: audio/audio.c:306:14: error: this statement may fall through [-Werror=implicit-fallthrough=] 306 | sign = 1; | ~~~~~^~~ audio/audio.c:307:5: note: here 307 | case AUDIO_FORMAT_U8: | ^~~~ cc1: all warnings being treated as errors Similarly to e4634941, add the missing fall through comment to hint GCC. Fixes: 2b9cce8cReviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NAleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: NGerd Hoffmann <kraxel@redhat.com> Message-Id: <20191218192526.13845-2-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Philippe Mathieu-Daudé 提交于
When adding new devices implementing QOM interfaces, we might forgot to add the Kconfig dependency that pulls the required objects in when building. Since QOM dependencies are resolved at runtime, we don't get any link-time failures, and QEMU aborts while starting: $ qemu ... Segmentation fault (core dumped) (gdb) bt #0 0x00007ff6e96b1e35 in raise () from /lib64/libc.so.6 #1 0x00007ff6e969c895 in abort () from /lib64/libc.so.6 #2 0x00005572bc5051cf in type_initialize (ti=0x5572be6f1200) at qom/object.c:323 #3 0x00005572bc505074 in type_initialize (ti=0x5572be6f1800) at qom/object.c:301 #4 0x00005572bc505074 in type_initialize (ti=0x5572be6e48e0) at qom/object.c:301 #5 0x00005572bc506939 in object_class_by_name (typename=0x5572bc56109a) at qom/object.c:959 #6 0x00005572bc503dd5 in cpu_class_by_name (typename=0x5572bc56109a, cpu_model=0x5572be6d9930) at hw/core/cpu.c:286 Since the caller has access to the qdev parent/interface names, we can simply display them to avoid starting a debugger: $ qemu ... qemu: missing interface 'fancy-if' for object 'fancy-dev' Aborted (core dumped) This commit is similar to e02bdf1c ("Display more helpful message when an object type is missing"). Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200118162348.17823-1-philmd@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 zhenwei pi 提交于
Handle bit 1 write, then post event to monitor. Suggested by Paolo, declear a new event, using GUEST_PANICKED could cause upper layers to react by shutting down or rebooting the guest. In advance for extention, add GuestPanicInformation in event message. Signed-off-by: Nzhenwei pi <pizhenwei@bytedance.com> Message-Id: <20200114023102.612548-3-pizhenwei@bytedance.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 zhenwei pi 提交于
Add bit 1 for pvpanic. This bit means that guest hits a panic, but guest wants to handle error by itself. Typical case: Linux guest runs kdump in panic. It will help us to separate the abnormal reboot from normal operation. Signed-off-by: Nzhenwei pi <pizhenwei@bytedance.com> Message-Id: <20200114023102.612548-2-pizhenwei@bytedance.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-