[PATCH v2] vfio: Include libgen.h for basename API

2023-12-11 Thread Khem Raj
-by: Khem Raj --- v2: Add missing link for [1] hw/vfio/pci.c | 1 + hw/vfio/platform.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index c62c02f7b6..f043c93b9e 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -19,6 +19,7 @@ */ #include "

[PATCH] vfio: Include libgen.h for basename API

2023-12-11 Thread Khem Raj
C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] | 3030 | group_name = basename(group_path); clang-17 treats this warning as error by default Signed-off-by: Khem Raj --- hw/vfio/pci.c | 1 + hw/vfio/platform.c | 1 + 2 files changed, 2

[PATCH v2] contrib/vhost-user-blk: Replace lseek64 with lseek

2022-12-18 Thread Khem Raj
64bit off_t is already in use since build uses _FILE_OFFSET_BITS=64 already. Using lseek/off_t also makes it work with latest musl without using _LARGEFILE64_SOURCE macro. This macro is implied with _GNU_SOURCE when using glibc but not with musl. Signed-off-by: Khem Raj Cc: Michael S. Tsirkin

[PATCH 2/2] linux-user: Replace use of lfs64 related functions and macros

2022-12-17 Thread Khem Raj
Builds defines -D_FILE_OFFSET_BITS=64 which makes the original functions anf macros behave same as their 64 suffixed counterparts. This also helps in compiling with latest musl C library, where these macros and functions are no more available under _GNU_SOURCE feature macro Signed-off-by: Khem

[PATCH 1/2] contrib/vhost-user-blk: Replace lseek64 with lseek

2022-12-17 Thread Khem Raj
64bit off_t is already in use since build uses _FILE_OFFSET_BITS=64 already. Using lseek/off_t also makes it work with latest must without using _LARGEFILE64_SOURCE macro. This macro is implied with _GNU_SOURCE when using glibc but not with musl. Signed-off-by: Khem Raj Cc: Michael S. Tsirkin

[PATCH v2] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux systems

2022-03-22 Thread Khem Raj
/musl/linux Signed-off-by: Khem Raj Cc: Zhang Yi Cc: Michael S. Tsirkin --- v2: Improve commit message util/mmap-alloc.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c index 893d864354..86d3cda248 100644 --- a/util/mmap-alloc.c

[PATCH] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux systems

2022-03-21 Thread Khem Raj
linux only wires MAP_SYNC and MAP_SHARED_VALIDATE for architectures which include asm-generic/mman.h and mips/powerpc are not including this file in linux/mman.h, therefore these should be defined for such architectures on Linux as well. This fixes build on mips/musl/linux Signed-off-by: Khem Raj

[PATCH] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux systems

2022-03-21 Thread Khem Raj
linux only wires MAP_SYNC and MAP_SHARED_VALIDATE for architectures which include asm-generic/mman.h and mips/powerpc are not including this file in linux/mman.h, therefore these should be defined for such architectures on Linux as well. This fixes build on mips/musl/linux Signed-off-by: Khem Raj

[PATCH v4] ppc64: Avoid pt_regs struct definition

2022-03-14 Thread Khem Raj
definition of type 'struct pt_regs' return uc->uc_mcontext.regs->nip; ^ Signed-off-by: Khem Raj Cc: Peter Maydell Cc: Philippe Mathieu-Daudé Cc: Richard Henderson --- v2: Drop ifdef __powerpc__ v3: Access go_regs directly and move the file to ppc64 dir v4: U

Re: [PATCH v3] ppc64: Avoid pt_regs struct definition

2022-03-14 Thread Khem Raj
On Mon, Mar 14, 2022 at 5:13 PM Richard Henderson wrote: > > On 3/14/22 14:51, Khem Raj wrote: > > +static inline uintptr_t host_signal_pc(host_sigcontext *uc) > > +{ > > +return uc->uc_mcontext.gp_regs[32]; > > +} > > + > > +static inlin

[PATCH v3] ppc64: Avoid pt_regs struct definition

2022-03-14 Thread Khem Raj
->uc_mcontext.regs->nip; ^ Signed-off-by: Khem Raj Cc: Peter Maydell Cc: Philippe Mathieu-Daudé Cc: Richard Henderson --- v2: Drop ifdef __powerpc__ v3: Access go_regs directly and move the file to ppc64 dir linux-user/include/host/ppc/host-signal.h

[PATCH v2] ppc: Include asm/ptrace.h for pt_regs struct definition

2022-03-14 Thread Khem Raj
Fixes ../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: incomplete definition of type 'struct pt_regs' return uc->uc_mcontext.regs->nip; ^ Signed-off-by: Khem Raj Cc: Peter Maydell Cc: Philippe Mathieu-Daudé Cc: Richard Henderson

Re: [PATCH] ppc: Include asm/ptrace.h for pt_regs struct definition

2022-03-14 Thread Khem Raj
On Mon, Mar 14, 2022 at 10:05 AM Peter Maydell wrote: > > On Mon, 14 Mar 2022 at 17:02, Khem Raj wrote: > > > > Fixes > > ../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: > > incomplete definition of type 'struct pt_regs' > >

[PATCH] ppc: Include asm/ptrace.h for pt_regs struct definition

2022-03-14 Thread Khem Raj
Fixes ../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: incomplete definition of type 'struct pt_regs' return uc->uc_mcontext.regs->nip; ^ Signed-off-by: Khem Raj Cc: Peter Maydell Cc: Philippe Mathieu-Daudé Cc: Richard Hen

[PATCH] riscv: Set 5.4 as minimum kernel version for riscv32

2021-12-15 Thread Khem Raj
5.4 is first stable API as far as rv32 is concerned see [1] [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=7a55dd3fb6d2c307a002a16776be84310b9c8989 Signed-off-by: Khem Raj Cc: Palmer Dabbelt Cc: Alistair Francis Cc: Bin Meng --- linux-user/riscv/target_syscall.h | 3 ++- 1 file

Re: [PATCH] linux-user: Replace __u64 with uint64_t

2021-11-10 Thread Khem Raj
On Wed, Nov 10, 2021 at 8:03 AM Warner Losh wrote: > > > > On Wed, Nov 10, 2021 at 8:19 AM Richard Henderson > wrote: >> >> On 11/10/21 4:12 PM, Richard Henderson wrote: >> > On 11/10/21 10:25 AM, Richard Henderson wrote: >> >> On 11/8/21 8:42

[PATCH] linux-user: Replace __u64 with uint64_t

2021-11-08 Thread Khem Raj
uint64_t is available in all userspaces via compiler include stdint.h therefore use it instead of __u64 which is linux internal type, it fixes build on some platforms eg. aarch64 systems using musl C library Upstream-Status: Submitted [] Signed-off-by: Khem Raj --- linux-user/host/aarch64

[PATCH] linux-user: Replace __u64 with uint64_t

2021-11-08 Thread Khem Raj
uint64_t is available in all userspaces via compiler include stdint.h therefore use it instead of __u64 which is linux internal type, it fixes build on some platforms eg. aarch64 systems using musl C library Signed-off-by: Khem Raj --- linux-user/host/aarch64/hostdep.h | 2 +- 1 file changed, 1

[PATCH] linux-user: Check for ieee128 fpbits in PPC64 HWCAP2 feature list

2021-06-14 Thread Khem Raj
=d337345ce145e23c5f3a956f349d924fdf54ce2d;hp=eb24865637a271ab7dad13190330105eab0d478d Signed-off-by: Khem Raj Cc: Florian Weimer --- linux-user/elfload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 17ab06f612..e7dd18fd40 100644 --- a/linux-user

Re: [RFC PATCH 0/3] target/mips: Make the number of TLB entries a CPU property

2020-10-14 Thread Khem Raj
t asked '-cpu P5600' testing. Look for 'victor2>' > > [1] > https://s3-eu-west-1.amazonaws.com/downloads-mips/documents/MD00419-2B-34Kf-DTS-01.20.pdf > > > From: Philippe Mathieu-Daudé on behalf of > Philippe Mathieu-Daudé > S

Re: [Qemu-devel] [PATCH] replace struct ucontext with ucontext_t type

2017-06-29 Thread Khem Raj
On Thu, Jun 29, 2017 at 1:02 AM, Laurent Vivier <laur...@vivier.eu> wrote: > Le 28/06/2017 à 22:44, Khem Raj a écrit : >> The ucontext_t type had a tag struct ucontext until now >> but newer glibc will drop it so we need to adjust and use >> the exposed type instead &g

[Qemu-devel] [PATCH] replace struct ucontext with ucontext_t type

2017-06-28 Thread Khem Raj
The ucontext_t type had a tag struct ucontext until now but newer glibc will drop it so we need to adjust and use the exposed type instead Signed-off-by: Khem Raj <raj.k...@gmail.com> Cc: Kamil Rytarowski <ka...@netbsd.org> Cc: Riku Voipio <riku.voi...@iki.fi> Cc: La

[Qemu-devel] [PATCH v2 10/10] target-ppc: add support for extended mtfsf/mtfsfi forms

2013-08-15 Thread Khem Raj
Hi I am seeing a regression with 1.5.0 release where the following program #include stdio.h #include math.h int main(int argc, char * argv[]) { double f = 1234.67; printf(floor(%f) = %f\n, f, floor(f)); return 0; } when compiled without any -O options

Re: [Qemu-devel] [PATCH] target-ppc: fix bit extraction for FPBF and FPL

2013-08-15 Thread Khem Raj
7d08d85645def18eac2a9d672c1868a35e0bcf79. This patch fixes this, which in turn fixes the problem reported by Khem Raj about the floor() function of libm. Reported-by: Khem Raj raj.k...@gmail.com Signed-off-by: Aurelien Jarno aurel...@aurel32.net --- target-ppc/translate.c |4 ++-- 1 file changed

[Qemu-devel] [Bug 700774] [NEW] sh7750.c:672: sh7750_mmct_writel: Assertion `0' failed.

2011-01-09 Thread Khem Raj
Public bug reported: qemu 0.12.5 on ubuntu ends up with this error when booting a SH4 machine usb 1-1: Manufacturer: 1 INIT: version 2.86 booting Error, no support currently for 8 bpp frame buffers Trying to change pixel format... Please wait: booting... Switched to a 32 bpp 8,8,8 frame buffer

[Qemu-devel] [Bug 700774] Re: sh7750.c:672: sh7750_mmct_writel: Assertion `0' failed.

2011-01-09 Thread Khem Raj
yes I backported these fixes on top of 0.12.5 and now I can boot the image successfully. thanks for quick turnaround. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/700774 Title: sh7750.c:672: