On 27.01.20 12:40, Ralf Ramsauer wrote:


On 27/01/2020 07:37, Jan Kiszka wrote:
From: Jan Kiszka <[email protected]>

This field is static, thus volatile is not appropriate. Rephrase the
field and flags documentation for a clearer wording.

Signed-off-by: Jan Kiszka <[email protected]>
---
  include/jailhouse/hypercall.h | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/jailhouse/hypercall.h b/include/jailhouse/hypercall.h
index 20eea801..07574d3d 100644
--- a/include/jailhouse/hypercall.h
+++ b/include/jailhouse/hypercall.h
@@ -92,9 +92,9 @@
  #define JAILHOUSE_CELL_FAILED                 3 /* terminal state */
  #define JAILHOUSE_CELL_FAILED_COMM_REV                4 /* terminal state */

-/* indicates if the inmate may use the dbg putc hypercall */
+/* indicates if inmate may use the Debug Console putc hypercall */
  #define JAILHOUSE_COMM_FLAG_DBG_PUTC_PERMITTED        0x0001
-/* indicates if the dbg putc is automatically used as output channel */
+/* indicates if inmate shall use Debug Console putc as output channel */
  #define JAILHOUSE_COMM_FLAG_DBG_PUTC_ACTIVE   0x0002

  #define JAILHOUSE_COMM_HAS_DBG_PUTC_PERMITTED(flags) \
@@ -116,8 +116,8 @@
        volatile __u32 msg_to_cell;                                     \
        /** Reply code sent from cell to hypervisor. */                 \
        volatile __u32 reply_from_cell;                                 \

Why do we actually need volatile here? Shouldn't we rather use mmio
accessors?

This is shared memory, not device memory.

Jan


   Ralf

-       /** Holds information special flags */                          \
-       volatile __u32 flags;                                           \
+       /** Holds static flags, see JAILHOUSE_COMM_FLAG_*. */           \
+       __u32 flags;                                                    \
        /** Debug console that may be accessed by the inmate. */        \
        struct jailhouse_console console;                               \
        /** Base address of PCI memory mapped config. */                \
--
2.16.4


--
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/c950de03-02f6-2ed8-109b-627ce9bda84b%40web.de.

Reply via email to