* [Qemu-devel] PATCH: Building qemu on OpenSolaris 2009.06 (SPARC) host
@ 2009-11-26 20:39 Palle Lyckegaard
2009-11-27 19:27 ` Andreas Färber
0 siblings, 1 reply; 8+ messages in thread
From: Palle Lyckegaard @ 2009-11-26 20:39 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 185 bytes --]
Hello brave qemu developers!
Attached are a few patches that will enable qemu to build on a
OpenSolaris 2009.06 host.
Please consider to apply them to the repository.
Regards
Palle
[-- Attachment #2: Type: TEXT/PLAIN, Size: 1816 bytes --]
diff --git a/fpu/softfloat-native.h b/fpu/softfloat-native.h
index 0893ce3..592beca 100644
--- a/fpu/softfloat-native.h
+++ b/fpu/softfloat-native.h
@@ -21,7 +21,7 @@
*/
#if defined(CONFIG_SOLARIS) && \
((CONFIG_SOLARIS_VERSION <= 9 ) || \
- ((CONFIG_SOLARIS_VERSION >= 10) && (__GNUC__ < 4))) \
+ ((CONFIG_SOLARIS_VERSION == 10) && (__GNUC__ < 4))) \
|| (defined(__OpenBSD__) && (OpenBSD < 200811))
/*
* C99 7.12.3 classification macros
diff --git a/net/tap-solaris.c b/net/tap-solaris.c
index ef4e60c..05dcfc1 100644
--- a/net/tap-solaris.c
+++ b/net/tap-solaris.c
@@ -23,6 +23,7 @@
*/
#include "net/tap.h"
+#include "sysemu.h"
#include <sys/stat.h>
#include <sys/ethernet.h>
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h
index 63aead9..a742133 100644
--- a/target-sparc/cpu.h
+++ b/target-sparc/cpu.h
@@ -83,6 +83,7 @@
#define PSR_OVF (1 << PSR_OVF_SHIFT)
#define PSR_CARRY_SHIFT 20
#define PSR_CARRY (1 << PSR_CARRY_SHIFT)
+#if !defined(CONFIG_SOLARIS)
#define PSR_ICC (PSR_NEG|PSR_ZERO|PSR_OVF|PSR_CARRY)
#define PSR_EF (1<<12)
#define PSR_PIL 0xf00
@@ -90,6 +91,7 @@
#define PSR_PS (1<<6)
#define PSR_ET (1<<5)
#define PSR_CWP 0x1f
+#endif
#define CC_SRC (env->cc_src)
#define CC_SRC2 (env->cc_src2)
@@ -129,8 +131,9 @@ enum {
#define PS_IE (1<<1)
#define PS_AG (1<<0) /* v9, zero on UA2007 */
+#if !defined(CONFIG_SOLARIS)
#define FPRS_FEF (1<<2)
-
+#endif
#define HS_PRIV (1<<2)
#endif
@@ -187,7 +190,9 @@ enum {
#define FSR_FTT_INVAL_FPR (6ULL << 14)
#define FSR_FCC1_SHIFT 11
+#if !defined(CONFIG_SOLARIS)
#define FSR_FCC1 (1ULL << FSR_FCC1_SHIFT)
+#endif
#define FSR_FCC0_SHIFT 10
#define FSR_FCC0 (1ULL << FSR_FCC0_SHIFT)
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] PATCH: Building qemu on OpenSolaris 2009.06 (SPARC) host
2009-11-26 20:39 [Qemu-devel] PATCH: Building qemu on OpenSolaris 2009.06 (SPARC) host Palle Lyckegaard
@ 2009-11-27 19:27 ` Andreas Färber
2009-11-28 20:03 ` Palle Lyckegaard
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Färber @ 2009-11-27 19:27 UTC (permalink / raw)
To: Palle Lyckegaard; +Cc: qemu-devel
Hello,
Am 26.11.2009 um 21:39 schrieb Palle Lyckegaard:
> Attached are a few patches that will enable qemu to build on a
> OpenSolaris 2009.06 host.
I can ack the softfloat part (fixes redefinition warnings) and the tap
part (fixes an unresolved symbol TFR).
But what does the cpu.h part fix?
Andreas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] PATCH: Building qemu on OpenSolaris 2009.06 (SPARC) host
2009-11-27 19:27 ` Andreas Färber
@ 2009-11-28 20:03 ` Palle Lyckegaard
2009-11-28 23:54 ` Andreas Färber
0 siblings, 1 reply; 8+ messages in thread
From: Palle Lyckegaard @ 2009-11-28 20:03 UTC (permalink / raw)
To: Andreas Färber; +Cc: qemu-devel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 544 bytes --]
On Fri, 27 Nov 2009, Andreas Färber wrote:
> I can ack the softfloat part (fixes redefinition warnings) and the tap part
> (fixes an unresolved symbol TFR).
>
> But what does the cpu.h part fix?
>
> Andreas
>
Hi Andreas,
the cpu.h part is an attempt to avoid warnings about e.g. PSR_EF being
redefined in /usr/include/v7/sys/privregs.h on my OpenSolaris 2009.06
SPARC host.
Other redefines are PSR_ICC, PSR_PIL, PSR_S, ...
I consider the softfloat and the tap parts the most important of the three
patches.
/Palle
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] PATCH: Building qemu on OpenSolaris 2009.06 (SPARC) host
2009-11-28 20:03 ` Palle Lyckegaard
@ 2009-11-28 23:54 ` Andreas Färber
2009-11-29 12:34 ` Palle Lyckegaard
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Färber @ 2009-11-28 23:54 UTC (permalink / raw)
To: Palle Lyckegaard; +Cc: qemu-devel
Hi Palle,
Am 28.11.2009 um 21:03 schrieb Palle Lyckegaard:
> On Fri, 27 Nov 2009, Andreas Färber wrote:
>
>> I can ack the softfloat part (fixes redefinition warnings) and the
>> tap part (fixes an unresolved symbol TFR).
>>
>> But what does the cpu.h part fix?
>
> the cpu.h part is an attempt to avoid warnings about e.g. PSR_EF
> being redefined in /usr/include/v7/sys/privregs.h on my OpenSolaris
> 2009.06 SPARC host.
>
> Other redefines are PSR_ICC, PSR_PIL, PSR_S, ...
Not having that v7 dir on amd64 here, did you check whether their
values are really defined identically?
If not, it may be necessary to either #undef them first or to prefix
them with TARGET_ as done for the user emulators...
Andreas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] PATCH: Building qemu on OpenSolaris 2009.06 (SPARC) host
2009-11-28 23:54 ` Andreas Färber
@ 2009-11-29 12:34 ` Palle Lyckegaard
2009-11-29 14:42 ` Andreas Färber
0 siblings, 1 reply; 8+ messages in thread
From: Palle Lyckegaard @ 2009-11-29 12:34 UTC (permalink / raw)
To: Andreas Färber; +Cc: qemu-devel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 362 bytes --]
On Sun, 29 Nov 2009, Andreas Färber wrote:
>
> Not having that v7 dir on amd64 here, did you check whether their values are
> really defined identically?
> If not, it may be necessary to either #undef them first or to prefix them
> with TARGET_ as done for the user emulators...
>
In which files are TARGET_ examples found (linux-user/strace.c?)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] PATCH: Building qemu on OpenSolaris 2009.06 (SPARC) host
2009-11-29 12:34 ` Palle Lyckegaard
@ 2009-11-29 14:42 ` Andreas Färber
2009-11-29 20:09 ` Palle Lyckegaard
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Färber @ 2009-11-29 14:42 UTC (permalink / raw)
To: Palle Lyckegaard; +Cc: qemu-devel
Am 29.11.2009 um 13:34 schrieb Palle Lyckegaard:
> On Sun, 29 Nov 2009, Andreas Färber wrote:
>
>>
>> Not having that v7 dir on amd64 here, did you check whether their
>> values are really defined identically?
>> If not, it may be necessary to either #undef them first or to
>> prefix them with TARGET_ as done for the user emulators...
>>
>
> In which files are TARGET_ examples found (linux-user/strace.c?)
Yes, for example. grep -r came up with this line among many others:
./linux-user/x86_64/termbits.h:#define TARGET_TIOCPKT_NOSTOP 16
I.e. if unavoidable, instead of #define PSR_XXX 123 one might need to
#define TARGET_PSR_XXX 123 and change *all* uses of PSR_XXX to
TARGET_PSR_XXX, so that Sun's and QEMU's definitions can live side by
side. If your approach or #undef works correctly, that would seem less
intrusive, therefore my question.
Andreas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] PATCH: Building qemu on OpenSolaris 2009.06 (SPARC) host
2009-11-29 14:42 ` Andreas Färber
@ 2009-11-29 20:09 ` Palle Lyckegaard
2009-11-30 16:56 ` Blue Swirl
0 siblings, 1 reply; 8+ messages in thread
From: Palle Lyckegaard @ 2009-11-29 20:09 UTC (permalink / raw)
To: Andreas Färber; +Cc: qemu-devel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 817 bytes --]
On Sun, 29 Nov 2009, Andreas Färber wrote:
> I.e. if unavoidable, instead of #define PSR_XXX 123 one might need to #define
> TARGET_PSR_XXX 123 and change *all* uses of PSR_XXX to TARGET_PSR_XXX, so
> that Sun's and QEMU's definitions can live side by side. If your approach or
> #undef works correctly, that would seem less intrusive, therefore my
> question.
>
So far I've located only the definitions FSR_FCC1 and FPSR_FEF as being
differently defined in qemu and OpenSolaris SPARC.
In order to be as little intrusive as possible I will rework my patch for
the cpu.h file so
- where the definitions in qemu and Solaris are equal: guard with an "if
!defined(CONFIG_SOLARIS)"
- where the definitions in qemu and Solaris are not equal: add a TARGET_
prefix to the definitions
/Palle
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] PATCH: Building qemu on OpenSolaris 2009.06 (SPARC) host
2009-11-29 20:09 ` Palle Lyckegaard
@ 2009-11-30 16:56 ` Blue Swirl
0 siblings, 0 replies; 8+ messages in thread
From: Blue Swirl @ 2009-11-30 16:56 UTC (permalink / raw)
To: Palle Lyckegaard; +Cc: Andreas Färber, qemu-devel
On Sun, Nov 29, 2009 at 10:09 PM, Palle Lyckegaard <palle@lyckegaard.dk> wrote:
> On Sun, 29 Nov 2009, Andreas Färber wrote:
>
>> I.e. if unavoidable, instead of #define PSR_XXX 123 one might need to
>> #define TARGET_PSR_XXX 123 and change *all* uses of PSR_XXX to
>> TARGET_PSR_XXX, so that Sun's and QEMU's definitions can live side by side.
>> If your approach or #undef works correctly, that would seem less intrusive,
>> therefore my question.
>>
>
> So far I've located only the definitions FSR_FCC1 and FPSR_FEF as being
> differently defined in qemu and OpenSolaris SPARC.
>
> In order to be as little intrusive as possible I will rework my patch for
> the cpu.h file so
> - where the definitions in qemu and Solaris are equal: guard with an "if
> !defined(CONFIG_SOLARIS)"
> - where the definitions in qemu and Solaris are not equal: add a TARGET_
> prefix to the definitions
It's cleaner just to rename.
PSR_* are also used for Sparc64 %xcc and %icc, so ICC_ or something
similar would be better.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-11-30 16:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-26 20:39 [Qemu-devel] PATCH: Building qemu on OpenSolaris 2009.06 (SPARC) host Palle Lyckegaard
2009-11-27 19:27 ` Andreas Färber
2009-11-28 20:03 ` Palle Lyckegaard
2009-11-28 23:54 ` Andreas Färber
2009-11-29 12:34 ` Palle Lyckegaard
2009-11-29 14:42 ` Andreas Färber
2009-11-29 20:09 ` Palle Lyckegaard
2009-11-30 16:56 ` Blue Swirl
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).