* [Qemu-trivial] [PULL 00/17] trivial patches for 2013-12-27
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, qemu-devel
Here are collected trivial patches for more than 2 weeks.
There's nothing exciting here, most stuff is really trivial,
including a few simple bugfixes.
Except of one patch by Stefan Weil, which basically re-writes
help text code in ./configure to be much simpler and shorter
and easier to read and manage. While this change is trivial
indeed, it has a potential of being in conflict with other
changes/trees, if another tree is updating help text too.
Please pull.
Thanks,
/mjt
The following changes since commit f976b09ea249cccc3fd41c98aaf6512908db0bae:
PPC: Fix compilation with TCG debug (2013-12-22 19:15:55 +0100)
are available in the git repository at:
git://git.corpit.ru/qemu.git trivial-patches
for you to fetch changes up to 5e8138ec82e17b72a6686e7325285dd6a318ea7e:
acpi unit-test: Remove temporary disk after test (2013-12-28 01:50:07 +0400)
----------------------------------------------------------------
Alexander Graf (1):
x86: only allow real mode to access 32bit without LMA
Amos Kong (1):
fix -boot strict regressed in commit 6ef4716
Fam Zheng (1):
acpi unit-test: Remove temporary disk after test
Ingo van Lil (1):
doc: Mention chardev:id in available devices for -serial
Michael Tokarev (1):
vl: make boot_strict variable static (not used outside vl.c)
Stefan Weil (12):
hw/arm/highbank: Simplify code (memory region in device state)
openrisc: Fix spelling in comment (transaltion -> translation)
misc: Use macro ARRAY_SIZE where possible
ui/cocoa: Use macro ARRAY_SIZE where possible
exynos4210: Use macro ARRAY_SIZE where possible
linux-user: Use macro TARGET_NSIG_WORDS where possible
target-m68k: Replace qemu_assert by hw_error
configure: Rewrite code for help message
configure: Python tests must be done before help message
pxa27x: Reduce size of keyboard matrix mapping
pxa27x: Add 'const' attribute to keyboard maps
mainstone: Fix duplicate array values for key 'space'
configure | 362 +++++++++++++++++++++----------------------
hw/arm/highbank.c | 7 +-
hw/arm/mainstone.c | 15 +-
hw/arm/z2.c | 2 +-
hw/audio/intel-hda.c | 4 +-
hw/char/exynos4210_uart.c | 6 +-
hw/input/pxa2xx_keypad.c | 6 +-
hw/misc/exynos4210_pmu.c | 3 +-
include/hw/arm/pxa.h | 8 +-
linux-user/signal.c | 8 +-
net/net.c | 2 +-
qemu-char.c | 3 +-
qemu-options.hx | 2 +
target-i386/helper.c | 6 +
target-m68k/translate.c | 28 ++--
target-openrisc/translate.c | 2 +-
tests/acpi-test.c | 5 +-
ui/cocoa.m | 5 +-
vl.c | 5 +-
19 files changed, 242 insertions(+), 237 deletions(-)
^ permalink raw reply [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 00/17] trivial patches for 2013-12-27
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, qemu-devel
Here are collected trivial patches for more than 2 weeks.
There's nothing exciting here, most stuff is really trivial,
including a few simple bugfixes.
Except of one patch by Stefan Weil, which basically re-writes
help text code in ./configure to be much simpler and shorter
and easier to read and manage. While this change is trivial
indeed, it has a potential of being in conflict with other
changes/trees, if another tree is updating help text too.
Please pull.
Thanks,
/mjt
The following changes since commit f976b09ea249cccc3fd41c98aaf6512908db0bae:
PPC: Fix compilation with TCG debug (2013-12-22 19:15:55 +0100)
are available in the git repository at:
git://git.corpit.ru/qemu.git trivial-patches
for you to fetch changes up to 5e8138ec82e17b72a6686e7325285dd6a318ea7e:
acpi unit-test: Remove temporary disk after test (2013-12-28 01:50:07 +0400)
----------------------------------------------------------------
Alexander Graf (1):
x86: only allow real mode to access 32bit without LMA
Amos Kong (1):
fix -boot strict regressed in commit 6ef4716
Fam Zheng (1):
acpi unit-test: Remove temporary disk after test
Ingo van Lil (1):
doc: Mention chardev:id in available devices for -serial
Michael Tokarev (1):
vl: make boot_strict variable static (not used outside vl.c)
Stefan Weil (12):
hw/arm/highbank: Simplify code (memory region in device state)
openrisc: Fix spelling in comment (transaltion -> translation)
misc: Use macro ARRAY_SIZE where possible
ui/cocoa: Use macro ARRAY_SIZE where possible
exynos4210: Use macro ARRAY_SIZE where possible
linux-user: Use macro TARGET_NSIG_WORDS where possible
target-m68k: Replace qemu_assert by hw_error
configure: Rewrite code for help message
configure: Python tests must be done before help message
pxa27x: Reduce size of keyboard matrix mapping
pxa27x: Add 'const' attribute to keyboard maps
mainstone: Fix duplicate array values for key 'space'
configure | 362 +++++++++++++++++++++----------------------
hw/arm/highbank.c | 7 +-
hw/arm/mainstone.c | 15 +-
hw/arm/z2.c | 2 +-
hw/audio/intel-hda.c | 4 +-
hw/char/exynos4210_uart.c | 6 +-
hw/input/pxa2xx_keypad.c | 6 +-
hw/misc/exynos4210_pmu.c | 3 +-
include/hw/arm/pxa.h | 8 +-
linux-user/signal.c | 8 +-
net/net.c | 2 +-
qemu-char.c | 3 +-
qemu-options.hx | 2 +
target-i386/helper.c | 6 +
target-m68k/translate.c | 28 ++--
target-openrisc/translate.c | 2 +-
tests/acpi-test.c | 5 +-
ui/cocoa.m | 5 +-
vl.c | 5 +-
19 files changed, 242 insertions(+), 237 deletions(-)
^ permalink raw reply [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 01/17] hw/arm/highbank: Simplify code (memory region in device state)
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
The memory region can be included by value instead of by reference in the
device state.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/arm/highbank.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
index c75b425..d76a1d1 100644
--- a/hw/arm/highbank.c
+++ b/hw/arm/highbank.c
@@ -126,7 +126,7 @@ typedef struct {
SysBusDevice parent_obj;
/*< public >*/
- MemoryRegion *iomem;
+ MemoryRegion iomem;
uint32_t regs[NUM_REGS];
} HighbankRegsState;
@@ -155,10 +155,9 @@ static int highbank_regs_init(SysBusDevice *dev)
{
HighbankRegsState *s = HIGHBANK_REGISTERS(dev);
- s->iomem = g_new(MemoryRegion, 1);
- memory_region_init_io(s->iomem, OBJECT(s), &hb_mem_ops, s->regs,
+ memory_region_init_io(&s->iomem, OBJECT(s), &hb_mem_ops, s->regs,
"highbank_regs", 0x1000);
- sysbus_init_mmio(dev, s->iomem);
+ sysbus_init_mmio(dev, &s->iomem);
return 0;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 01/17] hw/arm/highbank: Simplify code (memory region in device state)
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
The memory region can be included by value instead of by reference in the
device state.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/arm/highbank.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
index c75b425..d76a1d1 100644
--- a/hw/arm/highbank.c
+++ b/hw/arm/highbank.c
@@ -126,7 +126,7 @@ typedef struct {
SysBusDevice parent_obj;
/*< public >*/
- MemoryRegion *iomem;
+ MemoryRegion iomem;
uint32_t regs[NUM_REGS];
} HighbankRegsState;
@@ -155,10 +155,9 @@ static int highbank_regs_init(SysBusDevice *dev)
{
HighbankRegsState *s = HIGHBANK_REGISTERS(dev);
- s->iomem = g_new(MemoryRegion, 1);
- memory_region_init_io(s->iomem, OBJECT(s), &hb_mem_ops, s->regs,
+ memory_region_init_io(&s->iomem, OBJECT(s), &hb_mem_ops, s->regs,
"highbank_regs", 0x1000);
- sysbus_init_mmio(dev, s->iomem);
+ sysbus_init_mmio(dev, &s->iomem);
return 0;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 02/17] openrisc: Fix spelling in comment (transaltion -> translation)
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
I also removed two hyphens in the same comment.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Jia Liu <proljc@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
target-openrisc/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-openrisc/translate.c b/target-openrisc/translate.c
index 91c60eb..b381477 100644
--- a/target-openrisc/translate.c
+++ b/target-openrisc/translate.c
@@ -112,7 +112,7 @@ void openrisc_translate_init(void)
}
}
-/* Writeback SR_F transaltion-space to execution-space. */
+/* Writeback SR_F translation space to execution space. */
static inline void wb_SR_F(void)
{
int label;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 02/17] openrisc: Fix spelling in comment (transaltion -> translation)
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
I also removed two hyphens in the same comment.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Jia Liu <proljc@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
target-openrisc/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-openrisc/translate.c b/target-openrisc/translate.c
index 91c60eb..b381477 100644
--- a/target-openrisc/translate.c
+++ b/target-openrisc/translate.c
@@ -112,7 +112,7 @@ void openrisc_translate_init(void)
}
}
-/* Writeback SR_F transaltion-space to execution-space. */
+/* Writeback SR_F translation space to execution space. */
static inline void wb_SR_F(void)
{
int label;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 03/17] misc: Use macro ARRAY_SIZE where possible
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori
Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel,
Gerd Hoffmann, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
This improves readability and simplifies the code.
Cc: Anthony Liguori <aliguori@amazon.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/audio/intel-hda.c | 4 ++--
net/net.c | 2 +-
qemu-char.c | 3 +--
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index 6ab8c24..d41f82c 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -900,7 +900,7 @@ static const IntelHDAReg *intel_hda_reg_find(IntelHDAState *d, hwaddr addr)
{
const IntelHDAReg *reg;
- if (addr >= sizeof(regtab)/sizeof(regtab[0])) {
+ if (addr >= ARRAY_SIZE(regtab)) {
goto noreg;
}
reg = regtab+addr;
@@ -1025,7 +1025,7 @@ static void intel_hda_regs_reset(IntelHDAState *d)
uint32_t *addr;
int i;
- for (i = 0; i < sizeof(regtab)/sizeof(regtab[0]); i++) {
+ for (i = 0; i < ARRAY_SIZE(regtab); i++) {
if (regtab[i].name == NULL) {
continue;
}
diff --git a/net/net.c b/net/net.c
index 9db88cc..f8db85f 100644
--- a/net/net.c
+++ b/net/net.c
@@ -856,7 +856,7 @@ static int net_host_check_device(const char *device)
,"vde"
#endif
};
- for (i = 0; i < sizeof(valid_param_list) / sizeof(char *); i++) {
+ for (i = 0; i < ARRAY_SIZE(valid_param_list); i++) {
if (!strncmp(valid_param_list[i], device,
strlen(valid_param_list[i])))
return 1;
diff --git a/qemu-char.c b/qemu-char.c
index 418dc69..30c5a6a 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -1975,8 +1975,7 @@ static void win_stdio_wait_func(void *opaque)
DWORD dwSize;
int i;
- ret = ReadConsoleInput(stdio->hStdIn, buf, sizeof(buf) / sizeof(*buf),
- &dwSize);
+ ret = ReadConsoleInput(stdio->hStdIn, buf, ARRAY_SIZE(buf), &dwSize);
if (!ret) {
/* Avoid error storm */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 03/17] misc: Use macro ARRAY_SIZE where possible
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori
Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel,
Gerd Hoffmann, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
This improves readability and simplifies the code.
Cc: Anthony Liguori <aliguori@amazon.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/audio/intel-hda.c | 4 ++--
net/net.c | 2 +-
qemu-char.c | 3 +--
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index 6ab8c24..d41f82c 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -900,7 +900,7 @@ static const IntelHDAReg *intel_hda_reg_find(IntelHDAState *d, hwaddr addr)
{
const IntelHDAReg *reg;
- if (addr >= sizeof(regtab)/sizeof(regtab[0])) {
+ if (addr >= ARRAY_SIZE(regtab)) {
goto noreg;
}
reg = regtab+addr;
@@ -1025,7 +1025,7 @@ static void intel_hda_regs_reset(IntelHDAState *d)
uint32_t *addr;
int i;
- for (i = 0; i < sizeof(regtab)/sizeof(regtab[0]); i++) {
+ for (i = 0; i < ARRAY_SIZE(regtab); i++) {
if (regtab[i].name == NULL) {
continue;
}
diff --git a/net/net.c b/net/net.c
index 9db88cc..f8db85f 100644
--- a/net/net.c
+++ b/net/net.c
@@ -856,7 +856,7 @@ static int net_host_check_device(const char *device)
,"vde"
#endif
};
- for (i = 0; i < sizeof(valid_param_list) / sizeof(char *); i++) {
+ for (i = 0; i < ARRAY_SIZE(valid_param_list); i++) {
if (!strncmp(valid_param_list[i], device,
strlen(valid_param_list[i])))
return 1;
diff --git a/qemu-char.c b/qemu-char.c
index 418dc69..30c5a6a 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -1975,8 +1975,7 @@ static void win_stdio_wait_func(void *opaque)
DWORD dwSize;
int i;
- ret = ReadConsoleInput(stdio->hStdIn, buf, sizeof(buf) / sizeof(*buf),
- &dwSize);
+ ret = ReadConsoleInput(stdio->hStdIn, buf, ARRAY_SIZE(buf), &dwSize);
if (!ret) {
/* Avoid error storm */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 04/17] ui/cocoa: Use macro ARRAY_SIZE where possible
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori
Cc: qemu-trivial, Stefan Weil, Andreas Färber, Michael Tokarev,
qemu-devel
From: Stefan Weil <sw@weilnetz.de>
This improves readability and simplifies the code.
Cc: Andreas Färber <andreas.faerber@web.de>
Cc: Anthony Liguori <aliguori@amazon.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
ui/cocoa.m | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index be49179..2524f18 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -240,9 +240,8 @@ int keymap[] =
static int cocoa_keycode_to_qemu(int keycode)
{
- if((sizeof(keymap)/sizeof(int)) <= keycode)
- {
- printf("(cocoa) warning unknow keycode 0x%x\n", keycode);
+ if (ARRAY_SIZE(keymap) <= keycode) {
+ printf("(cocoa) warning unknown keycode 0x%x\n", keycode);
return 0;
}
return keymap[keycode];
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 04/17] ui/cocoa: Use macro ARRAY_SIZE where possible
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori
Cc: qemu-trivial, Stefan Weil, Andreas Färber, Michael Tokarev,
qemu-devel
From: Stefan Weil <sw@weilnetz.de>
This improves readability and simplifies the code.
Cc: Andreas Färber <andreas.faerber@web.de>
Cc: Anthony Liguori <aliguori@amazon.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
ui/cocoa.m | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index be49179..2524f18 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -240,9 +240,8 @@ int keymap[] =
static int cocoa_keycode_to_qemu(int keycode)
{
- if((sizeof(keymap)/sizeof(int)) <= keycode)
- {
- printf("(cocoa) warning unknow keycode 0x%x\n", keycode);
+ if (ARRAY_SIZE(keymap) <= keycode) {
+ printf("(cocoa) warning unknown keycode 0x%x\n", keycode);
return 0;
}
return keymap[keycode];
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 05/17] exynos4210: Use macro ARRAY_SIZE where possible
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori
Cc: Evgeny Voevodin, qemu-trivial, Stefan Weil, Michael Tokarev,
qemu-devel, Igor Mitsyanko, Dmitry Solodkiy, Maksim Kozlov
From: Stefan Weil <sw@weilnetz.de>
This improves readability and simplifies the code.
Cc: Dmitry Solodkiy <d.solodkiy@samsung.com>
Cc: Evgeny Voevodin <e.voevodin@samsung.com>
Cc: Igor Mitsyanko <i.mitsyanko@gmail.com>
Cc: Maksim Kozlov <m.kozlov@samsung.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/char/exynos4210_uart.c | 6 ++----
hw/misc/exynos4210_pmu.c | 3 +--
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c
index eef23a0..19b59cc 100644
--- a/hw/char/exynos4210_uart.c
+++ b/hw/char/exynos4210_uart.c
@@ -192,10 +192,9 @@ typedef struct Exynos4210UartState {
static const char *exynos4210_uart_regname(hwaddr offset)
{
- int regs_number = sizeof(exynos4210_uart_regs) / sizeof(Exynos4210UartReg);
int i;
- for (i = 0; i < regs_number; i++) {
+ for (i = 0; i < ARRAY_SIZE(exynos4210_uart_regs); i++) {
if (offset == exynos4210_uart_regs[i].offset) {
return exynos4210_uart_regs[i].name;
}
@@ -544,10 +543,9 @@ static void exynos4210_uart_event(void *opaque, int event)
static void exynos4210_uart_reset(DeviceState *dev)
{
Exynos4210UartState *s = EXYNOS4210_UART(dev);
- int regs_number = sizeof(exynos4210_uart_regs)/sizeof(Exynos4210UartReg);
int i;
- for (i = 0; i < regs_number; i++) {
+ for (i = 0; i < ARRAY_SIZE(exynos4210_uart_regs); i++) {
s->reg[I_(exynos4210_uart_regs[i].offset)] =
exynos4210_uart_regs[i].reset_value;
}
diff --git a/hw/misc/exynos4210_pmu.c b/hw/misc/exynos4210_pmu.c
index cbf0795..5ec14d1 100644
--- a/hw/misc/exynos4210_pmu.c
+++ b/hw/misc/exynos4210_pmu.c
@@ -383,8 +383,7 @@ static const Exynos4210PmuReg exynos4210_pmu_regs[] = {
{"GPS_ALIVE_OPTION", GPS_ALIVE_OPTION, 0x00000001},
};
-#define PMU_NUM_OF_REGISTERS \
- (sizeof(exynos4210_pmu_regs) / sizeof(Exynos4210PmuReg))
+#define PMU_NUM_OF_REGISTERS ARRAY_SIZE(exynos4210_pmu_regs)
#define TYPE_EXYNOS4210_PMU "exynos4210.pmu"
#define EXYNOS4210_PMU(obj) \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 05/17] exynos4210: Use macro ARRAY_SIZE where possible
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori
Cc: Evgeny Voevodin, qemu-trivial, Stefan Weil, Michael Tokarev,
qemu-devel, Igor Mitsyanko, Dmitry Solodkiy, Maksim Kozlov
From: Stefan Weil <sw@weilnetz.de>
This improves readability and simplifies the code.
Cc: Dmitry Solodkiy <d.solodkiy@samsung.com>
Cc: Evgeny Voevodin <e.voevodin@samsung.com>
Cc: Igor Mitsyanko <i.mitsyanko@gmail.com>
Cc: Maksim Kozlov <m.kozlov@samsung.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/char/exynos4210_uart.c | 6 ++----
hw/misc/exynos4210_pmu.c | 3 +--
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c
index eef23a0..19b59cc 100644
--- a/hw/char/exynos4210_uart.c
+++ b/hw/char/exynos4210_uart.c
@@ -192,10 +192,9 @@ typedef struct Exynos4210UartState {
static const char *exynos4210_uart_regname(hwaddr offset)
{
- int regs_number = sizeof(exynos4210_uart_regs) / sizeof(Exynos4210UartReg);
int i;
- for (i = 0; i < regs_number; i++) {
+ for (i = 0; i < ARRAY_SIZE(exynos4210_uart_regs); i++) {
if (offset == exynos4210_uart_regs[i].offset) {
return exynos4210_uart_regs[i].name;
}
@@ -544,10 +543,9 @@ static void exynos4210_uart_event(void *opaque, int event)
static void exynos4210_uart_reset(DeviceState *dev)
{
Exynos4210UartState *s = EXYNOS4210_UART(dev);
- int regs_number = sizeof(exynos4210_uart_regs)/sizeof(Exynos4210UartReg);
int i;
- for (i = 0; i < regs_number; i++) {
+ for (i = 0; i < ARRAY_SIZE(exynos4210_uart_regs); i++) {
s->reg[I_(exynos4210_uart_regs[i].offset)] =
exynos4210_uart_regs[i].reset_value;
}
diff --git a/hw/misc/exynos4210_pmu.c b/hw/misc/exynos4210_pmu.c
index cbf0795..5ec14d1 100644
--- a/hw/misc/exynos4210_pmu.c
+++ b/hw/misc/exynos4210_pmu.c
@@ -383,8 +383,7 @@ static const Exynos4210PmuReg exynos4210_pmu_regs[] = {
{"GPS_ALIVE_OPTION", GPS_ALIVE_OPTION, 0x00000001},
};
-#define PMU_NUM_OF_REGISTERS \
- (sizeof(exynos4210_pmu_regs) / sizeof(Exynos4210PmuReg))
+#define PMU_NUM_OF_REGISTERS ARRAY_SIZE(exynos4210_pmu_regs)
#define TYPE_EXYNOS4210_PMU "exynos4210.pmu"
#define EXYNOS4210_PMU(obj) \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 06/17] linux-user: Use macro TARGET_NSIG_WORDS where possible
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori
Cc: qemu-trivial, Stefan Weil, Riku Voipio, Michael Tokarev,
qemu-devel
From: Stefan Weil <sw@weilnetz.de>
This improves readability and simplifies the code.
Cc: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
linux-user/signal.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 4e7148a..0034c70 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -2539,9 +2539,9 @@ void sparc64_set_context(CPUSPARCState *env)
abi_ulong *src, *dst;
src = ucp->tuc_sigmask.sig;
dst = target_set.sig;
- for (i = 0; i < sizeof(target_sigset_t) / sizeof(abi_ulong);
- i++, dst++, src++)
+ for (i = 0; i < TARGET_NSIG_WORDS; i++, dst++, src++) {
err |= __get_user(*dst, src);
+ }
if (err)
goto do_sigsegv;
}
@@ -2644,9 +2644,9 @@ void sparc64_get_context(CPUSPARCState *env)
abi_ulong *src, *dst;
src = target_set.sig;
dst = ucp->tuc_sigmask.sig;
- for (i = 0; i < sizeof(target_sigset_t) / sizeof(abi_ulong);
- i++, dst++, src++)
+ for (i = 0; i < TARGET_NSIG_WORDS; i++, dst++, src++) {
err |= __put_user(*src, dst);
+ }
if (err)
goto do_sigsegv;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 06/17] linux-user: Use macro TARGET_NSIG_WORDS where possible
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori
Cc: qemu-trivial, Stefan Weil, Riku Voipio, Michael Tokarev,
qemu-devel
From: Stefan Weil <sw@weilnetz.de>
This improves readability and simplifies the code.
Cc: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
linux-user/signal.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 4e7148a..0034c70 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -2539,9 +2539,9 @@ void sparc64_set_context(CPUSPARCState *env)
abi_ulong *src, *dst;
src = ucp->tuc_sigmask.sig;
dst = target_set.sig;
- for (i = 0; i < sizeof(target_sigset_t) / sizeof(abi_ulong);
- i++, dst++, src++)
+ for (i = 0; i < TARGET_NSIG_WORDS; i++, dst++, src++) {
err |= __get_user(*dst, src);
+ }
if (err)
goto do_sigsegv;
}
@@ -2644,9 +2644,9 @@ void sparc64_get_context(CPUSPARCState *env)
abi_ulong *src, *dst;
src = target_set.sig;
dst = ucp->tuc_sigmask.sig;
- for (i = 0; i < sizeof(target_sigset_t) / sizeof(abi_ulong);
- i++, dst++, src++)
+ for (i = 0; i < TARGET_NSIG_WORDS; i++, dst++, src++) {
err |= __put_user(*src, dst);
+ }
if (err)
goto do_sigsegv;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 07/17] x86: only allow real mode to access 32bit without LMA
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, Alexander Graf, qemu-devel
From: Alexander Graf <agraf@suse.de>
When we're running in non-64bit mode with qemu-system-x86_64 we can
still end up with virtual addresses that are above the 32bit boundary
if a segment offset is set up.
GNU Hurd does exactly that. It sets the segment offset to 0x80000000 and
puts its EIP value to 0x8xxxxxxx to access low memory.
This doesn't hit us when we enable paging, as there we just mask away the
unused bits. But with real mode, we assume that vaddr == paddr which is
wrong in this case. Real hardware wraps the virtual address around at the
32bit boundary. So let's do the same.
This fixes booting GNU Hurd in qemu-system-x86_64 for me.
Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
target-i386/helper.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 7c196ff..ed965d6 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -531,6 +531,12 @@ int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr,
if (!(env->cr[0] & CR0_PG_MASK)) {
pte = addr;
+#ifdef TARGET_X86_64
+ if (!(env->hflags & HF_LMA_MASK)) {
+ /* Without long mode we can only address 32bits in real mode */
+ pte = (uint32_t)pte;
+ }
+#endif
virt_addr = addr & TARGET_PAGE_MASK;
prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
page_size = 4096;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 07/17] x86: only allow real mode to access 32bit without LMA
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, Alexander Graf, qemu-devel
From: Alexander Graf <agraf@suse.de>
When we're running in non-64bit mode with qemu-system-x86_64 we can
still end up with virtual addresses that are above the 32bit boundary
if a segment offset is set up.
GNU Hurd does exactly that. It sets the segment offset to 0x80000000 and
puts its EIP value to 0x8xxxxxxx to access low memory.
This doesn't hit us when we enable paging, as there we just mask away the
unused bits. But with real mode, we assume that vaddr == paddr which is
wrong in this case. Real hardware wraps the virtual address around at the
32bit boundary. So let's do the same.
This fixes booting GNU Hurd in qemu-system-x86_64 for me.
Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
target-i386/helper.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 7c196ff..ed965d6 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -531,6 +531,12 @@ int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr,
if (!(env->cr[0] & CR0_PG_MASK)) {
pte = addr;
+#ifdef TARGET_X86_64
+ if (!(env->hflags & HF_LMA_MASK)) {
+ /* Without long mode we can only address 32bits in real mode */
+ pte = (uint32_t)pte;
+ }
+#endif
virt_addr = addr & TARGET_PAGE_MASK;
prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
page_size = 4096;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 08/17] vl: make boot_strict variable static (not used outside vl.c)
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, qemu-devel
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Amos Kong <akong@redhat.com>
---
vl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vl.c b/vl.c
index 7511e70..ed8debb 100644
--- a/vl.c
+++ b/vl.c
@@ -230,7 +230,7 @@ int ctrl_grab = 0;
unsigned int nb_prom_envs = 0;
const char *prom_envs[MAX_PROM_ENVS];
int boot_menu;
-bool boot_strict;
+static bool boot_strict;
uint8_t *boot_splash_filedata;
size_t boot_splash_filedata_size;
uint8_t qemu_extra_params_fw[2];
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 08/17] vl: make boot_strict variable static (not used outside vl.c)
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, qemu-devel
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Amos Kong <akong@redhat.com>
---
vl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vl.c b/vl.c
index 7511e70..ed8debb 100644
--- a/vl.c
+++ b/vl.c
@@ -230,7 +230,7 @@ int ctrl_grab = 0;
unsigned int nb_prom_envs = 0;
const char *prom_envs[MAX_PROM_ENVS];
int boot_menu;
-bool boot_strict;
+static bool boot_strict;
uint8_t *boot_splash_filedata;
size_t boot_splash_filedata_size;
uint8_t qemu_extra_params_fw[2];
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 09/17] fix -boot strict regressed in commit 6ef4716
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, qemu-devel
From: Amos Kong <akong@redhat.com>
Commit 6ef4716 cleaned up parsing of -boot option argument, but
accidentally dropped parameter strict. It should have been updated
exactly like parameter menu. Do that.
Signed-off-by: Amos Kong <akong@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
vl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/vl.c b/vl.c
index ed8debb..e755aea 100644
--- a/vl.c
+++ b/vl.c
@@ -461,7 +461,7 @@ static QemuOptsList qemu_boot_opts = {
.type = QEMU_OPT_STRING,
}, {
.name = "strict",
- .type = QEMU_OPT_STRING,
+ .type = QEMU_OPT_BOOL,
},
{ /*End of list */ }
},
@@ -4081,6 +4081,7 @@ int main(int argc, char **argv, char **envp)
}
boot_menu = qemu_opt_get_bool(opts, "menu", boot_menu);
+ boot_strict = qemu_opt_get_bool(opts, "strict", false);
}
if (!kernel_cmdline) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 09/17] fix -boot strict regressed in commit 6ef4716
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Amos Kong, Michael Tokarev, qemu-devel
From: Amos Kong <akong@redhat.com>
Commit 6ef4716 cleaned up parsing of -boot option argument, but
accidentally dropped parameter strict. It should have been updated
exactly like parameter menu. Do that.
Signed-off-by: Amos Kong <akong@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
vl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/vl.c b/vl.c
index ed8debb..e755aea 100644
--- a/vl.c
+++ b/vl.c
@@ -461,7 +461,7 @@ static QemuOptsList qemu_boot_opts = {
.type = QEMU_OPT_STRING,
}, {
.name = "strict",
- .type = QEMU_OPT_STRING,
+ .type = QEMU_OPT_BOOL,
},
{ /*End of list */ }
},
@@ -4081,6 +4081,7 @@ int main(int argc, char **argv, char **envp)
}
boot_menu = qemu_opt_get_bool(opts, "menu", boot_menu);
+ boot_strict = qemu_opt_get_bool(opts, "strict", false);
}
if (!kernel_cmdline) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 10/17] target-m68k: Replace qemu_assert by hw_error
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
hw_error is already used for target-arm and target-s390x.
Using it for target-m68k fixes this compiler warning with Darwin because
hw_error is declared with QEMU_NORETURN:
target-m68k/translate.c:671:13: warning:
variable 'offset' is used uninitialized whenever switch default is taken
[-Wsometimes-uninitialized]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
target-m68k/translate.c | 28 +++++++++-------------------
1 file changed, 9 insertions(+), 19 deletions(-)
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index f54b94a..259788e 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -110,14 +110,6 @@ void m68k_tcg_init(void)
store_dummy = tcg_global_mem_new(TCG_AREG0, -8, "NULL");
}
-static inline void qemu_assert(int cond, const char *msg)
-{
- if (!cond) {
- fprintf (stderr, "badness: %s\n", msg);
- abort();
- }
-}
-
/* internal defines */
typedef struct DisasContext {
CPUM68KState *env;
@@ -199,7 +191,7 @@ static inline TCGv gen_load(DisasContext * s, int opsize, TCGv addr, int sign)
tcg_gen_qemu_ld32u(tmp, addr, index);
break;
default:
- qemu_assert(0, "bad load size");
+ hw_error("%s: Bad load size\n", __func__);
}
gen_throws_exception = gen_last_qop;
return tmp;
@@ -233,7 +225,7 @@ static inline void gen_store(DisasContext *s, int opsize, TCGv addr, TCGv val)
tcg_gen_qemu_st32(val, addr, index);
break;
default:
- qemu_assert(0, "bad store size");
+ hw_error("%s: Bad store size\n", __func__);
}
gen_throws_exception = gen_last_qop;
}
@@ -437,8 +429,7 @@ static inline int opsize_bytes(int opsize)
case OS_SINGLE: return 4;
case OS_DOUBLE: return 8;
default:
- qemu_assert(0, "bad operand size");
- return 0;
+ hw_error("%s: Bad operand size\n", __func__);
}
}
@@ -465,8 +456,7 @@ static void gen_partset_reg(int opsize, TCGv reg, TCGv val)
tcg_gen_mov_i32(reg, val);
break;
default:
- qemu_assert(0, "Bad operand size");
- break;
+ hw_error("%s: Bad operand size\n", __func__);
}
}
@@ -495,7 +485,7 @@ static inline TCGv gen_extend(TCGv val, int opsize, int sign)
tmp = val;
break;
default:
- qemu_assert(0, "Bad operand size");
+ hw_error("%s: Bad operand size\n", __func__);
}
return tmp;
}
@@ -669,7 +659,7 @@ static TCGv gen_ea(CPUM68KState *env, DisasContext *s, uint16_t insn,
offset = read_im32(env, s);
break;
default:
- qemu_assert(0, "Bad immediate operand");
+ hw_error("%s: Bad immediate operand\n", __func__);
}
return tcg_const_i32(offset);
default:
@@ -2092,7 +2082,7 @@ DISAS_INSN(wdebug)
return;
}
/* TODO: Implement wdebug. */
- qemu_assert(0, "WDEBUG not implemented");
+ hw_error("%s: Not implemented\n", __func__);
}
DISAS_INSN(trap)
@@ -2467,13 +2457,13 @@ DISAS_INSN(fbcc)
DISAS_INSN(frestore)
{
/* TODO: Implement frestore. */
- qemu_assert(0, "FRESTORE not implemented");
+ hw_error("%s: Not implemented\n", __func__);
}
DISAS_INSN(fsave)
{
/* TODO: Implement fsave. */
- qemu_assert(0, "FSAVE not implemented");
+ hw_error("%s: Not implemented\n", __func__);
}
static inline TCGv gen_mac_extract_word(DisasContext *s, TCGv val, int upper)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 10/17] target-m68k: Replace qemu_assert by hw_error
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
hw_error is already used for target-arm and target-s390x.
Using it for target-m68k fixes this compiler warning with Darwin because
hw_error is declared with QEMU_NORETURN:
target-m68k/translate.c:671:13: warning:
variable 'offset' is used uninitialized whenever switch default is taken
[-Wsometimes-uninitialized]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
target-m68k/translate.c | 28 +++++++++-------------------
1 file changed, 9 insertions(+), 19 deletions(-)
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index f54b94a..259788e 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -110,14 +110,6 @@ void m68k_tcg_init(void)
store_dummy = tcg_global_mem_new(TCG_AREG0, -8, "NULL");
}
-static inline void qemu_assert(int cond, const char *msg)
-{
- if (!cond) {
- fprintf (stderr, "badness: %s\n", msg);
- abort();
- }
-}
-
/* internal defines */
typedef struct DisasContext {
CPUM68KState *env;
@@ -199,7 +191,7 @@ static inline TCGv gen_load(DisasContext * s, int opsize, TCGv addr, int sign)
tcg_gen_qemu_ld32u(tmp, addr, index);
break;
default:
- qemu_assert(0, "bad load size");
+ hw_error("%s: Bad load size\n", __func__);
}
gen_throws_exception = gen_last_qop;
return tmp;
@@ -233,7 +225,7 @@ static inline void gen_store(DisasContext *s, int opsize, TCGv addr, TCGv val)
tcg_gen_qemu_st32(val, addr, index);
break;
default:
- qemu_assert(0, "bad store size");
+ hw_error("%s: Bad store size\n", __func__);
}
gen_throws_exception = gen_last_qop;
}
@@ -437,8 +429,7 @@ static inline int opsize_bytes(int opsize)
case OS_SINGLE: return 4;
case OS_DOUBLE: return 8;
default:
- qemu_assert(0, "bad operand size");
- return 0;
+ hw_error("%s: Bad operand size\n", __func__);
}
}
@@ -465,8 +456,7 @@ static void gen_partset_reg(int opsize, TCGv reg, TCGv val)
tcg_gen_mov_i32(reg, val);
break;
default:
- qemu_assert(0, "Bad operand size");
- break;
+ hw_error("%s: Bad operand size\n", __func__);
}
}
@@ -495,7 +485,7 @@ static inline TCGv gen_extend(TCGv val, int opsize, int sign)
tmp = val;
break;
default:
- qemu_assert(0, "Bad operand size");
+ hw_error("%s: Bad operand size\n", __func__);
}
return tmp;
}
@@ -669,7 +659,7 @@ static TCGv gen_ea(CPUM68KState *env, DisasContext *s, uint16_t insn,
offset = read_im32(env, s);
break;
default:
- qemu_assert(0, "Bad immediate operand");
+ hw_error("%s: Bad immediate operand\n", __func__);
}
return tcg_const_i32(offset);
default:
@@ -2092,7 +2082,7 @@ DISAS_INSN(wdebug)
return;
}
/* TODO: Implement wdebug. */
- qemu_assert(0, "WDEBUG not implemented");
+ hw_error("%s: Not implemented\n", __func__);
}
DISAS_INSN(trap)
@@ -2467,13 +2457,13 @@ DISAS_INSN(fbcc)
DISAS_INSN(frestore)
{
/* TODO: Implement frestore. */
- qemu_assert(0, "FRESTORE not implemented");
+ hw_error("%s: Not implemented\n", __func__);
}
DISAS_INSN(fsave)
{
/* TODO: Implement fsave. */
- qemu_assert(0, "FSAVE not implemented");
+ hw_error("%s: Not implemented\n", __func__);
}
static inline TCGv gen_mac_extract_word(DisasContext *s, TCGv val, int upper)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 11/17] configure: Rewrite code for help message
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
In the new form most lines of the code now look like the final output:
there is no leading echo command and the lines are shorter.
The resulting output is nearly identical: the only difference is a blank
character which was deliberately removed:
@@ -8,7 +8,7 @@
--interp-prefix=PREFIX where to find shared libraries, etc.
use %M for cpu name [/usr/gnemul/qemu-%M]
--target-list=LIST set target list (default: build everything)
- Available targets: alpha-softmmu arm-softmmu
+ Available targets: alpha-softmmu arm-softmmu
cris-softmmu i386-softmmu lm32-softmmu m68k-softmmu
microblaze-softmmu microblazeel-softmmu mips-softmmu
mips64-softmmu mips64el-softmmu mipsel-softmmu
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
configure | 324 ++++++++++++++++++++++++++++++-------------------------------
1 file changed, 162 insertions(+), 162 deletions(-)
diff --git a/configure b/configure
index 07b6be3..552d865 100755
--- a/configure
+++ b/configure
@@ -1074,169 +1074,169 @@ cat << EOF
Usage: configure [options]
Options: [defaults in brackets after descriptions]
+Standard options:
+ --help print this message
+ --prefix=PREFIX install in PREFIX [$prefix]
+ --interp-prefix=PREFIX where to find shared libraries, etc.
+ use %M for cpu name [$interp_prefix]
+ --target-list=LIST set target list (default: build everything)
+$(echo Available targets: $default_target_list | \
+ fold -s -w 53 | sed -e 's/^/ /')
+
+Advanced options (experts only):
+ --source-path=PATH path of source code [$source_path]
+ --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]
+ --cc=CC use C compiler CC [$cc]
+ --iasl=IASL use ACPI compiler IASL [$iasl]
+ --host-cc=CC use C compiler CC [$host_cc] for code run at
+ build time
+ --cxx=CXX use C++ compiler CXX [$cxx]
+ --objcc=OBJCC use Objective-C compiler OBJCC [$objcc]
+ --extra-cflags=CFLAGS append extra C compiler flags QEMU_CFLAGS
+ --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS
+ --make=MAKE use specified make [$make]
+ --install=INSTALL use specified install [$install]
+ --python=PYTHON use specified python [$python]
+ --smbd=SMBD use specified smbd [$smbd]
+ --static enable static build [$static]
+ --mandir=PATH install man pages in PATH
+ --datadir=PATH install firmware in PATH$confsuffix
+ --docdir=PATH install documentation in PATH$confsuffix
+ --bindir=PATH install binaries in PATH
+ --libdir=PATH install libraries in PATH
+ --sysconfdir=PATH install config in PATH$confsuffix
+ --localstatedir=PATH install local state in PATH (set at runtime on win32)
+ --with-confsuffix=SUFFIX suffix for QEMU data inside datadir and sysconfdir [$confsuffix]
+ --enable-debug-tcg enable TCG debugging
+ --disable-debug-tcg disable TCG debugging (default)
+ --enable-debug-info enable debugging information (default)
+ --disable-debug-info disable debugging information
+ --enable-debug enable common debug build options
+ --enable-sparse enable sparse checker
+ --disable-sparse disable sparse checker (default)
+ --disable-strip disable stripping binaries
+ --disable-werror disable compilation abort on warning
+ --disable-sdl disable SDL
+ --enable-sdl enable SDL
+ --disable-gtk disable gtk UI
+ --enable-gtk enable gtk UI
+ --disable-virtfs disable VirtFS
+ --enable-virtfs enable VirtFS
+ --disable-vnc disable VNC
+ --enable-vnc enable VNC
+ --disable-cocoa disable Cocoa (Mac OS X only)
+ --enable-cocoa enable Cocoa (default on Mac OS X)
+ --audio-drv-list=LIST set audio drivers list:
+ Available drivers: $audio_possible_drivers
+ --block-drv-whitelist=L Same as --block-drv-rw-whitelist=L
+ --block-drv-rw-whitelist=L
+ set block driver read-write whitelist
+ (affects only QEMU, not qemu-img)
+ --block-drv-ro-whitelist=L
+ set block driver read-only whitelist
+ (affects only QEMU, not qemu-img)
+ --disable-xen disable xen backend driver support
+ --enable-xen enable xen backend driver support
+ --disable-xen-pci-passthrough
+ --enable-xen-pci-passthrough
+ --disable-brlapi disable BrlAPI
+ --enable-brlapi enable BrlAPI
+ --disable-vnc-tls disable TLS encryption for VNC server
+ --enable-vnc-tls enable TLS encryption for VNC server
+ --disable-vnc-sasl disable SASL encryption for VNC server
+ --enable-vnc-sasl enable SASL encryption for VNC server
+ --disable-vnc-jpeg disable JPEG lossy compression for VNC server
+ --enable-vnc-jpeg enable JPEG lossy compression for VNC server
+ --disable-vnc-png disable PNG compression for VNC server (default)
+ --enable-vnc-png enable PNG compression for VNC server
+ --disable-vnc-ws disable Websockets support for VNC server
+ --enable-vnc-ws enable Websockets support for VNC server
+ --disable-curses disable curses output
+ --enable-curses enable curses output
+ --disable-curl disable curl connectivity
+ --enable-curl enable curl connectivity
+ --disable-fdt disable fdt device tree
+ --enable-fdt enable fdt device tree
+ --disable-bluez disable bluez stack connectivity
+ --enable-bluez enable bluez stack connectivity
+ --disable-slirp disable SLIRP userspace network connectivity
+ --disable-kvm disable KVM acceleration support
+ --enable-kvm enable KVM acceleration support
+ --disable-rdma disable RDMA-based migration support
+ --enable-rdma enable RDMA-based migration support
+ --enable-tcg-interpreter enable TCG with bytecode interpreter (TCI)
+ --enable-system enable all system emulation targets
+ --disable-system disable all system emulation targets
+ --enable-user enable supported user emulation targets
+ --disable-user disable all user emulation targets
+ --enable-linux-user enable all linux usermode emulation targets
+ --disable-linux-user disable all linux usermode emulation targets
+ --enable-bsd-user enable all BSD usermode emulation targets
+ --disable-bsd-user disable all BSD usermode emulation targets
+ --enable-guest-base enable GUEST_BASE support for usermode
+ emulation targets
+ --disable-guest-base disable GUEST_BASE support
+ --enable-pie build Position Independent Executables
+ --disable-pie do not build Position Independent Executables
+ --fmod-lib path to FMOD library
+ --fmod-inc path to FMOD includes
+ --oss-lib path to OSS library
+ --enable-uname-release=R Return R for uname -r in usermode emulation
+ --cpu=CPU Build for host CPU [$cpu]
+ --disable-uuid disable uuid support
+ --enable-uuid enable uuid support
+ --disable-vde disable support for vde network
+ --enable-vde enable support for vde network
+ --disable-netmap disable support for netmap network
+ --enable-netmap enable support for netmap network
+ --disable-linux-aio disable Linux AIO support
+ --enable-linux-aio enable Linux AIO support
+ --disable-cap-ng disable libcap-ng support
+ --enable-cap-ng enable libcap-ng support
+ --disable-attr disables attr and xattr support
+ --enable-attr enable attr and xattr support
+ --disable-blobs disable installing provided firmware blobs
+ --enable-docs enable documentation build
+ --disable-docs disable documentation build
+ --disable-vhost-net disable vhost-net acceleration support
+ --enable-vhost-net enable vhost-net acceleration support
+ --enable-trace-backend=B Set trace backend
+ Available backends: $($python $source_path/scripts/tracetool.py --list-backends)
+ --with-trace-file=NAME Full PATH,NAME of file to store traces
+ Default:trace-<pid>
+ --disable-spice disable spice
+ --enable-spice enable spice
+ --enable-rbd enable building the rados block device (rbd)
+ --disable-libiscsi disable iscsi support
+ --enable-libiscsi enable iscsi support
+ --disable-smartcard-nss disable smartcard nss support
+ --enable-smartcard-nss enable smartcard nss support
+ --disable-libusb disable libusb (for usb passthrough)
+ --enable-libusb enable libusb (for usb passthrough)
+ --disable-usb-redir disable usb network redirection support
+ --enable-usb-redir enable usb network redirection support
+ --disable-guest-agent disable building of the QEMU Guest Agent
+ --enable-guest-agent enable building of the QEMU Guest Agent
+ --with-vss-sdk=SDK-path enable Windows VSS support in QEMU Guest Agent
+ --with-win-sdk=SDK-path path to Windows Platform SDK (to build VSS .tlb)
+ --disable-seccomp disable seccomp support
+ --enable-seccomp enables seccomp support
+ --with-coroutine=BACKEND coroutine backend. Supported options:
+ gthread, ucontext, sigaltstack, windows
+ --disable-coroutine-pool disable coroutine freelist (worse performance)
+ --enable-coroutine-pool enable coroutine freelist (better performance)
+ --enable-glusterfs enable GlusterFS backend
+ --disable-glusterfs disable GlusterFS backend
+ --enable-gcov enable test coverage analysis with gcov
+ --gcov=GCOV use specified gcov [$gcov_tool]
+ --enable-tpm enable TPM support
+ --disable-libssh2 disable ssh block device support
+ --enable-libssh2 enable ssh block device support
+ --disable-vhdx disables support for the Microsoft VHDX image format
+ --enable-vhdx enable support for the Microsoft VHDX image format
+
+NOTE: The object files are built at the place where configure is launched
EOF
-echo "Standard options:"
-echo " --help print this message"
-echo " --prefix=PREFIX install in PREFIX [$prefix]"
-echo " --interp-prefix=PREFIX where to find shared libraries, etc."
-echo " use %M for cpu name [$interp_prefix]"
-echo " --target-list=LIST set target list (default: build everything)"
-echo "Available targets: $default_target_list" | \
- fold -s -w 53 | sed -e 's/^/ /'
-echo ""
-echo "Advanced options (experts only):"
-echo " --source-path=PATH path of source code [$source_path]"
-echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
-echo " --cc=CC use C compiler CC [$cc]"
-echo " --iasl=IASL use ACPI compiler IASL [$iasl]"
-echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"
-echo " build time"
-echo " --cxx=CXX use C++ compiler CXX [$cxx]"
-echo " --objcc=OBJCC use Objective-C compiler OBJCC [$objcc]"
-echo " --extra-cflags=CFLAGS append extra C compiler flags QEMU_CFLAGS"
-echo " --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS"
-echo " --make=MAKE use specified make [$make]"
-echo " --install=INSTALL use specified install [$install]"
-echo " --python=PYTHON use specified python [$python]"
-echo " --smbd=SMBD use specified smbd [$smbd]"
-echo " --static enable static build [$static]"
-echo " --mandir=PATH install man pages in PATH"
-echo " --datadir=PATH install firmware in PATH$confsuffix"
-echo " --docdir=PATH install documentation in PATH$confsuffix"
-echo " --bindir=PATH install binaries in PATH"
-echo " --libdir=PATH install libraries in PATH"
-echo " --sysconfdir=PATH install config in PATH$confsuffix"
-echo " --localstatedir=PATH install local state in PATH (set at runtime on win32)"
-echo " --with-confsuffix=SUFFIX suffix for QEMU data inside datadir and sysconfdir [$confsuffix]"
-echo " --enable-debug-tcg enable TCG debugging"
-echo " --disable-debug-tcg disable TCG debugging (default)"
-echo " --enable-debug-info enable debugging information (default)"
-echo " --disable-debug-info disable debugging information"
-echo " --enable-debug enable common debug build options"
-echo " --enable-sparse enable sparse checker"
-echo " --disable-sparse disable sparse checker (default)"
-echo " --disable-strip disable stripping binaries"
-echo " --disable-werror disable compilation abort on warning"
-echo " --disable-sdl disable SDL"
-echo " --enable-sdl enable SDL"
-echo " --disable-gtk disable gtk UI"
-echo " --enable-gtk enable gtk UI"
-echo " --disable-virtfs disable VirtFS"
-echo " --enable-virtfs enable VirtFS"
-echo " --disable-vnc disable VNC"
-echo " --enable-vnc enable VNC"
-echo " --disable-cocoa disable Cocoa (Mac OS X only)"
-echo " --enable-cocoa enable Cocoa (default on Mac OS X)"
-echo " --audio-drv-list=LIST set audio drivers list:"
-echo " Available drivers: $audio_possible_drivers"
-echo " --block-drv-whitelist=L Same as --block-drv-rw-whitelist=L"
-echo " --block-drv-rw-whitelist=L"
-echo " set block driver read-write whitelist"
-echo " (affects only QEMU, not qemu-img)"
-echo " --block-drv-ro-whitelist=L"
-echo " set block driver read-only whitelist"
-echo " (affects only QEMU, not qemu-img)"
-echo " --disable-xen disable xen backend driver support"
-echo " --enable-xen enable xen backend driver support"
-echo " --disable-xen-pci-passthrough"
-echo " --enable-xen-pci-passthrough"
-echo " --disable-brlapi disable BrlAPI"
-echo " --enable-brlapi enable BrlAPI"
-echo " --disable-vnc-tls disable TLS encryption for VNC server"
-echo " --enable-vnc-tls enable TLS encryption for VNC server"
-echo " --disable-vnc-sasl disable SASL encryption for VNC server"
-echo " --enable-vnc-sasl enable SASL encryption for VNC server"
-echo " --disable-vnc-jpeg disable JPEG lossy compression for VNC server"
-echo " --enable-vnc-jpeg enable JPEG lossy compression for VNC server"
-echo " --disable-vnc-png disable PNG compression for VNC server (default)"
-echo " --enable-vnc-png enable PNG compression for VNC server"
-echo " --disable-vnc-ws disable Websockets support for VNC server"
-echo " --enable-vnc-ws enable Websockets support for VNC server"
-echo " --disable-curses disable curses output"
-echo " --enable-curses enable curses output"
-echo " --disable-curl disable curl connectivity"
-echo " --enable-curl enable curl connectivity"
-echo " --disable-fdt disable fdt device tree"
-echo " --enable-fdt enable fdt device tree"
-echo " --disable-bluez disable bluez stack connectivity"
-echo " --enable-bluez enable bluez stack connectivity"
-echo " --disable-slirp disable SLIRP userspace network connectivity"
-echo " --disable-kvm disable KVM acceleration support"
-echo " --enable-kvm enable KVM acceleration support"
-echo " --disable-rdma disable RDMA-based migration support"
-echo " --enable-rdma enable RDMA-based migration support"
-echo " --enable-tcg-interpreter enable TCG with bytecode interpreter (TCI)"
-echo " --enable-system enable all system emulation targets"
-echo " --disable-system disable all system emulation targets"
-echo " --enable-user enable supported user emulation targets"
-echo " --disable-user disable all user emulation targets"
-echo " --enable-linux-user enable all linux usermode emulation targets"
-echo " --disable-linux-user disable all linux usermode emulation targets"
-echo " --enable-bsd-user enable all BSD usermode emulation targets"
-echo " --disable-bsd-user disable all BSD usermode emulation targets"
-echo " --enable-guest-base enable GUEST_BASE support for usermode"
-echo " emulation targets"
-echo " --disable-guest-base disable GUEST_BASE support"
-echo " --enable-pie build Position Independent Executables"
-echo " --disable-pie do not build Position Independent Executables"
-echo " --fmod-lib path to FMOD library"
-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 " --disable-uuid disable uuid support"
-echo " --enable-uuid enable uuid support"
-echo " --disable-vde disable support for vde network"
-echo " --enable-vde enable support for vde network"
-echo " --disable-netmap disable support for netmap network"
-echo " --enable-netmap enable support for netmap network"
-echo " --disable-linux-aio disable Linux AIO support"
-echo " --enable-linux-aio enable Linux AIO support"
-echo " --disable-cap-ng disable libcap-ng support"
-echo " --enable-cap-ng enable libcap-ng support"
-echo " --disable-attr disables attr and xattr support"
-echo " --enable-attr enable attr and xattr support"
-echo " --disable-blobs disable installing provided firmware blobs"
-echo " --enable-docs enable documentation build"
-echo " --disable-docs disable documentation build"
-echo " --disable-vhost-net disable vhost-net acceleration support"
-echo " --enable-vhost-net enable vhost-net acceleration support"
-echo " --enable-trace-backend=B Set trace backend"
-echo " Available backends:" $($python "$source_path"/scripts/tracetool.py --list-backends)
-echo " --with-trace-file=NAME Full PATH,NAME of file to store traces"
-echo " Default:trace-<pid>"
-echo " --disable-spice disable spice"
-echo " --enable-spice enable spice"
-echo " --enable-rbd enable building the rados block device (rbd)"
-echo " --disable-libiscsi disable iscsi support"
-echo " --enable-libiscsi enable iscsi support"
-echo " --disable-smartcard-nss disable smartcard nss support"
-echo " --enable-smartcard-nss enable smartcard nss support"
-echo " --disable-libusb disable libusb (for usb passthrough)"
-echo " --enable-libusb enable libusb (for usb passthrough)"
-echo " --disable-usb-redir disable usb network redirection support"
-echo " --enable-usb-redir enable usb network redirection support"
-echo " --disable-guest-agent disable building of the QEMU Guest Agent"
-echo " --enable-guest-agent enable building of the QEMU Guest Agent"
-echo " --with-vss-sdk=SDK-path enable Windows VSS support in QEMU Guest Agent"
-echo " --with-win-sdk=SDK-path path to Windows Platform SDK (to build VSS .tlb)"
-echo " --disable-seccomp disable seccomp support"
-echo " --enable-seccomp enables seccomp support"
-echo " --with-coroutine=BACKEND coroutine backend. Supported options:"
-echo " gthread, ucontext, sigaltstack, windows"
-echo " --disable-coroutine-pool disable coroutine freelist (worse performance)"
-echo " --enable-coroutine-pool enable coroutine freelist (better performance)"
-echo " --enable-glusterfs enable GlusterFS backend"
-echo " --disable-glusterfs disable GlusterFS backend"
-echo " --enable-gcov enable test coverage analysis with gcov"
-echo " --gcov=GCOV use specified gcov [$gcov_tool]"
-echo " --enable-tpm enable TPM support"
-echo " --disable-libssh2 disable ssh block device support"
-echo " --enable-libssh2 enable ssh block device support"
-echo " --disable-vhdx disables support for the Microsoft VHDX image format"
-echo " --enable-vhdx enable support for the Microsoft VHDX image format"
-echo ""
-echo "NOTE: The object files are built at the place where configure is launched"
exit 1
fi
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 11/17] configure: Rewrite code for help message
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
In the new form most lines of the code now look like the final output:
there is no leading echo command and the lines are shorter.
The resulting output is nearly identical: the only difference is a blank
character which was deliberately removed:
@@ -8,7 +8,7 @@
--interp-prefix=PREFIX where to find shared libraries, etc.
use %M for cpu name [/usr/gnemul/qemu-%M]
--target-list=LIST set target list (default: build everything)
- Available targets: alpha-softmmu arm-softmmu
+ Available targets: alpha-softmmu arm-softmmu
cris-softmmu i386-softmmu lm32-softmmu m68k-softmmu
microblaze-softmmu microblazeel-softmmu mips-softmmu
mips64-softmmu mips64el-softmmu mipsel-softmmu
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
configure | 324 ++++++++++++++++++++++++++++++-------------------------------
1 file changed, 162 insertions(+), 162 deletions(-)
diff --git a/configure b/configure
index 07b6be3..552d865 100755
--- a/configure
+++ b/configure
@@ -1074,169 +1074,169 @@ cat << EOF
Usage: configure [options]
Options: [defaults in brackets after descriptions]
+Standard options:
+ --help print this message
+ --prefix=PREFIX install in PREFIX [$prefix]
+ --interp-prefix=PREFIX where to find shared libraries, etc.
+ use %M for cpu name [$interp_prefix]
+ --target-list=LIST set target list (default: build everything)
+$(echo Available targets: $default_target_list | \
+ fold -s -w 53 | sed -e 's/^/ /')
+
+Advanced options (experts only):
+ --source-path=PATH path of source code [$source_path]
+ --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]
+ --cc=CC use C compiler CC [$cc]
+ --iasl=IASL use ACPI compiler IASL [$iasl]
+ --host-cc=CC use C compiler CC [$host_cc] for code run at
+ build time
+ --cxx=CXX use C++ compiler CXX [$cxx]
+ --objcc=OBJCC use Objective-C compiler OBJCC [$objcc]
+ --extra-cflags=CFLAGS append extra C compiler flags QEMU_CFLAGS
+ --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS
+ --make=MAKE use specified make [$make]
+ --install=INSTALL use specified install [$install]
+ --python=PYTHON use specified python [$python]
+ --smbd=SMBD use specified smbd [$smbd]
+ --static enable static build [$static]
+ --mandir=PATH install man pages in PATH
+ --datadir=PATH install firmware in PATH$confsuffix
+ --docdir=PATH install documentation in PATH$confsuffix
+ --bindir=PATH install binaries in PATH
+ --libdir=PATH install libraries in PATH
+ --sysconfdir=PATH install config in PATH$confsuffix
+ --localstatedir=PATH install local state in PATH (set at runtime on win32)
+ --with-confsuffix=SUFFIX suffix for QEMU data inside datadir and sysconfdir [$confsuffix]
+ --enable-debug-tcg enable TCG debugging
+ --disable-debug-tcg disable TCG debugging (default)
+ --enable-debug-info enable debugging information (default)
+ --disable-debug-info disable debugging information
+ --enable-debug enable common debug build options
+ --enable-sparse enable sparse checker
+ --disable-sparse disable sparse checker (default)
+ --disable-strip disable stripping binaries
+ --disable-werror disable compilation abort on warning
+ --disable-sdl disable SDL
+ --enable-sdl enable SDL
+ --disable-gtk disable gtk UI
+ --enable-gtk enable gtk UI
+ --disable-virtfs disable VirtFS
+ --enable-virtfs enable VirtFS
+ --disable-vnc disable VNC
+ --enable-vnc enable VNC
+ --disable-cocoa disable Cocoa (Mac OS X only)
+ --enable-cocoa enable Cocoa (default on Mac OS X)
+ --audio-drv-list=LIST set audio drivers list:
+ Available drivers: $audio_possible_drivers
+ --block-drv-whitelist=L Same as --block-drv-rw-whitelist=L
+ --block-drv-rw-whitelist=L
+ set block driver read-write whitelist
+ (affects only QEMU, not qemu-img)
+ --block-drv-ro-whitelist=L
+ set block driver read-only whitelist
+ (affects only QEMU, not qemu-img)
+ --disable-xen disable xen backend driver support
+ --enable-xen enable xen backend driver support
+ --disable-xen-pci-passthrough
+ --enable-xen-pci-passthrough
+ --disable-brlapi disable BrlAPI
+ --enable-brlapi enable BrlAPI
+ --disable-vnc-tls disable TLS encryption for VNC server
+ --enable-vnc-tls enable TLS encryption for VNC server
+ --disable-vnc-sasl disable SASL encryption for VNC server
+ --enable-vnc-sasl enable SASL encryption for VNC server
+ --disable-vnc-jpeg disable JPEG lossy compression for VNC server
+ --enable-vnc-jpeg enable JPEG lossy compression for VNC server
+ --disable-vnc-png disable PNG compression for VNC server (default)
+ --enable-vnc-png enable PNG compression for VNC server
+ --disable-vnc-ws disable Websockets support for VNC server
+ --enable-vnc-ws enable Websockets support for VNC server
+ --disable-curses disable curses output
+ --enable-curses enable curses output
+ --disable-curl disable curl connectivity
+ --enable-curl enable curl connectivity
+ --disable-fdt disable fdt device tree
+ --enable-fdt enable fdt device tree
+ --disable-bluez disable bluez stack connectivity
+ --enable-bluez enable bluez stack connectivity
+ --disable-slirp disable SLIRP userspace network connectivity
+ --disable-kvm disable KVM acceleration support
+ --enable-kvm enable KVM acceleration support
+ --disable-rdma disable RDMA-based migration support
+ --enable-rdma enable RDMA-based migration support
+ --enable-tcg-interpreter enable TCG with bytecode interpreter (TCI)
+ --enable-system enable all system emulation targets
+ --disable-system disable all system emulation targets
+ --enable-user enable supported user emulation targets
+ --disable-user disable all user emulation targets
+ --enable-linux-user enable all linux usermode emulation targets
+ --disable-linux-user disable all linux usermode emulation targets
+ --enable-bsd-user enable all BSD usermode emulation targets
+ --disable-bsd-user disable all BSD usermode emulation targets
+ --enable-guest-base enable GUEST_BASE support for usermode
+ emulation targets
+ --disable-guest-base disable GUEST_BASE support
+ --enable-pie build Position Independent Executables
+ --disable-pie do not build Position Independent Executables
+ --fmod-lib path to FMOD library
+ --fmod-inc path to FMOD includes
+ --oss-lib path to OSS library
+ --enable-uname-release=R Return R for uname -r in usermode emulation
+ --cpu=CPU Build for host CPU [$cpu]
+ --disable-uuid disable uuid support
+ --enable-uuid enable uuid support
+ --disable-vde disable support for vde network
+ --enable-vde enable support for vde network
+ --disable-netmap disable support for netmap network
+ --enable-netmap enable support for netmap network
+ --disable-linux-aio disable Linux AIO support
+ --enable-linux-aio enable Linux AIO support
+ --disable-cap-ng disable libcap-ng support
+ --enable-cap-ng enable libcap-ng support
+ --disable-attr disables attr and xattr support
+ --enable-attr enable attr and xattr support
+ --disable-blobs disable installing provided firmware blobs
+ --enable-docs enable documentation build
+ --disable-docs disable documentation build
+ --disable-vhost-net disable vhost-net acceleration support
+ --enable-vhost-net enable vhost-net acceleration support
+ --enable-trace-backend=B Set trace backend
+ Available backends: $($python $source_path/scripts/tracetool.py --list-backends)
+ --with-trace-file=NAME Full PATH,NAME of file to store traces
+ Default:trace-<pid>
+ --disable-spice disable spice
+ --enable-spice enable spice
+ --enable-rbd enable building the rados block device (rbd)
+ --disable-libiscsi disable iscsi support
+ --enable-libiscsi enable iscsi support
+ --disable-smartcard-nss disable smartcard nss support
+ --enable-smartcard-nss enable smartcard nss support
+ --disable-libusb disable libusb (for usb passthrough)
+ --enable-libusb enable libusb (for usb passthrough)
+ --disable-usb-redir disable usb network redirection support
+ --enable-usb-redir enable usb network redirection support
+ --disable-guest-agent disable building of the QEMU Guest Agent
+ --enable-guest-agent enable building of the QEMU Guest Agent
+ --with-vss-sdk=SDK-path enable Windows VSS support in QEMU Guest Agent
+ --with-win-sdk=SDK-path path to Windows Platform SDK (to build VSS .tlb)
+ --disable-seccomp disable seccomp support
+ --enable-seccomp enables seccomp support
+ --with-coroutine=BACKEND coroutine backend. Supported options:
+ gthread, ucontext, sigaltstack, windows
+ --disable-coroutine-pool disable coroutine freelist (worse performance)
+ --enable-coroutine-pool enable coroutine freelist (better performance)
+ --enable-glusterfs enable GlusterFS backend
+ --disable-glusterfs disable GlusterFS backend
+ --enable-gcov enable test coverage analysis with gcov
+ --gcov=GCOV use specified gcov [$gcov_tool]
+ --enable-tpm enable TPM support
+ --disable-libssh2 disable ssh block device support
+ --enable-libssh2 enable ssh block device support
+ --disable-vhdx disables support for the Microsoft VHDX image format
+ --enable-vhdx enable support for the Microsoft VHDX image format
+
+NOTE: The object files are built at the place where configure is launched
EOF
-echo "Standard options:"
-echo " --help print this message"
-echo " --prefix=PREFIX install in PREFIX [$prefix]"
-echo " --interp-prefix=PREFIX where to find shared libraries, etc."
-echo " use %M for cpu name [$interp_prefix]"
-echo " --target-list=LIST set target list (default: build everything)"
-echo "Available targets: $default_target_list" | \
- fold -s -w 53 | sed -e 's/^/ /'
-echo ""
-echo "Advanced options (experts only):"
-echo " --source-path=PATH path of source code [$source_path]"
-echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
-echo " --cc=CC use C compiler CC [$cc]"
-echo " --iasl=IASL use ACPI compiler IASL [$iasl]"
-echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"
-echo " build time"
-echo " --cxx=CXX use C++ compiler CXX [$cxx]"
-echo " --objcc=OBJCC use Objective-C compiler OBJCC [$objcc]"
-echo " --extra-cflags=CFLAGS append extra C compiler flags QEMU_CFLAGS"
-echo " --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS"
-echo " --make=MAKE use specified make [$make]"
-echo " --install=INSTALL use specified install [$install]"
-echo " --python=PYTHON use specified python [$python]"
-echo " --smbd=SMBD use specified smbd [$smbd]"
-echo " --static enable static build [$static]"
-echo " --mandir=PATH install man pages in PATH"
-echo " --datadir=PATH install firmware in PATH$confsuffix"
-echo " --docdir=PATH install documentation in PATH$confsuffix"
-echo " --bindir=PATH install binaries in PATH"
-echo " --libdir=PATH install libraries in PATH"
-echo " --sysconfdir=PATH install config in PATH$confsuffix"
-echo " --localstatedir=PATH install local state in PATH (set at runtime on win32)"
-echo " --with-confsuffix=SUFFIX suffix for QEMU data inside datadir and sysconfdir [$confsuffix]"
-echo " --enable-debug-tcg enable TCG debugging"
-echo " --disable-debug-tcg disable TCG debugging (default)"
-echo " --enable-debug-info enable debugging information (default)"
-echo " --disable-debug-info disable debugging information"
-echo " --enable-debug enable common debug build options"
-echo " --enable-sparse enable sparse checker"
-echo " --disable-sparse disable sparse checker (default)"
-echo " --disable-strip disable stripping binaries"
-echo " --disable-werror disable compilation abort on warning"
-echo " --disable-sdl disable SDL"
-echo " --enable-sdl enable SDL"
-echo " --disable-gtk disable gtk UI"
-echo " --enable-gtk enable gtk UI"
-echo " --disable-virtfs disable VirtFS"
-echo " --enable-virtfs enable VirtFS"
-echo " --disable-vnc disable VNC"
-echo " --enable-vnc enable VNC"
-echo " --disable-cocoa disable Cocoa (Mac OS X only)"
-echo " --enable-cocoa enable Cocoa (default on Mac OS X)"
-echo " --audio-drv-list=LIST set audio drivers list:"
-echo " Available drivers: $audio_possible_drivers"
-echo " --block-drv-whitelist=L Same as --block-drv-rw-whitelist=L"
-echo " --block-drv-rw-whitelist=L"
-echo " set block driver read-write whitelist"
-echo " (affects only QEMU, not qemu-img)"
-echo " --block-drv-ro-whitelist=L"
-echo " set block driver read-only whitelist"
-echo " (affects only QEMU, not qemu-img)"
-echo " --disable-xen disable xen backend driver support"
-echo " --enable-xen enable xen backend driver support"
-echo " --disable-xen-pci-passthrough"
-echo " --enable-xen-pci-passthrough"
-echo " --disable-brlapi disable BrlAPI"
-echo " --enable-brlapi enable BrlAPI"
-echo " --disable-vnc-tls disable TLS encryption for VNC server"
-echo " --enable-vnc-tls enable TLS encryption for VNC server"
-echo " --disable-vnc-sasl disable SASL encryption for VNC server"
-echo " --enable-vnc-sasl enable SASL encryption for VNC server"
-echo " --disable-vnc-jpeg disable JPEG lossy compression for VNC server"
-echo " --enable-vnc-jpeg enable JPEG lossy compression for VNC server"
-echo " --disable-vnc-png disable PNG compression for VNC server (default)"
-echo " --enable-vnc-png enable PNG compression for VNC server"
-echo " --disable-vnc-ws disable Websockets support for VNC server"
-echo " --enable-vnc-ws enable Websockets support for VNC server"
-echo " --disable-curses disable curses output"
-echo " --enable-curses enable curses output"
-echo " --disable-curl disable curl connectivity"
-echo " --enable-curl enable curl connectivity"
-echo " --disable-fdt disable fdt device tree"
-echo " --enable-fdt enable fdt device tree"
-echo " --disable-bluez disable bluez stack connectivity"
-echo " --enable-bluez enable bluez stack connectivity"
-echo " --disable-slirp disable SLIRP userspace network connectivity"
-echo " --disable-kvm disable KVM acceleration support"
-echo " --enable-kvm enable KVM acceleration support"
-echo " --disable-rdma disable RDMA-based migration support"
-echo " --enable-rdma enable RDMA-based migration support"
-echo " --enable-tcg-interpreter enable TCG with bytecode interpreter (TCI)"
-echo " --enable-system enable all system emulation targets"
-echo " --disable-system disable all system emulation targets"
-echo " --enable-user enable supported user emulation targets"
-echo " --disable-user disable all user emulation targets"
-echo " --enable-linux-user enable all linux usermode emulation targets"
-echo " --disable-linux-user disable all linux usermode emulation targets"
-echo " --enable-bsd-user enable all BSD usermode emulation targets"
-echo " --disable-bsd-user disable all BSD usermode emulation targets"
-echo " --enable-guest-base enable GUEST_BASE support for usermode"
-echo " emulation targets"
-echo " --disable-guest-base disable GUEST_BASE support"
-echo " --enable-pie build Position Independent Executables"
-echo " --disable-pie do not build Position Independent Executables"
-echo " --fmod-lib path to FMOD library"
-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 " --disable-uuid disable uuid support"
-echo " --enable-uuid enable uuid support"
-echo " --disable-vde disable support for vde network"
-echo " --enable-vde enable support for vde network"
-echo " --disable-netmap disable support for netmap network"
-echo " --enable-netmap enable support for netmap network"
-echo " --disable-linux-aio disable Linux AIO support"
-echo " --enable-linux-aio enable Linux AIO support"
-echo " --disable-cap-ng disable libcap-ng support"
-echo " --enable-cap-ng enable libcap-ng support"
-echo " --disable-attr disables attr and xattr support"
-echo " --enable-attr enable attr and xattr support"
-echo " --disable-blobs disable installing provided firmware blobs"
-echo " --enable-docs enable documentation build"
-echo " --disable-docs disable documentation build"
-echo " --disable-vhost-net disable vhost-net acceleration support"
-echo " --enable-vhost-net enable vhost-net acceleration support"
-echo " --enable-trace-backend=B Set trace backend"
-echo " Available backends:" $($python "$source_path"/scripts/tracetool.py --list-backends)
-echo " --with-trace-file=NAME Full PATH,NAME of file to store traces"
-echo " Default:trace-<pid>"
-echo " --disable-spice disable spice"
-echo " --enable-spice enable spice"
-echo " --enable-rbd enable building the rados block device (rbd)"
-echo " --disable-libiscsi disable iscsi support"
-echo " --enable-libiscsi enable iscsi support"
-echo " --disable-smartcard-nss disable smartcard nss support"
-echo " --enable-smartcard-nss enable smartcard nss support"
-echo " --disable-libusb disable libusb (for usb passthrough)"
-echo " --enable-libusb enable libusb (for usb passthrough)"
-echo " --disable-usb-redir disable usb network redirection support"
-echo " --enable-usb-redir enable usb network redirection support"
-echo " --disable-guest-agent disable building of the QEMU Guest Agent"
-echo " --enable-guest-agent enable building of the QEMU Guest Agent"
-echo " --with-vss-sdk=SDK-path enable Windows VSS support in QEMU Guest Agent"
-echo " --with-win-sdk=SDK-path path to Windows Platform SDK (to build VSS .tlb)"
-echo " --disable-seccomp disable seccomp support"
-echo " --enable-seccomp enables seccomp support"
-echo " --with-coroutine=BACKEND coroutine backend. Supported options:"
-echo " gthread, ucontext, sigaltstack, windows"
-echo " --disable-coroutine-pool disable coroutine freelist (worse performance)"
-echo " --enable-coroutine-pool enable coroutine freelist (better performance)"
-echo " --enable-glusterfs enable GlusterFS backend"
-echo " --disable-glusterfs disable GlusterFS backend"
-echo " --enable-gcov enable test coverage analysis with gcov"
-echo " --gcov=GCOV use specified gcov [$gcov_tool]"
-echo " --enable-tpm enable TPM support"
-echo " --disable-libssh2 disable ssh block device support"
-echo " --enable-libssh2 enable ssh block device support"
-echo " --disable-vhdx disables support for the Microsoft VHDX image format"
-echo " --enable-vhdx enable support for the Microsoft VHDX image format"
-echo ""
-echo "NOTE: The object files are built at the place where configure is launched"
exit 1
fi
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 12/17] configure: Python tests must be done before help message
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
The help message uses $python and displays its value, so that macro
should be tested and set early.
With this modification, configure --help displays the correct value
(usually python -B) and no longer creates several *.pyc files.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
configure | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/configure b/configure
index 552d865..57fe31e 100755
--- a/configure
+++ b/configure
@@ -1004,6 +1004,25 @@ for opt do
esac
done
+if ! has $python; then
+ error_exit "Python not found. Use --python=/path/to/python"
+fi
+
+# Note that if the Python conditional here evaluates True we will exit
+# with status 1 which is a shell 'false' value.
+if ! $python -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_info >= (3,))'; then
+ error_exit "Cannot use '$python', Python 2.4 or later is required." \
+ "Note that Python 3 or later is not yet supported." \
+ "Use --python=/path/to/python to specify a supported Python."
+fi
+
+# The -B switch was added in Python 2.6.
+# If it is supplied, compiled files are not written.
+# Use it for Python versions which support it.
+if $python -B -c 'import sys; sys.exit(0)' 2>/dev/null; then
+ python="$python -B"
+fi
+
case "$cpu" in
ppc)
CPU_CFLAGS="-m32"
@@ -1419,25 +1438,6 @@ if test "$solaris" = "yes" ; then
fi
fi
-if ! has $python; then
- error_exit "Python not found. Use --python=/path/to/python"
-fi
-
-# Note that if the Python conditional here evaluates True we will exit
-# with status 1 which is a shell 'false' value.
-if ! $python -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_info >= (3,))'; then
- error_exit "Cannot use '$python', Python 2.4 or later is required." \
- "Note that Python 3 or later is not yet supported." \
- "Use --python=/path/to/python to specify a supported Python."
-fi
-
-# The -B switch was added in Python 2.6.
-# If it is supplied, compiled files are not written.
-# Use it for Python versions which support it.
-if $python -B -c 'import sys; sys.exit(0)' 2>/dev/null; then
- python="$python -B"
-fi
-
if test -z "${target_list+xxx}" ; then
target_list="$default_target_list"
else
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 12/17] configure: Python tests must be done before help message
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
The help message uses $python and displays its value, so that macro
should be tested and set early.
With this modification, configure --help displays the correct value
(usually python -B) and no longer creates several *.pyc files.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
configure | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/configure b/configure
index 552d865..57fe31e 100755
--- a/configure
+++ b/configure
@@ -1004,6 +1004,25 @@ for opt do
esac
done
+if ! has $python; then
+ error_exit "Python not found. Use --python=/path/to/python"
+fi
+
+# Note that if the Python conditional here evaluates True we will exit
+# with status 1 which is a shell 'false' value.
+if ! $python -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_info >= (3,))'; then
+ error_exit "Cannot use '$python', Python 2.4 or later is required." \
+ "Note that Python 3 or later is not yet supported." \
+ "Use --python=/path/to/python to specify a supported Python."
+fi
+
+# The -B switch was added in Python 2.6.
+# If it is supplied, compiled files are not written.
+# Use it for Python versions which support it.
+if $python -B -c 'import sys; sys.exit(0)' 2>/dev/null; then
+ python="$python -B"
+fi
+
case "$cpu" in
ppc)
CPU_CFLAGS="-m32"
@@ -1419,25 +1438,6 @@ if test "$solaris" = "yes" ; then
fi
fi
-if ! has $python; then
- error_exit "Python not found. Use --python=/path/to/python"
-fi
-
-# Note that if the Python conditional here evaluates True we will exit
-# with status 1 which is a shell 'false' value.
-if ! $python -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_info >= (3,))'; then
- error_exit "Cannot use '$python', Python 2.4 or later is required." \
- "Note that Python 3 or later is not yet supported." \
- "Use --python=/path/to/python to specify a supported Python."
-fi
-
-# The -B switch was added in Python 2.6.
-# If it is supplied, compiled files are not written.
-# Use it for Python versions which support it.
-if $python -B -c 'import sys; sys.exit(0)' 2>/dev/null; then
- python="$python -B"
-fi
-
if test -z "${target_list+xxx}" ; then
target_list="$default_target_list"
else
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 13/17] doc: Mention chardev:id in available devices for -serial
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, qemu-devel, Ingo van Lil
From: Ingo van Lil <inguin@gmx.de>
It is possible to pre-define a character device with the -chardev option
and reference its id as serial device. The man page does not mention this
feature.
Use case: Use stdio as serial, but do not terminate VM on Ctrl-C
-chardev stdio,id=mystdio,signal=off -serial chardev:mystdio
Signed-off-by: Ingo van Lil <inguin@gmx.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
qemu-options.hx | 2 ++
1 file changed, 2 insertions(+)
diff --git a/qemu-options.hx b/qemu-options.hx
index bcfe9ea..56e5fdf 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2419,6 +2419,8 @@ vc:80Cx24C
No device is allocated.
@item null
void device
+@item chardev:@var{id}
+Use a named character device defined with the @code{-chardev} option.
@item /dev/XXX
[Linux only] Use host tty, e.g. @file{/dev/ttyS0}. The host serial port
parameters are set according to the emulated ones.
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 13/17] doc: Mention chardev:id in available devices for -serial
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, qemu-devel, Ingo van Lil
From: Ingo van Lil <inguin@gmx.de>
It is possible to pre-define a character device with the -chardev option
and reference its id as serial device. The man page does not mention this
feature.
Use case: Use stdio as serial, but do not terminate VM on Ctrl-C
-chardev stdio,id=mystdio,signal=off -serial chardev:mystdio
Signed-off-by: Ingo van Lil <inguin@gmx.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
qemu-options.hx | 2 ++
1 file changed, 2 insertions(+)
diff --git a/qemu-options.hx b/qemu-options.hx
index bcfe9ea..56e5fdf 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2419,6 +2419,8 @@ vc:80Cx24C
No device is allocated.
@item null
void device
+@item chardev:@var{id}
+Use a named character device defined with the @code{-chardev} option.
@item /dev/XXX
[Linux only] Use host tty, e.g. @file{/dev/ttyS0}. The host serial port
parameters are set according to the emulated ones.
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 14/17] pxa27x: Reduce size of keyboard matrix mapping
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
The row and column values use only a very limited range (-1 ... 7),
so a byte value is sufficient.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
include/hw/arm/pxa.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/hw/arm/pxa.h b/include/hw/arm/pxa.h
index a4e1a66..6db1ff3 100644
--- a/include/hw/arm/pxa.h
+++ b/include/hw/arm/pxa.h
@@ -102,8 +102,8 @@ void pxa2xx_pcmcia_set_irq_cb(void *opaque, qemu_irq irq, qemu_irq cd_irq);
/* pxa2xx_keypad.c */
struct keymap {
- int column;
- int row;
+ int8_t column;
+ int8_t row;
};
typedef struct PXA2xxKeyPadState PXA2xxKeyPadState;
PXA2xxKeyPadState *pxa27x_keypad_init(MemoryRegion *sysmem,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 14/17] pxa27x: Reduce size of keyboard matrix mapping
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
The row and column values use only a very limited range (-1 ... 7),
so a byte value is sufficient.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
include/hw/arm/pxa.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/hw/arm/pxa.h b/include/hw/arm/pxa.h
index a4e1a66..6db1ff3 100644
--- a/include/hw/arm/pxa.h
+++ b/include/hw/arm/pxa.h
@@ -102,8 +102,8 @@ void pxa2xx_pcmcia_set_irq_cb(void *opaque, qemu_irq irq, qemu_irq cd_irq);
/* pxa2xx_keypad.c */
struct keymap {
- int column;
- int row;
+ int8_t column;
+ int8_t row;
};
typedef struct PXA2xxKeyPadState PXA2xxKeyPadState;
PXA2xxKeyPadState *pxa27x_keypad_init(MemoryRegion *sysmem,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 15/17] pxa27x: Add 'const' attribute to keyboard maps
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
The mapping is a hardware feature, so it is relatively constant.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/arm/mainstone.c | 2 +-
hw/arm/z2.c | 2 +-
hw/input/pxa2xx_keypad.c | 6 +++---
include/hw/arm/pxa.h | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c
index 9402c84..276e359 100644
--- a/hw/arm/mainstone.c
+++ b/hw/arm/mainstone.c
@@ -45,7 +45,7 @@
#define S1_STSCHG_IRQ 14
#define S1_IRQ 15
-static struct keymap map[0xE0] = {
+static const struct keymap map[0xE0] = {
[0 ... 0xDF] = { -1, -1 },
[0x1e] = {0,0}, /* a */
[0x30] = {0,1}, /* b */
diff --git a/hw/arm/z2.c b/hw/arm/z2.c
index d52c501..97367b1 100644
--- a/hw/arm/z2.c
+++ b/hw/arm/z2.c
@@ -33,7 +33,7 @@
#define DPRINTF(fmt, ...)
#endif
-static struct keymap map[0x100] = {
+static const struct keymap map[0x100] = {
[0 ... 0xff] = { -1, -1 },
[0x3b] = {0, 0}, /* Option = F1 */
[0xc8] = {0, 1}, /* Up */
diff --git a/hw/input/pxa2xx_keypad.c b/hw/input/pxa2xx_keypad.c
index 846d137..b90b0ba 100644
--- a/hw/input/pxa2xx_keypad.c
+++ b/hw/input/pxa2xx_keypad.c
@@ -85,7 +85,7 @@
struct PXA2xxKeyPadState {
MemoryRegion iomem;
qemu_irq irq;
- struct keymap *map;
+ const struct keymap *map;
int pressed_cnt;
int alt_code;
@@ -322,8 +322,8 @@ PXA2xxKeyPadState *pxa27x_keypad_init(MemoryRegion *sysmem,
return s;
}
-void pxa27x_register_keypad(PXA2xxKeyPadState *kp, struct keymap *map,
- int size)
+void pxa27x_register_keypad(PXA2xxKeyPadState *kp,
+ const struct keymap *map, int size)
{
if(!map || size < 0x80) {
fprintf(stderr, "%s - No PXA keypad map defined\n", __FUNCTION__);
diff --git a/include/hw/arm/pxa.h b/include/hw/arm/pxa.h
index 6db1ff3..7ca330a 100644
--- a/include/hw/arm/pxa.h
+++ b/include/hw/arm/pxa.h
@@ -109,8 +109,8 @@ typedef struct PXA2xxKeyPadState PXA2xxKeyPadState;
PXA2xxKeyPadState *pxa27x_keypad_init(MemoryRegion *sysmem,
hwaddr base,
qemu_irq irq);
-void pxa27x_register_keypad(PXA2xxKeyPadState *kp, struct keymap *map,
- int size);
+void pxa27x_register_keypad(PXA2xxKeyPadState *kp,
+ const struct keymap *map, int size);
/* pxa2xx.c */
typedef struct PXA2xxI2CState PXA2xxI2CState;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 15/17] pxa27x: Add 'const' attribute to keyboard maps
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
The mapping is a hardware feature, so it is relatively constant.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/arm/mainstone.c | 2 +-
hw/arm/z2.c | 2 +-
hw/input/pxa2xx_keypad.c | 6 +++---
include/hw/arm/pxa.h | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c
index 9402c84..276e359 100644
--- a/hw/arm/mainstone.c
+++ b/hw/arm/mainstone.c
@@ -45,7 +45,7 @@
#define S1_STSCHG_IRQ 14
#define S1_IRQ 15
-static struct keymap map[0xE0] = {
+static const struct keymap map[0xE0] = {
[0 ... 0xDF] = { -1, -1 },
[0x1e] = {0,0}, /* a */
[0x30] = {0,1}, /* b */
diff --git a/hw/arm/z2.c b/hw/arm/z2.c
index d52c501..97367b1 100644
--- a/hw/arm/z2.c
+++ b/hw/arm/z2.c
@@ -33,7 +33,7 @@
#define DPRINTF(fmt, ...)
#endif
-static struct keymap map[0x100] = {
+static const struct keymap map[0x100] = {
[0 ... 0xff] = { -1, -1 },
[0x3b] = {0, 0}, /* Option = F1 */
[0xc8] = {0, 1}, /* Up */
diff --git a/hw/input/pxa2xx_keypad.c b/hw/input/pxa2xx_keypad.c
index 846d137..b90b0ba 100644
--- a/hw/input/pxa2xx_keypad.c
+++ b/hw/input/pxa2xx_keypad.c
@@ -85,7 +85,7 @@
struct PXA2xxKeyPadState {
MemoryRegion iomem;
qemu_irq irq;
- struct keymap *map;
+ const struct keymap *map;
int pressed_cnt;
int alt_code;
@@ -322,8 +322,8 @@ PXA2xxKeyPadState *pxa27x_keypad_init(MemoryRegion *sysmem,
return s;
}
-void pxa27x_register_keypad(PXA2xxKeyPadState *kp, struct keymap *map,
- int size)
+void pxa27x_register_keypad(PXA2xxKeyPadState *kp,
+ const struct keymap *map, int size)
{
if(!map || size < 0x80) {
fprintf(stderr, "%s - No PXA keypad map defined\n", __FUNCTION__);
diff --git a/include/hw/arm/pxa.h b/include/hw/arm/pxa.h
index 6db1ff3..7ca330a 100644
--- a/include/hw/arm/pxa.h
+++ b/include/hw/arm/pxa.h
@@ -109,8 +109,8 @@ typedef struct PXA2xxKeyPadState PXA2xxKeyPadState;
PXA2xxKeyPadState *pxa27x_keypad_init(MemoryRegion *sysmem,
hwaddr base,
qemu_irq irq);
-void pxa27x_register_keypad(PXA2xxKeyPadState *kp, struct keymap *map,
- int size);
+void pxa27x_register_keypad(PXA2xxKeyPadState *kp,
+ const struct keymap *map, int size);
/* pxa2xx.c */
typedef struct PXA2xxI2CState PXA2xxI2CState;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 16/17] mainstone: Fix duplicate array values for key 'space'
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
cgcc reported a duplicate initialisation. Mainstone includes a matrix
keyboard where two different positions map to 'space'.
QEMU uses the reversed mapping and does not map 'space' to two different
matrix positions.
Some other keys are either missing or might be mapped wrongly (cf. Linux
kernel code). Don't fix these until someone can test them with real
hardware, but add TODO comments.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/arm/mainstone.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c
index 276e359..d8e075e 100644
--- a/hw/arm/mainstone.c
+++ b/hw/arm/mainstone.c
@@ -75,9 +75,18 @@ static const struct keymap map[0xE0] = {
[0x2c] = {4,3}, /* z */
[0xc7] = {5,0}, /* Home */
[0x2a] = {5,1}, /* shift */
- [0x39] = {5,2}, /* space */
+ /*
+ * There are two matrix positions which map to space,
+ * but QEMU can only use one of them for the reverse
+ * mapping, so simply use the second one.
+ */
+ /* [0x39] = {5,2}, space */
[0x39] = {5,3}, /* space */
- [0x1c] = {5,5}, /* enter */
+ /*
+ * Matrix position {5,4} and other keys are missing here.
+ * TODO: Compare with Linux code and test real hardware.
+ */
+ [0x1c] = {5,5}, /* enter (TODO: might be wrong) */
[0xc8] = {6,0}, /* up */
[0xd0] = {6,1}, /* down */
[0xcb] = {6,2}, /* left */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 16/17] mainstone: Fix duplicate array values for key 'space'
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
cgcc reported a duplicate initialisation. Mainstone includes a matrix
keyboard where two different positions map to 'space'.
QEMU uses the reversed mapping and does not map 'space' to two different
matrix positions.
Some other keys are either missing or might be mapped wrongly (cf. Linux
kernel code). Don't fix these until someone can test them with real
hardware, but add TODO comments.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/arm/mainstone.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c
index 276e359..d8e075e 100644
--- a/hw/arm/mainstone.c
+++ b/hw/arm/mainstone.c
@@ -75,9 +75,18 @@ static const struct keymap map[0xE0] = {
[0x2c] = {4,3}, /* z */
[0xc7] = {5,0}, /* Home */
[0x2a] = {5,1}, /* shift */
- [0x39] = {5,2}, /* space */
+ /*
+ * There are two matrix positions which map to space,
+ * but QEMU can only use one of them for the reverse
+ * mapping, so simply use the second one.
+ */
+ /* [0x39] = {5,2}, space */
[0x39] = {5,3}, /* space */
- [0x1c] = {5,5}, /* enter */
+ /*
+ * Matrix position {5,4} and other keys are missing here.
+ * TODO: Compare with Linux code and test real hardware.
+ */
+ [0x1c] = {5,5}, /* enter (TODO: might be wrong) */
[0xc8] = {6,0}, /* up */
[0xd0] = {6,1}, /* down */
[0xcb] = {6,2}, /* left */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-trivial] [PULL 17/17] acpi unit-test: Remove temporary disk after test
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2013-12-27 22:07 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, Fam Zheng, qemu-devel
From: Fam Zheng <famz@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
tests/acpi-test.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/acpi-test.c b/tests/acpi-test.c
index ca83b1d..df1af83 100644
--- a/tests/acpi-test.c
+++ b/tests/acpi-test.c
@@ -382,6 +382,7 @@ int main(int argc, char *argv[])
{
const char *arch = qtest_get_arch();
FILE *f = fopen(disk, "w");
+ int ret;
fwrite(boot_sector, 1, sizeof boot_sector, f);
fclose(f);
@@ -390,5 +391,7 @@ int main(int argc, char *argv[])
if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
qtest_add_func("acpi/tcg", test_acpi_tcg);
}
- return g_test_run();
+ ret = g_test_run();
+ unlink(disk);
+ return ret;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [Qemu-devel] [PULL 17/17] acpi unit-test: Remove temporary disk after test
@ 2013-12-27 22:07 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2013-12-27 22:07 UTC (permalink / raw)
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, Fam Zheng, qemu-devel
From: Fam Zheng <famz@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
tests/acpi-test.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/acpi-test.c b/tests/acpi-test.c
index ca83b1d..df1af83 100644
--- a/tests/acpi-test.c
+++ b/tests/acpi-test.c
@@ -382,6 +382,7 @@ int main(int argc, char *argv[])
{
const char *arch = qtest_get_arch();
FILE *f = fopen(disk, "w");
+ int ret;
fwrite(boot_sector, 1, sizeof boot_sector, f);
fclose(f);
@@ -390,5 +391,7 @@ int main(int argc, char *argv[])
if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
qtest_add_func("acpi/tcg", test_acpi_tcg);
}
- return g_test_run();
+ ret = g_test_run();
+ unlink(disk);
+ return ret;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 42+ messages in thread
* Re: [Qemu-trivial] [PULL 10/17] target-m68k: Replace qemu_assert by hw_error
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
@ 2014-01-01 13:56 ` Stefan Weil
-1 siblings, 0 replies; 42+ messages in thread
From: Stefan Weil @ 2014-01-01 13:56 UTC (permalink / raw)
To: Michael Tokarev, aliguori; +Cc: qemu-trivial, qemu-devel
Am 27.12.2013 23:07, schrieb Michael Tokarev:
> From: Stefan Weil <sw@weilnetz.de>
>
> hw_error is already used for target-arm and target-s390x.
> Using it for target-m68k fixes this compiler warning with Darwin because
> hw_error is declared with QEMU_NORETURN:
>
> target-m68k/translate.c:671:13: warning:
> variable 'offset' is used uninitialized whenever switch default is taken
> [-Wsometimes-uninitialized]
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> ---
> target-m68k/translate.c | 28 +++++++++-------------------
> 1 file changed, 9 insertions(+), 19 deletions(-)
>
Hi,
I'm sorry that I have to revoke this patch.
hw_error is not available for user mode, so this patch fixes Darwin
(which only provides system emulation), but it breaks linking of
m68k-linux-user on Linux hosts.
target-arm and target-s390x use hw_error in conditional code which is
not compiled for user emulation, so they don't have this problem.
Regards
Stefan
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Qemu-devel] [PULL 10/17] target-m68k: Replace qemu_assert by hw_error
@ 2014-01-01 13:56 ` Stefan Weil
0 siblings, 0 replies; 42+ messages in thread
From: Stefan Weil @ 2014-01-01 13:56 UTC (permalink / raw)
To: Michael Tokarev, aliguori; +Cc: qemu-trivial, qemu-devel
Am 27.12.2013 23:07, schrieb Michael Tokarev:
> From: Stefan Weil <sw@weilnetz.de>
>
> hw_error is already used for target-arm and target-s390x.
> Using it for target-m68k fixes this compiler warning with Darwin because
> hw_error is declared with QEMU_NORETURN:
>
> target-m68k/translate.c:671:13: warning:
> variable 'offset' is used uninitialized whenever switch default is taken
> [-Wsometimes-uninitialized]
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> ---
> target-m68k/translate.c | 28 +++++++++-------------------
> 1 file changed, 9 insertions(+), 19 deletions(-)
>
Hi,
I'm sorry that I have to revoke this patch.
hw_error is not available for user mode, so this patch fixes Darwin
(which only provides system emulation), but it breaks linking of
m68k-linux-user on Linux hosts.
target-arm and target-s390x use hw_error in conditional code which is
not compiled for user emulation, so they don't have this problem.
Regards
Stefan
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Qemu-trivial] [PULL 10/17] target-m68k: Replace qemu_assert by hw_error
2014-01-01 13:56 ` [Qemu-devel] " Stefan Weil
@ 2014-01-01 14:05 ` Michael Tokarev
-1 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2014-01-01 14:05 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-trivial, qemu-devel, aliguori
01.01.2014 17:56, Stefan Weil wrote:
> I'm sorry that I have to revoke this patch.
Ow. Removed from the trivial-patches git tree.
/mjt
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Qemu-devel] [PULL 10/17] target-m68k: Replace qemu_assert by hw_error
@ 2014-01-01 14:05 ` Michael Tokarev
0 siblings, 0 replies; 42+ messages in thread
From: Michael Tokarev @ 2014-01-01 14:05 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-trivial, qemu-devel, aliguori
01.01.2014 17:56, Stefan Weil wrote:
> I'm sorry that I have to revoke this patch.
Ow. Removed from the trivial-patches git tree.
/mjt
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Qemu-trivial] [Qemu-devel] [PULL 10/17] target-m68k: Replace qemu_assert by hw_error
2014-01-01 13:56 ` [Qemu-devel] " Stefan Weil
@ 2014-01-01 15:29 ` Peter Maydell
-1 siblings, 0 replies; 42+ messages in thread
From: Peter Maydell @ 2014-01-01 15:29 UTC (permalink / raw)
To: Stefan Weil
Cc: QEMU Trivial, Michael Tokarev, QEMU Developers, Anthony Liguori
On 1 January 2014 13:56, Stefan Weil <sw@weilnetz.de> wrote:
> hw_error is not available for user mode, so this patch fixes Darwin
> (which only provides system emulation), but it breaks linking of
> m68k-linux-user on Linux hosts.
Maybe we need to come up with some better guidelines
about when to use the various choices of API we have
for fatal and otherwise unexpected errors:
* hw_error
* qemu_log_mask(LOG_UNIMP, ...) and continue
* assert
* g_assert and friends
* error*
* qerror*
* abort
* tcg_abort
* probably others I forget about...
At the moment there's a bit of a mix in existing code, and I don't
really know what the "best practices" are for when I'm reviewing
new code.
PS: does anybody actually find the full register dump hw_error()
spits out useful?
thanks
-- PMM
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Qemu-devel] [PULL 10/17] target-m68k: Replace qemu_assert by hw_error
@ 2014-01-01 15:29 ` Peter Maydell
0 siblings, 0 replies; 42+ messages in thread
From: Peter Maydell @ 2014-01-01 15:29 UTC (permalink / raw)
To: Stefan Weil
Cc: QEMU Trivial, Michael Tokarev, QEMU Developers, Anthony Liguori
On 1 January 2014 13:56, Stefan Weil <sw@weilnetz.de> wrote:
> hw_error is not available for user mode, so this patch fixes Darwin
> (which only provides system emulation), but it breaks linking of
> m68k-linux-user on Linux hosts.
Maybe we need to come up with some better guidelines
about when to use the various choices of API we have
for fatal and otherwise unexpected errors:
* hw_error
* qemu_log_mask(LOG_UNIMP, ...) and continue
* assert
* g_assert and friends
* error*
* qerror*
* abort
* tcg_abort
* probably others I forget about...
At the moment there's a bit of a mix in existing code, and I don't
really know what the "best practices" are for when I'm reviewing
new code.
PS: does anybody actually find the full register dump hw_error()
spits out useful?
thanks
-- PMM
^ permalink raw reply [flat|nested] 42+ messages in thread
end of thread, other threads:[~2014-01-01 15:30 UTC | newest]
Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-27 22:07 [Qemu-trivial] [PULL 00/17] trivial patches for 2013-12-27 Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2013-12-27 22:07 ` [Qemu-trivial] [PULL 01/17] hw/arm/highbank: Simplify code (memory region in device state) Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2013-12-27 22:07 ` [Qemu-trivial] [PULL 02/17] openrisc: Fix spelling in comment (transaltion -> translation) Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2013-12-27 22:07 ` [Qemu-trivial] [PULL 03/17] misc: Use macro ARRAY_SIZE where possible Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2013-12-27 22:07 ` [Qemu-trivial] [PULL 04/17] ui/cocoa: " Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2013-12-27 22:07 ` [Qemu-trivial] [PULL 05/17] exynos4210: " Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2013-12-27 22:07 ` [Qemu-trivial] [PULL 06/17] linux-user: Use macro TARGET_NSIG_WORDS " Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2013-12-27 22:07 ` [Qemu-trivial] [PULL 07/17] x86: only allow real mode to access 32bit without LMA Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2013-12-27 22:07 ` [Qemu-trivial] [PULL 08/17] vl: make boot_strict variable static (not used outside vl.c) Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2013-12-27 22:07 ` [Qemu-trivial] [PULL 09/17] fix -boot strict regressed in commit 6ef4716 Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2013-12-27 22:07 ` [Qemu-trivial] [PULL 10/17] target-m68k: Replace qemu_assert by hw_error Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2014-01-01 13:56 ` [Qemu-trivial] " Stefan Weil
2014-01-01 13:56 ` [Qemu-devel] " Stefan Weil
2014-01-01 14:05 ` [Qemu-trivial] " Michael Tokarev
2014-01-01 14:05 ` [Qemu-devel] " Michael Tokarev
2014-01-01 15:29 ` [Qemu-trivial] " Peter Maydell
2014-01-01 15:29 ` Peter Maydell
2013-12-27 22:07 ` [Qemu-trivial] [PULL 11/17] configure: Rewrite code for help message Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2013-12-27 22:07 ` [Qemu-trivial] [PULL 12/17] configure: Python tests must be done before " Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2013-12-27 22:07 ` [Qemu-trivial] [PULL 13/17] doc: Mention chardev:id in available devices for -serial Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2013-12-27 22:07 ` [Qemu-trivial] [PULL 14/17] pxa27x: Reduce size of keyboard matrix mapping Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2013-12-27 22:07 ` [Qemu-trivial] [PULL 15/17] pxa27x: Add 'const' attribute to keyboard maps Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2013-12-27 22:07 ` [Qemu-trivial] [PULL 16/17] mainstone: Fix duplicate array values for key 'space' Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
2013-12-27 22:07 ` [Qemu-trivial] [PULL 17/17] acpi unit-test: Remove temporary disk after test Michael Tokarev
2013-12-27 22:07 ` [Qemu-devel] " Michael Tokarev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.