qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v10 47/59] i386/xen: handle PV timer hypercalls


From: David Woodhouse
Subject: Re: [PATCH v10 47/59] i386/xen: handle PV timer hypercalls
Date: Tue, 14 Feb 2023 16:37:07 +0100
User-agent: K-9 Mail for Android


On 14 February 2023 11:10:05 CET, Paul Durrant <xadimgnik@gmail.com> wrote:
>On 01/02/2023 14:31, David Woodhouse wrote:
>> From: Joao Martins <joao.m.martins@oracle.com>
>> 
>> Introduce support for one shot and periodic mode of Xen PV timers,
>> whereby timer interrupts come through a special virq event channel
>> with deadlines being set through:
>> 
>> 1) set_timer_op hypercall (only oneshot)
>> 2) vcpu_op hypercall for {set,stop}_{singleshot,periodic}_timer
>> hypercalls
>> 
>> Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
>> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
>> ---
>>   hw/i386/kvm/xen_evtchn.c  |  31 +++++
>>   hw/i386/kvm/xen_evtchn.h  |   2 +
>>   target/i386/cpu.h         |   5 +
>>   target/i386/kvm/xen-emu.c | 245 +++++++++++++++++++++++++++++++++++++-
>>   target/i386/machine.c     |   1 +
>>   5 files changed, 282 insertions(+), 2 deletions(-)
>> 
>[snip]
>> @@ -1246,6 +1466,9 @@ static bool do_kvm_xen_handle_exit(X86CPU *cpu, struct 
>> kvm_xen_exit *exit)
>>       }
>>         switch (code) {
>> +    case __HYPERVISOR_set_timer_op:
>> +        return kvm_xen_hcall_set_timer_op(exit, cpu,
>> +                                          exit->u.hcall.params[0]);
>
>There's a nasty little semantic subtlety here which has been missed... If the 
>guest is not in longmode then the timer value is actually split across 
>param[0] and param[1] (so that it is still 64-bits).

Ooh, good catch. Will fix that (perhaps tomorrow depending on what they say 
when they look at the x-rays they just took of my knee :/ )

Thanks.




reply via email to

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