[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [V10 PATCH 08/23] PVH xen: Introduce PVH guest type and some basic changes.
On 07/08/13 00:26, Mukesh Rathor wrote: On Tue, 6 Aug 2013 13:06:37 +0100 George Dunlap <George.Dunlap@xxxxxxxxxxxxx> wrote:On Tue, Aug 6, 2013 at 12:47 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:On 06.08.13 at 13:29, George Dunlap <George.Dunlap@xxxxxxxxxxxxx> wrote:On Wed, Jul 24, 2013 at 2:59 AM, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote:--- a/xen/arch/x86/x86_64/traps.c +++ b/xen/arch/x86/x86_64/traps.c @@ -141,7 +141,7 @@ void show_registers(struct cpu_user_regs *regs) } } -void vcpu_show_registers(const struct vcpu *v) +void vcpu_show_registers(struct vcpu *v)Rather than doing this (which could potentially mask a bug in which something actually *does* get changed), wouldn't it make more sense to make hvm_kernel_mode (and hvm_get_segment_register) be const?That's what I suggested first too, but which turned out not to work: Down the call tree there is a use of v where a pointer to non-const is required (iirc in VMX specific code).Then the changelog should say that, preferably the exact function where non-const is needed, so people know why that's necessary without having to do their own looking.And the changelog does say it: "Note, we drop the const qualifier from vcpu_show_registers() to accomodate the hvm function call in guest_kernel_mode()." I said *exact function*. guest_kernel_mode() doesn't need it non-const; it needs it because of a function that it calls. That in turn doesn't need it non-const either -- it needs it because of the next one down. Who *actually* needs vcpu to be non-const, way down at the bottom? That's what I need to know to understand why we can't just change each of those functions to const all the way down. -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |