WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] use of struct hvm_mirq_dpci_mapping.gmsi vs. HVM_IRQ_DPC

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: RE: [Xen-devel] use of struct hvm_mirq_dpci_mapping.gmsi vs. HVM_IRQ_DPCI_*_MSI flags
From: "Kay, Allen M" <allen.m.kay@xxxxxxxxx>
Date: Tue, 26 Apr 2011 19:49:19 -0700
Accept-language: en-US
Acceptlanguage: en-US
Cc: Haitao Shan <maillists.shan@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 26 Apr 2011 19:50:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DB6A2EE020000780003E1DC@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4D94A88C0200007800039637@xxxxxxxxxxxxxxxxxx> <BANLkTinVcOUqDst2nOj8xfzNFbHnEtwCJg@xxxxxxxxxxxxxx> <4DB6A2EE020000780003E1DC@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcwD7rNj/S1N/T5gSQqwI5dUU8TC1QAk1Ryg
Thread-topic: [Xen-devel] use of struct hvm_mirq_dpci_mapping.gmsi vs. HVM_IRQ_DPCI_*_MSI flags
>>
>> I'm largely asking because I think struct hvm_mirq_dpci_mapping.dom
>> and .digl_list could actually overlay .gmsi, as much as struct
>> hvm_irq_dpci.hvm_timer could actually rather be folded into struct
>> hvm_mirq_dpci_mapping (and then also overlay .gmsi). The overlay
>> distinction bit would, based on initialization, be HVM_IRQ_DPCI_GUEST_MSI,
>> but according to use it wouldn't be clear which of the two
>> HVM_IRQ_DPCI_*_MSI bits is actually the correct one.
>>

Jan, sorry for the late reply.  I was out of the office in the past week.

Are you proposing the following data structure change?

struct hvm_mirq_dpci_mapping {
    uint32_t flags;
    int pending;
    union {
        struct timer *hvm_timer;
        struct list_head_digl_list;
        struct domain *dom;
        struct hvm_gmsi_info gmsi;
    };
}

>> Having a single structure only would make it a lot easier to
>> convert struct hvm_mirq_dpci_mapping * in struct hvm_irq_dpci to
>> a sparse struct hvm_mirq_dpci_mapping ** (populating slots only
>> as they get used), thus shrinking the currently two d->nr_pirqs
>> sized array allocations in pt_irq_create_bind_vtd() to a single one
>> with only pointer size array elements (allowing up to about 512
>> domain pirqs rather than currently slightly above 80 without
>> exceeding PAGE_SIZE on allocation).
>>

Are you saying above structure change will allow you to change the code to 
combine
memory allocation of hvm_irq_dpci->mirq and hvm_irq_dpci->hvm_timer into a 
single
allocation of array of pointers?

If my understanding of the proposal correctly, this will only work if all the 
elements
inside of the union are not used at the same time.

Please confirm/correct my understanding, Haitao and I will discuss this 
tomorrow.

Allen


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel