Trivial patches for December 8 to 18 2012
Subsystems (2)
The following changes since commit a8a826a3c3b8c8a1c4def0e9e22b46e78e6163a0:
exec: refactor cpu_restore_state (2012-12-16 08:35:24 +0000)
are available in the git repository at:
git://github.com/stefanha/qemu.git trivial-patches
for you to fetch changes up to 779ab5e3ddb9ad903f9a0ec21e148ed7bfd2d255:
configure: Earlier pkg-config probe (2012-12-18 17:40:40 +0100)
----------------------------------------------------------------
Cole Robinson (1):
gitignore: Add virtfs-proxy-helper
John Spencer (2):
fix build error on ARM due to wrong glibc check linux-user/syscall.c: remove wrong forward decl of setgroups()
Laszlo Ersek (1):
vmmouse_reset(): remove minimal code duplication
Peter Crosthwaite (4):
pflash_cfi01: qemu_log_mask "unimplemented" msg
pflash_cfi0x: Send debug messages to stderr
zynq_slcr: Compile time warning fixes.
arm_gic: Add cpu nr to Raised IRQ message
Stefan Weil (1):
configure: Earlier pkg-config probe
Zhi Yong Wu (1):
net, hub: fix the indent in the comments
.gitignore | 1 + configure | 16 ++++++++-------- hw/arm_gic.c | 2 +- hw/pflash_cfi01.c | 14 +++++++------- hw/pflash_cfi02.c | 6 +++--- hw/vmmouse.c | 1 - hw/zynq_slcr.c | 7 ++++--- linux-user/syscall.c | 2 +- net/hub.c | 2 +- user-exec.c | 2 +- 10 files changed, 27 insertions(+), 26 deletions(-)
Signature · 1 line
1.8.0.2
PATCH 1/10 net, hub: fix the indent in the comments
From: Zhi Yong Wu <[email protected]>
Remove some redundant blanks in the comments ofnet_hub_id_for_client().
--- net/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/hub.c +1 -1
@@ -256,7 +256,7 @@ void net_hub_info(Monitor *mon)/** * Get the hub id that a client is connected to * -* @id Pointer for hub id output, may be NULL +* @id: Pointer for hub id output, may be NULL */ int net_hub_id_for_client (NetClientState *nc,int *id) {
Signature · 1 line
1.8.0.2
PATCH 2/10 pflash_cfi01: qemu_log_mask "unimplemented" msg
In reply to Stefan HajnocziFrom: Peter Crosthwaite <[email protected]>
This printf is informing the user of unimplemented functionality. It should be re-directed to qemu_log(LOG_UNIMP, ...) accordingly.
--- hw/pflash_cfi01.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
hw/pflash_cfi01.c +3 -3
@@ -438,9 +438,9 @@ static void pflash_write(pflash_t *pfl, hwaddr offset,return ; error_flash: -printf ("%s: Unimplemented flash cmd sequence " -"(offset " TARGET_FMT_plx", wcycle 0x%x cmd 0x%x value 0x%x)\n" , - __func__, offset, pfl->wcycle, pfl->cmd, value); +qemu_log_mask (LOG_UNIMP ,"%s: Unimplemented flash cmd sequence " +"(offset " TARGET_FMT_plx", wcycle 0x%x cmd 0x%x value 0x%x)" +"\n" , __func__, offset, pfl->wcycle, pfl->cmd, value); reset_flash:memory_region_rom_device_set_readable (&pfl->mem, true);
Signature · 1 line
1.8.0.2
PATCH 3/10 pflash_cfi0x: Send debug messages to stderr
In reply to Stefan HajnocziFrom: Peter Crosthwaite <[email protected]>
These debug info messages should go to stderr rather than stdout.
--- hw/pflash_cfi01.c | 8 ++++---- hw/pflash_cfi02.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-)
hw/pflash_cfi01.c +4 -4
@@ -46,15 +46,15 @@#define PFLASH_BUG (fmt, ...) \ do { \ - printf("PFLASH: Possible BUG - " fmt, ## __VA_ARGS__); \ + fprintf(stderr, "PFLASH: Possible BUG - " fmt, ## __VA_ARGS__); \ exit(1); \ } while(0)/* #define PFLASH_DEBUG */ #ifdef PFLASH_DEBUG -#define DPRINTF (fmt, ...) \ -do { \ - printf("PFLASH: " fmt , ## __VA_ARGS__); \ +#define DPRINTF (fmt, ...) \ +do { \ + fprintf(stderr, "PFLASH: " fmt , ## __VA_ARGS__); \ } while (0)#else #define DPRINTF (fmt, ...) do { } while (0)
hw/pflash_cfi02.c +3 -3
@@ -45,9 +45,9 @@//#define PFLASH_DEBUG #ifdef PFLASH_DEBUG -#define DPRINTF (fmt, ...) \ -do { \ - printf("PFLASH: " fmt , ## __VA_ARGS__); \ +#define DPRINTF (fmt, ...) \ +do { \ + fprintf(stderr "PFLASH: " fmt , ## __VA_ARGS__); \ } while (0)#else #define DPRINTF (fmt, ...) do { } while (0)
Signature · 1 line
1.8.0.2
PATCH 4/10 zynq_slcr: Compile time warning fixes.
In reply to Stefan HajnocziFrom: Peter Crosthwaite <[email protected]>
Few warnings when compiled with debug printfs enabled. Fixed all.
--- hw/zynq_slcr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
hw/zynq_slcr.c +4 -3
@@ -334,7 +334,7 @@ static uint64_t zynq_slcr_read(void *opaque, hwaddr offset, {uint32_t ret =zynq_slcr_read_imp (opaque, offset); -DB_PRINT ("addr: %08x data: %08x\n" , offset, ret); +DB_PRINT ("addr: %08x data: %08x\n" , (unsigned )offset, (unsigned )ret);return ret; }
@@ -343,7 +343,7 @@ static void zynq_slcr_write(void *opaque, hwaddr offset, {ZynqSLCRState *s = (ZynqSLCRState *)opaque; -DB_PRINT ("offset: %08x data: %08x\n" , offset, (unsigned )val); +DB_PRINT ("offset: %08x data: %08x\n" , (unsigned )offset, (unsigned )val);switch (offset) {case 0x00 :/* SCL */
@@ -476,7 +476,8 @@ static void zynq_slcr_write(void *opaque, hwaddr offset,break ;default : bad_reg: -DB_PRINT ("Bad register write %x <= %08x\n" , (int )offset, val); +DB_PRINT ("Bad register write %x <= %08x\n" , (int )offset, + (unsigned )val); } }else {DB_PRINT ("SCLR registers are locked. Unlock them first\n" );
Signature · 1 line
1.8.0.2
PATCH 5/10 arm_gic: Add cpu nr to Raised IRQ message
In reply to Stefan HajnocziFrom: Peter Crosthwaite <[email protected]>
Add the relevant CPU nr to this debug message to make IRQ debugging more informative.
--- hw/arm_gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm_gic.c +1 -1
@@ -76,7 +76,7 @@ void gic_update(GICState *s)if (best_prio < s->priority_mask[cpu]) { s->current_pending[cpu] = best_irq;if (best_prio < s->running_priority[cpu]) { -DPRINTF ("Raised pending IRQ %d\n" , best_irq); +DPRINTF ("Raised pending IRQ %d (cpu %d)\n" , best_irq, cpu); level =1 ; } }
Signature · 1 line
1.8.0.2
PATCH 6/10 gitignore: Add virtfs-proxy-helper
In reply to Stefan HajnocziFrom: Cole Robinson <[email protected]>
--- .gitignore | 1 + 1 file changed, 1 insertion(+)
.gitignore +1 -0
@@ -47,6 +47,7 @@ test-qmp-output-visitor test-string-input-visitor test-string-output-visitor test-visitor-serialization +fsdev/virtfs-proxy-helper fsdev/virtfs-proxy-helper.1 fsdev/virtfs-proxy-helper.pod .gdbinit
Signature · 1 line
1.8.0.2
PATCH 7/10 fix build error on ARM due to wrong glibc check
In reply to Stefan HajnocziFrom: John Spencer <[email protected]>
the test for glibc < 2 "succeeds" wrongly for any non-glibc C library, and breaks the build on musl libc.
we must first test if __GLIBC__ is defined at all, before using it unconditionally.
--- user-exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
user-exec.c +1 -1
@@ -436,7 +436,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,unsigned long pc;int is_write; -#if (__GLIBC__ <2 || (__GLIBC__ ==2 && __GLIBC_MINOR__ <=3 )) +#if defined(__GLIBC__) && (__GLIBC__ <2 || (__GLIBC__ ==2 && __GLIBC_MINOR__ <=3 )) pc = uc->uc_mcontext.gregs[R15 ];#else pc = uc->uc_mcontext.arm_pc;
Signature · 1 line
1.8.0.2
PATCH 8/10 linux-user/syscall.c: remove wrong forward decl of setgroups()
In reply to Stefan HajnocziFrom: John Spencer <[email protected]>
this declaration is wrong:
the correct prototype on linux is:
int setgroups(size_t size, const gid_t *list);
since by default musl libc exposes this symbol in unistd.h additionally to grp.h, the wrong declaration causes a build error.
the proper fix is to simply include the correct header.
--- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/syscall.c +1 -1
@@ -28,6 +28,7 @@#include <fcntl.h> #include <time.h> #include <limits.h> +#include <grp.h> #include <sys/types.h> #include <sys/ipc.h> #include <sys/msg.h>
@@ -584,7 +585,6 @@ extern int personality(int);extern int flock (int ,int );extern int setfsuid (int );extern int setfsgid (int ); -extern int setgroups (int ,gid_t *);/* ARM EABI and MIPS expect 64bit types aligned even on pairs or registers */ #ifdef TARGET_ARM
Signature · 1 line
1.8.0.2
PATCH 9/10 vmmouse_reset(): remove minimal code duplication
In reply to Stefan HajnocziFrom: Laszlo Ersek <[email protected]>
Commit 069ab0eb added a vmmouse_disable() call to vmmouse_reset(). vmmouse_disable() resets the status already.
--- hw/vmmouse.c | 1 - 1 file changed, 1 deletion(-)
hw/vmmouse.c +0 -1
@@ -252,7 +252,6 @@ static void vmmouse_reset(DeviceState *d) {VMMouseState *s =container_of (d, VMMouseState, dev.qdev); - s->status =0xffff ; s->queue_size =VMMOUSE_QUEUE_SIZE ;vmmouse_disable (s);
Signature · 1 line
1.8.0.2
PATCH 10/10 configure: Earlier pkg-config probe
In reply to Stefan HajnocziFrom: Stefan Weil <[email protected]>
Probe pkg-config before it is used for the first time (libseccomp check).
--- configure | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
configure +8 -8
@@ -1360,6 +1360,14 @@ esac fi ########################################## +# pkg-config probe + +if ! has "$pkg_config_exe"; then + echo "Error: pkg-config binary '$pkg_config_exe' not found" + exit 1 +fi + +########################################## # NPTL probe if test "$nptl" != "no" ; then
@@ -1590,14 +1598,6 @@ if test "$xen_pci_passthrough" != "no"; then fi ########################################## -# pkg-config probe - -if ! has "$pkg_config_exe"; then - echo "Error: pkg-config binary '$pkg_config_exe' not found" - exit 1 -fi - -########################################## # libtool probe if ! has $libtool; then
Signature · 1 line
1.8.0.2
Quoted 11 lines · Stefan Hajnoczi
The following changes since commit
a8a826a3c3b8c8a1c4def0e9e22b46e78e6163a0:exec: refactor
cpu_restore_state(2012-12-16 08:35:24 +0000)are available in the git repository at:
git://github.com/stefanha/qemu.gittrivial-patchesfor you to fetch changes up to
779ab5e3ddb9ad903f9a0ec21e148ed7bfd2d255:configure: Earlier pkg-config probe (2012-12-18 17:40:40 +0100)
Pulled. Thanks.
Regards,
Anthony Liguori
Quoted 38 lines
----------------------------------------------------------------
Cole Robinson (1):
gitignore: Add virtfs-proxy-helperJohn Spencer (2):
fix build error on ARM due to wrong glibc checklinux-user/syscall.c: remove wrong forward decl ofsetgroups()Laszlo Ersek (1):
vmmouse_reset(): remove minimal code duplicationPeter Crosthwaite (4):
pflash_cfi01:qemu_log_mask"unimplemented" msg
pflash_cfi0x: Send debug messages to stderr
zynq_slcr: Compile time warning fixes.
arm_gic: Add cpu nr to Raised IRQ messageStefan Weil (1):
configure: Earlier pkg-config probeZhi Yong Wu (1):
net, hub: fix the indent in the comments.gitignore | 1 + configure | 16 ++++++++-------- hw/arm_gic.c | 2 +- hw/pflash_cfi01.c | 14 +++++++------- hw/pflash_cfi02.c | 6 +++--- hw/vmmouse.c | 1 - hw/zynq_slcr.c | 7 ++++--- linux-user/syscall.c | 2 +- net/hub.c | 2 +- user-exec.c | 2 +- 10 files changed, 27 insertions(+), 26 deletions(-)Signature · 1 line
1.8.0.2