[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v5 3/8] xen: add basic hypervisor filesystem support
- To: Julien Grall <julien@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Jürgen Groß <jgross@xxxxxxxx>
- Date: Thu, 20 Feb 2020 08:29:48 +0100
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Thu, 20 Feb 2020 07:29:54 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 19.02.20 17:26, Julien Grall wrote:
On 19/02/2020 08:11, Juergen Gross wrote:
+int hypfs_write_bool(struct hypfs_entry_leaf *leaf,
+ XEN_GUEST_HANDLE_PARAM(void) uaddr, unsigned
long ulen)
+{
+ union {
+ char buf[8];
+ uint8_t u8;
+ uint16_t u16;
+ uint32_t u32;
+ uint64_t u64;
+ } u;
+
+ ASSERT(leaf->e.type == XEN_HYPFS_TYPE_UINT && leaf->e.size <= 8);
Shouldn't this be XEN_HYPFSW_TYPE_BOOL? But then, why are we allowing a
boolean parameter to be held in a 64-bit value?
IHMO, a boolean should really be hold in a bool and nothing else.
Yes, as already replied to Jan I'll modify the param handling for bool
which allowed larger variables and which was the reason I added this
possibility here, too.
And yes, the test should use XEN_HYPFSW_TYPE_BOOL.
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|