* [Qemu-devel] [PATCH] qdd fadvise64_64 syscall
@ 2008-09-17 19:45 Riku Voipio
2008-09-19 7:49 ` Kirill A. Shutemov
0 siblings, 1 reply; 4+ messages in thread
From: Riku Voipio @ 2008-09-17 19:45 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1.1: Type: text/plain, Size: 195 bytes --]
Since it's only a hint, we can just add a happy passwtrough. Also
from scratchbox.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
--
"rm -rf" only sounds scary if you don't have backups
[-- Attachment #1.2: 39_syscall_fadvise64.patch --]
[-- Type: text/plain, Size: 1154 bytes --]
Index: trunk/linux-user/arm/syscall_nr.h
===================================================================
--- trunk.orig/linux-user/arm/syscall_nr.h 2008-09-07 02:32:28.000000000 +0300
+++ trunk/linux-user/arm/syscall_nr.h 2008-09-17 22:08:04.000000000 +0300
@@ -273,6 +273,7 @@
#define TARGET_NR_fstatfs64 267
#define TARGET_NR_tgkill 268
#define TARGET_NR_utimes 269
+#define TARGET_NR_fadvise64_64 270
#define TARGET_NR_arm_fadvise64_64 270
#define TARGET_NR_pciconfig_iobase 271
#define TARGET_NR_pciconfig_read 272
Index: trunk/linux-user/syscall.c
===================================================================
--- trunk.orig/linux-user/syscall.c 2008-09-17 21:43:47.000000000 +0300
+++ trunk/linux-user/syscall.c 2008-09-17 22:08:51.000000000 +0300
@@ -5532,6 +5532,12 @@
}
break;
#endif
+#ifdef TARGET_NR_fadvise64_64
+ case TARGET_NR_fadvise64_64:
+ /* This is a hint, so ignoring and returning success is ok. */
+ ret = get_errno(0);
+ break;
+#endif
#ifdef TARGET_NR_madvise
case TARGET_NR_madvise:
/* A straight passthrough may not be safe because qemu sometimes
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qdd fadvise64_64 syscall
2008-09-17 19:45 [Qemu-devel] [PATCH] qdd fadvise64_64 syscall Riku Voipio
@ 2008-09-19 7:49 ` Kirill A. Shutemov
2008-09-19 11:32 ` Riku Voipio
0 siblings, 1 reply; 4+ messages in thread
From: Kirill A. Shutemov @ 2008-09-19 7:49 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1773 bytes --]
On Wed, Sep 17, 2008 at 10:45:28PM +0300, Riku Voipio wrote:
> Since it's only a hint, we can just add a happy passwtrough. Also
> from scratchbox.
>
> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
> --
> "rm -rf" only sounds scary if you don't have backups
> Index: trunk/linux-user/arm/syscall_nr.h
> ===================================================================
> --- trunk.orig/linux-user/arm/syscall_nr.h 2008-09-07 02:32:28.000000000 +0300
> +++ trunk/linux-user/arm/syscall_nr.h 2008-09-17 22:08:04.000000000 +0300
> @@ -273,6 +273,7 @@
> #define TARGET_NR_fstatfs64 267
> #define TARGET_NR_tgkill 268
> #define TARGET_NR_utimes 269
> +#define TARGET_NR_fadvise64_64 270
> #define TARGET_NR_arm_fadvise64_64 270
> #define TARGET_NR_pciconfig_iobase 271
> #define TARGET_NR_pciconfig_read 272
It's wrong.
ARM doesn't provide fadvise64_64 syscall. It provides arm_fadvise64_64
with different argument order.
> Index: trunk/linux-user/syscall.c
> ===================================================================
> --- trunk.orig/linux-user/syscall.c 2008-09-17 21:43:47.000000000 +0300
> +++ trunk/linux-user/syscall.c 2008-09-17 22:08:51.000000000 +0300
> @@ -5532,6 +5532,12 @@
> }
> break;
> #endif
> +#ifdef TARGET_NR_fadvise64_64
> + case TARGET_NR_fadvise64_64:
> + /* This is a hint, so ignoring and returning success is ok. */
> + ret = get_errno(0);
> + break;
> +#endif
> #ifdef TARGET_NR_madvise
> case TARGET_NR_madvise:
> /* A straight passthrough may not be safe because qemu sometimes
Who is this realization make happy?
--
Regards, Kirill A. Shutemov
+ Belarus, Minsk
+ ALT Linux Team, http://www.altlinux.com/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qdd fadvise64_64 syscall
2008-09-19 7:49 ` Kirill A. Shutemov
@ 2008-09-19 11:32 ` Riku Voipio
2008-09-19 11:42 ` Kirill A. Shutemov
0 siblings, 1 reply; 4+ messages in thread
From: Riku Voipio @ 2008-09-19 11:32 UTC (permalink / raw)
To: qemu-devel
On Fri, Sep 19, 2008 at 10:49:24AM +0300, Kirill A. Shutemov wrote:
> On Wed, Sep 17, 2008 at 10:45:28PM +0300, Riku Voipio wrote:
> > Since it's only a hint, we can just add a happy passwtrough. Also
> > from scratchbox.
> >
> > Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
> > --
> > "rm -rf" only sounds scary if you don't have backups
>
> > Index: trunk/linux-user/arm/syscall_nr.h
> > ===================================================================
> > --- trunk.orig/linux-user/arm/syscall_nr.h 2008-09-07 02:32:28.000000000 +0300
> > +++ trunk/linux-user/arm/syscall_nr.h 2008-09-17 22:08:04.000000000 +0300
> > @@ -273,6 +273,7 @@
> > #define TARGET_NR_fstatfs64 267
> > #define TARGET_NR_tgkill 268
> > #define TARGET_NR_utimes 269
> > +#define TARGET_NR_fadvise64_64 270
> > #define TARGET_NR_arm_fadvise64_64 270
> > #define TARGET_NR_pciconfig_iobase 271
> > #define TARGET_NR_pciconfig_read 272
> It's wrong.
> ARM doesn't provide fadvise64_64 syscall. It provides arm_fadvise64_64
> with different argument order.
In this case, it doesn't matter since we don't use the arguments.
Nevertheless it's decepting and I'll remove it.
> > Index: trunk/linux-user/syscall.c
> > ===================================================================
> > --- trunk.orig/linux-user/syscall.c 2008-09-17 21:43:47.000000000 +0300
> > +++ trunk/linux-user/syscall.c 2008-09-17 22:08:51.000000000 +0300
> > @@ -5532,6 +5532,12 @@
> > }
> > break;
> > #endif
> > +#ifdef TARGET_NR_fadvise64_64
> > + case TARGET_NR_fadvise64_64:
> > + /* This is a hint, so ignoring and returning success is ok. */
> > + ret = get_errno(0);
> > + break;
> > +#endif
> > #ifdef TARGET_NR_madvise
> > case TARGET_NR_madvise:
> > /* A straight passthrough may not be safe because qemu sometimes
> Who is this realization make happy?
EPARSE.
--
"rm -rf" only sounds scary if you don't have backups
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qdd fadvise64_64 syscall
2008-09-19 11:32 ` Riku Voipio
@ 2008-09-19 11:42 ` Kirill A. Shutemov
0 siblings, 0 replies; 4+ messages in thread
From: Kirill A. Shutemov @ 2008-09-19 11:42 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 2370 bytes --]
On Fri, Sep 19, 2008 at 02:32:05PM +0300, Riku Voipio wrote:
> On Fri, Sep 19, 2008 at 10:49:24AM +0300, Kirill A. Shutemov wrote:
> > On Wed, Sep 17, 2008 at 10:45:28PM +0300, Riku Voipio wrote:
> > > Since it's only a hint, we can just add a happy passwtrough. Also
> > > from scratchbox.
> > >
> > > Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
> > > --
> > > "rm -rf" only sounds scary if you don't have backups
> >
> > > Index: trunk/linux-user/arm/syscall_nr.h
> > > ===================================================================
> > > --- trunk.orig/linux-user/arm/syscall_nr.h 2008-09-07 02:32:28.000000000 +0300
> > > +++ trunk/linux-user/arm/syscall_nr.h 2008-09-17 22:08:04.000000000 +0300
> > > @@ -273,6 +273,7 @@
> > > #define TARGET_NR_fstatfs64 267
> > > #define TARGET_NR_tgkill 268
> > > #define TARGET_NR_utimes 269
> > > +#define TARGET_NR_fadvise64_64 270
> > > #define TARGET_NR_arm_fadvise64_64 270
> > > #define TARGET_NR_pciconfig_iobase 271
> > > #define TARGET_NR_pciconfig_read 272
>
> > It's wrong.
> > ARM doesn't provide fadvise64_64 syscall. It provides arm_fadvise64_64
> > with different argument order.
>
> In this case, it doesn't matter since we don't use the arguments.
It matters if someone will provide true implementation of the syscall.
> Nevertheless it's decepting and I'll remove it.
>
> > > Index: trunk/linux-user/syscall.c
> > > ===================================================================
> > > --- trunk.orig/linux-user/syscall.c 2008-09-17 21:43:47.000000000 +0300
> > > +++ trunk/linux-user/syscall.c 2008-09-17 22:08:51.000000000 +0300
> > > @@ -5532,6 +5532,12 @@
> > > }
> > > break;
> > > #endif
> > > +#ifdef TARGET_NR_fadvise64_64
> > > + case TARGET_NR_fadvise64_64:
> > > + /* This is a hint, so ignoring and returning success is ok. */
> > > + ret = get_errno(0);
> > > + break;
> > > +#endif
> > > #ifdef TARGET_NR_madvise
> > > case TARGET_NR_madvise:
> > > /* A straight passthrough may not be safe because qemu sometimes
>
> > Who is this realization make happy?
>
> EPARSE.
>
>
> --
> "rm -rf" only sounds scary if you don't have backups
>
>
--
Regards, Kirill A. Shutemov
+ Belarus, Minsk
+ ALT Linux Team, http://www.altlinux.com/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-09-19 11:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-17 19:45 [Qemu-devel] [PATCH] qdd fadvise64_64 syscall Riku Voipio
2008-09-19 7:49 ` Kirill A. Shutemov
2008-09-19 11:32 ` Riku Voipio
2008-09-19 11:42 ` Kirill A. Shutemov
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).