qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/6] Trivial patches for 18 December 2012 to 4 January 2013
@ 2013-01-04 13:55 Stefan Hajnoczi
  2013-01-04 13:55 ` [Qemu-devel] [PATCH 1/6] pc_sysfw: Check for qemu_find_file() failure Stefan Hajnoczi
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2013-01-04 13:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi

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(-)

-- 
1.8.0.2

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH 1/6] pc_sysfw: Check for qemu_find_file() failure
  2013-01-04 13:55 [Qemu-devel] [PULL 0/6] Trivial patches for 18 December 2012 to 4 January 2013 Stefan Hajnoczi
@ 2013-01-04 13:55 ` Stefan Hajnoczi
  2013-01-04 13:55 ` [Qemu-devel] [PATCH 2/6] pseries: Remove unneeded include statement (fixes MinGW builds) Stefan Hajnoczi
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2013-01-04 13:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Markus Armbruster, Stefan Hajnoczi

From: Markus Armbruster <armbru@redhat.com>

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.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/pc_sysfw.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/pc_sysfw.c b/hw/pc_sysfw.c
index 87e1fa9..7567593 100644
--- a/hw/pc_sysfw.c
+++ b/hw/pc_sysfw.c
@@ -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");
 
-- 
1.8.0.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH 2/6] pseries: Remove unneeded include statement (fixes MinGW builds)
  2013-01-04 13:55 [Qemu-devel] [PULL 0/6] Trivial patches for 18 December 2012 to 4 January 2013 Stefan Hajnoczi
  2013-01-04 13:55 ` [Qemu-devel] [PATCH 1/6] pc_sysfw: Check for qemu_find_file() failure Stefan Hajnoczi
@ 2013-01-04 13:55 ` Stefan Hajnoczi
  2013-01-04 13:55 ` [Qemu-devel] [PATCH 3/6] Remove --sparc_cpu option from the configure list Stefan Hajnoczi
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2013-01-04 13:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Weil, Anthony Liguori, Stefan Hajnoczi

From: Stefan Weil <sw@weilnetz.de>

sys/mman.h is not needed (tested on Linux) and unavailable for MinGW,
so remove it.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/spapr_nvram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/spapr_nvram.c b/hw/spapr_nvram.c
index f20f6b4..680cdba 100644
--- a/hw/spapr_nvram.c
+++ b/hw/spapr_nvram.c
@@ -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"
-- 
1.8.0.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH 3/6] Remove --sparc_cpu option from the configure list
  2013-01-04 13:55 [Qemu-devel] [PULL 0/6] Trivial patches for 18 December 2012 to 4 January 2013 Stefan Hajnoczi
  2013-01-04 13:55 ` [Qemu-devel] [PATCH 1/6] pc_sysfw: Check for qemu_find_file() failure Stefan Hajnoczi
  2013-01-04 13:55 ` [Qemu-devel] [PATCH 2/6] pseries: Remove unneeded include statement (fixes MinGW builds) Stefan Hajnoczi
@ 2013-01-04 13:55 ` Stefan Hajnoczi
  2013-01-04 13:55 ` [Qemu-devel] [PATCH 4/6] hw/mcf5206: Reduce size of lookup table Stefan Hajnoczi
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2013-01-04 13:55 UTC (permalink / raw)
  To: qemu-devel
  Cc: Anthony Liguori, Stefan Hajnoczi,
	陳韋任 (Wei-Ren Chen)

From: 陳韋任 (Wei-Ren Chen) <chenwj@iis.sinica.edu.tw>

  commit 9b9c37c36439ee0452632253dac7a31897f27f70 always assume sparcv9,
the others are no longer supported. Remove --sparc_cpu option from the
configure list.

Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 configure | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configure b/configure
index 9538041..db11e51 100755
--- a/configure
+++ b/configure
@@ -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"
-- 
1.8.0.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH 4/6] hw/mcf5206: Reduce size of lookup table
  2013-01-04 13:55 [Qemu-devel] [PULL 0/6] Trivial patches for 18 December 2012 to 4 January 2013 Stefan Hajnoczi
                   ` (2 preceding siblings ...)
  2013-01-04 13:55 ` [Qemu-devel] [PATCH 3/6] Remove --sparc_cpu option from the configure list Stefan Hajnoczi
@ 2013-01-04 13:55 ` Stefan Hajnoczi
  2013-01-04 13:55 ` [Qemu-devel] [PATCH 5/6] linux-user/syscall.c: remove forward declarations Stefan Hajnoczi
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2013-01-04 13:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Weil, Anthony Liguori, Stefan Hajnoczi

From: Stefan Weil <sw@weilnetz.de>

This typically reduces the size from 512 bytes to 128 bytes.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/mcf5206.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/mcf5206.c b/hw/mcf5206.c
index fe7a488..d8c0059 100644
--- a/hw/mcf5206.c
+++ b/hw/mcf5206.c
@@ -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,
-- 
1.8.0.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH 5/6] linux-user/syscall.c: remove forward declarations
  2013-01-04 13:55 [Qemu-devel] [PULL 0/6] Trivial patches for 18 December 2012 to 4 January 2013 Stefan Hajnoczi
                   ` (3 preceding siblings ...)
  2013-01-04 13:55 ` [Qemu-devel] [PATCH 4/6] hw/mcf5206: Reduce size of lookup table Stefan Hajnoczi
@ 2013-01-04 13:55 ` Stefan Hajnoczi
  2013-01-04 13:55 ` [Qemu-devel] [PATCH 6/6] spice: drop incorrect vm_change_state_handler() opaque Stefan Hajnoczi
  2013-01-04 20:21 ` [Qemu-devel] [PULL 0/6] Trivial patches for 18 December 2012 to 4 January 2013 Anthony Liguori
  6 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2013-01-04 13:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi, John Spencer

From: John Spencer <maillist-qemu@barfooze.de>

instead use the correct headers that define these functions.

Requested-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: John Spencer <maillist-qemu@barfooze.de>
Reviewed-by: Amos Kong <kongjianjun@gmail.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 linux-user/syscall.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index e99adab..3167a87 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -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) {
-- 
1.8.0.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH 6/6] spice: drop incorrect vm_change_state_handler() opaque
  2013-01-04 13:55 [Qemu-devel] [PULL 0/6] Trivial patches for 18 December 2012 to 4 January 2013 Stefan Hajnoczi
                   ` (4 preceding siblings ...)
  2013-01-04 13:55 ` [Qemu-devel] [PATCH 5/6] linux-user/syscall.c: remove forward declarations Stefan Hajnoczi
@ 2013-01-04 13:55 ` Stefan Hajnoczi
  2013-01-04 20:21 ` [Qemu-devel] [PULL 0/6] Trivial patches for 18 December 2012 to 4 January 2013 Anthony Liguori
  6 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2013-01-04 13:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi

The 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.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Uri Lublin <uril@redhat.com>
---
 ui/spice-core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/ui/spice-core.c b/ui/spice-core.c
index 3e44779..d83de2a 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -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);
-- 
1.8.0.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PULL 0/6] Trivial patches for 18 December 2012 to 4 January 2013
  2013-01-04 13:55 [Qemu-devel] [PULL 0/6] Trivial patches for 18 December 2012 to 4 January 2013 Stefan Hajnoczi
                   ` (5 preceding siblings ...)
  2013-01-04 13:55 ` [Qemu-devel] [PATCH 6/6] spice: drop incorrect vm_change_state_handler() opaque Stefan Hajnoczi
@ 2013-01-04 20:21 ` Anthony Liguori
  6 siblings, 0 replies; 8+ messages in thread
From: Anthony Liguori @ 2013-01-04 20:21 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel; +Cc: Anthony Liguori

Pulled, thanks.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-01-04 20:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-04 13:55 [Qemu-devel] [PULL 0/6] Trivial patches for 18 December 2012 to 4 January 2013 Stefan Hajnoczi
2013-01-04 13:55 ` [Qemu-devel] [PATCH 1/6] pc_sysfw: Check for qemu_find_file() failure Stefan Hajnoczi
2013-01-04 13:55 ` [Qemu-devel] [PATCH 2/6] pseries: Remove unneeded include statement (fixes MinGW builds) Stefan Hajnoczi
2013-01-04 13:55 ` [Qemu-devel] [PATCH 3/6] Remove --sparc_cpu option from the configure list Stefan Hajnoczi
2013-01-04 13:55 ` [Qemu-devel] [PATCH 4/6] hw/mcf5206: Reduce size of lookup table Stefan Hajnoczi
2013-01-04 13:55 ` [Qemu-devel] [PATCH 5/6] linux-user/syscall.c: remove forward declarations Stefan Hajnoczi
2013-01-04 13:55 ` [Qemu-devel] [PATCH 6/6] spice: drop incorrect vm_change_state_handler() opaque Stefan Hajnoczi
2013-01-04 20:21 ` [Qemu-devel] [PULL 0/6] Trivial patches for 18 December 2012 to 4 January 2013 Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).