[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 11/23] hyperv: address HvSintRoute by X86CPU poi
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH 11/23] hyperv: address HvSintRoute by X86CPU pointer |
Date: |
Tue, 13 Jun 2017 16:02:56 -0300 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Tue, Jun 06, 2017 at 09:19:36PM +0300, Roman Kagan wrote:
> Use X86CPU pointer to refer to the respective HvSintRoute instead of
> vp_index. This is more convenient and also paves the way for future
> enhancements.
>
> Signed-off-by: Roman Kagan <address@hidden>
[...]
> @@ -101,16 +101,18 @@ static void hv_test_dev_control(void *opaque, hwaddr
> addr, uint64_t data,
> uint8_t sint = data & 0xFF;
> uint8_t vcpu_id = (data >> 8ULL) & 0xFF;
vcpu_id risks being confused KVM's vcpu_id (which is the CPU APIC
ID in x86). If you are already touching this code, this could be
renamed to vp_index to avoid confusion.
> uint8_t ctl = (data >> 16ULL) & 0xFF;
> + X86CPU *cpu = hyperv_find_vcpu(vcpu_id);
> + assert(cpu);
>
> switch (ctl) {
> case HV_TEST_DEV_SINT_ROUTE_CREATE:
> - sint_route_create(dev, vcpu_id, sint);
> + sint_route_create(dev, cpu, sint);
> break;
> case HV_TEST_DEV_SINT_ROUTE_DESTROY:
> - sint_route_destroy(dev, vcpu_id, sint);
> + sint_route_destroy(dev, cpu, sint);
> break;
> case HV_TEST_DEV_SINT_ROUTE_SET_SINT:
> - sint_route_set_sint(dev, vcpu_id, sint);
> + sint_route_set_sint(dev, cpu, sint);
> break;
> default:
> break;
--
Eduardo
- [Qemu-devel] [PATCH 17/23] hyperv: add synic message delivery, (continued)
- [Qemu-devel] [PATCH 17/23] hyperv: add synic message delivery, Roman Kagan, 2017/06/06
- [Qemu-devel] [PATCH 22/23] MAINTAINERS: add myself and eyakovlev@ for hyperv*, Roman Kagan, 2017/06/06
- [Qemu-devel] [PATCH 20/23] hyperv: process POST_MESSAGE hypercall, Roman Kagan, 2017/06/06
- [Qemu-devel] [PATCH 21/23] hyperv_testdev: add SynIC message and event testmodes, Roman Kagan, 2017/06/06
- [Qemu-devel] [PATCH 16/23] hyperv: map overlay pages after updating msrs, Roman Kagan, 2017/06/06
- [Qemu-devel] [PATCH 23/23] hyperv: update copyright notices, Roman Kagan, 2017/06/06
- Message not available
- Re: [Qemu-devel] [PATCH 11/23] hyperv: address HvSintRoute by X86CPU pointer,
Eduardo Habkost <=