[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.
- [PATCH v10 12/59] i386/xen: Implement SCHEDOP_poll and SCHEDOP_yield, (continued)
- [PATCH v10 51/59] hw/xen: Add xen_xenstore device for xenstore emulation, David Woodhouse, 2023/02/01
- [PATCH v10 47/59] i386/xen: handle PV timer hypercalls, David Woodhouse, 2023/02/01
- [PATCH v10 02/59] xen: add CONFIG_XEN_BUS and CONFIG_XEN_EMU options for Xen emulation, David Woodhouse, 2023/02/01
- [PATCH v10 19/59] i386/xen: implement HYPERVISOR_hvm_op, David Woodhouse, 2023/02/01
- [PATCH v10 41/59] hw/xen: Support HVM_PARAM_CALLBACK_TYPE_PCI_INTX callback, David Woodhouse, 2023/02/01
- [PATCH v10 39/59] i386/xen: add monitor commands to test event injection, David Woodhouse, 2023/02/01
[PATCH v10 57/59] hw/xen: Support MSI mapping to PIRQ, David Woodhouse, 2023/02/01