Trivial patches for 18 December 2012 to 4 January 2013
The following changes since commit 25bbf61e4bacd1e4fa4115ffcf151051b9d6608e:
pty: unbreak libvirt (2013-01-03 12:53:41 -0600)
are available in the git repository at:
git://github.com/stefanha/qemu.git trivial-patches
for you to fetch changes up to bfb82a28752d29291adf932c3a9941e8383203af:
spice: drop incorrect vm_change_state_handler() opaque (2013-01-04 14:38:05 +0100)
----------------------------------------------------------------
John Spencer (1):
linux-user/syscall.c: remove forward declarations
Markus Armbruster (1):
pc_sysfw: Check for qemu_find_file() failure
Stefan Hajnoczi (1):
spice: drop incorrect vm_change_state_handler() opaque
Stefan Weil (2):
pseries: Remove unneeded include statement (fixes MinGW builds) hw/mcf5206: Reduce size of lookup table
陳韋任 (Wei-Ren Chen) (1):
Remove --sparc_cpu option from the configure list
configure | 1 - hw/mcf5206.c | 2 +- hw/pc_sysfw.c | 4 ++++ hw/spapr_nvram.c | 2 +- linux-user/syscall.c | 8 +++----- ui/spice-core.c | 5 ++--- 6 files changed, 11 insertions(+), 11 deletions(-)
Signature · 1 line
1.8.0.2
PATCH 2/6 pseries: Remove unneeded include statement (fixes MinGW builds)
From: Stefan Weil <[email protected]>
sys/mman.h is not needed (tested on Linux) and unavailable for MinGW, so remove it.
--- hw/spapr_nvram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/spapr_nvram.c +1 -1
@@ -21,7 +21,7 @@* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include <sys/mman.h> +#include <libfdt.h> #include "sysemu/device_tree.h"
Signature · 1 line
1.8.0.2
PATCH 1/6 pc_sysfw: Check for qemu_find_file() failure
In reply to Stefan HajnocziFrom: Markus Armbruster <[email protected]>
pc_fw_add_pflash_drv() ignores qemu_find_file() failure, and happily creates a drive without a medium.
When pc_system_flash_init() asks for its size, bdrv_getlength() fails with -ENOMEDIUM, which isn't checked either. It fails relatively cleanly only because -ENOMEDIUM isn't a multiple of 4096:
$ qemu-system-x86_64 -S -vnc :0 -bios nonexistant
qemu: PC system firmware (pflash) must be a multiple of 0x1000
[Exit 1 ]Fix by handling the qemu_find_file() failure.
--- hw/pc_sysfw.c | 4 ++++ 1 file changed, 4 insertions(+)
hw/pc_sysfw.c +4 -0
@@ -84,6 +84,10 @@ static void pc_fw_add_pflash_drv(void) bios_name =BIOS_FILENAME ; } filename =qemu_find_file (QEMU_FILE_TYPE_BIOS , bios_name); +if (!filename) { +error_report ("Can't open BIOS image %s" , bios_name); +exit (1 ); + } opts =drive_add (IF_PFLASH ,-1 , filename,"readonly=on" );
Signature · 1 line
1.8.0.2
PATCH 4/6 hw/mcf5206: Reduce size of lookup table
In reply to Stefan HajnocziFrom: Stefan Weil <[email protected]>
This typically reduces the size from 512 bytes to 128 bytes.
--- hw/mcf5206.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/mcf5206.c +1 -1
@@ -359,7 +359,7 @@ static void m5206_mbar_write(m5206_mbar_state *s, uint32_t offset,/* Internal peripherals use a variety of register widths. This lookup table allows a single routine to handle all of them. */ -static const int m5206_mbar_width[] = +static const uint8_t m5206_mbar_width[] = {/* 000-040 */ 1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,2 ,2 ,2 ,2 ,/* 040-080 */ 1 ,2 ,2 ,2 ,4 ,1 ,2 ,4 ,1 ,2 ,4 ,2 ,2 ,4 ,2 ,2 ,
Signature · 1 line
1.8.0.2
PATCH 6/6 spice: drop incorrect vm_change_state_handler() opaque
In reply to Stefan HajnocziThe spice_server pointer is a global variable and vm_change_state_handler() therefore does not use its opaque parameter.
The vm change state handler is added with a pointer to the spice_server pointer. This is useless and we probably would not want 2 levels of pointers.
--- ui/spice-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
ui/spice-core.c +2 -3
@@ -709,7 +709,7 @@ void qemu_spice_init(void)qemu_spice_input_init ();qemu_spice_audio_init (); -qemu_add_vm_change_state_handler (vm_change_state_handler, &spice_server); +qemu_add_vm_change_state_handler (vm_change_state_handler,NULL );g_free (x509_key_file);g_free (x509_cert_file);
@@ -736,8 +736,7 @@ int qemu_spice_add_interface(SpiceBaseInstance *sin)*/ spice_server =spice_server_new ();spice_server_init (spice_server, &core_interface); -qemu_add_vm_change_state_handler (vm_change_state_handler, - &spice_server); +qemu_add_vm_change_state_handler (vm_change_state_handler,NULL ); }return spice_server_add_interface (spice_server, sin);
Signature · 1 line
1.8.0.2
PATCH 5/6 linux-user/syscall.c: remove forward declarations
In reply to Stefan HajnocziFrom: John Spencer <[email protected]>
instead use the correct headers that define these functions.
--- linux-user/syscall.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
linux-user/syscall.c +3 -5
@@ -36,6 +36,9 @@#include <sys/time.h> #include <sys/stat.h> #include <sys/mount.h> +#include <sys/file.h> +#include <sys/fsuid.h> +#include <sys/personality.h> #include <sys/prctl.h> #include <sys/resource.h> #include <sys/mman.h>
@@ -581,11 +584,6 @@ _syscall4(int, sys_prlimit64, pid_t, pid, int, resource, struct host_rlimit64 *, old_limit)#endif -extern int personality (int ); -extern int flock (int ,int ); -extern int setfsuid (int ); -extern int setfsgid (int ); -/* ARM EABI and MIPS expect 64bit types aligned even on pairs or registers */ #ifdef TARGET_ARM static inline int regpairs_aligned (void *cpu_env) {
Signature · 1 line
1.8.0.2
PATCH 3/6 Remove --sparc_cpu option from the configure list
In reply to Stefan HajnocziFrom: 陳韋任 (Wei-Ren Chen) <[email protected]>
commit 9b9c37c36439ee0452632253dac7a31897f27f70 always assume sparcv9,
the others are no longer supported. Remove --sparc_cpu option from the configure list.
--- configure | 1 - 1 file changed, 1 deletion(-)
configure +0 -1
@@ -1096,7 +1096,6 @@ echo " --fmod-inc path to FMOD includes" echo " --oss-lib path to OSS library" echo " --enable-uname-release=R Return R for uname -r in usermode emulation" echo " --cpu=CPU Build for host CPU [$cpu]" -echo " --sparc_cpu=V Build qemu for Sparc architecture v7, v8, v8plus, v8plusa, v9" echo " --disable-uuid disable uuid support" echo " --enable-uuid enable uuid support" echo " --disable-vde disable support for vde network"
Signature · 1 line
1.8.0.2
Pulled, thanks.
Regards,
Anthony Liguori