* [Qemu-devel] [PATCH] s390: compile fixes
@ 2010-11-17 12:01 Alexander Graf
2010-11-17 17:07 ` Stefan Weil
2010-12-25 23:33 ` Aurelien Jarno
0 siblings, 2 replies; 4+ messages in thread
From: Alexander Graf @ 2010-11-17 12:01 UTC (permalink / raw)
To: QEMU-devel Developers; +Cc: Blue Swirl
The s390 target doesn't compile out of the box anymore. This patch fixes all
the obvious glitches that got introduced in the last few weeks.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
hw/s390-virtio-bus.h | 2 ++
hw/s390-virtio.c | 1 +
target-s390x/kvm.c | 2 +-
target-s390x/translate.c | 2 +-
4 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/s390-virtio-bus.h b/hw/s390-virtio-bus.h
index 41558c9..669b610 100644
--- a/hw/s390-virtio-bus.h
+++ b/hw/s390-virtio-bus.h
@@ -17,6 +17,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "virtio-net.h"
+
#define VIRTIO_DEV_OFFS_TYPE 0 /* 8 bits */
#define VIRTIO_DEV_OFFS_NUM_VQ 1 /* 8 bits */
#define VIRTIO_DEV_OFFS_FEATURE_LEN 2 /* 8 bits */
diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index e7aec14..f29b624 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -19,6 +19,7 @@
#include "hw.h"
#include "block.h"
+#include "blockdev.h"
#include "sysemu.h"
#include "net.h"
#include "boards.h"
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index 9bf6abb..adf4a9e 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -119,7 +119,7 @@ int kvm_arch_put_registers(CPUState *env, int level)
int kvm_arch_get_registers(CPUState *env)
{
- uint32_t ret;
+ int ret;
struct kvm_regs regs;
int i;
diff --git a/target-s390x/translate.c b/target-s390x/translate.c
index 881d8c4..d33bfb1 100644
--- a/target-s390x/translate.c
+++ b/target-s390x/translate.c
@@ -36,7 +36,7 @@ void cpu_dump_state(CPUState *env, FILE *f, fprintf_function cpu_fprintf,
}
}
for (i = 0; i < 16; i++) {
- cpu_fprintf(f, "F%02d=%016lx", i, env->fregs[i]);
+ cpu_fprintf(f, "F%02d=%016lx", i, (long)env->fregs[i].i);
if ((i % 4) == 3) {
cpu_fprintf(f, "\n");
} else {
--
1.6.0.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] s390: compile fixes
2010-11-17 12:01 [Qemu-devel] [PATCH] s390: compile fixes Alexander Graf
@ 2010-11-17 17:07 ` Stefan Weil
2010-11-17 17:10 ` Alexander Graf
2010-12-25 23:33 ` Aurelien Jarno
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Weil @ 2010-11-17 17:07 UTC (permalink / raw)
To: Alexander Graf; +Cc: Blue Swirl, QEMU-devel Developers
Am 17.11.2010 13:01, schrieb Alexander Graf:
> The s390 target doesn't compile out of the box anymore. This patch
> fixes all
> the obvious glitches that got introduced in the last few weeks.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
> hw/s390-virtio-bus.h | 2 ++
> hw/s390-virtio.c | 1 +
> target-s390x/kvm.c | 2 +-
> target-s390x/translate.c | 2 +-
> 4 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/hw/s390-virtio-bus.h b/hw/s390-virtio-bus.h
> index 41558c9..669b610 100644
> --- a/hw/s390-virtio-bus.h
> +++ b/hw/s390-virtio-bus.h
> @@ -17,6 +17,8 @@
> * License along with this library; if not, see
> <http://www.gnu.org/licenses/>.
> */
>
> +#include "virtio-net.h"
> +
> #define VIRTIO_DEV_OFFS_TYPE 0 /* 8 bits */
> #define VIRTIO_DEV_OFFS_NUM_VQ 1 /* 8 bits */
> #define VIRTIO_DEV_OFFS_FEATURE_LEN 2 /* 8 bits */
> diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
> index e7aec14..f29b624 100644
> --- a/hw/s390-virtio.c
> +++ b/hw/s390-virtio.c
> @@ -19,6 +19,7 @@
>
> #include "hw.h"
> #include "block.h"
> +#include "blockdev.h"
> #include "sysemu.h"
> #include "net.h"
> #include "boards.h"
> diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
> index 9bf6abb..adf4a9e 100644
> --- a/target-s390x/kvm.c
> +++ b/target-s390x/kvm.c
> @@ -119,7 +119,7 @@ int kvm_arch_put_registers(CPUState *env, int level)
>
> int kvm_arch_get_registers(CPUState *env)
> {
> - uint32_t ret;
> + int ret;
> struct kvm_regs regs;
> int i;
>
> diff --git a/target-s390x/translate.c b/target-s390x/translate.c
> index 881d8c4..d33bfb1 100644
> --- a/target-s390x/translate.c
> +++ b/target-s390x/translate.c
> @@ -36,7 +36,7 @@ void cpu_dump_state(CPUState *env, FILE *f,
> fprintf_function cpu_fprintf,
> }
> }
> for (i = 0; i < 16; i++) {
> - cpu_fprintf(f, "F%02d=%016lx", i, env->fregs[i]);
> + cpu_fprintf(f, "F%02d=%016lx", i, (long)env->fregs[i].i);
I have no s390 build environment, but from the code I assume
that using PRIx64 might be better than using a type cast here.
Regards,
Stefan
PS. Alexander, there are more patches with format checking
in the queue, perhaps you can test them on s390, too.
You can pull them from git://git.weilnetz.de/git/qemu for-blueswirl.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] s390: compile fixes
2010-11-17 17:07 ` Stefan Weil
@ 2010-11-17 17:10 ` Alexander Graf
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2010-11-17 17:10 UTC (permalink / raw)
To: Stefan Weil; +Cc: Blue Swirl, QEMU-devel Developers
On 17.11.2010, at 18:07, Stefan Weil wrote:
> Am 17.11.2010 13:01, schrieb Alexander Graf:
>> The s390 target doesn't compile out of the box anymore. This patch fixes all
>> the obvious glitches that got introduced in the last few weeks.
>>
>> Signed-off-by: Alexander Graf <agraf@suse.de>
>> ---
>> hw/s390-virtio-bus.h | 2 ++
>> hw/s390-virtio.c | 1 +
>> target-s390x/kvm.c | 2 +-
>> target-s390x/translate.c | 2 +-
>> 4 files changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/s390-virtio-bus.h b/hw/s390-virtio-bus.h
>> index 41558c9..669b610 100644
>> --- a/hw/s390-virtio-bus.h
>> +++ b/hw/s390-virtio-bus.h
>> @@ -17,6 +17,8 @@
>> * License along with this library; if not, see <http://www.gnu.org/licenses/>.
>> */
>>
>> +#include "virtio-net.h"
>> +
>> #define VIRTIO_DEV_OFFS_TYPE 0 /* 8 bits */
>> #define VIRTIO_DEV_OFFS_NUM_VQ 1 /* 8 bits */
>> #define VIRTIO_DEV_OFFS_FEATURE_LEN 2 /* 8 bits */
>> diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
>> index e7aec14..f29b624 100644
>> --- a/hw/s390-virtio.c
>> +++ b/hw/s390-virtio.c
>> @@ -19,6 +19,7 @@
>>
>> #include "hw.h"
>> #include "block.h"
>> +#include "blockdev.h"
>> #include "sysemu.h"
>> #include "net.h"
>> #include "boards.h"
>> diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
>> index 9bf6abb..adf4a9e 100644
>> --- a/target-s390x/kvm.c
>> +++ b/target-s390x/kvm.c
>> @@ -119,7 +119,7 @@ int kvm_arch_put_registers(CPUState *env, int level)
>>
>> int kvm_arch_get_registers(CPUState *env)
>> {
>> - uint32_t ret;
>> + int ret;
>> struct kvm_regs regs;
>> int i;
>>
>> diff --git a/target-s390x/translate.c b/target-s390x/translate.c
>> index 881d8c4..d33bfb1 100644
>> --- a/target-s390x/translate.c
>> +++ b/target-s390x/translate.c
>> @@ -36,7 +36,7 @@ void cpu_dump_state(CPUState *env, FILE *f, fprintf_function cpu_fprintf,
>> }
>> }
>> for (i = 0; i < 16; i++) {
>> - cpu_fprintf(f, "F%02d=%016lx", i, env->fregs[i]);
>> + cpu_fprintf(f, "F%02d=%016lx", i, (long)env->fregs[i].i);
>
> I have no s390 build environment, but from the code I assume
> that using PRIx64 might be better than using a type cast here.
It doesn't matter really, as the code only works on 64bit anyways.
Alex
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] s390: compile fixes
2010-11-17 12:01 [Qemu-devel] [PATCH] s390: compile fixes Alexander Graf
2010-11-17 17:07 ` Stefan Weil
@ 2010-12-25 23:33 ` Aurelien Jarno
1 sibling, 0 replies; 4+ messages in thread
From: Aurelien Jarno @ 2010-12-25 23:33 UTC (permalink / raw)
To: Alexander Graf; +Cc: Blue Swirl, QEMU-devel Developers
On Wed, Nov 17, 2010 at 01:01:04PM +0100, Alexander Graf wrote:
> The s390 target doesn't compile out of the box anymore. This patch fixes all
> the obvious glitches that got introduced in the last few weeks.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
Thanks, applied.
> ---
> hw/s390-virtio-bus.h | 2 ++
> hw/s390-virtio.c | 1 +
> target-s390x/kvm.c | 2 +-
> target-s390x/translate.c | 2 +-
> 4 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/hw/s390-virtio-bus.h b/hw/s390-virtio-bus.h
> index 41558c9..669b610 100644
> --- a/hw/s390-virtio-bus.h
> +++ b/hw/s390-virtio-bus.h
> @@ -17,6 +17,8 @@
> * License along with this library; if not, see <http://www.gnu.org/licenses/>.
> */
>
> +#include "virtio-net.h"
> +
> #define VIRTIO_DEV_OFFS_TYPE 0 /* 8 bits */
> #define VIRTIO_DEV_OFFS_NUM_VQ 1 /* 8 bits */
> #define VIRTIO_DEV_OFFS_FEATURE_LEN 2 /* 8 bits */
> diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
> index e7aec14..f29b624 100644
> --- a/hw/s390-virtio.c
> +++ b/hw/s390-virtio.c
> @@ -19,6 +19,7 @@
>
> #include "hw.h"
> #include "block.h"
> +#include "blockdev.h"
> #include "sysemu.h"
> #include "net.h"
> #include "boards.h"
> diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
> index 9bf6abb..adf4a9e 100644
> --- a/target-s390x/kvm.c
> +++ b/target-s390x/kvm.c
> @@ -119,7 +119,7 @@ int kvm_arch_put_registers(CPUState *env, int level)
>
> int kvm_arch_get_registers(CPUState *env)
> {
> - uint32_t ret;
> + int ret;
> struct kvm_regs regs;
> int i;
>
> diff --git a/target-s390x/translate.c b/target-s390x/translate.c
> index 881d8c4..d33bfb1 100644
> --- a/target-s390x/translate.c
> +++ b/target-s390x/translate.c
> @@ -36,7 +36,7 @@ void cpu_dump_state(CPUState *env, FILE *f, fprintf_function cpu_fprintf,
> }
> }
> for (i = 0; i < 16; i++) {
> - cpu_fprintf(f, "F%02d=%016lx", i, env->fregs[i]);
> + cpu_fprintf(f, "F%02d=%016lx", i, (long)env->fregs[i].i);
> if ((i % 4) == 3) {
> cpu_fprintf(f, "\n");
> } else {
> --
> 1.6.0.2
>
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-25 23:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-17 12:01 [Qemu-devel] [PATCH] s390: compile fixes Alexander Graf
2010-11-17 17:07 ` Stefan Weil
2010-11-17 17:10 ` Alexander Graf
2010-12-25 23:33 ` Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).