* [PATCH 1/3] qemu-kvm: fix build with KVM_CAP_SET_GUEST_DEBUG [not found] <cover.1254914295.git.mst@redhat.com> @ 2009-10-07 11:19 ` Michael S. Tsirkin 2009-10-07 12:16 ` Jan Kiszka 2009-10-07 11:19 ` [PATCH 2/3] qemu-kvm: fix build on 32 bit Michael S. Tsirkin 2009-10-07 11:19 ` [PATCH 3/3] qemu-kvm: convert kvm_types to ISO Michael S. Tsirkin 2 siblings, 1 reply; 7+ messages in thread From: Michael S. Tsirkin @ 2009-10-07 11:19 UTC (permalink / raw) To: avi, kvm Fix build with KVM_CAP_SET_GUEST_DEBUG: use QLIST macro to declare list head. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- qemu-kvm.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-kvm.h b/qemu-kvm.h index 4523e25..d6748c7 100644 --- a/qemu-kvm.h +++ b/qemu-kvm.h @@ -1229,7 +1229,7 @@ typedef struct KVMState { int broken_set_mem_region; int migration_log; #ifdef KVM_CAP_SET_GUEST_DEBUG - struct kvm_sw_breakpoint_head kvm_sw_breakpoints; + QTAILQ_HEAD(, kvm_sw_breakpoint) kvm_sw_breakpoints; #endif struct kvm_context kvm_context; } KVMState; -- 1.6.5.rc2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] qemu-kvm: fix build with KVM_CAP_SET_GUEST_DEBUG 2009-10-07 11:19 ` [PATCH 1/3] qemu-kvm: fix build with KVM_CAP_SET_GUEST_DEBUG Michael S. Tsirkin @ 2009-10-07 12:16 ` Jan Kiszka 2009-10-07 12:18 ` Michael S. Tsirkin 0 siblings, 1 reply; 7+ messages in thread From: Jan Kiszka @ 2009-10-07 12:16 UTC (permalink / raw) To: Michael S. Tsirkin; +Cc: avi, kvm Michael S. Tsirkin wrote: > Fix build with KVM_CAP_SET_GUEST_DEBUG: use QLIST macro > to declare list head. > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com> > --- > qemu-kvm.h | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/qemu-kvm.h b/qemu-kvm.h > index 4523e25..d6748c7 100644 > --- a/qemu-kvm.h > +++ b/qemu-kvm.h > @@ -1229,7 +1229,7 @@ typedef struct KVMState { > int broken_set_mem_region; > int migration_log; > #ifdef KVM_CAP_SET_GUEST_DEBUG > - struct kvm_sw_breakpoint_head kvm_sw_breakpoints; > + QTAILQ_HEAD(, kvm_sw_breakpoint) kvm_sw_breakpoints; > #endif > struct kvm_context kvm_context; > } KVMState; If it's required here I bet we need this upstream too, right? Then please also file a corresponding patch for qemu. Thanks, Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] qemu-kvm: fix build with KVM_CAP_SET_GUEST_DEBUG 2009-10-07 12:16 ` Jan Kiszka @ 2009-10-07 12:18 ` Michael S. Tsirkin 2009-10-07 12:23 ` Jan Kiszka 0 siblings, 1 reply; 7+ messages in thread From: Michael S. Tsirkin @ 2009-10-07 12:18 UTC (permalink / raw) To: Jan Kiszka; +Cc: avi, kvm On Wed, Oct 07, 2009 at 02:16:32PM +0200, Jan Kiszka wrote: > Michael S. Tsirkin wrote: > > Fix build with KVM_CAP_SET_GUEST_DEBUG: use QLIST macro > > to declare list head. > > > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com> > > --- > > qemu-kvm.h | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/qemu-kvm.h b/qemu-kvm.h > > index 4523e25..d6748c7 100644 > > --- a/qemu-kvm.h > > +++ b/qemu-kvm.h > > @@ -1229,7 +1229,7 @@ typedef struct KVMState { > > int broken_set_mem_region; > > int migration_log; > > #ifdef KVM_CAP_SET_GUEST_DEBUG > > - struct kvm_sw_breakpoint_head kvm_sw_breakpoints; > > + QTAILQ_HEAD(, kvm_sw_breakpoint) kvm_sw_breakpoints; > > #endif > > struct kvm_context kvm_context; > > } KVMState; > > If it's required here I bet we need this upstream too, right? No, upstream does not have qemu-kvm.h All these files are qemu-kvm only. upstream builds fine as is. > Then > please also file a corresponding patch for qemu. > > Thanks, > Jan > > -- > Siemens AG, Corporate Technology, CT SE 2 > Corporate Competence Center Embedded Linux ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] qemu-kvm: fix build with KVM_CAP_SET_GUEST_DEBUG 2009-10-07 12:18 ` Michael S. Tsirkin @ 2009-10-07 12:23 ` Jan Kiszka 0 siblings, 0 replies; 7+ messages in thread From: Jan Kiszka @ 2009-10-07 12:23 UTC (permalink / raw) To: Michael S. Tsirkin; +Cc: avi@redhat.com, kvm@vger.kernel.org Michael S. Tsirkin wrote: > On Wed, Oct 07, 2009 at 02:16:32PM +0200, Jan Kiszka wrote: >> Michael S. Tsirkin wrote: >>> Fix build with KVM_CAP_SET_GUEST_DEBUG: use QLIST macro >>> to declare list head. >>> >>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> >>> --- >>> qemu-kvm.h | 2 +- >>> 1 files changed, 1 insertions(+), 1 deletions(-) >>> >>> diff --git a/qemu-kvm.h b/qemu-kvm.h >>> index 4523e25..d6748c7 100644 >>> --- a/qemu-kvm.h >>> +++ b/qemu-kvm.h >>> @@ -1229,7 +1229,7 @@ typedef struct KVMState { >>> int broken_set_mem_region; >>> int migration_log; >>> #ifdef KVM_CAP_SET_GUEST_DEBUG >>> - struct kvm_sw_breakpoint_head kvm_sw_breakpoints; >>> + QTAILQ_HEAD(, kvm_sw_breakpoint) kvm_sw_breakpoints; >>> #endif >>> struct kvm_context kvm_context; >>> } KVMState; >> If it's required here I bet we need this upstream too, right? > > No, upstream does not have qemu-kvm.h > All these files are qemu-kvm only. > upstream builds fine as is. Upstream has KVMState, too, but it also has a cleaner header structuring than qemu-kvm (as the latter is morphing towards to former). So yes, this is a qemu-kvm-only workaround. Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] qemu-kvm: fix build on 32 bit [not found] <cover.1254914295.git.mst@redhat.com> 2009-10-07 11:19 ` [PATCH 1/3] qemu-kvm: fix build with KVM_CAP_SET_GUEST_DEBUG Michael S. Tsirkin @ 2009-10-07 11:19 ` Michael S. Tsirkin 2009-10-07 11:19 ` [PATCH 3/3] qemu-kvm: convert kvm_types to ISO Michael S. Tsirkin 2 siblings, 0 replies; 7+ messages in thread From: Michael S. Tsirkin @ 2009-10-07 11:19 UTC (permalink / raw) To: avi, kvm Fix build on 32 bit system: cast 64 bit integer to pointer through pointer-sized integer. Without this, I get: qemu-kvm.c:1557: error: cast to pointer from integer of different size Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- qemu-kvm.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index a4a90ed..62ca050 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -588,7 +588,7 @@ int kvm_register_phys_mem(kvm_context_t kvm, struct kvm_userspace_memory_region memory = { .memory_size = len, .guest_phys_addr = phys_start, - .userspace_addr = (unsigned long) (intptr_t) userspace_addr, + .userspace_addr = (unsigned long) (uintptr_t) userspace_addr, .flags = log ? KVM_MEM_LOG_DIRTY_PAGES : 0, }; int r; @@ -1554,7 +1554,8 @@ static void sigbus_handler(int n, struct qemu_signalfd_siginfo *siginfo, CPUState *cenv; /* Hope we are lucky for AO MCE */ - if (do_qemu_ram_addr_from_host((void *)siginfo->ssi_addr, &paddr)) { + if (do_qemu_ram_addr_from_host((void *)(intptr_t)siginfo->ssi_addr, + &paddr)) { fprintf(stderr, "Hardware memory error for memory used by " "QEMU itself instead of guest system!: %llx\n", (unsigned long long)siginfo->ssi_addr); -- 1.6.5.rc2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] qemu-kvm: convert kvm_types to ISO [not found] <cover.1254914295.git.mst@redhat.com> 2009-10-07 11:19 ` [PATCH 1/3] qemu-kvm: fix build with KVM_CAP_SET_GUEST_DEBUG Michael S. Tsirkin 2009-10-07 11:19 ` [PATCH 2/3] qemu-kvm: fix build on 32 bit Michael S. Tsirkin @ 2009-10-07 11:19 ` Michael S. Tsirkin 2009-10-08 13:18 ` Avi Kivity 2 siblings, 1 reply; 7+ messages in thread From: Michael S. Tsirkin @ 2009-10-07 11:19 UTC (permalink / raw) To: avi, kvm Convert kvm-types to use ISO C types so that it can be included independently of other headers. This is on top of header patch set I sent previously. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- kvm/include/linux/kvm_types.h | 50 ++++++++++++++++++++-------------------- 1 files changed, 25 insertions(+), 25 deletions(-) diff --git a/kvm/include/linux/kvm_types.h b/kvm/include/linux/kvm_types.h index c65f89e..5c0b739 100644 --- a/kvm/include/linux/kvm_types.h +++ b/kvm/include/linux/kvm_types.h @@ -70,41 +70,41 @@ * hfn - host frame number */ -typedef unsigned long gva_t; -typedef u64 gpa_t; -typedef unsigned long gfn_t; +typedef unsigned long gva_t; +typedef unsigned long long gpa_t; +typedef unsigned long gfn_t; -typedef unsigned long hva_t; -typedef u64 hpa_t; -typedef unsigned long hfn_t; +typedef unsigned long hva_t; +typedef unsigned long long hpa_t; +typedef unsigned long hfn_t; typedef hfn_t pfn_t; union kvm_ioapic_redirect_entry { - u64 bits; + unsigned long long bits; struct { - u8 vector; - u8 delivery_mode:3; - u8 dest_mode:1; - u8 delivery_status:1; - u8 polarity:1; - u8 remote_irr:1; - u8 trig_mode:1; - u8 mask:1; - u8 reserve:7; - u8 reserved[4]; - u8 dest_id; + unsigned char vector; + unsigned char delivery_mode:3; + unsigned char dest_mode:1; + unsigned char delivery_status:1; + unsigned char polarity:1; + unsigned char remote_irr:1; + unsigned char trig_mode:1; + unsigned char mask:1; + unsigned char reserve:7; + unsigned char reserved[4]; + unsigned char dest_id; } fields; }; struct kvm_lapic_irq { - u32 vector; - u32 delivery_mode; - u32 dest_mode; - u32 level; - u32 trig_mode; - u32 shorthand; - u32 dest_id; + unsigned vector; + unsigned delivery_mode; + unsigned dest_mode; + unsigned level; + unsigned trig_mode; + unsigned shorthand; + unsigned dest_id; }; #endif /* __KVM_TYPES_H__ */ -- 1.6.5.rc2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] qemu-kvm: convert kvm_types to ISO 2009-10-07 11:19 ` [PATCH 3/3] qemu-kvm: convert kvm_types to ISO Michael S. Tsirkin @ 2009-10-08 13:18 ` Avi Kivity 0 siblings, 0 replies; 7+ messages in thread From: Avi Kivity @ 2009-10-08 13:18 UTC (permalink / raw) To: Michael S. Tsirkin; +Cc: kvm On 10/07/2009 01:19 PM, Michael S. Tsirkin wrote: > Convert kvm-types to use ISO C types so that > it can be included independently of other headers. > This is on top of header patch set I sent previously. > > Applied first two, but these headers are completely unnecessary for userspace, so I removed them instead. > diff --git a/kvm/include/linux/kvm_types.h b/kvm/include/linux/kvm_types.h > index c65f89e..5c0b739 100644 > --- a/kvm/include/linux/kvm_types.h > +++ b/kvm/include/linux/kvm_types.h > @@ -70,41 +70,41 @@ > * hfn - host frame number > */ > > -typedef unsigned long gva_t; > -typedef u64 gpa_t; > -typedef unsigned long gfn_t; > +typedef unsigned long gva_t; > +typedef unsigned long long gpa_t; > +typedef unsigned long gfn_t; > > -typedef unsigned long hva_t; > -typedef u64 hpa_t; > -typedef unsigned long hfn_t; > +typedef unsigned long hva_t; > +typedef unsigned long long hpa_t; > +typedef unsigned long hfn_t; > > typedef hfn_t pfn_t; > > union kvm_ioapic_redirect_entry { > - u64 bits; > + unsigned long long bits; > struct { > - u8 vector; > - u8 delivery_mode:3; > - u8 dest_mode:1; > - u8 delivery_status:1; > - u8 polarity:1; > - u8 remote_irr:1; > - u8 trig_mode:1; > - u8 mask:1; > - u8 reserve:7; > - u8 reserved[4]; > - u8 dest_id; > + unsigned char vector; > + unsigned char delivery_mode:3; > + unsigned char dest_mode:1; > + unsigned char delivery_status:1; > + unsigned char polarity:1; > + unsigned char remote_irr:1; > + unsigned char trig_mode:1; > + unsigned char mask:1; > + unsigned char reserve:7; > + unsigned char reserved[4]; > + unsigned char dest_id; > } fields; > }; > > struct kvm_lapic_irq { > - u32 vector; > - u32 delivery_mode; > - u32 dest_mode; > - u32 level; > - u32 trig_mode; > - u32 shorthand; > - u32 dest_id; > + unsigned vector; > + unsigned delivery_mode; > + unsigned dest_mode; > + unsigned level; > + unsigned trig_mode; > + unsigned shorthand; > + unsigned dest_id; > }; > > #endif /* __KVM_TYPES_H__ */ > -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-10-08 13:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1254914295.git.mst@redhat.com>
2009-10-07 11:19 ` [PATCH 1/3] qemu-kvm: fix build with KVM_CAP_SET_GUEST_DEBUG Michael S. Tsirkin
2009-10-07 12:16 ` Jan Kiszka
2009-10-07 12:18 ` Michael S. Tsirkin
2009-10-07 12:23 ` Jan Kiszka
2009-10-07 11:19 ` [PATCH 2/3] qemu-kvm: fix build on 32 bit Michael S. Tsirkin
2009-10-07 11:19 ` [PATCH 3/3] qemu-kvm: convert kvm_types to ISO Michael S. Tsirkin
2009-10-08 13:18 ` Avi Kivity
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).