Re: [kvm-unit-tests PATCH v2 3/3] s390x: Ultravisor guest API test

Cornelia Huck
2020-08-10T15:32:26Z

[-- Attachment #1: Type: text/plain, Size: 1005 bytes --]

On Mon, 10 Aug 2020 17:27:36 +0200
Janosch Frank <frankja@linux.ibm.com> wrote:

> On 8/10/20 4:50 PM, Cornelia Huck wrote:
> > On Fri, 7 Aug 2020 07:15:55 -0400
> > Janosch Frank <frankja@linux.ibm.com> wrote:

> >> +static inline int share(unsigned long addr, u16 cmd)
> >> +{
> >> + struct uv_cb_share uvcb = {
> >> + .header.cmd = cmd,
> >> + .header.len = sizeof(uvcb),
> >> + .paddr = addr
> >> + };
> >> +
> >> + uv_call(0, (u64)&uvcb);
> >> + return uvcb.header.rc;
> >
> > Any reason why you're not checking rc and cc here...
>
> Well, this is a helper function not a test function.
> Since I can only return one value and since I'm lazy, I chose to ignore
> the CC and went for the uvcb rc. That's basically also the answer for
> your following questions.

Maybe I'm just confused regarding the command execution here.

>
>
> Alright, I'll remove the helpers and execute those tests the hard way.

As a plus point, you see exactly what is being done.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]