qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 1/3] ich9: add TCO interface emulation


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 1/3] ich9: add TCO interface emulation
Date: Mon, 01 Jun 2015 11:05:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0


On 31/05/2015 00:04, Paulo Alcantara wrote:
> +    case TCO_RLD:
> +        tr->timeouts_no = 0;
> +        if (can_start_tco_timer(tr)) {
> +            tr->tco.rld = tr->tco.tmr;
> +            tco_timer_reload(tr);
> +        } else {
> +            tr->tco.rld = val;

Please mask out bits outside TCO_RLD_MASK here, same as you do for
TCO1_STS_MASK and friends.

> +        }
> +        break;

[...]

> +        tr->tco.cnt1 = tr->tco.cnt1 & TCO_LOCK ? val | TCO_LOCK : val;

Since you have to respin, you can do:

        tr->tco.cnt1 = val | (tr->tco.cnt1 & TCO_LOCK);

Otherwise looks good to me.

CCing the maintainer.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]