* [PATCH] Use symbol insted of number
@ 2007-06-01 10:21 Nguyen Anh Quynh
[not found] ` <9cde8bff0706010321k7e8a4db6l1d5ecf9924374fbc-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Nguyen Anh Quynh @ 2007-06-01 10:21 UTC (permalink / raw)
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
[-- Attachment #1: Type: text/plain, Size: 168 bytes --]
This patch makes hypercall.c use symbol instead of number with
hypercall-ioport-size.
Signed-off-by: Nguyen Anh Quynh <aquynh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[-- Attachment #2: patch2 --]
[-- Type: application/octet-stream, Size: 1181 bytes --]
diff --git a/qemu/hw/hypercall.c b/qemu/hw/hypercall.c
index e531da1..49ee1a7 100644
--- a/qemu/hw/hypercall.c
+++ b/qemu/hw/hypercall.c
@@ -26,6 +26,8 @@
#include "hypercall.h"
#include <stddef.h>
+#define HYPERCALL_IOPORT_SIZE 0x100
+
int use_hypercall_dev = 0;
typedef struct VmChannelCharDriverState {
@@ -183,8 +185,8 @@ static void hp_map(PCIDevice *pci_dev, int region_num,
PCIHypercallState *d = (PCIHypercallState *)pci_dev;
HypercallState *s = &d->hp;
- register_ioport_write(addr, 0x100, 1, hp_ioport_write, s);
- register_ioport_read(addr, 0x100, 1, hp_ioport_read, s);
+ register_ioport_write(addr, HYPERCALL_IOPORT_SIZE, 1, hp_ioport_write, s);
+ register_ioport_read(addr, HYPERCALL_IOPORT_SIZE, 1, hp_ioport_read, s);
}
@@ -273,7 +275,7 @@ void pci_hypercall_single_init(PCIBus *bus, uint32_t deviceid, uint32_t index)
pci_conf[0x0e] = 0x00; // header_type
pci_conf[0x3d] = 1; // interrupt pin 0
- pci_register_io_region(&d->dev, 0, 0x100,
+ pci_register_io_region(&d->dev, 0, HYPERCALL_IOPORT_SIZE,
PCI_ADDRESS_SPACE_IO, hp_map);
s = &d->hp;
pHypercallStates[index] = s;
[-- Attachment #3: Type: text/plain, Size: 286 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
[-- Attachment #4: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Use symbol insted of number
[not found] ` <9cde8bff0706010321k7e8a4db6l1d5ecf9924374fbc-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-06-03 7:41 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2007-06-03 7:41 UTC (permalink / raw)
To: Nguyen Anh Quynh; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Nguyen Anh Quynh wrote:
> This patch makes hypercall.c use symbol instead of number with
> hypercall-ioport-size.
Applied, thanks.
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-03 7:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-01 10:21 [PATCH] Use symbol insted of number Nguyen Anh Quynh
[not found] ` <9cde8bff0706010321k7e8a4db6l1d5ecf9924374fbc-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-06-03 7:41 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox