[PATCH v3] target/riscv: Fix incorrect PTE merge in walk_pte

2022-04-23 Thread Ralf Ramsauer
size attr --- 8120 89623000 1000 rwxu-ad 8120f000 89624000 1000 rwxu-ad Signed-off-by: Ralf Ramsauer --- [since v2: Adjust comment, rebased to latest master] target/riscv/mon

Re: [EXT] Re: [PATCH v2] target/riscv: Fix incorrect PTE merge in walk_pte

2022-04-22 Thread Ralf Ramsauer
On 22/04/2022 04:54, Bin Meng wrote: On Fri, Apr 22, 2022 at 10:53 AM Bin Meng wrote: On Tue, Apr 5, 2022 at 1:34 AM Ralf Ramsauer wrote: Two non-subsequent PTEs can be mapped to subsequent paddrs. In this case, walk_pte will erroneously merge them. Enforce the split up, by tracking

[PATCH v2] target/riscv: Fix incorrect PTE merge in walk_pte

2022-04-04 Thread Ralf Ramsauer
size attr --- 8120 89623000 1000 rwxu-ad 8120f000 89624000 1000 rwxu-ad Signed-off-by: Ralf Ramsauer --- target/riscv/monitor.c | 5 - 1 file changed, 4 insertions(+),

Re: [PATCH] target/riscv: Fix incorrect PTE merge in walk_pte

2022-04-04 Thread Ralf Ramsauer
On 01/04/2022 14:22, Ralf Ramsauer wrote: Two non-subsequent PTEs can be mapped to subsequent paddrs. In this case, walk_pte will erroneously merge them. Enforce the split up, by tracking the virtual base address. Let's say we have the mapping: 0x8120 -> 0x89623000 (4K) 0x

[PATCH] target/riscv: Fix incorrect PTE merge in walk_pte

2022-04-01 Thread Ralf Ramsauer
size attr --- 8120 89623000 1000 rwxu-ad 8120f000 89624000 1000 rwxu-ad Signed-off-by: Ralf Ramsauer --- target/riscv/monitor.c | 5 - 1 file changed, 4 insertions(+),

[PATCH v3] hw/riscv: virt: Exit if the user provided -bios in combination with KVM

2022-04-01 Thread Ralf Ramsauer
The -bios option is silently ignored if used in combination with -enable-kvm. The reason is that the machine starts in S-Mode, and the bios typically runs in M-Mode. Better exit in that case to not confuse the user. Signed-off-by: Ralf Ramsauer --- hw/riscv/virt.c | 14 ++ 1 file

Re: [EXT] Re: [PATCH] hw/riscv: virt: Warn the user if -bios is provided when using KVM

2022-03-31 Thread Ralf Ramsauer
On 31/03/2022 02:11, Alistair Francis wrote: On Thu, Mar 24, 2022 at 7:08 PM Daniel P. Berrangé wrote: On Wed, Mar 23, 2022 at 06:13:46PM +0100, Ralf Ramsauer wrote: The -bios option is silently ignored if used in combination with -enable-kvm. The reason is that the machine starts in S

[PATCH v2] hw/riscv: virt: Warn the user if -bios is provided when using KVM

2022-03-23 Thread Ralf Ramsauer
The -bios option is silently ignored if used in combination with -enable-kvm. The reason is that the machine starts in S-Mode, and the bios typically runs in M-Mode. Warn the user that the bios won't be loaded. Signed-off-by: Ralf Ramsauer --- hw/riscv/virt.c | 4 1 file chang

Re: [EXT] Re: [PATCH] hw/riscv: virt: Warn the user if -bios is provided when using KVM

2022-03-23 Thread Ralf Ramsauer
On 23/03/2022 22:05, Alistair Francis wrote: On Thu, Mar 24, 2022 at 3:13 AM Ralf Ramsauer wrote: The -bios option is silently ignored if used in combination with -enable-kvm. The reason is that the machine starts in S-Mode, and the bios typically runs in M-Mode. Warn the user that the

[PATCH] hw/riscv: virt: Warn the user if -bios is provided when using KVM

2022-03-23 Thread Ralf Ramsauer
The -bios option is silently ignored if used in combination with -enable-kvm. The reason is that the machine starts in S-Mode, and the bios typically runs in M-Mode. Warn the user that the bios won't be loaded. Signed-off-by: Ralf Ramsauer --- hw/riscv/virt.c | 3 +++ 1 file chang

Re: [EXT] Re: QEMU+KVM on RISC-V + Hypervisor Extension

2022-03-23 Thread Ralf Ramsauer
On 21/03/2022 21:47, Palmer Dabbelt wrote: On Sun, 20 Mar 2022 22:43:07 PDT (-0700), alistai...@gmail.com wrote: On Thu, Mar 17, 2022 at 7:46 PM Peter Maydell wrote: On Wed, 16 Mar 2022 at 22:23, Alistair Francis wrote: > Hmm... This seems like a bug. We shouldn't allow the user to spec

Re: [EXT] Re: QEMU+KVM on RISC-V + Hypervisor Extension

2022-03-19 Thread Ralf Ramsauer
On 17/03/2022 10:45, Peter Maydell wrote: On Wed, 16 Mar 2022 at 22:23, Alistair Francis wrote: Hmm... This seems like a bug. We shouldn't allow the user to specify a `-bios` option if using KVM. Would you mind preparing a patch to catch this? You don't want to allow the possibility of a b

Re: [EXT] Re: QEMU+KVM on RISC-V + Hypervisor Extension

2022-03-15 Thread Ralf Ramsauer
On 15/03/2022 13:42, Peter Maydell wrote: On Tue, 15 Mar 2022 at 12:29, Ralf Ramsauer wrote: I have no kernel specified in the guest, so I'd then expect to boot into an completely empty machine (besides the tiny startup stub in the MROM). However, I still get the exact same err

Re: [EXT] Re: QEMU+KVM on RISC-V + Hypervisor Extension

2022-03-15 Thread Ralf Ramsauer
On 15/03/2022 13:25, Anup Patel wrote: On Tue, Mar 15, 2022 at 5:47 PM Ralf Ramsauer wrote: On 15/03/2022 09:33, Anup Patel wrote: On Tue, Mar 15, 2022 at 12:18 PM Alistair Francis wrote: On Sun, Mar 13, 2022 at 12:12 PM Ralf Ramsauer wrote: Hi, I'm trying to run Linux/QEM

Re: [EXT] Re: QEMU+KVM on RISC-V + Hypervisor Extension

2022-03-15 Thread Ralf Ramsauer
On 15/03/2022 09:33, Anup Patel wrote: On Tue, Mar 15, 2022 at 12:18 PM Alistair Francis wrote: On Sun, Mar 13, 2022 at 12:12 PM Ralf Ramsauer wrote: Hi, I'm trying to run Linux/QEMU+KVM inside an emulated qemu-system-riscv64 VM (x86 host). On latest&greatest QEMU (1416688c5

QEMU+KVM on RISC-V + Hypervisor Extension

2022-03-12 Thread Ralf Ramsauer
Hi, I'm trying to run Linux/QEMU+KVM inside an emulated qemu-system-riscv64 VM (x86 host). On latest&greatest QEMU (1416688c53), I run Linux inside QEMU. On host side: qemu-system-riscv64 -nographic \ -machine virt \ -cpu 'rv64,h=true' \ -smp 8 -m 8G \ -bios $la

Re: [PATCH v1 4/5] RISC-V: Typed CSRs in gdbserver

2022-01-03 Thread Ralf Ramsauer
On 02/01/2022 17:06, Konrad Schwarz wrote: GDB target descriptions support typed registers; such that `info register X' displays not only the hex value of register `X', but also the individual bitfields the register comprises (if any), using textual labels if possible. This patch includes typ

[Qemu-devel] Using TRIM to shrink qcow2 images

2013-08-08 Thread Ralf Ramsauer
down to its minimum size. Did anyone already think about that? [1] : https://people.gnome.org/~markmc/qcow-image-format.html Regards, -- Ralf Ramsauer PGP: 0x8F10049B

Re: [Qemu-devel] [PATCH] hw: improve multiboot module loading

2011-04-07 Thread Ralf Ramsauer
On 07.04.2011, at 14:48, Stefan Hajnoczi wrote: > Out of curiousity, why are you trying to kill spaces at all? > > Why not just use a correct command-line to invoke QEMU? > > Stefan Well it took me 2 days to find out why -initrd "module1, module2" didn't work. If there's a space after the comm

Re: [Qemu-devel] [PATCH] hw: improve multiboot module loading

2011-04-07 Thread Ralf Ramsauer
Hello again, there's another problem with parsing the initrd string: If you want to start qemu with ... -initrd "mod1 arg=foo,bar , mod2 arg=bar,foo" it won't work The string is separated at every comma, arguments containing a comma are misinterpreted. So we'd think about another way deliverin

Re: [Qemu-devel] [PATCH] hw: improve multiboot module loading

2011-04-07 Thread Ralf Ramsauer
On 07.04.2011 um 10:38, Alexander Graf wrote: > > Also, I just realized that you did miss another small part that needs change. > A few lines above, there is code to interpret the modules right before that > as well: > >if (initrd_filename) { >const char *r = initrd_filename; >

Re: [Qemu-devel] [PATCH] hw: improve multiboot module loading

2011-04-07 Thread Ralf Ramsauer
Leading spaces mustn't be stripped! The commandline could look like: qemu -kernel kern -initrd "1.mod arg=foo arg2=bar, 2.mod arg=asdf" The problem is, that the string "1.mod arg=foo arg2=bar, 2.mod arg=asdf" is divided at the ','. So we have two string "1.mod arg=foo arg2=bar" and " 2.mod arg=asdf

Re: [Qemu-devel] [PATCH] hw: improve multiboot module loading

2011-04-06 Thread Ralf Ramsauer
Here the version with the correct coding style. diff --git a/hw/multiboot.c b/hw/multiboot.c index 0d2bfb4..2380d5e 100644 --- a/hw/multiboot.c +++ b/hw/multiboot.c @@ -267,6 +267,11 @@ int load_multiboot(void *fw_cfg, /* if a space comes after the module filename, treat everything