CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.With hypervisor versions that do not support the generation counter, but do support
On Wed, Aug 03, 2022 at 05:21:27PM +0200, bchalios@xxxxxxxxx wrote:
+ /* Backwards compatibility. If CTRA is not there we just don't exposeBackwards compatibility with what?
+ * the char device
Same intention as in the response in your other comment. I thought that it doesn't make sense
+ */This too is an error, you can not return with "all is good", right?
+ ret = parse_vmgenid_address(device, "CTRA", &state->gen_cntr_addr);
+ if (ret)
+ return 0;
+
+ state->next_counter = devm_memremap(&device->dev, state->gen_cntr_addr,
+ sizeof(u32), MEMREMAP_WB);
+ if (IS_ERR(state->next_counter))
+ return 0;
Once you try to create this device because the address is present, you
can't just give up and succeed no matter what went wrong, that seems
incorrect.
thanks,
greg k-h