From: "Chalios, Babis" <bchalios@amazon.es>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: <linux-kernel@vger.kernel.org>, <tytso@mit.edu>,
<Jason@zx2c4.com>, <dwmw@amazon.co.uk>, <graf@amazon.de>,
<xmarcalx@amazon.co.uk>, "Michael S. Tsirkin" <mst@redhat.com>,
<ani@anisinha.ca>, <imammedo@redhat.com>
Subject: Re: [PATCH 2/2] virt: vmgenid: add support for generation counter
Date: Wed, 3 Aug 2022 19:58:58 +0200 [thread overview]
Message-ID: <c342546f-457d-af9b-4db9-c9bd0e1269ac@amazon.es> (raw)
In-Reply-To: <YuqU4wXNBt4pAK+C@kroah.com>
On 3/8/22 17:31, Greg KH wrote:
> 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.
>
>
>
> On Wed, Aug 03, 2022 at 05:21:27PM +0200, bchalios@amazon.es wrote:
>> + /* Backwards compatibility. If CTRA is not there we just don't expose
>> + * the char device
> Backwards compatibility with what?
With hypervisor versions that do not support the generation counter, but
do support
the VM generation ID. In this case the hypervisor would expose ADDR but
not CTRA.
>
>> + */
>> + 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;
> This too is an error, you can not return with "all is good", right?
> 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.
Same intention as in the response in your other comment. I thought that
it doesn't make sense
to fail the whole ACPI device if registering the misc device fails.
However, seeing that again (even if my thinking is right) if this
devm_memremap fails we should
probably fail because there might be something wrong with the address
the device gave us.
>
> thanks,
>
> greg k-h
Cheers,
Babis
Amazon Spain Services sociedad limitada unipersonal, Calle Ramirez de Prado 5, 28045 Madrid. Registro Mercantil de Madrid . Tomo 22458 . Folio 102 . Hoja M-401234 . CIF B84570936
next prev parent reply other threads:[~2022-08-03 17:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-03 15:21 [PATCH 0/2] virt: vmgenid: add " bchalios
2022-08-03 15:21 ` [PATCH 1/2] virt: vmgenid: add helper function to parse ADDR bchalios
2022-08-03 15:21 ` [PATCH 2/2] virt: vmgenid: add support for generation counter bchalios
2022-08-03 15:28 ` Greg KH
2022-08-03 15:30 ` Greg KH
2022-08-03 17:53 ` Chalios, Babis
2022-08-03 15:31 ` Greg KH
2022-08-03 17:58 ` Chalios, Babis [this message]
2022-08-14 3:26 ` kernel test robot
2022-08-03 15:50 ` [PATCH 0/2] virt: vmgenid: add " Chalios, Babis
2022-08-03 15:57 ` Chalios, Babis
2022-08-04 13:33 ` Chalios, Babis
2022-08-04 14:59 ` Jason A. Donenfeld
2022-08-04 15:46 ` bchalios
2022-08-10 9:19 ` bchalios
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c342546f-457d-af9b-4db9-c9bd0e1269ac@amazon.es \
--to=bchalios@amazon.es \
--cc=Jason@zx2c4.com \
--cc=ani@anisinha.ca \
--cc=dwmw@amazon.co.uk \
--cc=graf@amazon.de \
--cc=gregkh@linuxfoundation.org \
--cc=imammedo@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=tytso@mit.edu \
--cc=xmarcalx@amazon.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®