include virtualization mode as part of priv
PATCH 1/1 include virtualization mode as part of priv
When debugging hypervisor extension based programs, it is convenient to see the current virtualization mode from GDB debugger.
This patch shares the virtualization mode as part of the existing "priv" virtual register, or more specifically via bit(8).
Quoted 1 line
From
0d82561b11e1c2835f14ba5460cfff52f0087530Mon Sep 17 00:00:00 2001
From: Yanfeng Liu <[email protected]>
Date: Mon, 18 Nov 2024 08:03:15 +0800
Subject: [PATCH] riscv/gdb: share virt mode via priv register
This shares virtualization mode together with privilege mode via the priv virtual register over the debug interface.
Check logs with gdb-multiarch 12.1:
``` (gdb) info registers priv priv 0x101 prv:1 [Supervisor] (gdb) set $priv = 1 (gdb) info registers priv priv 0x1 prv:1 [Supervisor] (gdb) set $priv = 0x101 (gdb) info registers priv priv 0x101 prv:1 [Supervisor] (gdb) ```
--- target/riscv/cpu_bits.h | 4 ++++ target/riscv/gdbstub.c | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-)
target/riscv/cpu_bits.h +4 -0
@@ -623,6 +623,10 @@ typedef enum {#define PRV_RESERVED 2#define PRV_M 3 +/* Share virtualization mode as part of priv register */ +#define PRV_V (1 << 8) + +/* RV32 satp CSR field masks */ #define SATP32_MODE 0x80000000#define SATP32_ASID 0x7fc00000
target/riscv/gdbstub.c +0 -0
@@ -212,8 +212,14 @@ static int riscv_gdb_get_virtual(CPUState *cs, GByteArray
*buf, int n)
#else
RISCVCPU *cpu = RISCV_CPU(cs);
CPURISCVState *env = &cpu->env;+ target_ulong ret = env->priv;
- return gdb_get_regl(buf, env->priv);
+ /* include virtualization mode */
+
+ if (env->virt_enabled) {
+ ret |= PRV_V;
+ }
+ return gdb_get_regl(buf, ret);
#endif
}
return 0;
@@ -225,11 +231,16 @@ static int riscv_gdb_set_virtual(CPUState *cs, uint8_t
*mem_buf, int n)
#ifndef CONFIG_USER_ONLY
RISCVCPU *cpu = RISCV_CPU(cs);
CPURISCVState *env = &cpu->env;+ target_ulong val = ldtul_p(mem_buf);
- env->priv = ldtul_p(mem_buf) & 0x3;
+ env->priv = val & 0x3;
if (env->priv == PRV_RESERVED) {
env->priv = PRV_S;
}+
+ /* Update virtualization mode */
+
+ env->virt_enabled = (env->priv != PRV_M && (val & PRV_V) != 0);
#endif
return sizeof(target_ulong);
}Signature · 1 line
2.34.1
Quoted 7 lines · Yanfeng
When debugging hypervisor extension based programs, it is convenient to see the current virtualization mode from GDB debugger.
This patch shares the virtualization mode as part of the existing "priv" virtual register, or more specifically via bit(8).
Interesting concept. This seems fine to me, I don't think this will break any existing user.
Another option though is to add a "virt" virtual register, which might be easier for people to figure out as it isn't obvious from GDB what bit 8 means. That might be a better approach as then it's really clear what the register means.
Quoted 6 lines
Quoted 3 lines
From
0d82561b11e1c2835f14ba5460cfff52f0087530Mon Sep 17 00:00:00 2001From: Yanfeng Liu <[email protected]>
Date: Mon, 18 Nov 2024 08:03:15 +0800
Subject: [PATCH] riscv/gdb: share virt mode via priv register
It seems like something strange happened when you submitted the patch. Can you fix this up?
Alistair
Quoted 85 lines
This shares virtualization mode together with privilege mode via the
privvirtual register over the debug interface.Check logs with gdb-multiarch 12.1:
``` (gdb) info registers priv priv 0x101 prv:1 [Supervisor] (gdb) set $priv = 1 (gdb) info registers priv priv 0x1 prv:1 [Supervisor] (gdb) set $priv = 0x101 (gdb) info registers priv priv 0x101 prv:1 [Supervisor] (gdb) ```Signed-off-by Yanfeng Liu <[email protected]>--- target/riscv/cpu_bits.h | 4 ++++ target/riscv/gdbstub.c | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-)target/riscv/cpu_bits.h +4
-0@@ -623,6 +623,10 @@ typedef enum {#define PRV_RESERVED 2#define PRV_M 3 +/* Share virtualization mode as part of priv register */ +#define PRV_V (1 << 8) + +/* RV32 satp CSR field masks */ #define SATP32_MODE 0x80000000#define SATP32_ASID 0x7fc00000target/riscv/gdbstub.c +7
-1@@ -212,8 +212,14 @@ static int riscv_gdb_get_virtual(CPUState *cs, GByteArray *buf, int n)#else RISCVCPU *cpu =RISCV_CPU (cs);CPURISCVState *env = &cpu->env; +target_ulong ret = env->priv; -return gdb_get_regl (buf, env->priv); +/* include virtualization mode */ + +if (env->virt_enabled) { + ret |=PRV_V ; + } +return gdb_get_regl (buf, ret);#endif }return 0;target/riscv/gdbstub.c +6
-1@@ -225,11 +231,16 @@ static int riscv_gdb_set_virtual(CPUState *cs, uint8_t *mem_buf, int n)#ifndef CONFIG_USER_ONLY RISCVCPU *cpu =RISCV_CPU (cs);CPURISCVState *env = &cpu->env; +target_ulong val =ldtul_p (mem_buf); - env->priv =ldtul_p (mem_buf) &0x3 ; + env->priv = val &0x3 ;if (env->priv ==PRV_RESERVED ) { env->priv =PRV_S ; } + +/* Update virtualization mode */ + + env->virt_enabled = (env->priv !=PRV_M && (val &PRV_V ) !=0 );#endif return sizeof (target_ulong);}--
2.34.1
Quoted 21 lines · Alistair Francis
Quoted 9 lines · Yanfeng
When debugging hypervisor extension based programs, it is convenient to see the
current virtualization mode from GDB debugger.This patch shares the virtualization mode as part of the existing "priv" virtual
register, or more specifically via bit(8).Interesting concept. This seems fine to me, I don't think this will break any existing user.
Another option though is to add a "virt" virtual register, which might be easier for people to figure out as it isn't obvious from GDB what bit 8 means. That might be a better approach as then it's really clear what the register means.
Quoted 2 lines
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
From
0d82561b11e1c2835f14ba5460cfff52f0087530Mon Sep 17 00:00:00 2001From: Yanfeng Liu <[email protected]>
Date: Mon, 18 Nov 2024 08:03:15 +0800
Subject: [PATCH] riscv/gdb: share virt mode via priv registerIt seems like something strange happened when you submitted the patch. Can you fix this up?
I prepared a patch file via the following steps:
- Did git format-patch --stdout -1 > /tmp/patch,
- Pasted the /tmp/patch content to email composer window,
- Filled in email receipts, subject line and a few lines before the patch
context in composer window.
I am wondering if the lines added before the formatted patch content in last step caused trouble?
When resending email, should I use [patch v2] in subject line? I guess it is unnecessary as it is the same patch.
I included it as attachment here as well, hoping it helps.
Regards,
yf
Quoted 79 lines
Alistair
Quoted 77 lines
This shares virtualization mode together with privilege mode via the
privvirtual register over the debug interface.Check logs with gdb-multiarch 12.1:
``` (gdb) info registers priv priv 0x101 prv:1 [Supervisor] (gdb) set $priv = 1 (gdb) info registers priv priv 0x1 prv:1 [Supervisor] (gdb) set $priv = 0x101 (gdb) info registers priv priv 0x101 prv:1 [Supervisor] (gdb) ```Signed-off-by Yanfeng Liu <[email protected]>---
target/riscv/cpu_bits.h | 4 ++++
target/riscv/gdbstub.c | 15 +++++++++++++--2 files changed, 17 insertions(+), 2 deletions(-)target/riscv/cpu_bits.h +4
-0@@ -623,6 +623,10 @@ typedef enum { #define PRV_RESERVED 2 #define PRV_M 3 +/* Share virtualization mode as part of priv register */ +#define PRV_V (1 << 8) + + /* RV32 satp CSR field masks */ #define SATP32_MODE 0x80000000 #define SATP32_ASID 0x7fc00000target/riscv/gdbstub.c +0
-0@@ -212,8 +212,14 @@ static int riscv_gdb_get_virtual(CPUState *cs,GByteArray
*buf, int n)
#else
RISCVCPU *cpu =RISCV_CPU(cs);
CPURISCVState *env =&cpu->env;
+target_ulongret =env->priv;- return
gdb_get_regl(buf, env->priv);
+ /* include virtualization mode */
+
+ if (env->virt_enabled) {
+ ret |=PRV_V;
+ }
+ returngdb_get_regl(buf, ret);
#endif
}
return 0;target/riscv/gdbstub.c +6
-1@@ -225,11 +231,16 @@ static int riscv_gdb_set_virtual(CPUState *cs, uint8_t *mem_buf, int n) #ifndef CONFIG_USER_ONLY RISCVCPU *cpu = RISCV_CPU(cs); CPURISCVState *env = &cpu->env; + target_ulong val = ldtul_p(mem_buf); - env->priv = ldtul_p(mem_buf) & 0x3; + env->priv = val & 0x3; if (env->priv == PRV_RESERVED) { env->priv = PRV_S; } + + /* Update virtualization mode */ + + env->virt_enabled = (env->priv != PRV_M && (val & PRV_V) != 0);
Quoted 8 lines
Quoted 8 lines
target/riscv/gdbstub.c +0
-0#endif return sizeof(target_ulong);}
--
2.34.1
From 0d82561b11e1c2835f14ba5460cfff52f0087530 Mon Sep 17 00:00:00 2001
From: Yanfeng Liu <[email protected]>
Date: Mon, 18 Nov 2024 08:03:15 +0800
Subject: [PATCH] riscv/gdb: share virt mode via priv register
This shares virtualization mode together with privilege mode via the priv virtual register over the debug interface.
Check logs with gdb-multiarch 12.1:
``` (gdb) info registers priv priv 0x101 prv:1 [Supervisor] (gdb) set $priv = 1 (gdb) info registers priv priv 0x1 prv:1 [Supervisor] (gdb) set $priv = 0x101 (gdb) info registers priv priv 0x101 prv:1 [Supervisor] (gdb) ```
--- target/riscv/cpu_bits.h | 4 ++++ target/riscv/gdbstub.c | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-)
target/riscv/cpu_bits.h +4 -0
@@ -623,6 +623,10 @@ typedef enum {#define PRV_RESERVED 2#define PRV_M 3 +/* Share virtualization mode as part of priv register */ +#define PRV_V (1 << 8) + +/* RV32 satp CSR field masks */ #define SATP32_MODE 0x80000000#define SATP32_ASID 0x7fc00000
target/riscv/gdbstub.c +13 -2
@@ -212,8 +212,14 @@ static int riscv_gdb_get_virtual(CPUState *cs, GByteArray *buf, int n)#else RISCVCPU *cpu =RISCV_CPU (cs);CPURISCVState *env = &cpu->env; +target_ulong ret = env->priv; -return gdb_get_regl (buf, env->priv); +/* include virtualization mode */ + +if (env->virt_enabled) { + ret |=PRV_V ; + } +return gdb_get_regl (buf, ret);#endif }return 0 ;
@@ -225,11 +231,16 @@ static int riscv_gdb_set_virtual(CPUState *cs, uint8_t *mem_buf, int n)#ifndef CONFIG_USER_ONLY RISCVCPU *cpu =RISCV_CPU (cs);CPURISCVState *env = &cpu->env; +target_ulong val =ldtul_p (mem_buf); - env->priv =ldtul_p (mem_buf) &0x3 ; + env->priv = val &0x3 ;if (env->priv ==PRV_RESERVED ) { env->priv =PRV_S ; } + +/* Update virtualization mode */ + + env->virt_enabled = (env->priv !=PRV_M && (val &PRV_V ) !=0 );#endif return sizeof (target_ulong); }
Signature · 1 line
2.34.1
Quoted 31 lines · Yanfeng
Quoted 21 lines · Alistair Francis
Quoted 9 lines · Yanfeng
When debugging hypervisor extension based programs, it is convenient to see the
current virtualization mode from GDB debugger.This patch shares the virtualization mode as part of the existing "priv" virtual
register, or more specifically via bit(8).Interesting concept. This seems fine to me, I don't think this will break any existing user.
Another option though is to add a "virt" virtual register, which might be easier for people to figure out as it isn't obvious from GDB what bit 8 means. That might be a better approach as then it's really clear what the register means.
Quoted 2 lines
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
From
0d82561b11e1c2835f14ba5460cfff52f0087530Mon Sep 17 00:00:00 2001From: Yanfeng Liu <[email protected]>
Date: Mon, 18 Nov 2024 08:03:15 +0800
Subject: [PATCH] riscv/gdb: share virt mode via priv registerIt seems like something strange happened when you submitted the patch. Can you fix this up?
Quoted 6 lines
I prepared a patch file via the following steps:
- Did
git format-patch --stdout -1 > /tmp/patch,
- Pasted the/tmp/patchcontent to email composer window,
- Filled in email receipts, subject line and a few lines before the patch
context in composer window.
You should use git send-email instead, see the QEMU documentation for more details:
https://www.qemu.org/docs/master/devel/submitting-a-patch.html#submitting-your-patches
Quoted 5 lines
I am wondering if the lines added before the formatted patch content in last step caused trouble?
When resending email, should I use [patch v2] in subject line? I guess it is unnecessary as it is the same patch.
Ideally I think a "virt" virtual register would be a better approach, so if you could do that instead and send a v2 that would be great :)
Alistair
Alistair.
My initial `git send-email" on Ubuntu 22.04 wasn't lukcy:
```shell $ git send-email git: 'send-email' is not a git command. See 'git --help'. ```
I need time to find a solution.
As for seperate virt thing, my concern is that though the V and P status looks orthogonal, they are not so independent (e.g. P=3 implies V=0). Having them in one priv register tells user that that they should be operated together using one command.
Quoted 54 lines · Alistair Francis
Quoted 32 lines · Yanfeng
Quoted 22 lines · Alistair Francis
Quoted 10 lines · Yanfeng
When debugging hypervisor extension based programs, it is convenient to see
the
current virtualization mode from GDB debugger.This patch shares the virtualization mode as part of the existing "priv" virtual
register, or more specifically via bit(8).Interesting concept. This seems fine to me, I don't think this will break any existing user.
Another option though is to add a "virt" virtual register, which might be easier for people to figure out as it isn't obvious from GDB what bit 8 means. That might be a better approach as then it's really clear what the register means.
Quoted 2 lines
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
From
0d82561b11e1c2835f14ba5460cfff52f0087530Mon Sep 17 00:00:00 2001From: Yanfeng Liu <[email protected]>
Date: Mon, 18 Nov 2024 08:03:15 +0800
Subject: [PATCH] riscv/gdb: share virt mode via priv registerIt seems like something strange happened when you submitted the patch. Can you fix this up?
Quoted 6 lines
I prepared a patch file via the following steps:
- Did
git format-patch --stdout -1 > /tmp/patch,
- Pasted the/tmp/patchcontent to email composer window,
- Filled in email receipts, subject line and a few lines before the patch context in composer window.You should use
git send-emailinstead, see the QEMU documentation for more details:
https://www.qemu.org/docs/master/devel/submitting-a-patch.html#submitting-your-patchesQuoted 5 lines
I am wondering if the lines added before the formatted patch content in last step caused trouble?
When resending email, should I use [patch v2] in subject line? I guess it is unnecessary as it is the same patch.Ideally I think a "virt" virtual register would be a better approach, so if you could do that instead and send a v2 that would be great :)
Alistair
Quoted 11 lines · Yanfeng
Alistair.
My initial `git send-email" on Ubuntu 22.04 wasn't lukcy:
```shell $ git send-email git: 'send-email' is not a git command. See 'git --help'. ```I need time to find a solution.
You will need to install git-send-email (or something like that)
Quoted 5 lines
As for seperate
virtthing, my concern is that though the V and P status looks orthogonal, they are not so independent (e.g.P=3impliesV=0). Having them in oneprivregister tells user that that they should be operated together using one command.
True, but how can a user know what bit 8 means?
Alistair
Quoted 57 lines · Alistair Francis
Quoted 54 lines · Yanfeng
Quoted 32 lines · Alistair Francis
Quoted 22 lines · Yanfeng
Quoted 10 lines
When debugging hypervisor extension based programs, it is convenient to see
the
current virtualization mode from GDB debugger.This patch shares the virtualization mode as part of the existing "priv" virtual
register, or more specifically via bit(8).Interesting concept. This seems fine to me, I don't think this will break any existing user.
Another option though is to add a "virt" virtual register, which might be easier for people to figure out as it isn't obvious from GDB what bit 8 means. That might be a better approach as then it's really clear what the register means.
Quoted 2 lines
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
From
0d82561b11e1c2835f14ba5460cfff52f0087530Mon Sep 17 00:00:00 2001From: Yanfeng Liu <[email protected]>
Date: Mon, 18 Nov 2024 08:03:15 +0800
Subject: [PATCH] riscv/gdb: share virt mode via priv registerIt seems like something strange happened when you submitted the patch. Can you fix this up?
Quoted 6 lines
I prepared a patch file via the following steps:
- Did
git format-patch --stdout -1 > /tmp/patch,
- Pasted the/tmp/patchcontent to email composer window,
- Filled in email receipts, subject line and a few lines before the patch
context in composer window.You should use
git send-emailinstead, see the QEMU documentation for more details:
https://www.qemu.org/docs/master/devel/submitting-a-patch.html#submitting-your-patchesQuoted 5 lines
I am wondering if the lines added before the formatted patch content in last step caused trouble?
When resending email, should I use [patch v2] in subject line? I guess it is unnecessary as it is the same patch.Ideally I think a "virt" virtual register would be a better approach, so if you could do that instead and send a v2 that would be great :)
Alistair
Quoted 6 lines · Alistair Francis
Quoted 5 lines · Yanfeng
Alistair.
My initial `git send-email" on Ubuntu 22.04 wasn't lukcy:
Quoted 8 lines
Quoted 6 lines
```shell $ git send-email git: 'send-email' is not a git command. See 'git --help'. ```I need time to find a solution.
You will need to install git-send-email (or something like that)
Yes, now the "git send-email" exists and I will see how to use it correctly.
Quoted 10 lines
Quoted 8 lines
As for seperate
virtthing, my concern is that though the V and P status looks
orthogonal, they are not so independent (e.g.P=3impliesV=0). Having them
in oneprivregister tells user that that they should be operated together using one command.True, but how can a user know what bit 8 means?
Good point. Can we mention it in the user document for priv register?
I used bit(8) at my first try and it worked from GDB command line. Actually I also tried bit(4) but found GDB command takes that bit as part of P value so I withdrawed back to bit(8).
Quoted 65 lines
Alistair
Quoted 62 lines · Alistair Francis
Quoted 60 lines · Yanfeng
Quoted 35 lines · Alistair Francis
Quoted 24 lines · Yanfeng
Quoted 8 lines
When debugging hypervisor extension based programs, it is convenient to
see
the
current virtualization mode from GDB debugger.Quoted 4 lines
This patch shares the virtualization mode as part of the existing "priv"
virtual
register, or more specifically via bit(8).Interesting concept. This seems fine to me, I don't think this will break any existing user.
Another option though is to add a "virt" virtual register, which might be easier for people to figure out as it isn't obvious from GDB what bit 8 means. That might be a better approach as then it's really clear what the register means.
Quoted 2 lines
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
From
0d82561b11e1c2835f14ba5460cfff52f0087530Mon Sep 17 00:00:00 2001From: Yanfeng Liu <[email protected]>
Date: Mon, 18 Nov 2024 08:03:15 +0800
Subject: [PATCH] riscv/gdb: share virt mode via priv registerIt seems like something strange happened when you submitted the patch. Can you fix this up?
Quoted 7 lines
I prepared a patch file via the following steps:
- Did
git format-patch --stdout -1 > /tmp/patch,
- Pasted the/tmp/patchcontent to email composer window,
- Filled in email receipts, subject line and a few lines before the patch
context in composer window.You should use
git send-emailinstead, see the QEMU documentation for more details:
https://www.qemu.org/docs/master/devel/submitting-a-patch.html#submitting-your-patchesQuoted 7 lines
I am wondering if the lines added before the formatted patch content in last
step caused trouble?
When resending email, should I use [patch v2] in subject line? I guess it is
unnecessary as it is the same patch.Ideally I think a "virt" virtual register would be a better approach, so if you could do that instead and send a v2 that would be great :)
Alistair
Quoted 28 lines · Yanfeng
Quoted 6 lines · Alistair Francis
Quoted 5 lines · Yanfeng
Alistair.
My initial `git send-email" on Ubuntu 22.04 wasn't lukcy:
Quoted 8 lines
Quoted 6 lines
```shell $ git send-email git: 'send-email' is not a git command. See 'git --help'. ```I need time to find a solution.
You will need to install git-send-email (or something like that)
Yes, now the "git send-email" exists and I will see how to use it correctly.
Quoted 9 lines
Quoted 8 lines
As for seperate
virtthing, my concern is that though the V and P status looks
orthogonal, they are not so independent (e.g.P=3impliesV=0). Having them
in oneprivregister tells user that that they should be operated together using one command.
Quoted 3 lines
Quoted 1 line
True, but how can a user know what bit 8 means?
Good point. Can we mention it in the user document for
privregister?
AFAIK we don't really have a place to document that. Which is why a "virt" register would help as it's self documenting.
Alistair
Quoted 6 lines
I used bit(8) at my first try and it worked from GDB command line. Actually I also tried bit(4) but found GDB command takes that bit as part of P value so I withdrawed back to bit(8).
Quoted 1 line
Quoted 32 lines · Alistair Francis
Quoted 31 lines · Yanfeng
Quoted 6 lines · Alistair Francis
Quoted 5 lines · Yanfeng
Alistair.
My initial `git send-email" on Ubuntu 22.04 wasn't lukcy:
Quoted 8 lines
Quoted 6 lines
```shell $ git send-email git: 'send-email' is not a git command. See 'git --help'. ```I need time to find a solution.
You will need to install git-send-email (or something like that)
Yes, now the "git send-email" exists and I will see how to use it correctly.
Quoted 12 lines
Quoted 11 lines
As for seperate
virtthing, my concern is that though the V and P status
looks
orthogonal, they are not so independent (e.g.P=3impliesV=0). Having
them
in oneprivregister tells user that that they should be operated together
using one command.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
True, but how can a user know what bit 8 means?
Good point. Can we mention it in the user document for
privregister?AFAIK we don't really have a place to document that. Which is why a "virt" register would help as it's self documenting.
Okay, I will try adding a virt virtual register in a [PATCH v2] later.
Quoted 11 lines
Alistair
Quoted 8 lines
I used bit(8) at my first try and it worked from GDB command line. Actually I
also tried bit(4) but found GDB command takes that bit as part of P value so I
withdrawed back to bit(8).
Quoted 33 lines · Yanfeng
Quoted 32 lines · Alistair Francis
Quoted 31 lines · Yanfeng
Quoted 6 lines · Alistair Francis
Quoted 5 lines · Yanfeng
Alistair.
My initial `git send-email" on Ubuntu 22.04 wasn't lukcy:
Quoted 8 lines
Quoted 6 lines
```shell $ git send-email git: 'send-email' is not a git command. See 'git --help'. ```I need time to find a solution.
You will need to install git-send-email (or something like that)
Yes, now the "git send-email" exists and I will see how to use it correctly.
Quoted 12 lines
Quoted 11 lines
As for seperate
virtthing, my concern is that though the V and P status
looks
orthogonal, they are not so independent (e.g.P=3impliesV=0). Having
them
in oneprivregister tells user that that they should be operated together
using one command.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
True, but how can a user know what bit 8 means?
Good point. Can we mention it in the user document for
privregister?AFAIK we don't really have a place to document that. Which is why a "virt" register would help as it's self documenting.
Okay, I will try adding a
virtvirtual register in a [PATCH v2] later.
Can you please also change the patch title/subject to:
"riscv: include virtualization mode as part of priv"
Adding 'riscv' at the beginning will help people from the common qemu-devel ML to identify which subsystem/arch this patch is aimed at.
Thanks,
Daniel
Quoted 12 lines
Quoted 11 lines
Alistair
Quoted 8 lines
I used bit(8) at my first try and it worked from GDB command line. Actually I
also tried bit(4) but found GDB command takes that bit as part of P value so I
withdrawed back to bit(8).
Quoted 46 lines · Daniel Henrique Barboza
Quoted 34 lines · Yanfeng
Quoted 33 lines · Alistair Francis
Quoted 32 lines · Yanfeng
Quoted 6 lines · Alistair Francis
Quoted 5 lines · Yanfeng
Alistair.
My initial `git send-email" on Ubuntu 22.04 wasn't lukcy:
Quoted 8 lines
Quoted 6 lines
```shell $ git send-email git: 'send-email' is not a git command. See 'git --help'. ```I need time to find a solution.
You will need to install git-send-email (or something like that)
Yes, now the "git send-email" exists and I will see how to use it correctly.
Quoted 12 lines
Quoted 11 lines
As for seperate
virtthing, my concern is that though the V and P status
looks
orthogonal, they are not so independent (e.g.P=3impliesV=0). Having
them
in oneprivregister tells user that that they should be operated together
using one command.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
True, but how can a user know what bit 8 means?
Good point. Can we mention it in the user document for
privregister?AFAIK we don't really have a place to document that. Which is why a "virt" register would help as it's self documenting.
Okay, I will try adding a
virtvirtual register in a [PATCH v2] later.
Quoted 8 lines
Can you please also change the patch title/subject to:
"riscv: include virtualization mode as part of priv"
Adding 'riscv' at the beginning will help people from the common qemu-devel ML to
identify which subsystem/arch this patch is aimed at.
Sure, will do in updated versions later.
Thanks,
yf
Quoted 21 lines
Thanks,
Daniel
Quoted 14 lines
Quoted 13 lines
Alistair
Quoted 10 lines
I used bit(8) at my first try and it worked from GDB command line. Actually
I
also tried bit(4) but found GDB command takes that bit as part of P value so
I
withdrawed back to bit(8).