* [Qemu-devel] [PULL 0/4] Net patches @ 2013-09-02 11:38 Stefan Hajnoczi 2013-09-02 11:38 ` [Qemu-devel] [PULL 1/4] tap: Use numbered tap/tun devices on all *BSD OS's Stefan Hajnoczi ` (5 more replies) 0 siblings, 6 replies; 13+ messages in thread From: Stefan Hajnoczi @ 2013-09-02 11:38 UTC (permalink / raw) To: qemu-devel; +Cc: Anthony Liguori The following changes since commit 4ff78e0dbcd5c795962567fdc1b31e9e03c55b07: Merge remote-tracking branch 'luiz/queue/qmp' into staging (2013-08-30 12:26:04 -0500) are available in the git repository at: git://github.com/stefanha/qemu.git net for you to fetch changes up to e21f6f23606e90f5cc6df2d9b1d8b862b54d2796: vmxnet3: Eliminate __packed redefined warning (2013-09-02 13:35:50 +0200) ---------------------------------------------------------------- Brad Smith (2): tap: Use numbered tap/tun devices on all *BSD OS's vmxnet3: Eliminate __packed redefined warning Jan Kiszka (1): net: Rename send_queue to incoming_queue Vincenzo Maffione (1): e1000: add interrupt mitigation support hw/i386/pc_piix.c | 18 ++++++- hw/i386/pc_q35.c | 16 ++++++- hw/net/e1000.c | 131 +++++++++++++++++++++++++++++++++++++++++++++++++-- hw/net/vmxnet3.h | 2 - include/hw/i386/pc.h | 8 ++++ include/net/net.h | 2 +- net/hub.c | 2 +- net/net.c | 14 +++--- net/tap-bsd.c | 11 ----- 9 files changed, 176 insertions(+), 28 deletions(-) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 13+ messages in thread
* [Qemu-devel] [PULL 1/4] tap: Use numbered tap/tun devices on all *BSD OS's 2013-09-02 11:38 [Qemu-devel] [PULL 0/4] Net patches Stefan Hajnoczi @ 2013-09-02 11:38 ` Stefan Hajnoczi 2013-09-02 11:38 ` [Qemu-devel] [PULL 2/4] net: Rename send_queue to incoming_queue Stefan Hajnoczi ` (4 subsequent siblings) 5 siblings, 0 replies; 13+ messages in thread From: Stefan Hajnoczi @ 2013-09-02 11:38 UTC (permalink / raw) To: qemu-devel; +Cc: Anthony Liguori From: Brad Smith <brad@comstyle.com> The following patch simplifies the *BSD tap/tun code and makes use of numbered tap/tun interfaces on all *BSD OS's. NetBSD has a patch in their pkgsrc tree to make use of this feature and DragonFly also supports this as well. Signed-off-by: Brad Smith <brad@comstyle.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> --- net/tap-bsd.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/net/tap-bsd.c b/net/tap-bsd.c index f61d580..90f8a02 100644 --- a/net/tap-bsd.c +++ b/net/tap-bsd.c @@ -44,8 +44,6 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, struct stat s; #endif -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ - defined(__OpenBSD__) || defined(__APPLE__) /* if no ifname is given, always start the search from tap0/tun0. */ int i; char dname[100]; @@ -76,15 +74,6 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, dname, strerror(errno)); return -1; } -#else - TFR(fd = open("/dev/tap", O_RDWR)); - if (fd < 0) { - fprintf(stderr, - "warning: could not open /dev/tap: no virtual network emulation: %s\n", - strerror(errno)); - return -1; - } -#endif #ifdef TAPGIFNAME if (ioctl(fd, TAPGIFNAME, (void *)&ifr) < 0) { -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PULL 2/4] net: Rename send_queue to incoming_queue 2013-09-02 11:38 [Qemu-devel] [PULL 0/4] Net patches Stefan Hajnoczi 2013-09-02 11:38 ` [Qemu-devel] [PULL 1/4] tap: Use numbered tap/tun devices on all *BSD OS's Stefan Hajnoczi @ 2013-09-02 11:38 ` Stefan Hajnoczi 2013-09-02 11:38 ` [Qemu-devel] [PULL 3/4] e1000: add interrupt mitigation support Stefan Hajnoczi ` (3 subsequent siblings) 5 siblings, 0 replies; 13+ messages in thread From: Stefan Hajnoczi @ 2013-09-02 11:38 UTC (permalink / raw) To: qemu-devel; +Cc: Anthony Liguori From: Jan Kiszka <jan.kiszka@siemens.com> Each networking client has a queue for packets that could not yet be delivered to that client. Calling this queue "send_queue" is highly confusing as it has nothing to to with packets send from this client but to it. Avoid this confusing by renaming it to "incoming_queue". Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> --- include/net/net.h | 2 +- net/hub.c | 2 +- net/net.c | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/net/net.h b/include/net/net.h index 30e4b04..11e1468 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -69,7 +69,7 @@ struct NetClientState { int link_down; QTAILQ_ENTRY(NetClientState) next; NetClientState *peer; - NetQueue *send_queue; + NetQueue *incoming_queue; char *model; char *name; char info_str[256]; diff --git a/net/hub.c b/net/hub.c index df32074..33a99c9 100644 --- a/net/hub.c +++ b/net/hub.c @@ -347,7 +347,7 @@ bool net_hub_flush(NetClientState *nc) QLIST_FOREACH(port, &source_port->hub->ports, next) { if (port != source_port) { - ret += qemu_net_queue_flush(port->nc.send_queue); + ret += qemu_net_queue_flush(port->nc.incoming_queue); } } return ret ? true : false; diff --git a/net/net.c b/net/net.c index 1148592..c330c9a 100644 --- a/net/net.c +++ b/net/net.c @@ -207,7 +207,7 @@ static void qemu_net_client_setup(NetClientState *nc, } QTAILQ_INSERT_TAIL(&net_clients, nc, next); - nc->send_queue = qemu_new_net_queue(nc); + nc->incoming_queue = qemu_new_net_queue(nc); nc->destructor = destructor; } @@ -289,8 +289,8 @@ static void qemu_cleanup_net_client(NetClientState *nc) static void qemu_free_net_client(NetClientState *nc) { - if (nc->send_queue) { - qemu_del_net_queue(nc->send_queue); + if (nc->incoming_queue) { + qemu_del_net_queue(nc->incoming_queue); } if (nc->peer) { nc->peer->peer = NULL; @@ -431,7 +431,7 @@ void qemu_purge_queued_packets(NetClientState *nc) return; } - qemu_net_queue_purge(nc->peer->send_queue, nc); + qemu_net_queue_purge(nc->peer->incoming_queue, nc); } void qemu_flush_queued_packets(NetClientState *nc) @@ -444,7 +444,7 @@ void qemu_flush_queued_packets(NetClientState *nc) } return; } - if (qemu_net_queue_flush(nc->send_queue)) { + if (qemu_net_queue_flush(nc->incoming_queue)) { /* We emptied the queue successfully, signal to the IO thread to repoll * the file descriptor (for tap, for example). */ @@ -468,7 +468,7 @@ static ssize_t qemu_send_packet_async_with_flags(NetClientState *sender, return size; } - queue = sender->peer->send_queue; + queue = sender->peer->incoming_queue; return qemu_net_queue_send(queue, sender, flags, buf, size, sent_cb); } @@ -543,7 +543,7 @@ ssize_t qemu_sendv_packet_async(NetClientState *sender, return iov_size(iov, iovcnt); } - queue = sender->peer->send_queue; + queue = sender->peer->incoming_queue; return qemu_net_queue_send_iov(queue, sender, QEMU_NET_PACKET_FLAG_NONE, -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PULL 3/4] e1000: add interrupt mitigation support 2013-09-02 11:38 [Qemu-devel] [PULL 0/4] Net patches Stefan Hajnoczi 2013-09-02 11:38 ` [Qemu-devel] [PULL 1/4] tap: Use numbered tap/tun devices on all *BSD OS's Stefan Hajnoczi 2013-09-02 11:38 ` [Qemu-devel] [PULL 2/4] net: Rename send_queue to incoming_queue Stefan Hajnoczi @ 2013-09-02 11:38 ` Stefan Hajnoczi 2013-09-02 11:38 ` [Qemu-devel] [PULL 4/4] vmxnet3: Eliminate __packed redefined warning Stefan Hajnoczi ` (2 subsequent siblings) 5 siblings, 0 replies; 13+ messages in thread From: Stefan Hajnoczi @ 2013-09-02 11:38 UTC (permalink / raw) To: qemu-devel; +Cc: Anthony Liguori From: Vincenzo Maffione <v.maffione@gmail.com> This patch partially implements the e1000 interrupt mitigation mechanisms. Using a single QEMUTimer, it emulates the ITR register (which is the newer mitigation register, recommended by Intel) and approximately emulates RADV and TADV registers. TIDV and RDTR register functionalities are not emulated (RDTR is only used to validate RADV, according to the e1000 specs). RADV, TADV, TIDV and RDTR registers make up the older e1000 mitigation mechanism and would need a timer each to be completely emulated. However, a single timer has been used in order to reach a good compromise between emulation accuracy and simplicity/efficiency. The implemented mechanism can be enabled/disabled specifying the command line e1000-specific boolean parameter "mitigation", e.g. qemu-system-x86_64 -device e1000,mitigation=on,... ... For more information, see the Software developer's manual at http://download.intel.com/design/network/manuals/8254x_GBe_SDM.pdf. Interrupt mitigation boosts performance when the guest suffers from an high interrupt rate (i.e. receiving short UDP packets at high packet rate). For some numerical results see the following link http://info.iet.unipi.it/~luigi/papers/20130520-rizzo-vm.pdf Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> (for pc-* machines) Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> --- hw/i386/pc_piix.c | 18 ++++++- hw/i386/pc_q35.c | 16 ++++++- hw/net/e1000.c | 131 +++++++++++++++++++++++++++++++++++++++++++++++++-- include/hw/i386/pc.h | 8 ++++ 4 files changed, 167 insertions(+), 6 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 3c36a2a..226f038 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -334,8 +334,8 @@ static void pc_xen_hvm_init(QEMUMachineInitArgs *args) } #endif -static QEMUMachine pc_i440fx_machine_v1_6 = { - .name = "pc-i440fx-1.6", +static QEMUMachine pc_i440fx_machine_v1_7 = { + .name = "pc-i440fx-1.7", .alias = "pc", .desc = "Standard PC (i440FX + PIIX, 1996)", .init = pc_init_pci_1_6, @@ -345,6 +345,19 @@ static QEMUMachine pc_i440fx_machine_v1_6 = { DEFAULT_MACHINE_OPTIONS, }; +static QEMUMachine pc_i440fx_machine_v1_6 = { + .name = "pc-i440fx-1.6", + .desc = "Standard PC (i440FX + PIIX, 1996)", + .init = pc_init_pci, + .hot_add_cpu = pc_hot_add_cpu, + .max_cpus = 255, + .compat_props = (GlobalProperty[]) { + PC_COMPAT_1_6, + { /* end of list */ } + }, + DEFAULT_MACHINE_OPTIONS, +}; + static QEMUMachine pc_i440fx_machine_v1_5 = { .name = "pc-i440fx-1.5", .desc = "Standard PC (i440FX + PIIX, 1996)", @@ -753,6 +766,7 @@ static QEMUMachine xenfv_machine = { static void pc_machine_init(void) { + qemu_register_machine(&pc_i440fx_machine_v1_7); qemu_register_machine(&pc_i440fx_machine_v1_6); qemu_register_machine(&pc_i440fx_machine_v1_5); qemu_register_machine(&pc_i440fx_machine_v1_4); diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 198c785..5ec4f0a 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -253,13 +253,26 @@ static void pc_q35_init_1_4(QEMUMachineInitArgs *args) pc_q35_init(args); } +static QEMUMachine pc_q35_machine_v1_7 = { + .name = "pc-q35-1.7", + .alias = "q35", + .desc = "Standard PC (Q35 + ICH9, 2009)", + .init = pc_q35_init, + .hot_add_cpu = pc_hot_add_cpu, + .max_cpus = 255, + DEFAULT_MACHINE_OPTIONS, +}; + static QEMUMachine pc_q35_machine_v1_6 = { .name = "pc-q35-1.6", - .alias = "q35", .desc = "Standard PC (Q35 + ICH9, 2009)", .init = pc_q35_init_1_6, .hot_add_cpu = pc_hot_add_cpu, .max_cpus = 255, + .compat_props = (GlobalProperty[]) { + PC_COMPAT_1_6, + { /* end of list */ } + }, DEFAULT_MACHINE_OPTIONS, }; @@ -290,6 +303,7 @@ static QEMUMachine pc_q35_machine_v1_4 = { static void pc_q35_machine_init(void) { + qemu_register_machine(&pc_q35_machine_v1_7); qemu_register_machine(&pc_q35_machine_v1_6); qemu_register_machine(&pc_q35_machine_v1_5); qemu_register_machine(&pc_q35_machine_v1_4); diff --git a/hw/net/e1000.c b/hw/net/e1000.c index f5ebed4..d3f274c 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -135,9 +135,16 @@ typedef struct E1000State_st { QEMUTimer *autoneg_timer; + QEMUTimer *mit_timer; /* Mitigation timer. */ + bool mit_timer_on; /* Mitigation timer is running. */ + bool mit_irq_level; /* Tracks interrupt pin level. */ + uint32_t mit_ide; /* Tracks E1000_TXD_CMD_IDE bit. */ + /* Compatibility flags for migration to/from qemu 1.3.0 and older */ #define E1000_FLAG_AUTONEG_BIT 0 +#define E1000_FLAG_MIT_BIT 1 #define E1000_FLAG_AUTONEG (1 << E1000_FLAG_AUTONEG_BIT) +#define E1000_FLAG_MIT (1 << E1000_FLAG_MIT_BIT) uint32_t compat_flags; } E1000State; @@ -158,7 +165,8 @@ enum { defreg(TORH), defreg(TORL), defreg(TOTH), defreg(TOTL), defreg(TPR), defreg(TPT), defreg(TXDCTL), defreg(WUFC), defreg(RA), defreg(MTA), defreg(CRCERRS),defreg(VFTA), - defreg(VET), + defreg(VET), defreg(RDTR), defreg(RADV), defreg(TADV), + defreg(ITR), }; static void @@ -245,10 +253,21 @@ static const uint32_t mac_reg_init[] = { E1000_MANC_RMCP_EN, }; +/* Helper function, *curr == 0 means the value is not set */ +static inline void +mit_update_delay(uint32_t *curr, uint32_t value) +{ + if (value && (*curr == 0 || value < *curr)) { + *curr = value; + } +} + static void set_interrupt_cause(E1000State *s, int index, uint32_t val) { PCIDevice *d = PCI_DEVICE(s); + uint32_t pending_ints; + uint32_t mit_delay; if (val && (E1000_DEVID >= E1000_DEV_ID_82547EI_MOBILE)) { /* Only for 8257x */ @@ -266,7 +285,57 @@ set_interrupt_cause(E1000State *s, int index, uint32_t val) */ s->mac_reg[ICS] = val; - qemu_set_irq(d->irq[0], (s->mac_reg[IMS] & s->mac_reg[ICR]) != 0); + pending_ints = (s->mac_reg[IMS] & s->mac_reg[ICR]); + if (!s->mit_irq_level && pending_ints) { + /* + * Here we detect a potential raising edge. We postpone raising the + * interrupt line if we are inside the mitigation delay window + * (s->mit_timer_on == 1). + * We provide a partial implementation of interrupt mitigation, + * emulating only RADV, TADV and ITR (lower 16 bits, 1024ns units for + * RADV and TADV, 256ns units for ITR). RDTR is only used to enable + * RADV; relative timers based on TIDV and RDTR are not implemented. + */ + if (s->mit_timer_on) { + return; + } + if (s->compat_flags & E1000_FLAG_MIT) { + /* Compute the next mitigation delay according to pending + * interrupts and the current values of RADV (provided + * RDTR!=0), TADV and ITR. + * Then rearm the timer. + */ + mit_delay = 0; + if (s->mit_ide && + (pending_ints & (E1000_ICR_TXQE | E1000_ICR_TXDW))) { + mit_update_delay(&mit_delay, s->mac_reg[TADV] * 4); + } + if (s->mac_reg[RDTR] && (pending_ints & E1000_ICS_RXT0)) { + mit_update_delay(&mit_delay, s->mac_reg[RADV] * 4); + } + mit_update_delay(&mit_delay, s->mac_reg[ITR]); + + if (mit_delay) { + s->mit_timer_on = 1; + timer_mod(s->mit_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + + mit_delay * 256); + } + s->mit_ide = 0; + } + } + + s->mit_irq_level = (pending_ints != 0); + qemu_set_irq(d->irq[0], s->mit_irq_level); +} + +static void +e1000_mit_timer(void *opaque) +{ + E1000State *s = opaque; + + s->mit_timer_on = 0; + /* Call set_interrupt_cause to update the irq level (if necessary). */ + set_interrupt_cause(s, 0, s->mac_reg[ICR]); } static void @@ -307,6 +376,10 @@ static void e1000_reset(void *opaque) int i; timer_del(d->autoneg_timer); + timer_del(d->mit_timer); + d->mit_timer_on = 0; + d->mit_irq_level = 0; + d->mit_ide = 0; memset(d->phy_reg, 0, sizeof d->phy_reg); memmove(d->phy_reg, phy_reg_init, sizeof phy_reg_init); memset(d->mac_reg, 0, sizeof d->mac_reg); @@ -572,6 +645,7 @@ process_tx_desc(E1000State *s, struct e1000_tx_desc *dp) struct e1000_context_desc *xp = (struct e1000_context_desc *)dp; struct e1000_tx *tp = &s->tx; + s->mit_ide |= (txd_lower & E1000_TXD_CMD_IDE); if (dtype == E1000_TXD_CMD_DEXT) { // context descriptor op = le32_to_cpu(xp->cmd_and_length); tp->ipcss = xp->lower_setup.ip_fields.ipcss; @@ -1047,7 +1121,8 @@ static uint32_t (*macreg_readops[])(E1000State *, int) = { getreg(TORL), getreg(TOTL), getreg(IMS), getreg(TCTL), getreg(RDH), getreg(RDT), getreg(VET), getreg(ICS), getreg(TDBAL), getreg(TDBAH), getreg(RDBAH), getreg(RDBAL), - getreg(TDLEN), getreg(RDLEN), + getreg(TDLEN), getreg(RDLEN), getreg(RDTR), getreg(RADV), + getreg(TADV), getreg(ITR), [TOTH] = mac_read_clr8, [TORH] = mac_read_clr8, [GPRC] = mac_read_clr4, [GPTC] = mac_read_clr4, [TPR] = mac_read_clr4, [TPT] = mac_read_clr4, @@ -1069,6 +1144,8 @@ static void (*macreg_writeops[])(E1000State *, int, uint32_t) = { [TDH] = set_16bit, [RDH] = set_16bit, [RDT] = set_rdt, [IMC] = set_imc, [IMS] = set_ims, [ICR] = set_icr, [EECD] = set_eecd, [RCTL] = set_rx_control, [CTRL] = set_ctrl, + [RDTR] = set_16bit, [RADV] = set_16bit, [TADV] = set_16bit, + [ITR] = set_16bit, [RA ... RA+31] = &mac_writereg, [MTA ... MTA+127] = &mac_writereg, [VFTA ... VFTA+127] = &mac_writereg, @@ -1150,6 +1227,11 @@ static void e1000_pre_save(void *opaque) E1000State *s = opaque; NetClientState *nc = qemu_get_queue(s->nic); + /* If the mitigation timer is active, emulate a timeout now. */ + if (s->mit_timer_on) { + e1000_mit_timer(s); + } + if (!(s->compat_flags & E1000_FLAG_AUTONEG)) { return; } @@ -1171,6 +1253,14 @@ static int e1000_post_load(void *opaque, int version_id) E1000State *s = opaque; NetClientState *nc = qemu_get_queue(s->nic); + if (!(s->compat_flags & E1000_FLAG_MIT)) { + s->mac_reg[ITR] = s->mac_reg[RDTR] = s->mac_reg[RADV] = + s->mac_reg[TADV] = 0; + s->mit_irq_level = false; + } + s->mit_ide = 0; + s->mit_timer_on = false; + /* nc.link_down can't be migrated, so infer link_down according * to link status bit in mac_reg[STATUS]. * Alternatively, restart link negotiation if it was in progress. */ @@ -1190,6 +1280,28 @@ static int e1000_post_load(void *opaque, int version_id) return 0; } +static bool e1000_mit_state_needed(void *opaque) +{ + E1000State *s = opaque; + + return s->compat_flags & E1000_FLAG_MIT; +} + +static const VMStateDescription vmstate_e1000_mit_state = { + .name = "e1000/mit_state", + .version_id = 1, + .minimum_version_id = 1, + .minimum_version_id_old = 1, + .fields = (VMStateField[]) { + VMSTATE_UINT32(mac_reg[RDTR], E1000State), + VMSTATE_UINT32(mac_reg[RADV], E1000State), + VMSTATE_UINT32(mac_reg[TADV], E1000State), + VMSTATE_UINT32(mac_reg[ITR], E1000State), + VMSTATE_BOOL(mit_irq_level, E1000State), + VMSTATE_END_OF_LIST() + } +}; + static const VMStateDescription vmstate_e1000 = { .name = "e1000", .version_id = 2, @@ -1267,6 +1379,14 @@ static const VMStateDescription vmstate_e1000 = { VMSTATE_UINT32_SUB_ARRAY(mac_reg, E1000State, MTA, 128), VMSTATE_UINT32_SUB_ARRAY(mac_reg, E1000State, VFTA, 128), VMSTATE_END_OF_LIST() + }, + .subsections = (VMStateSubsection[]) { + { + .vmsd = &vmstate_e1000_mit_state, + .needed = e1000_mit_state_needed, + }, { + /* empty */ + } } }; @@ -1316,6 +1436,8 @@ pci_e1000_uninit(PCIDevice *dev) timer_del(d->autoneg_timer); timer_free(d->autoneg_timer); + timer_del(d->mit_timer); + timer_free(d->mit_timer); memory_region_destroy(&d->mmio); memory_region_destroy(&d->io); qemu_del_nic(d->nic); @@ -1371,6 +1493,7 @@ static int pci_e1000_init(PCIDevice *pci_dev) add_boot_device_path(d->conf.bootindex, dev, "/ethernet-phy@0"); d->autoneg_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, e1000_autoneg_timer, d); + d->mit_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, e1000_mit_timer, d); return 0; } @@ -1385,6 +1508,8 @@ static Property e1000_properties[] = { DEFINE_NIC_PROPERTIES(E1000State, conf), DEFINE_PROP_BIT("autonegotiation", E1000State, compat_flags, E1000_FLAG_AUTONEG_BIT, true), + DEFINE_PROP_BIT("mitigation", E1000State, + compat_flags, E1000_FLAG_MIT_BIT, true), DEFINE_PROP_END_OF_LIST(), }; diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index f79d478..8b4dfae 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -216,7 +216,15 @@ void pvpanic_init(ISABus *bus); int e820_add_entry(uint64_t, uint64_t, uint32_t); +#define PC_COMPAT_1_6 \ + {\ + .driver = "e1000",\ + .property = "mitigation",\ + .value = "off",\ + } + #define PC_COMPAT_1_5 \ + PC_COMPAT_1_6, \ {\ .driver = "Conroe-" TYPE_X86_CPU,\ .property = "model",\ -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PULL 4/4] vmxnet3: Eliminate __packed redefined warning 2013-09-02 11:38 [Qemu-devel] [PULL 0/4] Net patches Stefan Hajnoczi ` (2 preceding siblings ...) 2013-09-02 11:38 ` [Qemu-devel] [PULL 3/4] e1000: add interrupt mitigation support Stefan Hajnoczi @ 2013-09-02 11:38 ` Stefan Hajnoczi 2013-09-05 18:38 ` [Qemu-devel] [PULL 0/4] Net patches Anthony Liguori 2013-09-05 19:49 ` Paolo Bonzini 5 siblings, 0 replies; 13+ messages in thread From: Stefan Hajnoczi @ 2013-09-02 11:38 UTC (permalink / raw) To: qemu-devel; +Cc: Anthony Liguori From: Brad Smith <brad@comstyle.com> This eliminates a warning about __packed being redefined as exposed by the vmxnet3 code. __packed is not used anywhere in the vmxnet3 code. CC hw/net/vmxnet3.o In file included from hw/net/vmxnet3.c:29: hw/net/vmxnet3.h:37:1: warning: "__packed" redefined In file included from /usr/include/stdlib.h:38, from /buildbot-qemu/default_openbsd_current/build/include/qemu-common.h:26, from /buildbot-qemu/default_openbsd_current/build/include/hw/hw.h:5, from hw/net/vmxnet3.c:18: /usr/include/sys/cdefs.h:209:1: warning: this is the location of the previous definition Signed-off-by: Brad Smith <brad@comstyle.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> --- hw/net/vmxnet3.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/net/vmxnet3.h b/hw/net/vmxnet3.h index 4eae7c7..f987d71 100644 --- a/hw/net/vmxnet3.h +++ b/hw/net/vmxnet3.h @@ -34,7 +34,6 @@ #define __le16 uint16_t #define __le32 uint32_t #define __le64 uint64_t -#define __packed QEMU_PACKED #if defined(HOST_WORDS_BIGENDIAN) #define __BIG_ENDIAN_BITFIELD @@ -749,7 +748,6 @@ struct Vmxnet3_DriverShared { #undef __le16 #undef __le32 #undef __le64 -#undef __packed #if defined(HOST_WORDS_BIGENDIAN) #undef __BIG_ENDIAN_BITFIELD #endif -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PULL 0/4] Net patches 2013-09-02 11:38 [Qemu-devel] [PULL 0/4] Net patches Stefan Hajnoczi ` (3 preceding siblings ...) 2013-09-02 11:38 ` [Qemu-devel] [PULL 4/4] vmxnet3: Eliminate __packed redefined warning Stefan Hajnoczi @ 2013-09-05 18:38 ` Anthony Liguori 2013-09-06 14:59 ` Stefan Hajnoczi 2013-09-05 19:49 ` Paolo Bonzini 5 siblings, 1 reply; 13+ messages in thread From: Anthony Liguori @ 2013-09-05 18:38 UTC (permalink / raw) To: Stefan Hajnoczi, qemu-devel Stefan Hajnoczi <stefanha@redhat.com> writes: > The following changes since commit 4ff78e0dbcd5c795962567fdc1b31e9e03c55b07: > > Merge remote-tracking branch 'luiz/queue/qmp' into staging (2013-08-30 12:26:04 -0500) > > are available in the git repository at: Sorry, I forgot to send you this feedback earlier. This conflicts badly with a pull request from Michael Tsirkin that I merged already. Can you rebase against master and resubmit? Thanks! Regards, Anthony Liguori > > > git://github.com/stefanha/qemu.git net > > for you to fetch changes up to e21f6f23606e90f5cc6df2d9b1d8b862b54d2796: > > vmxnet3: Eliminate __packed redefined warning (2013-09-02 13:35:50 +0200) > > ---------------------------------------------------------------- > Brad Smith (2): > tap: Use numbered tap/tun devices on all *BSD OS's > vmxnet3: Eliminate __packed redefined warning > > Jan Kiszka (1): > net: Rename send_queue to incoming_queue > > Vincenzo Maffione (1): > e1000: add interrupt mitigation support > > hw/i386/pc_piix.c | 18 ++++++- > hw/i386/pc_q35.c | 16 ++++++- > hw/net/e1000.c | 131 +++++++++++++++++++++++++++++++++++++++++++++++++-- > hw/net/vmxnet3.h | 2 - > include/hw/i386/pc.h | 8 ++++ > include/net/net.h | 2 +- > net/hub.c | 2 +- > net/net.c | 14 +++--- > net/tap-bsd.c | 11 ----- > 9 files changed, 176 insertions(+), 28 deletions(-) > > -- > 1.8.3.1 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PULL 0/4] Net patches 2013-09-05 18:38 ` [Qemu-devel] [PULL 0/4] Net patches Anthony Liguori @ 2013-09-06 14:59 ` Stefan Hajnoczi 0 siblings, 0 replies; 13+ messages in thread From: Stefan Hajnoczi @ 2013-09-06 14:59 UTC (permalink / raw) To: Anthony Liguori; +Cc: qemu-devel On Thu, Sep 05, 2013 at 01:38:23PM -0500, Anthony Liguori wrote: > Stefan Hajnoczi <stefanha@redhat.com> writes: > > > The following changes since commit 4ff78e0dbcd5c795962567fdc1b31e9e03c55b07: > > > > Merge remote-tracking branch 'luiz/queue/qmp' into staging (2013-08-30 12:26:04 -0500) > > > > are available in the git repository at: > > Sorry, I forgot to send you this feedback earlier. > > This conflicts badly with a pull request from Michael Tsirkin that I > merged already. Can you rebase against master and resubmit? Sure, will do. Stefan ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PULL 0/4] Net patches 2013-09-02 11:38 [Qemu-devel] [PULL 0/4] Net patches Stefan Hajnoczi ` (4 preceding siblings ...) 2013-09-05 18:38 ` [Qemu-devel] [PULL 0/4] Net patches Anthony Liguori @ 2013-09-05 19:49 ` Paolo Bonzini 2013-09-05 21:02 ` Aurelien Jarno 5 siblings, 1 reply; 13+ messages in thread From: Paolo Bonzini @ 2013-09-05 19:49 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: Aurelien Jarno, qemu-devel, Anthony Liguori Il 02/09/2013 13:38, Stefan Hajnoczi ha scritto: > The following changes since commit 4ff78e0dbcd5c795962567fdc1b31e9e03c55b07: > > Merge remote-tracking branch 'luiz/queue/qmp' into staging (2013-08-30 12:26:04 -0500) > > are available in the git repository at: > > > git://github.com/stefanha/qemu.git net > > for you to fetch changes up to e21f6f23606e90f5cc6df2d9b1d8b862b54d2796: > > vmxnet3: Eliminate __packed redefined warning (2013-09-02 13:35:50 +0200) Is Aurelien going to apply the ne2k patch himself? Paolo ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PULL 0/4] Net patches 2013-09-05 19:49 ` Paolo Bonzini @ 2013-09-05 21:02 ` Aurelien Jarno 2013-09-06 6:03 ` Paolo Bonzini 0 siblings, 1 reply; 13+ messages in thread From: Aurelien Jarno @ 2013-09-05 21:02 UTC (permalink / raw) To: Paolo Bonzini; +Cc: Anthony Liguori, qemu-devel, Stefan Hajnoczi On Thu, Sep 05, 2013 at 09:49:46PM +0200, Paolo Bonzini wrote: > Il 02/09/2013 13:38, Stefan Hajnoczi ha scritto: > > The following changes since commit 4ff78e0dbcd5c795962567fdc1b31e9e03c55b07: > > > > Merge remote-tracking branch 'luiz/queue/qmp' into staging (2013-08-30 12:26:04 -0500) > > > > are available in the git repository at: > > > > > > git://github.com/stefanha/qemu.git net > > > > for you to fetch changes up to e21f6f23606e90f5cc6df2d9b1d8b862b54d2796: > > > > vmxnet3: Eliminate __packed redefined warning (2013-09-02 13:35:50 +0200) > > Is Aurelien going to apply the ne2k patch himself? It would be nice if you can get the pcnet fix in your tree. For the ne2k patch, as reported it might break the non-PCI version. I have to look at that more in details, probably this week-end. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PULL 0/4] Net patches 2013-09-05 21:02 ` Aurelien Jarno @ 2013-09-06 6:03 ` Paolo Bonzini 2013-09-06 14:59 ` Stefan Hajnoczi 0 siblings, 1 reply; 13+ messages in thread From: Paolo Bonzini @ 2013-09-06 6:03 UTC (permalink / raw) To: Aurelien Jarno; +Cc: Stefan Hajnoczi, qemu-devel, Anthony Liguori Il 05/09/2013 23:02, Aurelien Jarno ha scritto: > It would be nice if you can get the pcnet fix in your tree. For the ne2k > patch, as reported it might break the non-PCI version. I have to look at > that more in details, probably this week-end. No, that's fine. The non-PCI version is also little endian. Paolo ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PULL 0/4] Net patches 2013-09-06 6:03 ` Paolo Bonzini @ 2013-09-06 14:59 ` Stefan Hajnoczi 2013-09-09 14:49 ` Aurelien Jarno 0 siblings, 1 reply; 13+ messages in thread From: Stefan Hajnoczi @ 2013-09-06 14:59 UTC (permalink / raw) To: Paolo Bonzini; +Cc: Anthony Liguori, Aurelien Jarno, qemu-devel On Fri, Sep 06, 2013 at 08:03:27AM +0200, Paolo Bonzini wrote: > Il 05/09/2013 23:02, Aurelien Jarno ha scritto: > > It would be nice if you can get the pcnet fix in your tree. For the ne2k > > patch, as reported it might break the non-PCI version. I have to look at > > that more in details, probably this week-end. > > No, that's fine. The non-PCI version is also little endian. Good. I just wanted confirmation because I'm not up-to-speed on device endianness. I'll merge the patch. Stefan ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PULL 0/4] Net patches 2013-09-06 14:59 ` Stefan Hajnoczi @ 2013-09-09 14:49 ` Aurelien Jarno 2013-09-10 7:49 ` Stefan Hajnoczi 0 siblings, 1 reply; 13+ messages in thread From: Aurelien Jarno @ 2013-09-09 14:49 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: Paolo Bonzini, qemu-devel, Anthony Liguori On Fri, Sep 06, 2013 at 04:59:06PM +0200, Stefan Hajnoczi wrote: > On Fri, Sep 06, 2013 at 08:03:27AM +0200, Paolo Bonzini wrote: > > Il 05/09/2013 23:02, Aurelien Jarno ha scritto: > > > It would be nice if you can get the pcnet fix in your tree. For the ne2k > > > patch, as reported it might break the non-PCI version. I have to look at > > > that more in details, probably this week-end. > > > > No, that's fine. The non-PCI version is also little endian. > > Good. I just wanted confirmation because I'm not up-to-speed on device > endianness. > > I'll merge the patch. > Thanks. Would it be possible to also merge the following patch: http://patchwork.ozlabs.org/patch/270487/ -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PULL 0/4] Net patches 2013-09-09 14:49 ` Aurelien Jarno @ 2013-09-10 7:49 ` Stefan Hajnoczi 0 siblings, 0 replies; 13+ messages in thread From: Stefan Hajnoczi @ 2013-09-10 7:49 UTC (permalink / raw) To: Aurelien Jarno Cc: Anthony Liguori, Paolo Bonzini, qemu-devel, Stefan Hajnoczi On Mon, Sep 09, 2013 at 04:49:06PM +0200, Aurelien Jarno wrote: > On Fri, Sep 06, 2013 at 04:59:06PM +0200, Stefan Hajnoczi wrote: > > On Fri, Sep 06, 2013 at 08:03:27AM +0200, Paolo Bonzini wrote: > > > Il 05/09/2013 23:02, Aurelien Jarno ha scritto: > > > > It would be nice if you can get the pcnet fix in your tree. For the ne2k > > > > patch, as reported it might break the non-PCI version. I have to look at > > > > that more in details, probably this week-end. > > > > > > No, that's fine. The non-PCI version is also little endian. > > > > Good. I just wanted confirmation because I'm not up-to-speed on device > > endianness. > > > > I'll merge the patch. > > > > Thanks. Would it be possible to also merge the following patch: > > http://patchwork.ozlabs.org/patch/270487/ Merged onto my net-next tree. I'll send a pull request at the end of the week. Stefan ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-09-10 7:49 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-09-02 11:38 [Qemu-devel] [PULL 0/4] Net patches Stefan Hajnoczi 2013-09-02 11:38 ` [Qemu-devel] [PULL 1/4] tap: Use numbered tap/tun devices on all *BSD OS's Stefan Hajnoczi 2013-09-02 11:38 ` [Qemu-devel] [PULL 2/4] net: Rename send_queue to incoming_queue Stefan Hajnoczi 2013-09-02 11:38 ` [Qemu-devel] [PULL 3/4] e1000: add interrupt mitigation support Stefan Hajnoczi 2013-09-02 11:38 ` [Qemu-devel] [PULL 4/4] vmxnet3: Eliminate __packed redefined warning Stefan Hajnoczi 2013-09-05 18:38 ` [Qemu-devel] [PULL 0/4] Net patches Anthony Liguori 2013-09-06 14:59 ` Stefan Hajnoczi 2013-09-05 19:49 ` Paolo Bonzini 2013-09-05 21:02 ` Aurelien Jarno 2013-09-06 6:03 ` Paolo Bonzini 2013-09-06 14:59 ` Stefan Hajnoczi 2013-09-09 14:49 ` Aurelien Jarno 2013-09-10 7:49 ` Stefan Hajnoczi
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).